Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: minecart-copystockpilelinks [DFHack lua script]  (Read 2280 times)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
minecart-copystockpilelinks [DFHack lua script]
« on: September 28, 2017, 06:52:43 am »

Bit of a speed challenge (bit over a hour with this post, could have gone faster >_>), decided to implement old idea: Have minecarts automatically add settings of any stockpiles you set them to take from.


What it does: If you're currently viewing a stop, sets it to take all things enabled in all the piles it is linked to take from to.
Why? To simplify placing minecart qsps with multiple or custom stockpile settings.

Convenient usage: Place
keybinding add S@dwarfmode/Hauling/DefineStop minecart-copystockpilelinks
in dfhack.init
and save the code into /hacks/scripts as text file ending in .lua.

Tested in DFHack 43.05-r2, 43.03-r1, 42.06-r1.

E: Forgot that I removed case for ==1 links which caused script to not work on single link due not matching case of >1 links.
« Last Edit: September 28, 2017, 09:03:46 am by Fleeting Frames »
Logged