mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 15:13:16 +00:00
fix karl dying :(
This commit is contained in:
parent
d3023add3a
commit
03b639276b
1 changed files with 19 additions and 0 deletions
19
quant.ew/data/scripts/buildings/racing_cart_check.lua
Normal file
19
quant.ew/data/scripts/buildings/racing_cart_check.lua
Normal file
|
@ -0,0 +1,19 @@
|
|||
dofile_once( "data/scripts/lib/utilities.lua" )
|
||||
|
||||
local entity_id = GetUpdatedEntityID()
|
||||
local x, y = EntityGetTransform( entity_id )
|
||||
|
||||
local targets = EntityGetInRadiusWithTag( x, y, 20, "small_friend" )
|
||||
if ( #targets > 0 ) then
|
||||
for i,t in ipairs( targets ) do
|
||||
if ( EntityHasTag( t, "polymorphed") == false ) and not EntityHasTag(t, "racing_cart") then
|
||||
EntityKill( t )
|
||||
|
||||
EntitySetComponentsWithTagEnabled( entity_id, "driver", true )
|
||||
EntitySetComponentsWithTagEnabled( entity_id, "driverless", false )
|
||||
|
||||
EntityAddTag( entity_id, "small_friend" )
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue