#pragma once #include "game/game.hpp" #include "entity.hpp" #include "array.hpp" #include "script_value.hpp" namespace scripting { script_value call_function(const std::string& name, const std::vector& arguments); script_value call_function(const std::string& name, const entity& entity, const std::vector& arguments); template T call(const std::string& name, const std::vector& arguments = {}); template <> script_value call(const std::string& name, const std::vector& arguments); template T call(const std::string& name, const std::vector& arguments) { return call(name, arguments).as(); } script_value exec_ent_thread(const entity& entity, const char* pos, const std::vector& arguments); const char* get_function_pos(const std::string& filename, const std::string& function); script_value call_script_function(const entity& entity, const std::string& filename, const std::string& function, const std::vector& arguments); void clear_entity_fields(const entity& entity); void clear_custom_fields(); void set_entity_field(const entity& entity, const std::string& field, const script_value& value); script_value get_entity_field(const entity& entity, const std::string& field); void notify(const entity& entity, const std::string& event, const std::vector& arguments); unsigned int make_array(); }