Add custom entity field support

This commit is contained in:
Federico Cecchetto
2021-11-07 23:42:56 +01:00
parent 7526de9b76
commit eee68760e4
7 changed files with 176 additions and 37 deletions

View File

@ -2,6 +2,15 @@
namespace gsc
{
enum classid
{
entity,
hudelem,
pathnode,
node,
count
};
class function_args
{
public:
@ -34,4 +43,11 @@ namespace gsc
{
void add(const std::string& name, const script_method& func);
}
namespace field
{
void add(classid classnum, const std::string& name,
const std::function<scripting::script_value(unsigned int entnum)>& getter,
const std::function<void(unsigned int entnum, const scripting::script_value&)>& setter);
}
}