Added move_type to obj.move_to and its many hooks and what calls it.

This commit is contained in:
Andrew Bastien 2022-07-10 19:36:57 -04:00
parent ae21036a34
commit c99cd45f93
10 changed files with 48 additions and 37 deletions

View file

@ -603,7 +603,7 @@ class CmdCreate(ObjManipCommand):
if "drop" in self.switches:
if caller.location:
obj.home = caller.location
obj.move_to(caller.location, quiet=True)
obj.move_to(caller.location, quiet=True, move_type="drop")
if string:
caller.msg(string)
@ -993,7 +993,7 @@ class CmdDig(ObjManipCommand):
)
caller.msg("%s%s%s" % (room_string, exit_to_string, exit_back_string))
if new_room and "teleport" in self.switches:
caller.move_to(new_room)
caller.move_to(new_room, move_type="teleport")
class CmdTunnel(COMMAND_DEFAULT_CLASS):
@ -3709,6 +3709,7 @@ class CmdTeleport(COMMAND_DEFAULT_CLASS):
quiet="quiet" in self.switches,
emit_to_obj=caller,
use_destination="intoexit" not in self.switches,
move_type="teleport"
):
if obj_to_teleport == caller:

View file

@ -49,7 +49,7 @@ class CmdHome(COMMAND_DEFAULT_CLASS):
caller.msg("You are already home!")
else:
caller.msg("There's no place like home ...")
caller.move_to(home)
caller.move_to(home, move_type="teleport")
class CmdLook(COMMAND_DEFAULT_CLASS):
@ -434,7 +434,7 @@ class CmdGet(COMMAND_DEFAULT_CLASS):
if not obj.at_pre_get(caller):
return
success = obj.move_to(caller, quiet=True)
success = obj.move_to(caller, quiet=True, move_type="get")
if not success:
caller.msg("This can't be picked up.")
else:
@ -484,7 +484,7 @@ class CmdDrop(COMMAND_DEFAULT_CLASS):
if not obj.at_pre_drop(caller):
return
success = obj.move_to(caller.location, quiet=True)
success = obj.move_to(caller.location, quiet=True, move_type="drop")
if not success:
caller.msg("This couldn't be dropped.")
else:
@ -538,7 +538,7 @@ class CmdGive(COMMAND_DEFAULT_CLASS):
return
# give object
success = to_give.move_to(target, quiet=True)
success = to_give.move_to(target, quiet=True, move_type="get")
if not success:
caller.msg("This could not be given.")
else: