More whitespace cleanup.
This commit is contained in:
parent
c0322c9eae
commit
45c5be8468
43 changed files with 1116 additions and 1131 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#
|
||||
# This is an example batch build file for Evennia.
|
||||
# This is an example batch build file for Evennia.
|
||||
#
|
||||
# It allows batch processing of normal Evennia commands.
|
||||
# Test it by loading it with the @batchprocess command
|
||||
|
|
@ -10,9 +10,9 @@
|
|||
# marks the end of a previous command definition (important!).
|
||||
#
|
||||
# All supplied commands are given as normal, on their own line
|
||||
# and accepts arguments in any format up until the first next
|
||||
# and accepts arguments in any format up until the first next
|
||||
# comment line begins. Extra whitespace is removed; an empty
|
||||
# line in a command definition translates into a newline.
|
||||
# line in a command definition translates into a newline.
|
||||
#
|
||||
|
||||
# This creates a red button
|
||||
|
|
@ -20,32 +20,32 @@
|
|||
@create button:examples.red_button.RedButton
|
||||
|
||||
# This comment ends input for @create
|
||||
# Next command:
|
||||
# Next command:
|
||||
|
||||
@set button/desc =
|
||||
This is a large red button. Now and then
|
||||
it flashes in an evil, yet strangely tantalizing way.
|
||||
@set button/desc =
|
||||
This is a large red button. Now and then
|
||||
it flashes in an evil, yet strangely tantalizing way.
|
||||
|
||||
A big sign sits next to it. It says:
|
||||
|
||||
|
||||
-----------
|
||||
|
||||
Press me!
|
||||
Press me!
|
||||
|
||||
-----------
|
||||
|
||||
|
||||
... It really begs to be pressed, doesn't it? You
|
||||
know you want to!
|
||||
|
||||
# This ends the @set command. Note that line breaks and extra spaces
|
||||
# in the argument are not considered. A completely empty line
|
||||
... It really begs to be pressed, doesn't it? You
|
||||
know you want to!
|
||||
|
||||
# This ends the @set command. Note that line breaks and extra spaces
|
||||
# in the argument are not considered. A completely empty line
|
||||
# translates to a \n newline in the command; two empty lines will thus
|
||||
# create a new paragraph. (note that few commands support it though, you
|
||||
# mainly want to use it for descriptions)
|
||||
|
||||
# Now let's place the button where it belongs (let's say limbo #2 is
|
||||
# Now let's place the button where it belongs (let's say limbo #2 is
|
||||
# the evil lair in our example)
|
||||
|
||||
@teleport #2
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
# Batchcode script
|
||||
#
|
||||
#
|
||||
#
|
||||
# The Batch-code processor accepts full python modules (e.g. "batch.py") that
|
||||
# looks identical to normal Python files with a few exceptions that allows them
|
||||
|
|
@ -8,29 +8,29 @@
|
|||
# of the file and allows for features like stepping from block to block
|
||||
# (without executing those coming before), as well as automatic deletion
|
||||
# of created objects etc. You can however also run a batch-code python file
|
||||
# directly using Python (and can also be de).
|
||||
# directly using Python (and can also be de).
|
||||
|
||||
# Code blocks are separated by python comments starting with special code words.
|
||||
# Code blocks are separated by python comments starting with special code words.
|
||||
|
||||
# #HEADER - this denotes commands global to the entire file, such as
|
||||
# import statements and global variables. They will
|
||||
# automatically be made available for each block. Observe
|
||||
# that changes to these variables made in one block is not
|
||||
# preserved between blocks!)
|
||||
# #CODE (infotext) [objname, objname, ...] - This designates a code block that will be executed like a
|
||||
# #CODE (infotext) [objname, objname, ...] - This designates a code block that will be executed like a
|
||||
# stand-alone piece of code together with any #HEADER
|
||||
# defined.
|
||||
# infotext is a describing text about what goes in in this block. It will be
|
||||
# defined.
|
||||
# infotext is a describing text about what goes in in this block. It will be
|
||||
# shown by the batchprocessing command.
|
||||
# <objname>s mark the (variable-)names of objects created in the code,
|
||||
# and which may be auto-deleted by the processor if desired (such as when
|
||||
# debugging the script). E.g., if the code contains the command
|
||||
# <objname>s mark the (variable-)names of objects created in the code,
|
||||
# and which may be auto-deleted by the processor if desired (such as when
|
||||
# debugging the script). E.g., if the code contains the command
|
||||
# myobj = create.create_object(...), you could put 'myobj' in the #CODE header
|
||||
# regardless of what the created object is actually called in-game.
|
||||
# #INSERT filename - this includes another code batch file. The named file will be loaded and
|
||||
# regardless of what the created object is actually called in-game.
|
||||
# #INSERT filename - this includes another code batch file. The named file will be loaded and
|
||||
# run at this point. Note that code from the inserted file will NOT share #HEADERs
|
||||
# with the importing file, but will only use the headers in the importing file.
|
||||
# make sure to not create a cyclic import here!
|
||||
# make sure to not create a cyclic import here!
|
||||
|
||||
# The following variable is automatically made available for the script:
|
||||
|
||||
|
|
@ -38,9 +38,9 @@
|
|||
#
|
||||
|
||||
|
||||
#HEADER
|
||||
#HEADER
|
||||
|
||||
# everything in this block will be appended to the beginning of
|
||||
# everything in this block will be appended to the beginning of
|
||||
# all other #CODE blocks when they are executed.
|
||||
|
||||
from ev import create, search
|
||||
|
|
@ -53,13 +53,13 @@ limbo = search.objects('Limbo', global_search=True)[0]
|
|||
#CODE (create red button)
|
||||
|
||||
# This is the first code block. Within each block, python
|
||||
# code works as normal. Note how we make use if imports and
|
||||
# code works as normal. Note how we make use if imports and
|
||||
# 'limbo' defined in the #HEADER block. This block's header
|
||||
# offers no information about red_button variable, so it
|
||||
# won't be able to be deleted in debug mode.
|
||||
# offers no information about red_button variable, so it
|
||||
# won't be able to be deleted in debug mode.
|
||||
|
||||
# create a red button in limbo
|
||||
red_button = create.create_object(red_button.RedButton, key="Red button",
|
||||
red_button = create.create_object(red_button.RedButton, key="Red button",
|
||||
location=limbo, aliases=["button"])
|
||||
|
||||
# we take a look at what we created
|
||||
|
|
@ -74,10 +74,10 @@ caller.msg("A %s was created." % red_button.key)
|
|||
# times).
|
||||
|
||||
# the python variables we assign to must match the ones given in the
|
||||
# header for the system to be able to delete them afterwards during a
|
||||
# debugging run.
|
||||
# header for the system to be able to delete them afterwards during a
|
||||
# debugging run.
|
||||
table = create.create_object(baseobjects.Object, key="Table", location=limbo)
|
||||
chair = create.create_object(baseobjects.Object, key="Chair", location=limbo)
|
||||
|
||||
string = "A %s and %s were created. If debug was active, they were deleted again."
|
||||
string = "A %s and %s were created. If debug was active, they were deleted again."
|
||||
caller.msg(string % (table, chair))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue