mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
27 lines
864 B
Lua
27 lines
864 B
Lua
![]() |
dofile_once("data/scripts/lib/utilities.lua")
|
||
|
|
||
|
function spawn_leggy( entity_item )
|
||
|
if not GameHasFlagRun("ew_flag_this_is_host") then
|
||
|
return
|
||
|
end
|
||
|
local x, y = EntityGetTransform( entity_item )
|
||
|
EntityLoad( "data/entities/particles/polymorph_explosion.xml", x, y )
|
||
|
GamePlaySound( "data/audio/Desktop/game_effect.bank", "game_effect/polymorph/create", x, y );
|
||
|
EntityLoad( "data/entities/animals/chest_leggy.xml", x, y )
|
||
|
EntityKill( entity_item )
|
||
|
end
|
||
|
|
||
|
function item_pickup( entity_item, entity_who_picked, name )
|
||
|
spawn_leggy( entity_item )
|
||
|
|
||
|
end
|
||
|
|
||
|
function physics_body_modified( is_destroyed )
|
||
|
local entity_item = GetUpdatedEntityID()
|
||
|
spawn_leggy( entity_item )
|
||
|
end
|
||
|
|
||
|
function collision_trigger( colliding_entity_id )
|
||
|
local entity_item = GetUpdatedEntityID()
|
||
|
spawn_leggy( entity_item )
|
||
|
end
|