mirror of
https://github.com/evennia/evennia.git
synced 2026-03-29 03:57:17 +02:00
cleaned up script copy method in script manager.
This commit is contained in:
parent
2487d4b622
commit
261e463505
1 changed files with 3 additions and 7 deletions
|
|
@ -209,14 +209,10 @@ class ScriptManager(TypedObjectManager):
|
|||
"""
|
||||
Make an identical copy of the original_script
|
||||
"""
|
||||
|
||||
typeclass = original_script.typeclass_path
|
||||
if not new_key:
|
||||
new_key = original_script.key
|
||||
if not new_obj:
|
||||
new_obj = original_script.obj
|
||||
if not new_locks:
|
||||
new_locks = original_script.db_lock_storage
|
||||
new_key = new_key if new_key!=None else original_script.key
|
||||
new_obj = new_obj if new_obj!=None else original_script.obj
|
||||
new_locks = new_locks if new_locks!=None else original_script.db_lock_storage
|
||||
|
||||
from src.utils import create
|
||||
new_script = create.create_script(typeclass, key=new_key, obj=new_obj, locks=new_locks, autostart=True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue