mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Copied objects retain plural alias category.
This commit is contained in:
parent
5b2963fc46
commit
f0dbcbc461
1 changed files with 4 additions and 1 deletions
|
|
@ -397,7 +397,10 @@ class CmdCopy(ObjManipCommand):
|
|||
if not from_obj:
|
||||
return
|
||||
to_obj_name = "%s_copy" % from_obj_name
|
||||
to_obj_aliases = ["%s_copy" % alias for alias in from_obj.aliases.all()]
|
||||
to_obj_aliases = [
|
||||
(f"{alias}_copy", category)
|
||||
for alias, category in from_obj.aliases.all(return_key_and_category=True)
|
||||
]
|
||||
copiedobj = ObjectDB.objects.copy_object(
|
||||
from_obj, new_key=to_obj_name, new_aliases=to_obj_aliases
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue