fix mutual action interact with self bug
This commit is contained in:
@@ -143,6 +143,8 @@ class MutualAction(DefineAction, LLMAction, ActualActionMixin, TargetingMixin):
|
||||
target = self._get_target_avatar(target_avatar)
|
||||
if target is None:
|
||||
return False, "目标不存在"
|
||||
if target == self.avatar:
|
||||
return False, "不能对自己发起互动"
|
||||
# 调用子类的额外检查
|
||||
return self._can_start(target)
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ class Talk(MutualAction):
|
||||
|
||||
ACTION_NAME = "攀谈"
|
||||
EMOJI = "👋"
|
||||
DESC = "向对方发起攀谈"
|
||||
DOABLES_REQUIREMENTS = "目标在交互范围内"
|
||||
DESC = "向某人发起攀谈,对象不能是自己"
|
||||
DOABLES_REQUIREMENTS = "对象在交互范围内"
|
||||
PARAMS = {"target_avatar": "AvatarName"}
|
||||
FEEDBACK_ACTIONS: list[str] = ["Talk", "Reject"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user