mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Backported "item_make_explosive" script function
Updated documents for the function. Removed deprecated "register" keyword.
This commit is contained in:
@@ -52,7 +52,7 @@
|
||||
#define HOOK_INVENTORYMOVE (24)
|
||||
#define HOOK_INVENWIELD (25)
|
||||
#define HOOK_ADJUSTFID (26)
|
||||
//#define HOOK_COMBATTURN (27) // unimplemented
|
||||
//#define HOOK_COMBATTURN (27) // unimplemented
|
||||
#define HOOK_CARTRAVEL (28)
|
||||
#define HOOK_SETGLOBALVAR (29)
|
||||
#define HOOK_RESTTIMER (30)
|
||||
@@ -348,6 +348,7 @@
|
||||
#define intface_redraw sfall_func0("intface_redraw")
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define inventory_redraw(invSide) sfall_func1("inventory_redraw", invSide)
|
||||
#define item_make_explosive(pid, activePid, min, max) sfall_func4("item_make_explosive", pid, activePid, min, max)
|
||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
||||
#define lock_is_jammed(obj) sfall_func1("lock_is_jammed", obj)
|
||||
#define loot_obj sfall_func0("loot_obj")
|
||||
|
||||
@@ -286,7 +286,7 @@ FUNCTION REFERENCE
|
||||
|
||||
-----
|
||||
##### `array get_explosion_damage(itemPid)`
|
||||
- Returns an array of the minimum and maximum damage of Dynamite or Plastic Explosives.
|
||||
- Returns an array of the minimum and maximum damage of the explosive item.
|
||||
|
||||
-----
|
||||
##### `void set_dynamite_damage(minDmg, maxDmg)`
|
||||
@@ -682,6 +682,17 @@ sfall_funcX metarule functions
|
||||
- Redraws inventory list in the inventory/use inventory item on/loot/barter screens
|
||||
- `invSide` specifies which side needs to be redrawn: 0 - the player, 1 - target (container/NPC in loot/barter screens), -1 - both sides (same as without argument)
|
||||
|
||||
----
|
||||
#### item_make_explosive
|
||||
`void sfall_func3("item_make_explosive", int pid, int activePid, int damage)`\
|
||||
`void sfall_func4("item_make_explosive", int pid, int activePid, int min, int max)`
|
||||
- Makes the specified item (pid) an explosive item like Dynamite or Plastic Explosives
|
||||
- `activePid` is for an item with an active timer, can be the same as the `pid` argument
|
||||
- The item proto must be the **Misc Item** type and have the **Use** action flag
|
||||
- `min` and `max` are the minimum and maximum explosion damage
|
||||
- Using the function on an item that is already set as an explosive will override its previous settings
|
||||
- __NOTE:__ this function does not work for pid's of Dynamite and Plastic Explosives
|
||||
|
||||
----
|
||||
#### get_string_pointer
|
||||
`int sfall_func1("get_string_pointer", string text)`
|
||||
|
||||
Reference in New Issue
Block a user