diff options
author | sfan5 <sfan5@live.de> | 2016-11-26 17:35:25 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2016-11-28 13:41:19 +0100 |
commit | c38985825f299999135cc01aaf0052ec9138135a (patch) | |
tree | c54db1b2f7e8a27dd5c1d693c6e0ee92386271b9 /builtin/game | |
parent | 2fe3bf5a18eb9aa9f38654b3c0a0729c42408cd6 (diff) | |
download | minetest-c38985825f299999135cc01aaf0052ec9138135a.tar.gz minetest-c38985825f299999135cc01aaf0052ec9138135a.tar.bz2 minetest-c38985825f299999135cc01aaf0052ec9138135a.zip |
Allow restricting detached inventories to one player
This combats the problem of sending the hundreds of
"creative" / "armor" or whatever detached invs that
exist on popular servers to each and every player
on join or on change of said invs.
Diffstat (limited to 'builtin/game')
-rw-r--r-- | builtin/game/detached_inventory.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/game/detached_inventory.lua b/builtin/game/detached_inventory.lua index b5d106b04..420e89ff2 100644 --- a/builtin/game/detached_inventory.lua +++ b/builtin/game/detached_inventory.lua @@ -2,7 +2,7 @@ core.detached_inventories = {} -function core.create_detached_inventory(name, callbacks) +function core.create_detached_inventory(name, callbacks, player_name) local stuff = {} stuff.name = name if callbacks then @@ -15,6 +15,6 @@ function core.create_detached_inventory(name, callbacks) end stuff.mod_origin = core.get_current_modname() or "??" core.detached_inventories[name] = stuff - return core.create_detached_inventory_raw(name) + return core.create_detached_inventory_raw(name, player_name) end |