Compare commits
1 Commits
ff93356a9a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 4855bde1a4 |
@@ -467,8 +467,7 @@ class AgentSpeakGenerator:
|
|||||||
:param main_goal: Whether this is a main goal (for UI notification purposes).
|
:param main_goal: Whether this is a main goal (for UI notification purposes).
|
||||||
"""
|
"""
|
||||||
context: list[AstExpression] = [self._astify(phase)]
|
context: list[AstExpression] = [self._astify(phase)]
|
||||||
if goal.can_fail:
|
context.append(~self._astify(goal, achieved=True))
|
||||||
context.append(~self._astify(goal, achieved=True))
|
|
||||||
if previous_goal and previous_goal.can_fail:
|
if previous_goal and previous_goal.can_fail:
|
||||||
context.append(self._astify(previous_goal, achieved=True))
|
context.append(self._astify(previous_goal, achieved=True))
|
||||||
if not continues_response:
|
if not continues_response:
|
||||||
@@ -489,7 +488,7 @@ class AgentSpeakGenerator:
|
|||||||
if isinstance(step, Goal):
|
if isinstance(step, Goal):
|
||||||
subgoals.append(step)
|
subgoals.append(step)
|
||||||
|
|
||||||
if not goal.can_fail and not continues_response:
|
if not goal.can_fail:
|
||||||
body.append(AstStatement(StatementType.ADD_BELIEF, self._astify(goal, achieved=True)))
|
body.append(AstStatement(StatementType.ADD_BELIEF, self._astify(goal, achieved=True)))
|
||||||
|
|
||||||
if len(body) == 0:
|
if len(body) == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user