mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Added ability to attach Lua/MapScript callbacks to a trigger. Can be set to work with complex trigger actions.
Added scripts path to Lua so that Lua can find scripts within scripts/
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
// MapScript.h
|
||||
//
|
||||
|
||||
#ifndef MAPSCRIPT_H
|
||||
#define MAPSCRIPT_H
|
||||
|
||||
// Lua is written in C, so compiler needs to know how to link its libraries
|
||||
extern "C" {
|
||||
# include "lua.h"
|
||||
@@ -15,6 +18,8 @@ class MapScript {
|
||||
public:
|
||||
bool Init(const char* mapName);
|
||||
void CallFunction(const char* functionName);
|
||||
void SetLuaPath(const char* input_path);
|
||||
private:
|
||||
lua_State* L;
|
||||
};
|
||||
#endif
|
||||
Reference in New Issue
Block a user