Link Search Menu Expand Document

Localmap

Функции


get_can_rest_on_map

funcX

get_can_rest_on_map(int mapNum, int elev)
  • returns the set rest value of the map after using the set_can_rest_on_map function
  • Returns -1 if the rest value of the map was not previously set (i.e. no data for the map in sfalldb.sav)
  • the can_rest_here values from maps.txt are ignored.

get_light_level

int get_light_level()

Returns ambient light level in range 0..65536. The value returned by get_light_level may not exactly match that set by set_light_level, as set_light_level applies modifiers from the Night Vision perk.


objects_in_radius

funcX

objects_in_radius", int tile, int radius, int elevation, int type)
  • returns an array of objects of a type (see OBJ_TYPE_* constants in define_extra.h) within the specified radius from the given tile
  • passing -1 to the type argument or not specifying it will return all objects within the radius
  • the radius is limited to 50 hexes

set_can_rest_on_map

funcX

void set_can_rest_on_map(int mapNum, int elev, bool value)

Allows/disallows to rest on the map for the specified level, overrides the can_rest_here values in maps.txt.

  • mapNum is the map index from maps.txt
  • passing -1 to the elev argument will set the rest value for all map elevations
  • the set rest value will be stored in sfalldb.sav file (in savegame)