mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a new hook: HOOK_ADJUSTRADS
Fixed a crash bug in ScriptExtender.cpp from commit c736e39.
Some adjustments to the hook injection mechanism.
This commit is contained in:
@@ -806,7 +806,10 @@
|
||||
#define bit_32 (0x80000000)
|
||||
#define bit_ALL (0xFFFFFFFF)
|
||||
|
||||
|
||||
#define ROLL_CRITICAL_FAILURE 0
|
||||
#define ROLL_FAILURE 1
|
||||
#define ROLL_SUCCESS 2
|
||||
#define ROLL_CRITICAL_SUCCESS 3
|
||||
|
||||
//Misc commands
|
||||
#define obj_get_rot(obj) (has_trait(TRAIT_OBJECT, obj, OBJECT_CUR_ROT))
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
#define HOOK_TARGETOBJECT (42)
|
||||
#define HOOK_ENCOUNTER (43)
|
||||
#define HOOK_ADJUSTPOISON (44)
|
||||
#define HOOK_ADJUSTRADS (45)
|
||||
|
||||
//Valid arguments to list_begin
|
||||
#define LIST_CRITTERS (0)
|
||||
|
||||
@@ -707,3 +707,14 @@ int arg2 - the damage value at the time of applying the poison effect
|
||||
|
||||
int ret0 - the new amount of poison being added/removed
|
||||
int ret1 - the new damage value, only negative values are allowed (will only be valid at the time of taking damage from the poison)
|
||||
|
||||
-------------------------------------------
|
||||
|
||||
HOOK_ADJUSTRADS (hs_adjustrads.int)
|
||||
|
||||
Runs when a critter's radiation level is changed.
|
||||
|
||||
Critter arg0 - the critter (usually dude_obj)
|
||||
int arg1 - the amount of radiation being added/removed
|
||||
|
||||
int ret0 - the new amount of radiation being added/removed
|
||||
|
||||
Reference in New Issue
Block a user