Some minor rephrasings
This commit is contained in:
parent
67470bbd66
commit
6e4183e76d
1 changed files with 18 additions and 23 deletions
|
|
@ -791,8 +791,8 @@ class CmdDig(ObjManipCommand):
|
||||||
alias_string = ""
|
alias_string = ""
|
||||||
if new_room.aliases.all():
|
if new_room.aliases.all():
|
||||||
alias_string = " (%s)" % ", ".join(new_room.aliases.all())
|
alias_string = " (%s)" % ", ".join(new_room.aliases.all())
|
||||||
room_string = "Created room %s(%s)%s of type %s." %\
|
room_string = "Created room %s(%s)%s of type %s." % (
|
||||||
(new_room, new_room.dbref, alias_string, typeclass)
|
new_room, new_room.dbref, alias_string, typeclass)
|
||||||
|
|
||||||
# create exit to room
|
# create exit to room
|
||||||
|
|
||||||
|
|
@ -802,11 +802,9 @@ class CmdDig(ObjManipCommand):
|
||||||
if self.rhs_objs:
|
if self.rhs_objs:
|
||||||
to_exit = self.rhs_objs[0]
|
to_exit = self.rhs_objs[0]
|
||||||
if not to_exit["name"]:
|
if not to_exit["name"]:
|
||||||
exit_to_string = \
|
exit_to_string = "\nNo exit created to new room."
|
||||||
"\nNo exit created to new room."
|
|
||||||
elif not location:
|
elif not location:
|
||||||
exit_to_string = \
|
exit_to_string = "\nYou cannot create an exit from a None-location."
|
||||||
"\nYou cannot create an exit from a None-location."
|
|
||||||
else:
|
else:
|
||||||
# Build the exit to the new room from the current one
|
# Build the exit to the new room from the current one
|
||||||
typeclass = to_exit["option"]
|
typeclass = to_exit["option"]
|
||||||
|
|
@ -835,11 +833,9 @@ class CmdDig(ObjManipCommand):
|
||||||
# Building the exit back to the current room
|
# Building the exit back to the current room
|
||||||
back_exit = self.rhs_objs[1]
|
back_exit = self.rhs_objs[1]
|
||||||
if not back_exit["name"]:
|
if not back_exit["name"]:
|
||||||
exit_back_string = \
|
exit_back_string = "\nNo back exit created."
|
||||||
"\nNo back exit created."
|
|
||||||
elif not location:
|
elif not location:
|
||||||
exit_back_string = \
|
exit_back_string = "\nYou cannot create an exit back to a None-location."
|
||||||
"\nYou cannot create an exit back to a None-location."
|
|
||||||
else:
|
else:
|
||||||
typeclass = back_exit["option"]
|
typeclass = back_exit["option"]
|
||||||
if not typeclass:
|
if not typeclass:
|
||||||
|
|
@ -920,7 +916,8 @@ class CmdTunnel(COMMAND_DEFAULT_CLASS):
|
||||||
self.caller.msg(string)
|
self.caller.msg(string)
|
||||||
return
|
return
|
||||||
if self.lhs not in self.directions:
|
if self.lhs not in self.directions:
|
||||||
string = "@tunnel can only understand the following directions: %s." % ",".join(sorted(self.directions.keys()))
|
string = "@tunnel can only understand the following directions: %s." % ",".join(
|
||||||
|
sorted(self.directions.keys()))
|
||||||
string += "\n(use @dig for more freedom)"
|
string += "\n(use @dig for more freedom)"
|
||||||
self.caller.msg(string)
|
self.caller.msg(string)
|
||||||
return
|
return
|
||||||
|
|
@ -1006,8 +1003,8 @@ class CmdLink(COMMAND_DEFAULT_CLASS):
|
||||||
string += note % (target.name, target.dbref)
|
string += note % (target.name, target.dbref)
|
||||||
obj.destination = target.location
|
obj.destination = target.location
|
||||||
target.destination = obj.location
|
target.destination = obj.location
|
||||||
string += "\nLink created %s (in %s) <-> %s (in %s) (two-way)." %\
|
string += "\nLink created %s (in %s) <-> %s (in %s) (two-way)." % (
|
||||||
(obj.name, obj.location, target.name, target.location)
|
obj.name, obj.location, target.name, target.location)
|
||||||
else:
|
else:
|
||||||
obj.destination = target
|
obj.destination = target
|
||||||
string += "\nLink created %s -> %s (one way)." % (obj.name, target)
|
string += "\nLink created %s -> %s (one way)." % (obj.name, target)
|
||||||
|
|
@ -1114,8 +1111,8 @@ class CmdSetHome(CmdLink):
|
||||||
old_home = obj.home
|
old_home = obj.home
|
||||||
obj.home = new_home
|
obj.home = new_home
|
||||||
if old_home:
|
if old_home:
|
||||||
string = "%s's home location was changed from %s(%s) to %s(%s)." %\
|
string = "%s's home location was changed from %s(%s) to %s(%s)." % (
|
||||||
(obj, old_home, old_home.dbref, new_home, new_home.dbref)
|
obj, old_home, old_home.dbref, new_home, new_home.dbref)
|
||||||
else:
|
else:
|
||||||
string = "%s' home location was set to %s(%s)." % (obj, new_home, new_home.dbref)
|
string = "%s' home location was set to %s(%s)." % (obj, new_home, new_home.dbref)
|
||||||
self.caller.msg(string)
|
self.caller.msg(string)
|
||||||
|
|
@ -1278,8 +1275,8 @@ class CmdOpen(ObjManipCommand):
|
||||||
exit_obj.destination = destination
|
exit_obj.destination = destination
|
||||||
if exit_aliases:
|
if exit_aliases:
|
||||||
[exit_obj.aliases.add(alias) for alias in exit_aliases]
|
[exit_obj.aliases.add(alias) for alias in exit_aliases]
|
||||||
string += " Rerouted its old destination '%s' to '%s' and changed aliases." %\
|
string += " Rerouted its old destination '%s' to '%s' and changed aliases." % (
|
||||||
(old_destination.name, destination.name)
|
old_destination.name, destination.name)
|
||||||
else:
|
else:
|
||||||
string += " It already points to the correct place."
|
string += " It already points to the correct place."
|
||||||
|
|
||||||
|
|
@ -2456,12 +2453,10 @@ class CmdScript(COMMAND_DEFAULT_CLASS):
|
||||||
ok = obj.scripts.add(self.rhs, autostart=True)
|
ok = obj.scripts.add(self.rhs, autostart=True)
|
||||||
if not ok:
|
if not ok:
|
||||||
result.append("\nScript %s could not be added and/or started on %s." % (
|
result.append("\nScript %s could not be added and/or started on %s." % (
|
||||||
self.rhs, obj.get_display_name(caller)
|
self.rhs, obj.get_display_name(caller)))
|
||||||
))
|
|
||||||
else:
|
else:
|
||||||
result.append("Script |w%s|n successfully added and started on %s." % (
|
result.append("Script |w%s|n successfully added and started on %s." % (
|
||||||
self.rhs, obj.get_display_name(caller)
|
self.rhs, obj.get_display_name(caller)))
|
||||||
))
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
paths = [self.rhs] + ["%s.%s" % (prefix, self.rhs)
|
paths = [self.rhs] + ["%s.%s" % (prefix, self.rhs)
|
||||||
|
|
@ -2661,8 +2656,8 @@ class CmdSpawn(COMMAND_DEFAULT_CLASS):
|
||||||
def _show_prototypes(prototypes):
|
def _show_prototypes(prototypes):
|
||||||
"""Helper to show a list of available prototypes"""
|
"""Helper to show a list of available prototypes"""
|
||||||
prots = ", ".join(sorted(prototypes.keys()))
|
prots = ", ".join(sorted(prototypes.keys()))
|
||||||
return "\nAvailable prototypes (case sensistive): %s" % \
|
return "\nAvailable prototypes (case sensistive): %s" % (
|
||||||
("\n" + utils.fill(prots) if prots else "None")
|
"\n" + utils.fill(prots) if prots else "None")
|
||||||
|
|
||||||
prototypes = spawn(return_prototypes=True)
|
prototypes = spawn(return_prototypes=True)
|
||||||
if not self.args:
|
if not self.args:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue