Added description of HOOK_RESTTIMER, set_rest_heal_time, and set_rest_mode to documents.

Renamed the bit flags for set_rest_mode.
Fixed compilation error in Worldmap.cpp.
This commit is contained in:
NovaRain
2018-05-08 12:30:53 +08:00
parent 9fa59a0d75
commit ee9010217e
5 changed files with 65 additions and 55 deletions
+5 -5
View File
@@ -180,6 +180,11 @@
#define CURSOR_COMMAND (1)
#define CURSOR_TARGETING (2)
//Valid flags for set_rest_mode
#define RESTMODE_DISABLED (1) // disable resting on all maps
#define RESTMODE_STRICT (2) // disable resting on maps with "can_rest_here=No" in Maps.txt, even if there are no other critters
#define RESTMODE_NO_HEALING (4) // disable healing during resting
#define mstr_combat(x) (message_str_game(GAME_MSG_COMBAT, x))
#define mstr_ai(x) (message_str_game(GAME_MSG_AI, x))
#define mstr_scrname(x) (message_str_game(GAME_MSG_SCRNAME, x))
@@ -207,11 +212,6 @@
#define BLOCKING_TYPE_AI (2)
#define BLOCKING_TYPE_SIGHT (3) // not really useful (works not as you would expect), game uses this only when checking if you can talk to a person
//Rest mode flags
#define DISABLE_REST (1)
#define DISABLE_REST_FIX (2)
#define DISABLE_REST_HEAL (4)
#define party_member_list_critters party_member_list(0)
#define party_member_list_all party_member_list(1)
+13
View File
@@ -485,3 +485,16 @@ int arg1 - the index number of the global variable being set
int arg2 - the set value of the global variable
int ret1 - overrides the value of the global variable
-------------------------------------------
HOOK_RESTTIMER (hs_resttimer.int)
Runs continuously while the player is resting (using pipboy alarm clock).
int arg1 - the game time in ticks
int arg2 - event type: 1 - when the resting ends normally, -1 - when pressing ESC to cancel the timer, 0 - otherwise
int arg3 - the hour part of the length of resting time
int arg4 - the minute part of the length of resting time
int ret1 - pass 1 to interrupt the resting
@@ -466,8 +466,12 @@ Some utility/math functions are available:
- works only in map_enter_p_proc procedure
> void sfall_func1("set_rest_heal_time", int minutes)
- sets the time interval in minutes for healing during resting. The default is 180
- The time interval will be reset each time the player reloads the game
> void sfall_func1("set_rest_mode", int mode)
- sets the bit flags for the rest mode (see REST_* constants in sfall.h)
- passing 0 will reset the rest mode. It will also be reset each time the player reloads the game
------------------------
------ MORE INFO -------