Simutrans-Squirrel-API
Public Member Functions | Private Member Functions | List of all members
attraction_list_x Class Reference

Public Member Functions

integer get_count ()
 

Private Member Functions

building_x _get (integer)
 
void _nexti ()
 

Detailed Description

Implements iterator to iterate through the list of all attractions on the map.

Usage:

local list = world.get_attraction_list()
// list is now of type attraction_list_x
foreach(att in list) {
... // att is an instance of the building_x class
}

Definition at line 225 of file api_world.cc.

Member Function Documentation

◆ _get()

building_x attraction_list_x::_get ( integer  )
private

Meta-method to be used in foreach loops to loop over all attractions on the map. Do not call it directly.

◆ _nexti()

void attraction_list_x::_nexti ( )
private

Meta-method to be used in foreach loops to loop over all attractions on the map. Do not call it directly.

◆ get_count()

integer attraction_list_x::get_count ( )

Returns number of attractions in the list.


The documentation for this class was generated from the following file: