Skip to content

Commit

Permalink
give bug of duplicate status
Browse files Browse the repository at this point in the history
  • Loading branch information
AmitaiMazliah committed Jan 9, 2024
1 parent 21a5b1e commit 4053e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/agents/agent_2d.gd
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func die() -> void:
queue_free()

func give_status(status: AgentStatus) -> void:
if statuses.has(status):
if statuses.any(func (s: AgentStatus): return s.name == status.name):
print(name, " already has this status, ignoring")
return
if len(statuses) >= max_status_count:
Expand Down

0 comments on commit 4053e55

Please sign in to comment.