[Rseding91] Removing fluid from train via script doesn't reset inactivity
Posted: Sat Nov 07, 2020 9:58 am
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...
The train's inactivity timer is reset correctly.
The train's inactivity timer is reset correctly.
- With the fluid wagon selected...
The train's inactivity timer is reset correctly.
The train's inactivity timer is NOT reset.
Tests:
- With the cargo wagon selected...
Code: Select all
/c game.player.selected.insert{name="iron-plate",count=100}
Code: Select all
/c game.player.selected.get_inventory(defines.inventory.cargo_wagon).remove{name="iron-plate",count=100}
- With the fluid wagon selected...
Code: Select all
/c game.player.selected.insert_fluid{name="water",amount=100}
Code: Select all
/c game.player.selected.remove_fluid{name="water",amount=100}