mirror of
https://github.com/Mestima/wanda.git
synced 2025-05-03 13:40:15 +00:00
on character dead crash fix (function rewrite)
This commit is contained in:
parent
633abca26f
commit
cda33a69c2
@ -5,24 +5,21 @@ local assets = {
|
|||||||
|
|
||||||
local prefabs = {}
|
local prefabs = {}
|
||||||
|
|
||||||
|
|
||||||
local function onopen(inst)
|
local function onopen(inst)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function onclose(inst)
|
local function onclose(inst)
|
||||||
--[[
|
local owner = inst and inst.components and inst.components.inventoryitem and inst.components.inventoryitem.owner or nil
|
||||||
local owner = inst.components.inventoryitem.owner
|
if owner ~= nil then
|
||||||
if owner then
|
local container = owner and owner.components and owner.components.inventory and owner.components.inventory:GetOverflowContainer() or nil
|
||||||
local container = owner.components.inventory:GetOverflowContainer()
|
if container ~= nil then
|
||||||
if container then
|
|
||||||
container:Open(owner)
|
container:Open(owner)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--]]
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ondropped(inst)
|
local function ondropped(inst)
|
||||||
if inst.components.container then
|
if inst.components.container ~= nil then
|
||||||
inst.components.container:Close()
|
inst.components.container:Close()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -61,7 +58,7 @@ local function fn()
|
|||||||
inst:AddComponent("container")
|
inst:AddComponent("container")
|
||||||
inst.components.container:WidgetSetup("pocketwatchpack")
|
inst.components.container:WidgetSetup("pocketwatchpack")
|
||||||
--inst.components.container.onopenfn = onopen
|
--inst.components.container.onopenfn = onopen
|
||||||
--inst.components.container.onclosefn = onclose
|
inst.components.container.onclosefn = onclose
|
||||||
|
|
||||||
MakeHauntableLaunchAndDropFirstItem(inst)
|
MakeHauntableLaunchAndDropFirstItem(inst)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user