mirror of
https://github.com/IntQuant/noita_entangled_worlds.git
synced 2025-10-19 07:03:16 +00:00
Add perk-related particles to clients.
This commit is contained in:
parent
155a2f0988
commit
4a61bffa9b
1 changed files with 14 additions and 0 deletions
|
@ -38,8 +38,22 @@ local function give_one_perk(entity_who_picked, perk_info, count)
|
|||
end
|
||||
|
||||
if perk_info.func ~= nil then
|
||||
GamePrint(count)
|
||||
perk_info.func( 0, entity_who_picked, "", count )
|
||||
end
|
||||
|
||||
local no_remove = perk_info.do_not_remove or false
|
||||
|
||||
-- particle effect only applied once
|
||||
if perk_info.particle_effect ~= nil and ( count <= 1 ) then
|
||||
local particle_id = EntityLoad( "data/entities/particles/perks/" .. perk_info.particle_effect .. ".xml" )
|
||||
|
||||
if ( no_remove == false ) then
|
||||
EntityAddTag( particle_id, "perk_entity" )
|
||||
end
|
||||
|
||||
EntityAddChild( entity_who_picked, particle_id )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue