From 8b9c7359b21952be4b6adc452e7e8865265e0840 Mon Sep 17 00:00:00 2001 From: amazliah Date: Sun, 17 Dec 2023 10:11:03 +0200 Subject: [PATCH] eariest status is removed fix --- scripts/agents/agent_2d.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/agents/agent_2d.gd b/scripts/agents/agent_2d.gd index e11e980..5d63363 100644 --- a/scripts/agents/agent_2d.gd +++ b/scripts/agents/agent_2d.gd @@ -86,7 +86,7 @@ func give_status(status: AgentStatus) -> void: print(name, " already has this status, ignoring") return if len(statuses) >= max_status_count: - var status_to_remove = statuses.pop_back() + var status_to_remove = statuses.pop_front() print(name, " has too many statuses, removing last status") if status_to_remove.has_method("on_status_ended"): status_to_remove.on_status_ended(self)