1
0
Fork 0
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:
sfan5 2024-08-11 13:34:03 +02:00
parent 387856a1c3
commit 7ae51382c8
7 changed files with 295 additions and 269 deletions

View file

@ -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);
};