mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
[CSM] Add core.get_timeofday & core.get_day_count env calls (#5401)
* [CSM] Add core.get_timeofday & core.get_day_count env calls * [CSM] Add core.get_node_level, core.get_node_max_level, core.find_node_near
This commit is contained in:
parent
b52f3005c3
commit
0891975ad6
13 changed files with 67 additions and 25 deletions
|
@ -40,13 +40,14 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||
#include "threading/atomic.h"
|
||||
#include "network/networkprotocol.h" // for AccessDeniedCode
|
||||
|
||||
class IGameDef;
|
||||
class Map;
|
||||
|
||||
class Environment
|
||||
{
|
||||
public:
|
||||
// Environment will delete the map passed to the constructor
|
||||
Environment();
|
||||
Environment(IGameDef *gamedef);
|
||||
virtual ~Environment();
|
||||
|
||||
/*
|
||||
|
@ -77,6 +78,7 @@ public:
|
|||
// counter used internally when triggering ABMs
|
||||
u32 m_added_objects;
|
||||
|
||||
IGameDef* getGameDef() { return m_gamedef; }
|
||||
protected:
|
||||
GenericAtomic<float> m_time_of_day_speed;
|
||||
|
||||
|
@ -114,6 +116,7 @@ protected:
|
|||
float m_cache_abm_interval;
|
||||
float m_cache_nodetimer_interval;
|
||||
|
||||
IGameDef *m_gamedef;
|
||||
private:
|
||||
Mutex m_time_lock;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue