Items can be plural by default

This commit is contained in:
Howard Abrams 2025-09-14 10:57:19 -07:00
parent dcab25c5ce
commit b45e906f58

View file

@ -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 "")