Fix sitting bug

This commit is contained in:
Howard Abrams 2025-05-31 09:52:01 -07:00
parent 03e85eef6f
commit 73f3c17d68

View file

@ -37,6 +37,12 @@ class Sittable(Object):
sitter.msg(f"You are already sitting {adjective} {article} {self.key}.") sitter.msg(f"You are already sitting {adjective} {article} {self.key}.")
return return
# Clean up an issue that sometimes someone logs off or leaves
# a room without standing first.
if self.db.sitter:
if not self.location.has(self.db.sitter):
self.db.sitter = None
if self.db.sitter and not self.multiple: if self.db.sitter and not self.multiple:
sitter.msg(f"You can't sit {adjective} {article} {self.key} " sitter.msg(f"You can't sit {adjective} {article} {self.key} "
f"- {current.get_display_name(sitter)} is already sitting there!") f"- {current.get_display_name(sitter)} is already sitting there!")