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:
parent
2afbf25c36
commit
06e3bcef7c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user