diff --git a/evennia/objects/objects.py b/evennia/objects/objects.py index 1f2bd94021..dee5d33af3 100644 --- a/evennia/objects/objects.py +++ b/evennia/objects/objects.py @@ -1512,9 +1512,9 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase): num = 1 if self.location: num = max(0, *[ - int(obj.key.lstrip(key) or 0) + int(obj.key.lstrip(key)) for obj in self.location.contents - if obj.key.startswith(key) + if obj.key.startswith(key) and obj.key.lstrip(key).isdigit() ])+1 return "%s%03i" % (key, num)