diff options
author | Pierre-Yves Rollo <dev@pyrollo.com> | 2020-10-04 15:24:29 +0200 |
---|---|---|
committer | SmallJoker <mk939@ymail.com> | 2020-10-04 15:24:34 +0200 |
commit | 81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04 (patch) | |
tree | 0f1c256eb6f24eb95df60804d9db82cead0f91e2 /src/server.h | |
parent | 3068853e8a58ccc7370a5ce977c08223601c497a (diff) | |
download | minetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.tar.gz minetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.tar.bz2 minetest-81c66d6efb9fb0ab8a03b40e2bc22aa49eff9a04.zip |
Minimap as HUD element with API control
Features:
* Define Minimap available modes (surface/radar, scale) from Lua, using player:set_minimap_modes()
* New HUD elements for displaying minimap with custom size and placing
* New minimap mode for displaying a texture instead of the map
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h index 258d75eaf..4b3ac5cf7 100644 --- a/src/server.h +++ b/src/server.h @@ -118,6 +118,14 @@ struct ServerPlayingSound std::unordered_set<session_t> clients; // peer ids }; +struct MinimapMode { + MinimapType type = MINIMAP_TYPE_OFF; + std::string label; + u16 size = 0; + std::string texture; + u16 scale = 1; +}; + class Server : public con::PeerHandler, public MapEventReceiver, public IGameDef { @@ -331,6 +339,10 @@ public: void SendPlayerSpeed(session_t peer_id, const v3f &added_vel); void SendPlayerFov(session_t peer_id); + void SendMinimapModes(session_t peer_id, + std::vector<MinimapMode> &modes, + size_t wanted_mode); + void sendDetachedInventories(session_t peer_id, bool incremental); virtual bool registerModStorage(ModMetadata *storage); |