mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-05-10 04:26:42 +03:00
Move Color to Scripting.
This commit is contained in:
parent
416be03d95
commit
7c484d2510
11 changed files with 16 additions and 20 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