Flashlight toggle help

Place to get help with not working mods / modding interface.
Post Reply
ariksu
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jun 15, 2024 9:59 am
Contact:

Flashlight toggle help

Post 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 18 times

User avatar
Stringweasel
Filter Inserter
Filter Inserter
Posts: 367
Joined: Thu Apr 27, 2017 8:22 pm
Contact:

Re: Flashlight toggle help

Post by Stringweasel »

You could try

Code: Select all

/c game.player.enable_flashlight()
Alt-F4 Author | Factorio Modder
My Mods: Hall of Fame | Better Victory Screen | Fluidic Power | Biter Power | Space Spidertron | Spidertron Dock | Weasel's Demolition Derby
Official Contributor to Space Exploration

ariksu
Manual Inserter
Manual Inserter
Posts: 3
Joined: Sat Jun 15, 2024 9:59 am
Contact:

Re: Flashlight toggle help

Post 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!

Post Reply

Return to “Modding help”