Merge branch 'develop' of github.com:evennia/evennia into develop

This commit is contained in:
Griatch 2021-10-12 23:55:00 +02:00
commit a4ec9edde7
4 changed files with 9 additions and 6 deletions

3
.gitignore vendored
View file

@ -53,3 +53,6 @@ docs/build
# For users of Atom # For users of Atom
.remote-sync.json .remote-sync.json
# Visual Studio Code (VS-Code)
.vscode/

View file

@ -128,7 +128,7 @@ instead.
Here's the stat-example again, moving the stats to variables (here we just set them, but in a real Here's the stat-example again, moving the stats to variables (here we just set them, but in a real
game they may be changed over time, or modified by circumstance): game they may be changed over time, or modified by circumstance):
> py str, dex, int = 13, 14, 8 ; print("STR: {}, DEX: {}, INT: {}".format(stren, dex, int)) > py stren, dex, intel = 13, 14, 8 ; print("STR: {}, DEX: {dex}, INT: {}".format(stren, dex, intel))
STR: 13, DEX: 14, INT: 8 STR: 13, DEX: 14, INT: 8
The point is that even if the values of the stats change, the print() statement would not change - it just keeps The point is that even if the values of the stats change, the print() statement would not change - it just keeps
@ -148,7 +148,7 @@ An f-string on its own is just like any other string. But let's redo the example
We could just insert that `a` variable directly into the f-string using `{a}`. Fewer parentheses to We could just insert that `a` variable directly into the f-string using `{a}`. Fewer parentheses to
remember and arguable easier to read as well. remember and arguable easier to read as well.
> py str, dex, int = 13, 14, 8 ; print(f"STR: {str}, DEX: {dex}, INT: {int}") > py stren, dex, intel = 13, 14, 8 ; print(f"STR: {stren}, DEX: {dex}, INT: {intel}")
STR: 13, DEX: 14, INT: 8 STR: 13, DEX: 14, INT: 8
We will be exploring more complex string concepts when we get to creating Commands and need to We will be exploring more complex string concepts when we get to creating Commands and need to

View file

@ -59,11 +59,11 @@ just mocked for the example.
# skill (stored as Attribute on caster) # skill (stored as Attribute on caster)
firemagic skill level3+ firemagic skill level10+
# recipe for fireball # recipe for fireball
fireball = spellbook[T] + wand[T] + [firemagic skill lvl3+] fireball = spellbook[T] + wand[T] + [firemagic skill lvl10+]
---- ----

View file

@ -73,8 +73,8 @@ def create_object(
typeclass (class or str): Class or python path to a typeclass. typeclass (class or str): Class or python path to a typeclass.
key (str): Name of the new object. If not set, a name of key (str): Name of the new object. If not set, a name of
`#dbref` will be set. `#dbref` will be set.
home (Object or str): Obj or #dbref to use as the object's location (Object or str): Obj or #dbref to use as the location of the new object.
home location. home (Object or str): Obj or #dbref to use as the object's home location.
permissions (list): A list of permission strings or tuples (permstring, category). permissions (list): A list of permission strings or tuples (permstring, category).
locks (str): one or more lockstrings, separated by semicolons. locks (str): one or more lockstrings, separated by semicolons.
aliases (list): A list of alternative keys or tuples (aliasstring, category). aliases (list): A list of alternative keys or tuples (aliasstring, category).