Personal roboport blacklist

Place to get help with not working mods / modding interface.
SmotPokin42000
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Mar 18, 2016 12:49 pm
Contact:

Personal roboport blacklist

Post by SmotPokin42000 »

Ok, so I'm trying to make a mod to keep construction bots from grabbing items from chests marked for deconstruction, but I'm new to this and I'm not sure how to make this work.

Code: Select all

script.on_event({defines.events.on_robot_pre_mined},
   function
      game.print("A bot is about to mine an entity"..event.tick)
      if event.entity = ("container", "logistic-container")
         then event.robot 
      end
   end
)
So I have an idea of how to find decon'ed chests, but not how differentiate those from ones in range of the player or ones in range of a fixed roboport. I also no idea on how to stop the robot in question.
Any help would be appreciated.
Post Reply

Return to “Modding help”