Page 1 of 1

[Rseding91] Removing fluid from train via script doesn't reset inactivity

Posted: Sat Nov 07, 2020 9:58 am
by PFQNiet
Test setup: build a rail, a train stop, and a train with a cargo and fluid wagon. Send the train to the stop with "inactivity" set to like a minute.

Tests:
- With the cargo wagon selected...

Code: Select all

/c game.player.selected.insert{name="iron-plate",count=100}
The train's inactivity timer is reset correctly.

Code: Select all

/c game.player.selected.get_inventory(defines.inventory.cargo_wagon).remove{name="iron-plate",count=100}
The train's inactivity timer is reset correctly.

- With the fluid wagon selected...

Code: Select all

/c game.player.selected.insert_fluid{name="water",amount=100}
The train's inactivity timer is reset correctly.

Code: Select all

/c game.player.selected.remove_fluid{name="water",amount=100}
The train's inactivity timer is NOT reset.

Re: Removing fluid from train via script doesn't reset inactivity

Posted: Sat Nov 07, 2020 7:44 pm
by Rseding91
Thanks for the report. It's now fixed for 1.1.