mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Re-removed some comments to batch-code example left over from debug.
This commit is contained in:
parent
0dc62a5fc9
commit
d99d52fa5a
1 changed files with 31 additions and 31 deletions
|
|
@ -52,34 +52,34 @@ from ev import Object
|
|||
limbo = search_object('Limbo')[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
|
||||
## '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.
|
||||
#
|
||||
## create a red button in limbo
|
||||
#red_button = create_object(red_button.RedButton, key="Red button",
|
||||
# location=limbo, aliases=["button"])
|
||||
#
|
||||
## we take a look at what we created
|
||||
#caller.msg("A %s was created." % red_button.key)
|
||||
#
|
||||
##CODE (create table and chair) table, chair
|
||||
#
|
||||
## this code block has 'table' and 'chair' set as deletable
|
||||
## objects. This means that when the batchcode processor runs in
|
||||
## testing mode, objects created in these variables will be deleted
|
||||
## again (so as to avoid duplicate objects when testing the script many
|
||||
## 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.
|
||||
#table = create_object(Object, key="Table", location=limbo)
|
||||
#chair = create_object(Object, key="Chair", location=limbo)
|
||||
#
|
||||
#string = "A %s and %s were created. If debug was active, they were deleted again."
|
||||
#caller.msg(string % (table, chair))
|
||||
#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
|
||||
# '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.
|
||||
|
||||
# create a red button in limbo
|
||||
red_button = create_object(red_button.RedButton, key="Red button",
|
||||
location=limbo, aliases=["button"])
|
||||
|
||||
# we take a look at what we created
|
||||
caller.msg("A %s was created." % red_button.key)
|
||||
|
||||
#CODE (create table and chair) table, chair
|
||||
|
||||
# this code block has 'table' and 'chair' set as deletable
|
||||
# objects. This means that when the batchcode processor runs in
|
||||
# testing mode, objects created in these variables will be deleted
|
||||
# again (so as to avoid duplicate objects when testing the script many
|
||||
# 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.
|
||||
table = create_object(Object, key="Table", location=limbo)
|
||||
chair = create_object(Object, key="Chair", location=limbo)
|
||||
|
||||
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