mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
Fix perk.lua override
This commit is contained in:
parent
b4a0b26dfd
commit
bb6fb51ef9
@ -17,7 +17,7 @@ local oldPerkSpawn = perk_spawn
|
||||
---@param y number
|
||||
---@param perkID integer
|
||||
---@param dontRemoveOtherPerks boolean
|
||||
---@return NoitaEntity|nil
|
||||
---@return number|nil
|
||||
function perk_spawn(x, y, perkID, dontRemoveOtherPerks)
|
||||
local entity = EntityAPI.Wrap(oldPerkSpawn(x, y, perkID, dontRemoveOtherPerks))
|
||||
if entity == nil then return end
|
||||
@ -27,4 +27,6 @@ function perk_spawn(x, y, perkID, dontRemoveOtherPerks)
|
||||
for _, component in ipairs(components) do
|
||||
entity:RemoveComponent(component)
|
||||
end
|
||||
|
||||
return entity.ID
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user