objects.py markup/whitespace/PEP 8/typo fixes

This commit is contained in:
BlauFeuer 2017-02-12 19:05:18 -05:00 committed by GitHub
parent 9ea8daf605
commit 1fb064c978

View file

@ -27,7 +27,7 @@ from evennia import utils
from evennia.utils import search from evennia.utils import search
from evennia.utils.spawner import spawn from evennia.utils.spawner import spawn
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# TutorialObject # TutorialObject
# #
@ -41,7 +41,7 @@ from evennia.utils.spawner import spawn
# itself, or the removal of an inventory item from a # itself, or the removal of an inventory item from a
# character's inventory when leaving the tutorial, for example. # character's inventory when leaving the tutorial, for example.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
class TutorialObject(DefaultObject): class TutorialObject(DefaultObject):
@ -50,20 +50,20 @@ class TutorialObject(DefaultObject):
""" """
def at_object_creation(self): def at_object_creation(self):
"Called when the object is first created." """Called when the object is first created."""
super(TutorialObject, self).at_object_creation() super(TutorialObject, self).at_object_creation()
self.db.tutorial_info = "No tutorial info is available for this object." self.db.tutorial_info = "No tutorial info is available for this object."
def reset(self): def reset(self):
"Resets the object, whatever that may mean." """Resets the object, whatever that may mean."""
self.location = self.home self.location = self.home
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Readable - an object that can be "read" # Readable - an object that can be "read"
# #
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Read command # Read command
@ -96,7 +96,7 @@ class CmdRead(Command):
# we want an attribute read_text to be defined. # we want an attribute read_text to be defined.
readtext = obj.db.readable_text readtext = obj.db.readable_text
if readtext: if readtext:
string = "You read {C%s{n:\n %s" % (obj.key, readtext) string = "You read |C%s|n:\n %s" % (obj.key, readtext)
else: else:
string = "There is nothing to read on %s." % obj.key string = "There is nothing to read on %s." % obj.key
self.caller.msg(string) self.caller.msg(string)
@ -129,7 +129,7 @@ class Readable(TutorialObject):
self.cmdset.add_default(CmdSetReadable, permanent=True) self.cmdset.add_default(CmdSetReadable, permanent=True)
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Climbable object # Climbable object
# #
@ -139,7 +139,7 @@ class Readable(TutorialObject):
# of what was last climbed is used in a simple puzzle in the # of what was last climbed is used in a simple puzzle in the
# tutorial. # tutorial.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
class CmdClimb(Command): class CmdClimb(Command):
""" """
@ -155,7 +155,7 @@ class CmdClimb(Command):
help_category = "TutorialWorld" help_category = "TutorialWorld"
def func(self): def func(self):
"Implements function" """Implements function"""
if not self.args: if not self.args:
self.caller.msg("What do you want to climb?") self.caller.msg("What do you want to climb?")
@ -175,9 +175,9 @@ class CmdClimb(Command):
class CmdSetClimbable(CmdSet): class CmdSetClimbable(CmdSet):
"Climbing cmdset" """Climbing cmdset"""
def at_cmdset_creation(self): def at_cmdset_creation(self):
"populate set" """populate set"""
self.add(CmdClimb()) self.add(CmdClimb())
@ -188,12 +188,11 @@ class Climbable(TutorialObject):
""" """
def at_object_creation(self): def at_object_creation(self):
"Called at initial creation only" """Called at initial creation only"""
self.cmdset.add_default(CmdSetClimbable, permanent=True) self.cmdset.add_default(CmdSetClimbable, permanent=True)
# -------------------------------------------------------------
#------------------------------------------------------------
# #
# Obelisk - a unique item # Obelisk - a unique item
# #
@ -203,7 +202,7 @@ class Climbable(TutorialObject):
# looking also stores a key attribute on the looking object (different # looking also stores a key attribute on the looking object (different
# depending on which text you saw) for later reference. # depending on which text you saw) for later reference.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
class Obelisk(TutorialObject): class Obelisk(TutorialObject):
""" """
@ -219,7 +218,7 @@ class Obelisk(TutorialObject):
""" """
def at_object_creation(self): def at_object_creation(self):
"Called when object is created." """Called when object is created."""
super(Obelisk, self).at_object_creation() super(Obelisk, self).at_object_creation()
self.db.tutorial_info = "This object changes its desc randomly, and makes sure to remember which one you saw." self.db.tutorial_info = "This object changes its desc randomly, and makes sure to remember which one you saw."
self.db.puzzle_descs = ["You see a normal stone slab"] self.db.puzzle_descs = ["You see a normal stone slab"]
@ -247,7 +246,7 @@ class Obelisk(TutorialObject):
return super(Obelisk, self).return_appearance(caller) return super(Obelisk, self).return_appearance(caller)
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# LightSource # LightSource
# #
@ -262,7 +261,7 @@ class Obelisk(TutorialObject):
# where the light matters (in the Dark Room where you can # where the light matters (in the Dark Room where you can
# find new light sources easily), this is okay here. # find new light sources easily), this is okay here.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
class CmdLight(Command): class CmdLight(Command):
""" """
@ -288,13 +287,13 @@ class CmdLight(Command):
class CmdSetLight(CmdSet): class CmdSetLight(CmdSet):
"CmdSet for the lightsource commands" """CmdSet for the lightsource commands"""
key = "lightsource_cmdset" key = "lightsource_cmdset"
# this is higher than the dark cmdset - important! # this is higher than the dark cmdset - important!
priority = 3 priority = 3
def at_cmdset_creation(self): def at_cmdset_creation(self):
"called at cmdset creation" """called at cmdset creation"""
self.add(CmdLight()) self.add(CmdLight())
@ -316,7 +315,7 @@ class LightSource(TutorialObject):
self.delete() self.delete()
def at_object_creation(self): def at_object_creation(self):
"Called when object is first created." """Called when object is first created."""
super(LightSource, self).at_object_creation() super(LightSource, self).at_object_creation()
self.db.tutorial_info = "This object can be lit to create light. It has a timeout for how long it burns." self.db.tutorial_info = "This object can be lit to create light. It has a timeout for how long it burns."
self.db.is_giving_light = False self.db.is_giving_light = False
@ -336,7 +335,7 @@ class LightSource(TutorialObject):
self.db.is_giving_light = False self.db.is_giving_light = False
try: try:
self.location.location.msg_contents("%s's %s flickers and dies." % self.location.location.msg_contents("%s's %s flickers and dies." %
(self.location, self.key), exclude=self.location) (self.location, self.key), exclude=self.location)
self.location.msg("Your %s flickers and dies." % self.key) self.location.msg("Your %s flickers and dies." % self.key)
self.location.location.check_light_state() self.location.location.check_light_state()
except AttributeError: except AttributeError:
@ -348,7 +347,6 @@ class LightSource(TutorialObject):
pass pass
self.delete() self.delete()
def light(self): def light(self):
""" """
Light this object - this is called by Light command. Light this object - this is called by Light command.
@ -374,7 +372,7 @@ class LightSource(TutorialObject):
return True return True
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Crumbling wall - unique exit # Crumbling wall - unique exit
# #
@ -388,7 +386,7 @@ class LightSource(TutorialObject):
# position - when they have, the "press button" command # position - when they have, the "press button" command
# is made available and the Exit is made traversable. # is made available and the Exit is made traversable.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
# There are four roots - two horizontal and two vertically # There are four roots - two horizontal and two vertically
# running roots. Each can have three positions: top/middle/bottom # running roots. Each can have three positions: top/middle/bottom
@ -454,7 +452,7 @@ class CmdShiftRoot(Command):
# get current root positions dict # get current root positions dict
root_pos = self.obj.db.root_pos root_pos = self.obj.db.root_pos
if not color in root_pos: if color not in root_pos:
self.caller.msg("No such root to move.") self.caller.msg("No such root to move.")
return return
@ -526,7 +524,7 @@ class CmdShiftRoot(Command):
self.obj.db.root_pos = root_pos self.obj.db.root_pos = root_pos
# Check victory condition # Check victory condition
if listvalues(root_pos).count(0) == 0: # no roots in middle position if listvalues(root_pos).count(0) == 0: # no roots in middle position
# This will affect the cmd: lock of CmdPressButton # This will affect the cmd: lock of CmdPressButton
self.obj.db.button_exposed = True self.obj.db.button_exposed = True
self.caller.msg("Holding aside the root you think you notice something behind it ...") self.caller.msg("Holding aside the root you think you notice something behind it ...")
@ -546,7 +544,7 @@ class CmdPressButton(Command):
help_category = "TutorialWorld" help_category = "TutorialWorld"
def func(self): def func(self):
"Implements the command" """Implements the command"""
if self.caller.db.crumbling_wall_found_exit: if self.caller.db.crumbling_wall_found_exit:
# we already pushed the button # we already pushed the button
@ -556,22 +554,22 @@ class CmdPressButton(Command):
# pushing the button # pushing the button
string = "You move your fingers over the suspicious depression, then gives it a " \ string = "You move your fingers over the suspicious depression, then gives it a " \
"decisive push. First nothing happens, then there is a rumble and a hidden " \ "decisive push. First nothing happens, then there is a rumble and a hidden " \
"{wpassage{n opens, dust and pebbles rumbling as part of the wall moves aside." "|wpassage|n opens, dust and pebbles rumbling as part of the wall moves aside."
self.caller.msg(string) self.caller.msg(string)
string = "%s moves their fingers over the suspicious depression, then gives it a " \ string = "%s moves their fingers over the suspicious depression, then gives it a " \
"decisive push. First nothing happens, then there is a rumble and a hidden " \ "decisive push. First nothing happens, then there is a rumble and a hidden " \
"{wpassage{n opens, dust and pebbles rumbling as part of the wall moves aside." "|wpassage|n opens, dust and pebbles rumbling as part of the wall moves aside."
self.caller.location.msg_contents(string % self.caller.key, exclude=self.caller) self.caller.location.msg_contents(string % self.caller.key, exclude=self.caller)
self.obj.open_wall() self.obj.open_wall()
class CmdSetCrumblingWall(CmdSet): class CmdSetCrumblingWall(CmdSet):
"Group the commands for crumblingWall" """Group the commands for crumblingWall"""
key = "crumblingwall_cmdset" key = "crumblingwall_cmdset"
priority = 2 priority = 2
def at_cmdset_creation(self): def at_cmdset_creation(self):
"called when object is first created." """called when object is first created."""
self.add(CmdShiftRoot()) self.add(CmdShiftRoot())
self.add(CmdPressButton()) self.add(CmdPressButton())
@ -597,7 +595,7 @@ class CrumblingWall(TutorialObject, DefaultExit):
self.reset() self.reset()
def at_object_creation(self): def at_object_creation(self):
"called when the object is first created." """called when the object is first created."""
super(CrumblingWall, self).at_object_creation() super(CrumblingWall, self).at_object_creation()
self.aliases.add(["secret passage", "passage", self.aliases.add(["secret passage", "passage",
@ -643,17 +641,17 @@ class CrumblingWall(TutorialObject, DefaultExit):
utils.delay(45, self.reset) utils.delay(45, self.reset)
def _translate_position(self, root, ipos): def _translate_position(self, root, ipos):
"Translates the position into words" """Translates the position into words"""
rootnames = {"red": "The {rreddish{n vertical-hanging root ", rootnames = {"red": "The |rreddish|n vertical-hanging root ",
"blue": "The thick vertical root with {bblue{n flowers ", "blue": "The thick vertical root with |bblue|n flowers ",
"yellow": "The thin horizontal-hanging root with {yyellow{n flowers ", "yellow": "The thin horizontal-hanging root with |yyellow|n flowers ",
"green": "The weedy {ggreen{n horizontal root "} "green": "The weedy |ggreen|n horizontal root "}
vpos = {-1: "hangs far to the {wleft{n on the wall.", vpos = {-1: "hangs far to the |wleft|n on the wall.",
0: "hangs straight down the {wmiddle{n of the wall.", 0: "hangs straight down the |wmiddle|n of the wall.",
1: "hangs far to the {wright{n of the wall."} 1: "hangs far to the |wright|n of the wall."}
hpos = {-1: "covers the {wupper{n part of the wall.", hpos = {-1: "covers the |wupper|n part of the wall.",
0: "passes right over the {wmiddle{n of the wall.", 0: "passes right over the |wmiddle|n of the wall.",
1: "nearly touches the floor, near the {wbottom{n of the wall."} 1: "nearly touches the floor, near the |wbottom|n of the wall."}
if root in ("yellow", "green"): if root in ("yellow", "green"):
string = rootnames[root] + hpos[ipos] string = rootnames[root] + hpos[ipos]
@ -679,10 +677,10 @@ class CrumblingWall(TutorialObject, DefaultExit):
"opening may close again soon." "opening may close again soon."
else: else:
# puzzle not solved yet. # puzzle not solved yet.
string = "The wall is old and covered with roots that here and there have permeated the stone. " \ string = "The wall is old and covered with roots that here and there have permeated the stone. " \
"The roots (or whatever they are - some of them are covered in small non-descript flowers) " \ "The roots (or whatever they are - some of them are covered in small non-descript flowers) " \
"crisscross the wall, making it hard to clearly see its stony surface. Maybe you could " \ "crisscross the wall, making it hard to clearly see its stony surface. Maybe you could " \
"try to {wshift{n or {wmove{n them.\n" "try to |wshift|n or |wmove|n them.\n"
# display the root positions to help with the puzzle # display the root positions to help with the puzzle
for key, pos in self.db.root_pos.items(): for key, pos in self.db.root_pos.items():
string += "\n" + self._translate_position(key, pos) string += "\n" + self._translate_position(key, pos)
@ -701,7 +699,7 @@ class CrumblingWall(TutorialObject, DefaultExit):
self.reset() self.reset()
def at_failed_traverse(self, traverser): def at_failed_traverse(self, traverser):
"This is called if the player fails to pass the Exit." """This is called if the player fails to pass the Exit."""
traverser.msg("No matter how you try, you cannot force yourself through %s." % self.key) traverser.msg("No matter how you try, you cannot force yourself through %s." % self.key)
def reset(self): def reset(self):
@ -717,15 +715,15 @@ class CrumblingWall(TutorialObject, DefaultExit):
self.destination = None self.destination = None
# Reset the roots with some random starting positions for the roots: # Reset the roots with some random starting positions for the roots:
start_pos = [{"yellow":1, "green":0, "red":0, "blue":0}, start_pos = [{"yellow": 1, "green": 0, "red": 0, "blue": 0},
{"yellow":0, "green":0, "red":0, "blue":0}, {"yellow": 0, "green": 0, "red": 0, "blue": 0},
{"yellow":0, "green":1, "red":-1, "blue":0}, {"yellow": 0, "green": 1, "red": -1, "blue": 0},
{"yellow":1, "green":0, "red":0, "blue":0}, {"yellow": 1, "green": 0, "red": 0, "blue": 0},
{"yellow":0, "green":0, "red":0, "blue":1}] {"yellow": 0, "green": 0, "red": 0, "blue": 1}]
self.db.root_pos = random.choice(start_pos) self.db.root_pos = random.choice(start_pos)
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Weapon - object type # Weapon - object type
# #
@ -739,7 +737,7 @@ class CrumblingWall(TutorialObject, DefaultExit):
# we let the weapon itself determine how easy/hard it is # we let the weapon itself determine how easy/hard it is
# to hit with it, and how much damage it can do. # to hit with it, and how much damage it can do.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
class CmdAttack(Command): class CmdAttack(Command):
""" """
@ -760,13 +758,12 @@ class CmdAttack(Command):
# command class, using the given command alias to separate between them. # command class, using the given command alias to separate between them.
key = "attack" key = "attack"
aliases = ["hit","kill", "fight", "thrust", "pierce", "stab", aliases = ["hit", "kill", "fight", "thrust", "pierce", "stab", "slash", "chop", "parry", "defend"]
"slash", "chop", "parry", "defend"]
locks = "cmd:all()" locks = "cmd:all()"
help_category = "TutorialWorld" help_category = "TutorialWorld"
def func(self): def func(self):
"Implements the stab" """Implements the stab"""
cmdstring = self.cmdstring cmdstring = self.cmdstring
@ -790,9 +787,6 @@ class CmdAttack(Command):
if not target: if not target:
return return
string = ""
tstring = ""
ostring = ""
if cmdstring in ("thrust", "pierce", "stab"): if cmdstring in ("thrust", "pierce", "stab"):
hit = float(self.obj.db.hit) * 0.7 # modified due to stab hit = float(self.obj.db.hit) * 0.7 # modified due to stab
damage = self.obj.db.damage * 2 # modified due to stab damage = self.obj.db.damage * 2 # modified due to stab
@ -815,13 +809,13 @@ class CmdAttack(Command):
if target.db.combat_parry_mode: if target.db.combat_parry_mode:
# target is defensive; even harder to hit! # target is defensive; even harder to hit!
target.msg("{GYou defend, trying to avoid the attack.{n") target.msg("|GYou defend, trying to avoid the attack.|n")
hit *= 0.5 hit *= 0.5
if random.random() <= hit: if random.random() <= hit:
self.caller.msg(string + "{gIt's a hit!{n") self.caller.msg(string + "|gIt's a hit!|n")
target.msg(tstring + "{rIt's a hit!{n") target.msg(tstring + "|rIt's a hit!|n")
self.caller.location.msg_contents(ostring + "It's a hit!", exclude=[target,self.caller]) self.caller.location.msg_contents(ostring + "It's a hit!", exclude=[target, self.caller])
# call enemy hook # call enemy hook
if hasattr(target, "at_hit"): if hasattr(target, "at_hit"):
@ -832,18 +826,18 @@ class CmdAttack(Command):
target.db.health -= damage target.db.health -= damage
else: else:
# sorry, impossible to fight this enemy ... # sorry, impossible to fight this enemy ...
self.caller.msg("The enemy seems unaffacted.") self.caller.msg("The enemy seems unaffected.")
return return
else: else:
self.caller.msg(string + "{rYou miss.{n") self.caller.msg(string + "|rYou miss.|n")
target.msg(tstring + "{gThey miss you.{n") target.msg(tstring + "|gThey miss you.|n")
self.caller.location.msg_contents(ostring + "They miss.", exclude=[target, self.caller]) self.caller.location.msg_contents(ostring + "They miss.", exclude=[target, self.caller])
class CmdSetWeapon(CmdSet): class CmdSetWeapon(CmdSet):
"Holds the attack command." """Holds the attack command."""
def at_cmdset_creation(self): def at_cmdset_creation(self):
"called at first object creation." """called at first object creation."""
self.add(CmdAttack()) self.add(CmdAttack())
@ -859,7 +853,7 @@ class Weapon(TutorialObject):
""" """
def at_object_creation(self): def at_object_creation(self):
"Called at first creation of the object" """Called at first creation of the object"""
super(Weapon, self).at_object_creation() super(Weapon, self).at_object_creation()
self.db.hit = 0.4 # hit chance self.db.hit = 0.4 # hit chance
self.db.parry = 0.8 # parry chance self.db.parry = 0.8 # parry chance
@ -873,13 +867,14 @@ class Weapon(TutorialObject):
to return to. to return to.
""" """
if self.location.has_player and self.home == self.location: if self.location.has_player and self.home == self.location:
self.location.msg_contents("%s suddenly and magically fades into nothingness, as if it was never there ..." % self.key) self.location.msg_contents("%s suddenly and magically fades into nothingness, as if it was never there ..."
% self.key)
self.delete() self.delete()
else: else:
self.location = self.home self.location = self.home
#------------------------------------------------------------ # -------------------------------------------------------------
# #
# Weapon rack - spawns weapons # Weapon rack - spawns weapons
# #
@ -890,7 +885,7 @@ class Weapon(TutorialObject):
# used to create unique and interesting variations of typeclassed # used to create unique and interesting variations of typeclassed
# objects. # objects.
# #
#------------------------------------------------------------ # -------------------------------------------------------------
WEAPON_PROTOTYPES = { WEAPON_PROTOTYPES = {
"weapon": { "weapon": {
@ -905,7 +900,7 @@ WEAPON_PROTOTYPES = {
"prototype": "weapon", "prototype": "weapon",
"aliases": "sword", "aliases": "sword",
"key": "Kitchen knife", "key": "Kitchen knife",
"desc":"A rusty kitchen knife. Better than nothing.", "desc": "A rusty kitchen knife. Better than nothing.",
"damage": 3}, "damage": 3},
"dagger": { "dagger": {
"prototype": "knife", "prototype": "knife",
@ -923,20 +918,20 @@ WEAPON_PROTOTYPES = {
"parry": 0.5}, "parry": 0.5},
"club": { "club": {
"prototype": "weapon", "prototype": "weapon",
"key":"Club", "key": "Club",
"desc": "A heavy wooden club, little more than a heavy branch.", "desc": "A heavy wooden club, little more than a heavy branch.",
"hit": 0.4, "hit": 0.4,
"damage": 6, "damage": 6,
"parry": 0.2}, "parry": 0.2},
"axe": { "axe": {
"prototype": "weapon", "prototype": "weapon",
"key":"Axe", "key": "Axe",
"desc": "A woodcutter's axe with a keen edge.", "desc": "A woodcutter's axe with a keen edge.",
"hit": 0.4, "hit": 0.4,
"damage": 6, "damage": 6,
"parry": 0.2}, "parry": 0.2},
"ornate longsword": { "ornate longsword": {
"prototype":"sword", "prototype": "sword",
"key": "Ornate longsword", "key": "Ornate longsword",
"desc": "A fine longsword with some swirling patterns on the handle.", "desc": "A fine longsword with some swirling patterns on the handle.",
"hit": 0.5, "hit": 0.5,
@ -968,14 +963,16 @@ WEAPON_PROTOTYPES = {
"prototype": "rune axe", "prototype": "rune axe",
"key": "Slayer waraxe", "key": "Slayer waraxe",
"aliases": ["waraxe", "war", "slayer"], "aliases": ["waraxe", "war", "slayer"],
"desc": "A huge double-bladed axe marked with the runes for 'Slayer'. It has more runic inscriptions on its head, which you cannot decipher.", "desc": "A huge double-bladed axe marked with the runes for 'Slayer'."
" It has more runic inscriptions on its head, which you cannot decipher.",
"hit": 0.7, "hit": 0.7,
"damage": 8}, "damage": 8},
"ghostblade": { "ghostblade": {
"prototype": "ornate longsword", "prototype": "ornate longsword",
"key": "The Ghostblade", "key": "The Ghostblade",
"aliases": ["blade", "ghost"], "aliases": ["blade", "ghost"],
"desc": "This massive sword is large as you are tall, yet seems to weigh almost nothing. It's almost like it's not really there.", "desc": "This massive sword is large as you are tall, yet seems to weigh almost nothing."
" It's almost like it's not really there.",
"hit": 0.9, "hit": 0.9,
"parry": 0.8, "parry": 0.8,
"damage": 10}, "damage": 10},
@ -983,7 +980,8 @@ WEAPON_PROTOTYPES = {
"prototype": "ghostblade", "prototype": "ghostblade",
"key": "The Hawkblade", "key": "The Hawkblade",
"aliases": ["hawk", "blade"], "aliases": ["hawk", "blade"],
"desc": "The weapon of a long-dead heroine and a more civilized age, the hawk-shaped hilt of this blade almost has a life of its own.", "desc": "The weapon of a long-dead heroine and a more civilized age,"
" the hawk-shaped hilt of this blade almost has a life of its own.",
"hit": 0.85, "hit": 0.85,
"parry": 0.7, "parry": 0.7,
"damage": 11} "damage": 11}
@ -1000,7 +998,7 @@ class CmdGetWeapon(Command):
key = "get weapon" key = "get weapon"
aliases = "get weapon" aliases = "get weapon"
locks = "cmd:all()" locks = "cmd:all()"
help_cateogory = "TutorialWorld" help_category = "TutorialWorld"
def func(self): def func(self):
""" """
@ -1009,6 +1007,7 @@ class CmdGetWeapon(Command):
""" """
self.obj.produce_weapon(self.caller) self.obj.produce_weapon(self.caller)
class CmdSetWeaponRack(CmdSet): class CmdSetWeaponRack(CmdSet):
""" """
The cmdset for the rack. The cmdset for the rack.
@ -1016,7 +1015,7 @@ class CmdSetWeaponRack(CmdSet):
key = "weaponrack_cmdset" key = "weaponrack_cmdset"
def at_cmdset_creation(self): def at_cmdset_creation(self):
"Called at first creation of cmdset" """Called at first creation of cmdset"""
self.add(CmdGetWeapon()) self.add(CmdGetWeapon())
@ -1044,7 +1043,7 @@ class WeaponRack(TutorialObject):
self.db.rack_id = "weaponrack_1" self.db.rack_id = "weaponrack_1"
# these are prototype names from the prototype # these are prototype names from the prototype
# dictionary above. # dictionary above.
self.db.get_weapon_msg = "You find {c%s{n." self.db.get_weapon_msg = "You find |c%s|n."
self.db.no_more_weapons_msg = "you find nothing else of use." self.db.no_more_weapons_msg = "you find nothing else of use."
self.db.available_weapons = ["knife", "dagger", self.db.available_weapons = ["knife", "dagger",
"sword", "club"] "sword", "club"]