#ifndef GOAP_ACTION_HPP #define GOAP_ACTION_HPP #include "state.hpp" #include #include #include #include #include #include namespace godot { class CharacterActor; } namespace godot::goap { typedef HashMap WorldState; typedef KeyValue WorldProperty; class Action : public Resource { GDCLASS(Action, Resource); static void _bind_methods(); public: void set_context_prerequisites(Dictionary dict); Dictionary get_context_prerequisites() const; void set_prerequisites(Dictionary dict); Dictionary get_prerequisites() const; void set_effects(Dictionary dict); Dictionary get_effects() const; void set_apply_state(Ref args); Ref get_apply_state() const; bool get_is_completed(CharacterActor *context); static Dictionary property_map_to_dict(WorldState const &props); static void dict_to_property_map(Dictionary const &dict, WorldState &out); public: WorldState context_prerequisites{}; WorldState prerequisites{}; WorldState effects{}; Ref apply_state{}; }; } #endif //!GOAP_ACTION_HPP