# evennia.contrib.grid.xyzgrid.commands

XYZ-aware commands

Just add the XYZGridCmdSet to the default character cmdset to override the commands with XYZ-aware equivalents.

class `evennia.contrib.grid.xyzgrid.commands.``PathData`(target, xymap, directions, step_sequence, task)

  Bases: `tuple`

  `directions`

    Alias for field number 2

  `step_sequence`

    Alias for field number 3

  `target`

    Alias for field number 0

  `task`

    Alias for field number 4

  `xymap`

    Alias for field number 1

class `evennia.contrib.grid.xyzgrid.commands.``CmdXYZTeleport`(**kwargs)

  Bases: `evennia.commands.default.building.CmdTeleport`

  teleport object to another location

  Usage:

    tel/switch [<object> to||=] <target location> tel/switch [<object> to||=] (X,Y[,Z])

  Examples

  tel Limbo tel/quiet box = Limbo tel/tonone box tel (3, 3, the small cave) tel (4, 1) # on the same map tel/map Z|mapname

  Switches:
    quiet - don’t echo leave/arrive messages to the source/target

      locations for the move.

    intoexit - if target is an exit, teleport INTO

      the exit object instead of to its destination

    tonone - if set, teleport the object to a None-location. If this

      switch is set, <target location> is ignored. Note that the only way to retrieve an object from a None location is by direct #dbref reference. A puppeted object cannot be moved to None.

    loc - teleport object to the target’s location instead of its contents map - show coordinate map of given Zcoord/mapname.

  Teleports an object somewhere. If no object is given, you yourself are teleported to the target location. If (X,Y) or (X,Y,Z) coordinates are given, the target is a location on the XYZGrid.

  `parse`()

    Breaking out searching here to make this easier to override.

  `aliases` = ['@tel']
  `help_category` = 'building'
  `key` = '@teleport'
  `lock_storage` = 'cmd:perm(teleport) or perm(Builder)'
  `search_index_entry` = {'aliases': '@tel', 'category': 'building', 'key': '@teleport', 'no_prefix': 'teleport tel', 'tags': '', 'text': "\n teleport object to another location\n\n Usage:\n tel/switch [<object> to||=] <target location>\n tel/switch [<object> to||=] (X,Y[,Z])\n\n Examples:\n tel Limbo\n tel/quiet box = Limbo\n tel/tonone box\n tel (3, 3, the small cave)\n tel (4, 1) # on the same map\n tel/map Z|mapname\n\n Switches:\n quiet - don't echo leave/arrive messages to the source/target\n locations for the move.\n intoexit - if target is an exit, teleport INTO\n the exit object instead of to its destination\n tonone - if set, teleport the object to a None-location. If this\n switch is set, <target location> is ignored.\n Note that the only way to retrieve\n an object from a None location is by direct #dbref\n reference. A puppeted object cannot be moved to None.\n loc - teleport object to the target's location instead of its contents\n map - show coordinate map of given Zcoord/mapname.\n\n Teleports an object somewhere. If no object is given, you yourself are\n teleported to the target location. If (X,Y) or (X,Y,Z) coordinates\n are given, the target is a location on the XYZGrid.\n\n "}

class `evennia.contrib.grid.xyzgrid.commands.``CmdXYZOpen`(**kwargs)

  Bases: `evennia.commands.default.building.CmdOpen`

  open a new exit from the current room

  Usage:

    open <new exit>[;alias;..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination> open <new exit>[;alias;..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = (X,Y,Z)

  Handles the creation of exits. If a destination is given, the exit will point there. The destination can also be given as an (X,Y,Z) coordinate on the XYZGrid - this command is used to link non-grid rooms to the grid and vice-versa.

  The <return exit> argument sets up an exit at the destination leading back to the current room. Apart from (X,Y,Z) coordinate, destination name can be given both as a #dbref and a name, if that name is globally unique.

  Examples

  open kitchen = Kitchen open north, south = Town Center open cave mouth;cave = (3, 4, the small cave)

  `parse`()

    We need to expand the default parsing to get all the cases, see the module doc.

  `aliases` = []
  `help_category` = 'building'
  `key` = '@open'
  `lock_storage` = 'cmd:perm(open) or perm(Builder)'
  `search_index_entry` = {'aliases': '', 'category': 'building', 'key': '@open', 'no_prefix': 'open ', 'tags': '', 'text': '\n open a new exit from the current room\n\n Usage:\n open <new exit>[;alias;..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = <destination>\n open <new exit>[;alias;..][:typeclass] [,<return exit>[;alias;..][:typeclass]]] = (X,Y,Z)\n\n Handles the creation of exits. If a destination is given, the exit\n will point there. The destination can also be given as an (X,Y,Z) coordinate on the\n XYZGrid - this command is used to link non-grid rooms to the grid and vice-versa.\n\n The <return exit> argument sets up an exit at the destination leading back to the current room.\n Apart from (X,Y,Z) coordinate, destination name can be given both as a #dbref and a name, if\n that name is globally unique.\n\n Examples:\n open kitchen = Kitchen\n open north, south = Town Center\n open cave mouth;cave = (3, 4, the small cave)\n\n '}

class `evennia.contrib.grid.xyzgrid.commands.``CmdGoto`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  Go to a named location in this area via the shortest path.

  Usage:

    path <location> - find shortest path to target location (don’t move) goto <location> - auto-move to target location, using shortest path path - show current target location and shortest path goto - abort current goto, otherwise show current path path clear - clear current path

  Finds the shortest route to a location in your current area and can then automatically walk you there.

  Builders can optionally specify a specific grid coordinate (X,Y) to go to.

  `key` = 'goto'
  `aliases` = ['path']
  `help_category` = 'general'
  `locks` = 'cmd:all()'
  `auto_step_delay` = 2
  `default_xyz_path_interrupt_msg` = 'Pathfinding interrupted here.'
  `func`()

    Implement command

  `lock_storage` = 'cmd:all()'
  `search_index_entry` = {'aliases': 'path', 'category': 'general', 'key': 'goto', 'no_prefix': ' path', 'tags': '', 'text': "\n Go to a named location in this area via the shortest path.\n\n Usage:\n path <location> - find shortest path to target location (don't move)\n goto <location> - auto-move to target location, using shortest path\n path - show current target location and shortest path\n goto - abort current goto, otherwise show current path\n path clear - clear current path\n\n Finds the shortest route to a location in your current area and\n can then automatically walk you there.\n\n Builders can optionally specify a specific grid coordinate (X,Y) to go to.\n\n "}

class `evennia.contrib.grid.xyzgrid.commands.``CmdMap`(**kwargs)

  Bases: `evennia.commands.default.muxcommand.MuxCommand`

  Show a map of an area

  Usage:

    map [Zcoord] map list

  This is a builder-command.

  `key` = 'map'
  `locks` = 'cmd:perm(Builders)'
  `func`()

    Implement command

  `aliases` = []
  `help_category` = 'general'
  `lock_storage` = 'cmd:perm(Builders)'
  `search_index_entry` = {'aliases': '', 'category': 'general', 'key': 'map', 'no_prefix': ' ', 'tags': '', 'text': '\n Show a map of an area\n\n Usage:\n map [Zcoord]\n map list\n\n This is a builder-command.\n\n '}

class `evennia.contrib.grid.xyzgrid.commands.``XYZGridCmdSet`(cmdsetobj=None, key=None)

  Bases: `evennia.commands.cmdset.CmdSet`

  Cmdset for easily adding the above cmds to the character cmdset.

  `key` = 'xyzgrid_cmdset'
  `at_cmdset_creation`()

    Hook method - this should be overloaded in the inheriting class, and should take care of populating the cmdset by use of self.add().

  `path` = 'evennia.contrib.grid.xyzgrid.commands.XYZGridCmdSet'