1. Please be advised of a few specific rules and guidelines for this section.

RELEASED Multidirectional Drains 1.1 Update for SB 1.1.1

Place Drains in any direction, on any surface!

  1. Markelius

    Markelius Space Kumquat

    Markelius submitted a new mod:

    Multidirectional Drains - Place Drains in any direction, on any surface!

    Read more about this mod...
     
  2. Darkwhip

    Darkwhip Subatomic Cosmonaut

    Is it multiplayer friendly ?
     
  3. Markelius

    Markelius Space Kumquat

    It's multiplayer friendly the same way every other mod that adds new objects is, both the host and client(s) need to have the mod installed. Otherwise, placing the drains on a server without the mod installed will likely result in the drain dissapearing immediately.
     
  4. Darkwhip

    Darkwhip Subatomic Cosmonaut

    Well that's not the answer I was looking for but anyway. It does the job.
     
  5. Shadow Wolf TJC

    Shadow Wolf TJC Spaceman Spiff

    The mod's structure seems sloppy. You can cut down on the mod's size by taking out the following files:
    • drain.animation
    • drain.frames
    • drain.lua
    • drain.object
    • drain.png
    • drainicon.png
    Save for drain.object, they all seem completely unchanged from the default files, so they can be removed without affecting your mod's performance. As for drain.object, I'd advise using a .patch file instead.

    Here's how I'd design drain.object.patch:
    Code:
    [
    { "op": "remove", "path": "/animationParts" },
    { "op": "remove", "path": "/animationPosition" },
    {
      "op": "replace",
      "path": "/orientations",
      "value": [
      {
      "image" : "drain.png:<color>.off",
      "imagePosition" : [0, 0],
         
        "animationParts" : {
         "drain" : "drain.png"
      },
      "animationPosition" : [0, 0],
    
      "spaceScan" : 0.1,
      "anchors" : [ "bottom" ]
      },
      {
      "image" : "draintop.png:<color>.off",
      "imagePosition" : [0, 0],
         
        "animationParts" : {
         "drain" : "draintop.png"
      },
      "animationPosition" : [0, 0],
    
      "spaceScan" : 0.1,
      "anchors" : [ "top" ]
      },
      {
      "image" : "drainleft.png:<color>.off",
      "imagePosition" : [0, 0],
         
        "animationParts" : {
         "drain" : "drainleft.png"
      },
      "animationPosition" : [0, 0],
    
      "spaceScan" : 0.1,
      "anchors" : [ "left" ]
      },
      {
      "image" : "drainright.png:<color>.off",
      "imagePosition" : [0, 0],
         
        "animationParts" : {
         "drain" : "drainright.png"
      },
      "animationPosition" : [0, 0],
    
      "spaceScan" : 0.1,
      "anchors" : [ "right" ]
      },
      {
      "image" : "drainbg.png:<color>.off",
      "imagePosition" : [0, 0],
         
        "animationParts" : {
         "drain" : "drainbg.png"
      },
      "animationPosition" : [0, 0],
    
      "spaceScan" : 0.1,
      "anchors" : [ "background" ]
      }
      ]
    }
    ]
    It seemed as if all you did was modify the "orientations" node to add the additional "orientations" for the extra positions that the drain could be placed at, and move the "animationParts" and "animationPosition" to the new "orientation" indexes. Therefore, I applied a patch to remove the "animationParts" and "animationPosition" nodes, and replace the entire "orientations" array, with each index within the array being given the "animationParts" and "animationPosition" nodes.

    Alternatively, you could use this if you'd rather not want to risk conflicting with some other mod's attempts at adding new orientations (though honestly, who would want to do that for reasons other than the ones stated in your mod?):
    Code:
    [
    { "op": "remove", "path": "/animationParts" },
    { "op": "remove", "path": "/animationPosition" },
    { "op": "add", "path": "/orientations/0/animationParts", "value" : { "drain" : "drain.png" } },
    { "op": "add", "path": "/orientations/0/animationPosition", "value" : [0,0] },
    {
      "op": "add",
      "path": "/orientations/-",
      "value": {
          "image" : "draintop.png:<color>.off",
          "imagePosition" : [0, 0],
         
          "animationParts" : {
            "drain" : "draintop.png"
          },
          "animationPosition" : [0, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "top" ]
        }
    },
    {
      "op": "add",
      "path": "/orientations/-",
      "value": {
          "image" : "drainleft.png:<color>.off",
          "imagePosition" : [0, 0],
         
          "animationParts" : {
            "drain" : "drainleft.png"
          },
          "animationPosition" : [0, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "left" ]
        }
    },
    {
      "op": "add",
      "path": "/orientations/-",
      "value": {
          "image" : "drainright.png:<color>.off",
          "imagePosition" : [0, 0],
         
          "animationParts" : {
            "drain" : "drainright.png"
          },
          "animationPosition" : [0, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "right" ]
        }
    },
    {
      "op": "add",
      "path": "/orientations/-",
      "value": {
          "image" : "drainbg.png:<color>.off",
          "imagePosition" : [0, 0],
         
          "animationParts" : {
            "drain" : "drainbg.png"
          },
          "animationPosition" : [0, 0],
    
          "spaceScan" : 0.1,
          "anchors" : [ "background" ]
        }
    }
    ]
    Other than this, looks like a neat little mod. ;)
     
  6. GoldenstarArtist

    GoldenstarArtist Cosmic Narwhal

    Any news on whether this mod will be compatible with the upcoming July 22nd 1.0 update?

    Suggestion: Adding more colors/kinds of drains?
     
  7. Markelius

    Markelius Space Kumquat

Share This Page