mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 20:47:17 +02:00
better validation
This commit is contained in:
parent
57b6d35b02
commit
261ca40aa0
1 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue