This commit is contained in:
2026-06-30 13:54:37 +09:00
parent cde4e7522a
commit 04fdc17b8d
2 changed files with 9 additions and 4 deletions
+27
View File
@@ -0,0 +1,27 @@
local main = {}
function main.toggle(event)
if event.prototype_name ~= 'phi-cl-toggle-editor' then
return
end
local player = game.players[event.player_index]
if player.permission_group and not player.permission_group.allows_action(defines.input_action.toggle_map_editor) then
return
end
if not player.admin then
return
end
player.toggle_map_editor()
end
function main.toggle_editor(event)
local player = game.players[event.player_index]
player.set_shortcut_toggled('phi-cl-toggle-editor', player.physical_controller_type == defines.controllers.editor)
game.tick_paused = false
end
return main