Remove ability to teleport puppeted objects to a None location, as per #1304.
This commit is contained in:
parent
feed89257f
commit
f7955340a7
1 changed files with 11 additions and 9 deletions
|
|
@ -2241,7 +2241,7 @@ class CmdTeleport(COMMAND_DEFAULT_CLASS):
|
||||||
switch is set, <target location> is ignored.
|
switch is set, <target location> is ignored.
|
||||||
Note that the only way to retrieve
|
Note that the only way to retrieve
|
||||||
an object from a None location is by direct #dbref
|
an object from a None location is by direct #dbref
|
||||||
reference.
|
reference. A puppeted object cannot be moved to None.
|
||||||
|
|
||||||
Teleports an object somewhere. If no object is given, you yourself
|
Teleports an object somewhere. If no object is given, you yourself
|
||||||
is teleported to the target location. """
|
is teleported to the target location. """
|
||||||
|
|
@ -2266,14 +2266,16 @@ class CmdTeleport(COMMAND_DEFAULT_CLASS):
|
||||||
# teleporting to None
|
# teleporting to None
|
||||||
if not args:
|
if not args:
|
||||||
obj_to_teleport = caller
|
obj_to_teleport = caller
|
||||||
caller.msg("Teleported to None-location.")
|
|
||||||
if caller.location and not tel_quietly:
|
|
||||||
caller.location.msg_contents("%s teleported into nothingness." % caller, exclude=caller)
|
|
||||||
else:
|
else:
|
||||||
obj_to_teleport = caller.search(lhs, global_search=True)
|
obj_to_teleport = caller.search(lhs, global_search=True)
|
||||||
if not obj_to_teleport:
|
if not obj_to_teleport:
|
||||||
caller.msg("Did not find object to teleport.")
|
caller.msg("Did not find object to teleport.")
|
||||||
return
|
return
|
||||||
|
if obj_to_teleport.has_player:
|
||||||
|
caller.msg("Cannot teleport a puppeted object "
|
||||||
|
"(%s, puppeted by %s) to a None-location." % (
|
||||||
|
obj_to_teleport.key, obj_to_teleport.player))
|
||||||
|
return
|
||||||
caller.msg("Teleported %s -> None-location." % obj_to_teleport)
|
caller.msg("Teleported %s -> None-location." % obj_to_teleport)
|
||||||
if obj_to_teleport.location and not tel_quietly:
|
if obj_to_teleport.location and not tel_quietly:
|
||||||
obj_to_teleport.location.msg_contents("%s teleported %s into nothingness."
|
obj_to_teleport.location.msg_contents("%s teleported %s into nothingness."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue