1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2024-12-30 23:17:53 +02:00

Mtn v3 - fix spectate bug during final battle

This commit is contained in:
Gerkiz 2024-06-12 23:02:09 +02:00
parent 2afbf25c36
commit 06e3bcef7c

View File

@ -677,16 +677,12 @@ Gui.on_click(
end
local player = event.player
if not player or not player.valid then
return
end
if Public.get('final_battle') then
return player.print('Not possible during the final battle.', Color.warning)
end
if player.character and player.character.valid then
local success = Public.set_player_to_spectator(player)
if not player or not player.valid then
return
end
if player.character and player.character.valid then
local success = Public.set_player_to_spectator(player)
if success then
hide_all_gui(player)
end