Fluids, Trains and Inactivity

Place to get help with not working mods / modding interface.
PFQNiet
Filter Inserter
Filter Inserter
Posts: 290
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Fluids, Trains and Inactivity

Post by PFQNiet »

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?
User avatar
NotRexButCaesar
Smart Inserter
Smart Inserter
Posts: 1133
Joined: Sun Feb 16, 2020 12:47 am
Contact:

Re: Fluids, Trains and Inactivity

Post by NotRexButCaesar »

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!
PFQNiet
Filter Inserter
Filter Inserter
Posts: 290
Joined: Sat Sep 05, 2020 7:48 pm
Contact:

Re: Fluids, Trains and Inactivity

Post by PFQNiet »

Huh, I just tested in vanilla with a simple:

Code: Select all

game.player.selected.insert_fluid{name="water",amount=100}
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.
Post Reply

Return to “Modding help”