1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[CSM] Add minimap API modifiers (#5399)

* Rename Mapper (too generic) to Minimap
* Add lua functions to get/set position, angle, mode for minimap
* Client: rename m_mapper to m_minimap
* Add minimap to core.ui namespace (core.ui.minimap)
* Add various functions to manage minimap (show, hide, toggle_shape)
* Cleanup trivial declaration in client
This commit is contained in:
Loïc Blot 2017-03-16 10:34:54 +01:00 committed by GitHub
parent eb88e5dd4b
commit 40ce538aad
14 changed files with 349 additions and 53 deletions

View file

@ -49,7 +49,7 @@ struct MapDrawControl;
class MtEventManager;
struct PointedThing;
class Database;
class Mapper;
class Minimap;
struct MinimapMapblock;
class Camera;
class NetworkPacket;
@ -522,21 +522,17 @@ public:
void afterContentReceived(IrrlichtDevice *device);
float getRTT(void);
float getCurRate(void);
float getAvgRate(void);
float getRTT();
float getCurRate();
Mapper* getMapper ()
{ return m_mapper; }
void setCamera(Camera* camera)
{ m_camera = camera; }
Minimap* getMinimap() { return m_minimap; }
void setCamera(Camera* camera) { m_camera = camera; }
Camera* getCamera ()
{ return m_camera; }
bool isMinimapDisabledByServer()
{ return m_minimap_disabled_by_server; }
bool shouldShowMinimap() const;
void setMinimapShownByMod(bool state) { m_minimap_shown_by_mod = state; }
// IGameDef interface
virtual IItemDefManager* getItemDefManager();
@ -636,8 +632,9 @@ private:
con::Connection m_con;
IrrlichtDevice *m_device;
Camera *m_camera;
Mapper *m_mapper;
Minimap *m_minimap;
bool m_minimap_disabled_by_server;
bool m_minimap_shown_by_mod;
// Server serialization version
u8 m_server_ser_ver;