[1.0.0] is_shortcut_toggled always returns false for built-in shortcuts
Posted: Mon Nov 16, 2020 10:51 am
What?
It seems impossible to detect the status of 'toggle-alt-mode' or 'toggle-personal-roboport'.
So what?
I'd like to show some extra info to the player when they have both of these enabled, but the api seems to have no access to them. LuaPlayer.is_shortcut_toggled('toggle-alt-mode') also always returns "false". Presumably because they're not "custom" shortcuts, but it's highly misleading to have a function respond with a wrong answer if it's not supposed to work at all for that purpose.
Regarding alt mod there's even an event on_player_toggled_alt_mode. But it doesn't tell me what the new state is either. So either i'm missing something blatantly obvious or the whole event is pointless.
It seems impossible to detect the status of 'toggle-alt-mode' or 'toggle-personal-roboport'.
So what?
I'd like to show some extra info to the player when they have both of these enabled, but the api seems to have no access to them. LuaPlayer.is_shortcut_toggled('toggle-alt-mode') also always returns "false". Presumably because they're not "custom" shortcuts, but it's highly misleading to have a function respond with a wrong answer if it's not supposed to work at all for that purpose.
Regarding alt mod there's even an event on_player_toggled_alt_mode. But it doesn't tell me what the new state is either. So either i'm missing something blatantly obvious or the whole event is pointless.