[0.17.14] 'custom-input' event don't fire while in spectator mode

Place to get help with not working mods / modding interface.
Post Reply
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

[0.17.14] 'custom-input' event don't fire while in spectator mode

Post by Earendel »

While in spectator mode (defines.controllers.spectator), custom input events don't fire.

This might be desirable if all input events were exclusively game-world-affecting but that is always the case, they can be navigation-based too.

I need a player in spectator mode to be able to use shortcuts as it's critical to multi-surface navigation.

If the event were to fire the event handler has access to the player, so it can make the call whether to execute the normal code based on the controller mode.

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5150
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.17.14] 'custom-input' event don't fire while in spectator mode

Post by Klonan »

Set the prototype flag:
`enabled_while_spectating = true`

Moving to modding help

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [0.17.14] 'custom-input' event don't fire while in spectator mode

Post by Earendel »

Wow, already thought of.

Thanks.

Post Reply

Return to “Modding help”