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 /src/server.h | |
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 'src/server.h')
-rw-r--r-- | src/server.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h index 9e844e36c..cc2bcef25 100644 --- a/src/server.h +++ b/src/server.h @@ -270,7 +270,7 @@ public: void deleteParticleSpawner(const std::string &playername, u32 id); // Creates or resets inventory - Inventory* createDetachedInventory(const std::string &name); + Inventory* createDetachedInventory(const std::string &name, const std::string &player=""); // Envlock and conlock should be locked when using scriptapi GameScripting *getScriptIface(){ return m_script; } @@ -647,6 +647,8 @@ private: */ // key = name std::map<std::string, Inventory*> m_detached_inventories; + // value = "" (visible to all players) or player name + std::map<std::string, std::string> m_detached_inventories_player; DISABLE_CLASS_COPY(Server); }; |