Module structure
Functions for handling structures.
Global functions
| Structure.all () | returns an iterator over all structures. | 
| Structure.getFromID (id) | finds a structure by ID | 
| Structure.getFromName (name) | finds a structure by name | 
Class Structure
| structure:getBlueprint () | get the structure's blueprint name | 
| structure:getDescription () | get the structure's description | 
| structure:getEntrance () | gets the interior entrance room for the structure | 
| structure:getFirstVNum () | get the first vnum in the range assigned to the structure | 
| structure:getID () | get the structure's ID | 
| structure:getInRoom () | gets the room the structure is located in | 
| structure:getLastVNum () | get the last vnum in the range assigned to the structure | 
| structure:getName () | get the structure's name | 
| structure:getOwner () | get the structure's owner's name | 
| structure:getPlanet () | gets the planet this structure is on, or nil if not set. | 
| structure:rooms () | get an iterator over rooms in the structure. | 
| structure:setDescription (description) | set the structure's description | 
| structure:setInRoom (the) | sets the room the structure is located in | 
| structure:setName (name) | set the structure's name | 
| structure:setOwner (owner) | set the structure's owner | 
Global functions
- Structure.all ()
- 
    returns an iterator over all structures.
    Returns:- 
        an iterator of Structure
    
 Usage:for structure in Structure.all() do -- do something end 
- Structure.getFromID (id)
- 
    finds a structure by ID
    Parameters:- id int the structure ID
 Returns:- 
           Structure
        the structure, or nil if not found
    
 
- Structure.getFromName (name)
- 
    finds a structure by name
    Parameters:- name string the structure name
 Returns:- 
           Structure
        the structure, or nil if not found
    
 
Class Structure
          Functions on structure variables
          
    - structure:getBlueprint ()
- 
    get the structure's blueprint name
    Returns:- 
           string
        the structure's blueprint name, or nil if not set.
    
 
- structure:getDescription ()
- 
    get the structure's description
    Returns:- 
           string
        the structure's description, or nil if not set.
    
 
- structure:getEntrance ()
- 
    gets the interior entrance room for the structure
    Returns:- 
           Room
        the structure's entrance room, or nil if not set.
    
 
- structure:getFirstVNum ()
- 
    get the first vnum in the range assigned to the structure
    Returns:- 
           int
        the structure's first vnum
    
 
- structure:getID ()
- 
    get the structure's ID
    Returns:- 
           int
        the structure's id.
    
 
- structure:getInRoom ()
- 
    gets the room the structure is located in
    Returns:- 
           Room
        the room the structure is in, or nil if not set.
    
 
- structure:getLastVNum ()
- 
    get the last vnum in the range assigned to the structure
    Returns:- 
           int
        the structure's last vnum
    
 
- structure:getName ()
- 
    get the structure's name
    Returns:- 
           string
        the structure's name, or nil if not set.
    
 
- structure:getOwner ()
- 
    get the structure's owner's name
    Returns:- 
           string
        the structure's owner's name, or nil if not set.
    
 
- structure:getPlanet ()
- 
    gets the planet this structure is on, or nil if not set.
    Returns:- 
           Planet
        the planet where the structure is located, or nil if not set.
    
 
- structure:rooms ()
- 
    get an iterator over rooms in the structure.
    Returns:- 
        an iterator of Room
    
 Usage:for room in structure:rooms() do -- do something end 
- structure:setDescription (description)
- 
    set the structure's description
    Parameters:- description string the description to set
 Returns:- 
           Structure
        the structure, for function chaining.
    
 
- structure:setInRoom (the)
- 
    sets the room the structure is located in
    Parameters:- the Room room to place the structure into
 Returns:- 
           Structure
        the structure, for function chaining.
    
 
- structure:setName (name)
- 
    set the structure's name
    Parameters:- name string the name to set
 Returns:- 
           Structure
        the structure, for function chaining.
    
 
- structure:setOwner (owner)
- 
    set the structure's owner
    Parameters:- owner string the name of the owner to set
 Returns:- 
           Structure
        the structure, for function chaining.