Fix Script example. Resolve #2600.
This commit is contained in:
parent
b3005239e4
commit
62477eac50
1 changed files with 2 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ class Script(DefaultScript):
|
||||||
# stuff common for all your scripts goes here
|
# stuff common for all your scripts goes here
|
||||||
|
|
||||||
class MyScript(Script):
|
class MyScript(Script):
|
||||||
def at_script_creation(selfself):
|
def at_script_creation(self):
|
||||||
"""Called once, when script is first created"""
|
"""Called once, when script is first created"""
|
||||||
self.key = "myscript"
|
self.key = "myscript"
|
||||||
self.db.foo = "bar"
|
self.db.foo = "bar"
|
||||||
|
|
@ -145,7 +145,7 @@ evennia.create_script('typeclasses.scripts.MyScript')
|
||||||
|
|
||||||
# from somewhere else
|
# from somewhere else
|
||||||
|
|
||||||
myscript = evennia.search_script("myscript")
|
myscript = evennia.search_script("myscript").first()
|
||||||
bar = myscript.db.foo
|
bar = myscript.db.foo
|
||||||
myscript.db.something_else = 1000
|
myscript.db.something_else = 1000
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue