Fix keycard mismatch and typo in locked-door message

Inventory stored keycards under their full item_id (keycard_red) while
Room.locked_by/has_keycard checked against the plain color (red), so
the Waffentresor always reported itself as locked even with the
keycard in hand. Also fixes "rede Keycard" -> "rote Keycard".
This commit is contained in:
fedora_openclaw committed 2026-07-05 20:22:00 +02:00
1 parent 46116f7f4b
commit d4fd5561c2
2 files changed
+6 -2

No files matched your search

+2 -1
View File
@@ -78,7 +78,8 @@ class Inventory:
def add(self, item, count=1):
if item.kind == "key":
self.keycards.add(item.item_id)
color = item.item_id.removeprefix("keycard_")
self.keycards.add(color)
return
if item.kind == "fragment":
self.crucible_fragments += count