mirror of
https://github.com/evennia/evennia.git
synced 2026-03-22 15:56:30 +01:00
Fix Script example. Resolve #2600.
This commit is contained in:
parent
3ee7c37971
commit
e1241a9b05
1 changed files with 2 additions and 2 deletions
|
|
@ -131,7 +131,7 @@ class Script(DefaultScript):
|
|||
# stuff common for all your scripts goes here
|
||||
|
||||
class MyScript(Script):
|
||||
def at_script_creation(selfself):
|
||||
def at_script_creation(self):
|
||||
"""Called once, when script is first created"""
|
||||
self.key = "myscript"
|
||||
self.db.foo = "bar"
|
||||
|
|
@ -145,7 +145,7 @@ evennia.create_script('typeclasses.scripts.MyScript')
|
|||
|
||||
# from somewhere else
|
||||
|
||||
myscript = evennia.search_script("myscript")
|
||||
myscript = evennia.search_script("myscript").first()
|
||||
bar = myscript.db.foo
|
||||
myscript.db.something_else = 1000
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue