mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-11 04:56:49 +03:00
Move all scripting header files into new folder.
This commit is contained in:
parent
4ab4595f3a
commit
8c82eed3d2
29 changed files with 0 additions and 0 deletions
13
Scripting/Include/ScriptUtil.h
Normal file
13
Scripting/Include/ScriptUtil.h
Normal file
|
@ -0,0 +1,13 @@
|
|||
#pragma once
|
||||
#define index_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE & item, sol::object key) \
|
||||
{ \
|
||||
std::string err = "Attempted to read non-existant var \"" + key.as<std::string>() + "\" from " + LUA_CLASS_NAME; \
|
||||
ScriptAssert(false, err);\
|
||||
}
|
||||
|
||||
#define newindex_error_maker(CPP_TYPE, LUA_CLASS_NAME) [](CPP_TYPE & item, sol::object key) \
|
||||
{ \
|
||||
std::string err = "Attempted to set non-existant var \"" + key.as<std::string>() + "\" of " + LUA_CLASS_NAME; \
|
||||
ScriptAssert(false, err);\
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue