summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/script.h
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/script.h')
-rw-r--r--plugins/MirLua/src/script.h33
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();
};