Page 1 of 1

Flashlight toggle help

Posted: Sun Aug 25, 2024 5:02 pm
by ariksu
might be not a correct forum, and I apologize for that. Some combination of mods screwed up my character's flashlight state, and it does not work at night anymore. Moreover, even if the attached save loaded without mods at all - the flashlight is still turned off at night (the save file time is late night, so it's easy to repro).

The cultprit I have in mind is the https://mods.factorio.com/mod/blueprint-sandboxes. It disables character with simultaneously transferring it to another surface, where no time is running. But I have no chance to validate it (tried to test that to no avail).

Could someone advice is it possible with some LUA code force turn the character flashlight on from the in-game console?
16_py_run3.zip
Save file to reproduce
(29.41 MiB) Downloaded 24 times

Re: Flashlight toggle help

Posted: Sun Aug 25, 2024 8:17 pm
by Stringweasel
You could try

Code: Select all

/c game.player.enable_flashlight()

Re: Flashlight toggle help

Posted: Mon Aug 26, 2024 6:49 am
by ariksu
Stringweasel wrote:
Sun Aug 25, 2024 8:17 pm
You could try

Code: Select all

/c game.player.enable_flashlight()
Thanks, this worked! I've found the enable_flashlight() somewhere, but could not find an object structure to execute it. Thank you so much!