dofile( "data/scripts/lib/utilities.lua" )

local entity_id = GetUpdatedEntityID()
local pos_x, pos_y, current_rotation = EntityGetTransform( entity_id )

local components = EntityGetComponent(entity_id, "LuaComponent")

local lua_components = {}

for key,comp_id in pairs(components) do 
    local var_name = ComponentGetValue( comp_id, "script_source_file" )

    if(var_name == "mods/spellbound_bundle/files/scripts/projectiles/bubble_projectiles_delayed_cast.lua")then
        table.insert(lua_components, comp_id)
    end
end

if(#lua_components > 1)then
    EntityRemoveComponent(entity_id, lua_components[2])
end