Simutrans-Squirrel-API
extend_get Class Reference

#include <api_base.h>

Inheritance diagram for extend_get:
city_x convoy_x factory_production_x factory_x halt_x line_x map_object_x obj_desc_x player_x square_x tile_x world

Detailed Description

Class that implements an extended get-method.

If child class has method

function get_something()

then function result can be accessed by

local result = some_instance.something

as if the class has a member variable.

Example:

local player = player_x(0)
local cash1 = player.get_cash()[0]
local cash2 = player.cash[0]
// now cash1 == cash2

Definition at line 75 of file api_base.h.


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