Module area

Functions for areas

Class Area

area:fold () (DEPRECATED) Saves the area, useful after changing room flags or variables.
area:getClan () returns the clan currently assigned to the area.
area:getName () Get the area's display name
area:getShortname () Get the area's shortname
area:hails () Get a map of hail names to their rooms
area:rooms () get an iterator over rooms in the area.
area:roomsWithFlags (matchall, flag1, flag2, flag3, flag4, flag5) get an iterator over rooms in the area with a given room flag


Class Area

Functions on area variables
area:fold ()
(DEPRECATED) Saves the area, useful after changing room flags or variables.
area:getClan ()
returns the clan currently assigned to the area.

Returns:

    Clan the clan who is assigned to the area, or nil if none is set.
area:getName ()
Get the area's display name

Returns:

    string the area's name
area:getShortname ()
Get the area's shortname

Returns:

    string the area's shortname
area:hails ()
Get a map of hail names to their rooms

Returns:

    a map of hail names to their rooms

Usage:

    local hotelRoom = room:hails()["hotel"]
    if hotelRoom then
      ch:echoAt("You can hail to this hotel: "..hotelRoom:getName())
    end
area:rooms ()
get an iterator over rooms in the area.

Returns:

    an iterator of Room

Usage:

    for room in planet:rooms() do
      -- do something
    end
area:roomsWithFlags (matchall, flag1, flag2, flag3, flag4, flag5)
get an iterator over rooms in the area with a given room flag

Parameters:

  • matchall boolean true to require all matching flags, or false to require any matching flags
  • flag1 string The first flag the rooms should have.
  • flag2 string (optional) The second flag the rooms should have.
  • flag3 string (optional) The third flag the rooms should have.
  • flag4 string (optional) The fourth flag the rooms should have.
  • flag5 string (optional) The fifth flag the rooms should have.

Returns:

    an iterator of Room

Usage:

    for room in planet:roomsWithFlags("hospital", "safe", "nopvp") do
      -- do something
    end
generated by LDoc 1.5.0 Last updated 2024-10-22 16:05:00