From b45e906f58ede38cf87d228cb4e33381e1eb2193 Mon Sep 17 00:00:00 2001 From: Howard Abrams Date: Sun, 14 Sep 2025 10:57:19 -0700 Subject: [PATCH] Items can be plural by default --- typeclasses/rooms.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/typeclasses/rooms.py b/typeclasses/rooms.py index 8e7f443..7eb72c2 100644 --- a/typeclasses/rooms.py +++ b/typeclasses/rooms.py @@ -165,7 +165,7 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener): Replace """ things = self.filter_visible(self.contents_get(content_type="object"), - looker, **kwargs) + looker, **kwargs) tchars = [c for c in self.contents_get(content_type="character") if c.attributes.get('transformed')] @@ -178,7 +178,13 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom, Listener): nthings = len(thinglist) thing = thinglist[0] singular, plural = thing.get_numbered_name(nthings, looker, key=thingname) - thing_names.append(singular if nthings == 1 else plural) + if nthings > 1: + thing_names.append(plural) + elif thing.db.plural: + thing_names.append(thing.get_display_name(looker)) + else: + thing_names.append(singular) + thing_names = iter_to_str(thing_names, endsep=_(", and")) return _(f"You notice {thing_names}." if thing_names else "")