diff --git a/quant.ew/files/src/perk_fns.lua b/quant.ew/files/src/perk_fns.lua index 7b94f27e..d6c4c332 100644 --- a/quant.ew/files/src/perk_fns.lua +++ b/quant.ew/files/src/perk_fns.lua @@ -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