diff options
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
-rw-r--r-- | modules/gdscript/gd_functions.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index f789493ae8..0d11734bbd 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -93,6 +93,7 @@ const char *GDFunctions::get_func_name(Function p_func) { "load", "inst2dict", "dict2inst", + "hash", "print_stack", }; @@ -864,6 +865,12 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va r_ret = gdscr->_new(NULL,0,r_error); } break; + case HASH: { + + VALIDATE_ARG_COUNT(1); + r_ret=p_args[0]->hash(); + + } break; case PRINT_STACK: { @@ -1238,6 +1245,12 @@ MethodInfo GDFunctions::get_info(Function p_func) { mi.return_val.type=Variant::OBJECT; return mi; } break; + case HASH: { + + MethodInfo mi("hash",PropertyInfo(Variant::NIL,"var:var")); + mi.return_val.type=Variant::INT; + return mi; + } break; case PRINT_STACK: { MethodInfo mi("print_stack"); |