mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Hide internal detached inventory functions (#14594)
This commit is contained in:
parent
c63c05b141
commit
a7bde8e523
@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
core.detached_inventories = {}
|
core.detached_inventories = {}
|
||||||
|
|
||||||
|
local create_detached_inventory_raw = core.create_detached_inventory_raw
|
||||||
|
core.create_detached_inventory_raw = nil
|
||||||
|
|
||||||
function core.create_detached_inventory(name, callbacks, player_name)
|
function core.create_detached_inventory(name, callbacks, player_name)
|
||||||
local stuff = {}
|
local stuff = {}
|
||||||
stuff.name = name
|
stuff.name = name
|
||||||
@ -15,10 +18,13 @@ function core.create_detached_inventory(name, callbacks, player_name)
|
|||||||
end
|
end
|
||||||
stuff.mod_origin = core.get_current_modname() or "??"
|
stuff.mod_origin = core.get_current_modname() or "??"
|
||||||
core.detached_inventories[name] = stuff
|
core.detached_inventories[name] = stuff
|
||||||
return core.create_detached_inventory_raw(name, player_name)
|
return create_detached_inventory_raw(name, player_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local remove_detached_inventory_raw = core.remove_detached_inventory_raw
|
||||||
|
core.remove_detached_inventory_raw = nil
|
||||||
|
|
||||||
function core.remove_detached_inventory(name)
|
function core.remove_detached_inventory(name)
|
||||||
core.detached_inventories[name] = nil
|
core.detached_inventories[name] = nil
|
||||||
return core.remove_detached_inventory_raw(name)
|
return remove_detached_inventory_raw(name)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user