summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/script.h
diff options
context:
space:
mode:
authoraunsane <aunsane@gmail.com>2018-05-20 21:10:10 +0300
committeraunsane <aunsane@gmail.com>2018-05-20 21:34:31 +0300
commita955d18f62f335f84e0926f351eb85d78224cba6 (patch)
tree7bd4d30040ec32bba5949dd2245cb68617fb4192 /plugins/MirLua/src/script.h
parent46363eef857b69761f1d6d28da5a53a954f76900 (diff)
MirLua: project reordering
Diffstat (limited to 'plugins/MirLua/src/script.h')
-rw-r--r--plugins/MirLua/src/script.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/plugins/MirLua/src/script.h b/plugins/MirLua/src/script.h
new file mode 100644
index 0000000000..8ff5b40600
--- /dev/null
+++ b/plugins/MirLua/src/script.h
@@ -0,0 +1,38 @@
+#pragma once
+
+class CMLuaScript : public CMLuaEnvironment
+{
+public:
+ enum Status
+ {
+ None,
+ Loaded,
+ Failed
+ };
+
+private:
+ Status status;
+ int unloadRef;
+
+ const wchar_t *fileName;
+ wchar_t filePath[MAX_PATH];
+
+ void Unload();
+
+public:
+ CMLuaScript(lua_State *L, const wchar_t *path);
+ CMLuaScript(const CMLuaScript &script);
+ ~CMLuaScript();
+
+ const wchar_t* GetFilePath() const;
+ const wchar_t* GetFileName() const;
+
+ bool IsEnabled();
+ void Enable();
+ void Disable();
+
+ Status GetStatus() const;
+
+ bool Load();
+ bool Reload();
+};