diff options
author | aunsane <aunsane@gmail.com> | 2018-06-13 21:06:38 +0300 |
---|---|---|
committer | aunsane <aunsane@gmail.com> | 2018-06-15 20:43:41 +0300 |
commit | 3d95ec897aba52663e8aa919bb8dd9eed5f74dbc (patch) | |
tree | 7428bcc4d8ad95c2a7ef78990db58707fbb108ef /plugins/MirLua/src/script.h | |
parent | a183cb3bb45cfd3e59e0220b71dba7fa10d0e358 (diff) |
MirLua:
- Lua engine moved to separate class
- added ability to compile scripts
- renamed script enable setting name
- version bump
Diffstat (limited to 'plugins/MirLua/src/script.h')
-rw-r--r-- | plugins/MirLua/src/script.h | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/plugins/MirLua/src/script.h b/plugins/MirLua/src/script.h index 2caf88c925..383bac1190 100644 --- a/plugins/MirLua/src/script.h +++ b/plugins/MirLua/src/script.h @@ -1,21 +1,20 @@ #pragma once
-class CMLuaScript : public CMLuaEnvironment
+enum class ScriptStatus
{
-public:
- enum Status
- {
- None,
- Loaded,
- Failed
- };
+ None,
+ Loaded,
+ Failed,
+};
+class CMLuaScript : public CMLuaEnvironment
+{
private:
- Status status;
- int unloadRef;
-
- const wchar_t *fileName;
+ wchar_t *scriptName;
wchar_t filePath[MAX_PATH];
+ bool isBinary;
+ ScriptStatus status;
+ int unloadRef;
public:
CMLuaScript(lua_State *L, const wchar_t *path);
@@ -23,16 +22,20 @@ public: ~CMLuaScript();
const wchar_t* GetFilePath() const;
- const wchar_t* GetFileName() const;
+ const wchar_t* GetName() const;
- bool IsEnabled();
+ bool IsBinary() const;
+
+ bool IsEnabled() const;
void Enable();
void Disable();
- Status GetStatus() const;
+ ScriptStatus GetStatus() const;
int Load() override;
int Unload() override;
bool Reload();
+
+ bool Compile();
};
|