mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Refactor ABM/LBM related code
This commit is contained in:
parent
387856a1c3
commit
7ae51382c8
7 changed files with 295 additions and 269 deletions
|
@ -55,5 +55,19 @@ public:
|
|||
// Determines whether there are any on_mapblocks_changed callbacks
|
||||
bool has_on_mapblocks_changed();
|
||||
|
||||
// Initializes environment and loads some definitions from Lua
|
||||
void initializeEnvironment(ServerEnvironment *env);
|
||||
|
||||
void triggerABM(int id, v3s16 p, MapNode n,
|
||||
u32 active_object_count, u32 active_object_count_wider);
|
||||
|
||||
void triggerLBM(int id, v3s16 p, MapNode n, float dtime_s);
|
||||
|
||||
private:
|
||||
void readABMs();
|
||||
|
||||
void readLBMs();
|
||||
|
||||
// Reads a single or a list of node names into a vector
|
||||
static bool read_nodenames(lua_State *L, int idx, std::vector<std::string> &to);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue