Jump to content

JuryOfYourFears

Member
  • Posts

    2
  • Joined

  • Last visited

JuryOfYourFears's Achievements

  1. For posterity, this is what I ended up with: function ISPlumbHelperCursor2:isValid(square) local x,y,z = square:getX(),square:getY(),square:getZ()-1 local squareA = getCell():getGridSquare(x, y, z) if not squareA then return false end local objects = squareA:getObjects() for index=0, objects:size()-1 do local object = objects:get(index) if (object:hasModData() and object:getModData().canBeWaterPiped) or (instanceof(object, "IsoObject") and object:getSprite() and object:getSprite():getProperties() and object:getSprite():getProperties():Is(IsoFlagType.waterPiped)) then return true end end return false end
  2. function ISPlumbHelperCursor2:isValid(square) local objects = square:getObjects() for index=0, objects:size()-1 do local object = objects:get(index) if object:hasModData() and object:getModData().canBeWaterPiped then return true end end return false end This is finding the objects (things that can be plumbed) but I need to check one floor down and I'm still learning, so I've kind of hit a wall here. Any advice is appreciated!
×
×
  • Create New...