Added "get_stat_max/min" script functions (#307)

Added updating player's stats on the char screen to "display_stats"
script function (#314)
This commit is contained in:
NovaRain
2020-06-29 11:53:12 +08:00
parent 6ecc1fcd1f
commit 1db8988368
8 changed files with 93 additions and 30 deletions
+9 -2
View File
@@ -480,8 +480,8 @@ Some utility/math functions are available:
- sets the current cursor mode
> void sfall_func0("display_stats")
- displays player stats in the inventory screen display window
- works only in opened inventory
- updates player's stats in the inventory display window or on the character screen
- NOTE: works only when the interface window is opened
> int sfall_func1("lock_is_jammed", object)
- returns 1 if the lock (container or scenery) is currently jammed, 0 otherwise
@@ -730,6 +730,13 @@ optional arguments:
- flags: mode flags (see MSGBOX_* constants in define_extra.h). Pass -1 to skip setting the flags (default flags are NORMAL and YESNO)
- color1/2: the color index in Fallout palette. color1 sets the text color for the first line, and color2 for all subsequent lines of text (default color is 145)
> int sfall_func1("get_stat_min", stat)
> int sfall_func1("get_stat_max", stat)
> int sfall_func2("get_stat_min", stat, bool who)
> int sfall_func2("get_stat_max", stat, bool who)
- returns the maximum or minimum set value of the specified stat (see set_stat_max/min functions)
- who: 0 (false) or omitting the argument - returns the value of the player, 1 (true) - returns the value set for other critters
------------------------
------ MORE INFO -------
------------------------