mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Also fix the game over message
This commit is contained in:
parent
6fab20f02f
commit
9e2820ba83
1 changed files with 13 additions and 4 deletions
|
@ -273,16 +273,25 @@ end
|
||||||
local function do_game_over(message)
|
local function do_game_over(message)
|
||||||
net.proxy_notify_game_over()
|
net.proxy_notify_game_over()
|
||||||
ctx.run_ended = true
|
ctx.run_ended = true
|
||||||
local damage_model = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "DamageModelComponent")
|
|
||||||
GameRemoveFlagRun("ew_flag_notplayer_active")
|
GameRemoveFlagRun("ew_flag_notplayer_active")
|
||||||
set_camera_free(true, ctx.my_player.entity)
|
set_camera_free(true, ctx.my_player.entity)
|
||||||
if damage_model ~= nil and #(EntityGetAllChildren(ctx.my_player.entity) or {}) ~= 0 then
|
|
||||||
|
if #(EntityGetAllChildren(ctx.my_player.entity) or {}) ~= 0 then
|
||||||
local ent = end_poly_effect(ctx.my_player.entity)
|
local ent = end_poly_effect(ctx.my_player.entity)
|
||||||
if ent ~= nil then
|
if ent ~= nil then
|
||||||
polymorph.switch_entity(ent)
|
polymorph.switch_entity(ent)
|
||||||
if ctx.my_player.entity ~= nil then
|
if ctx.my_player.entity ~= nil then
|
||||||
ComponentSetValue2(damage_model, "wait_for_kill_flag_on_death", false)
|
local stat_component = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "GameStatsComponent")
|
||||||
EntityInflictDamage(ctx.my_player.entity, 1000000, "DAMAGE_CURSE", message, "NONE", 0, 0, GameGetWorldStateEntity())
|
if stat_component ~= nil then
|
||||||
|
ComponentSetValue2(stat_component, "extra_death_msg", "")
|
||||||
|
print("extra_death_msg removed")
|
||||||
|
end
|
||||||
|
|
||||||
|
local damage_model = EntityGetFirstComponentIncludingDisabled(ctx.my_player.entity, "DamageModelComponent")
|
||||||
|
if damage_model ~= nil then
|
||||||
|
ComponentSetValue2(damage_model, "wait_for_kill_flag_on_death", false)
|
||||||
|
EntityInflictDamage(ctx.my_player.entity, 1000000, "DAMAGE_CURSE", message, "NONE", 0, 0, GameGetWorldStateEntity())
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue