minor refactor

This commit is contained in:
MihailRis
2024-04-10 19:55:03 +03:00
parent 252e9f0d19
commit c8ca56fb8e
16 changed files with 51 additions and 30 deletions
+19
View File
@@ -0,0 +1,19 @@
#ifndef LOGIC_SCRIPTING_ENVIRONMENT_H_
#define LOGIC_SCRIPTING_ENVIRONMENT_H_
namespace scripting {
/// @brief Lua environment wrapper for automatic deletion
class Environment {
int env;
public:
Environment(int env);
~Environment();
int getId() const;
// @brief Release namespace control
void release();
};
}
#endif // LOGIC_SCRIPTING_ENVIRONMENT_H_
+1
View File
@@ -17,6 +17,7 @@
#include "../../logic/LevelController.h"
#include "../../frontend/UiDocument.h"
#include "../../engine.h"
#include "Environment.h"
#include "lua/LuaState.h"
#include "../../util/stringutil.h"
#include "../../util/timeutil.h"
+1 -12
View File
@@ -33,18 +33,7 @@ namespace scripting {
extern BlocksController* blocks;
extern LevelController* controller;
/// @brief Lua environment wrapper for automatic deletion
class Environment {
int env;
public:
Environment(int env);
~Environment();
int getId() const;
// @brief Release namespace control
void release();
};
class Environment;
void initialize(Engine* engine);