Fix inv-entity old on_activate arguments
This commit is contained in:
parent
5d60bfe973
commit
5236edbedb
|
@ -100,7 +100,7 @@ function mcl_entity_invs.register_inv(entity_name,show_name,size,no_on_righclick
|
||||||
local old_oa = minetest.registered_entities[entity_name].on_activate
|
local old_oa = minetest.registered_entities[entity_name].on_activate
|
||||||
minetest.registered_entities[entity_name].on_activate = function(self,staticdata,dtime_s)
|
minetest.registered_entities[entity_name].on_activate = function(self,staticdata,dtime_s)
|
||||||
local r
|
local r
|
||||||
if old_oa then r=old_oa(self,clicker) end
|
if old_oa then r=old_oa(self,staticdata,dtime_s) end
|
||||||
local d = minetest.deserialize(staticdata)
|
local d = minetest.deserialize(staticdata)
|
||||||
if type(d) == "table" and d._inv_id then
|
if type(d) == "table" and d._inv_id then
|
||||||
self._inv_id = d._inv_id
|
self._inv_id = d._inv_id
|
||||||
|
@ -143,9 +143,9 @@ function mcl_entity_invs.register_inv(entity_name,show_name,size,no_on_righclick
|
||||||
end
|
end
|
||||||
|
|
||||||
local old_od = minetest.registered_entities[entity_name].on_death
|
local old_od = minetest.registered_entities[entity_name].on_death
|
||||||
minetest.registered_entities[entity_name].on_death = function(self,clicker)
|
minetest.registered_entities[entity_name].on_death = function(self,killer)
|
||||||
drop_inv(self)
|
drop_inv(self)
|
||||||
minetest.remove_detached_inventory(self._inv_id)
|
minetest.remove_detached_inventory(self._inv_id)
|
||||||
if old_od then return old_od(self,clicker) end
|
if old_od then return old_od(self,killer) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user