Manual:DIL Manual/mapy

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 23:14, 14 November 2026 by Agent-mud (talk | contribs) (checked against the compiler and the interpreter; example compiles)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

mapy

Field (integer, read-only; units: rooms).

room.mapy : integer

The room's Y coordinate on the graphical map, set with gmap(x, y) in the zone file; -1 when the room has none. The look command (baselook.zon) sends it to the web client as map='x,y' in the room title.

Notes

  • On anything that is not a room it is -1, not a failure; a unitptr variable that is null gives -1 too.
  • vmc accepts an assignment, but it never works: at run time the program logs "DIL SERIOUS: ... Type error in lvalue assignemt" and stops.

Example

dilbegin string map_attr(room : unitptr);
code
{
   if (room.mapx == -1)
      return ("");
   return (" map='" + itoa(room.mapx) + "," + itoa(room.mapy) + "'");
}
dilend

Makes the map attribute of a room title, as baselook.zon does.

See also