Okay so I have modded a building that loads stuff into a parked train. For solid items, this works great as every time the script transfers a stack into the train, it resets the train's "inactivity" timer. However, for fluids, a change in the fluid wagon's contents does not seem to be resetting the train's inactivity.
Is there any way to intentionally trigger the train's inactivity timer through script, or should I be making an interface request/bug report about this?
Fluids, Trains and Inactivity
- NotRexButCaesar
- Smart Inserter
- Posts: 1133
- Joined: Sun Feb 16, 2020 12:47 am
- Contact:
Re: Fluids, Trains and Inactivity
Changing the fluid wagon contents should definitely trigger the inactivity. that sounds like a bug. As for manually triggering the inactivity condition, you can use the circuit network and "send to train".
Ⅲ—Crevez, chiens, si vous n'étes pas contents!
Re: Fluids, Trains and Inactivity
Huh, I just tested in vanilla with a simple:
And the inactivity timer reset just fine. So something's wrong with my mod code. Time for debugging my own problems!
EDIT: nvm, it works now. I must've done something else wrong and accidentally fixed it or something LOL
EDIT2: Found it. Inserting stuff into the train works, removing it does not.
Code: Select all
game.player.selected.insert_fluid{name="water",amount=100}
EDIT: nvm, it works now. I must've done something else wrong and accidentally fixed it or something LOL
EDIT2: Found it. Inserting stuff into the train works, removing it does not.