chore: added comments, removed unused world_state_override

This commit is contained in:
Sara 2024-03-30 23:03:12 +01:00
parent 87d2cbd727
commit 60df329d1b
2 changed files with 6 additions and 8 deletions

View file

@ -131,8 +131,6 @@ Vector<Ref<Action>> Planner::make_plan(Ref<Goal> goal) {
}
Variant Planner::get_world_property(StringName prop_key) {
if(world_state_override.has(prop_key))
return world_state_override.get(prop_key);
if(prop_key.begins_with("g_"))
return this->global_world_state->get_world_property(prop_key);
if(this->cached_world_state.has(prop_key))

View file

@ -58,13 +58,13 @@ public:
void set_actions(Array actions);
Array get_actions() const;
private:
CharacterActor *actor{nullptr};
WorldState world_state_override{};
WorldState cached_world_state{};
GlobalWorldState *global_world_state{nullptr};
Vector<Ref<Action>> actions{};
private:
CharacterActor *actor{nullptr}; // the parent actor of this planner
WorldState cached_world_state{}; // the cached worldstate, cleared for every make_plan call
GlobalWorldState *global_world_state{nullptr}; // cached singleton instance
// configured settings
Vector<Ref<Action>> actions{}; // available actions
};
struct PlannerNodeHasher {