mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Backported "get_ini_sections/section" functions from 4.0
Minor code edits.
This commit is contained in:
@@ -284,6 +284,8 @@
|
||||
#define get_current_inven_size(obj) sfall_func1("get_current_inven_size", obj)
|
||||
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
||||
#define get_flags(obj) sfall_func1("get_flags", obj)
|
||||
#define get_ini_section(file, sect) sfall_func2("get_ini_section", file, sect)
|
||||
#define get_ini_sections(file) sfall_func1("get_ini_sections", file)
|
||||
#define get_interface_x(winType) sfall_func2("get_window_attribute", winType, 1)
|
||||
#define get_interface_y(winType) sfall_func2("get_window_attribute", winType, 2)
|
||||
#define get_inven_ap_cost sfall_func0("get_inven_ap_cost")
|
||||
|
||||
@@ -456,6 +456,13 @@ Some utility/math functions are available:
|
||||
> void sfall_func0("real_dude_obj")
|
||||
- returns the initial dude_obj after taking control of other critters in combat
|
||||
|
||||
> array sfall_func1("get_ini_sections", string fileName)
|
||||
- returns an array of names of all sections in a given INI file
|
||||
|
||||
> array sfall_func2("get_ini_section", string fileName, string section)
|
||||
- returns an associative array of keys and values for a given INI file and section
|
||||
- NOTE: all keys and their values will be of String type
|
||||
|
||||
> int sfall_func0("car_gas_amount")
|
||||
- returns the current amount of fuel in player's car (between 0 and 80000)
|
||||
- to change fuel amount, use vanilla function: metarule(METARULE_GIVE_CAR_GAS, amount) - amount can be positive or negative
|
||||
|
||||
Reference in New Issue
Block a user