mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added signal_close_game script function
Updated documents and version number.
This commit is contained in:
@@ -376,6 +376,10 @@
|
||||
detail: int has_fake_trait(string name)
|
||||
opcode: 0x81c2
|
||||
doc: Returns the number of levels the player has of the traits with the given name or ID of extra trait.
|
||||
- name: add_trait
|
||||
detail: void add_trait(int traitID)
|
||||
doc: adds the specified trait to the player
|
||||
macro: sfall.h
|
||||
- name: remove_trait
|
||||
detail: void remove_trait(int traitID)
|
||||
opcode: 0x8225
|
||||
@@ -1063,10 +1067,6 @@
|
||||
slot: 0 - armor slot, 1 - right slot, 2 - left slot (see `INVEN_TYPE_*` in **define.h**)
|
||||
|
||||
|
||||
- name: add_trait
|
||||
detail: void add_trait(int traitID)
|
||||
doc: adds the specified trait to the player
|
||||
macro: sfall.h
|
||||
- name: get_inven_ap_cost
|
||||
detail: int get_inven_ap_cost
|
||||
doc: Returns the current AP cost to access the inventory in combat
|
||||
@@ -1078,6 +1078,11 @@
|
||||
`fixedParam`: the value that is passed to the `timed_event_p_proc` procedure for the `fixed_param` function
|
||||
macro: sfall.h
|
||||
|
||||
- name: signal_close_game
|
||||
detail: void signal_close_game
|
||||
doc: Works in a similar way to vanilla function: `metarule(METARULE_SIGNAL_END_GAME, 0)`, but it will then close the game instead of only returning the player to the main menu
|
||||
macro: sfall.h
|
||||
|
||||
- name: Utility
|
||||
items:
|
||||
- name: sprintf
|
||||
@@ -1520,7 +1525,7 @@
|
||||
macro: sfall.h
|
||||
|
||||
- name: objects_in_radius
|
||||
detail: objects_in_radius", int tile, int radius, int elevation, int type)
|
||||
detail: array objects_in_radius(int tile, int radius, int elevation, int type)
|
||||
doc: |
|
||||
- returns an array of objects of a type (see `OBJ_TYPE_*` constants in **define_extra.h**) within the specified radius from the given tile
|
||||
- passing -1 to the `type` argument or _not specifying it_ will return all objects within the radius
|
||||
|
||||
@@ -391,6 +391,7 @@
|
||||
#define set_window_flag(winID, flag, value) sfall_func3("set_window_flag", winID, flag, value)
|
||||
#define show_win sfall_func0("show_window")
|
||||
#define show_window(winName) sfall_func1("show_window", winName)
|
||||
#define signal_close_game sfall_func0("signal_close_game")
|
||||
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
||||
#define string_compare(str1, str2) sfall_func2("string_compare", str1, str2)
|
||||
#define string_compare_locale(str1, str2, codePage) sfall_func3("string_compare", str1, str2, codePage)
|
||||
|
||||
@@ -244,7 +244,7 @@ FUNCTION REFERENCE
|
||||
- Returns FID of a roof tile at given tile number and elevation. Note that FID of 1 is used when there is no actual roof.
|
||||
|
||||
-----
|
||||
##### `void reg_anim_combat_check`
|
||||
##### `void reg_anim_combat_check(int enable)`
|
||||
- Allows enabling all `reg_anim_*` functions in combat (including vanilla functions) if set to 0. It is automatically reset at the end of each frame, so you need to call it before `reg_anim_begin() ... reg_anim_end()` code block.
|
||||
|
||||
**Some additional `reg_anim_*` functions were introduced. They all work in the same convention as vanilla functions and use the same underlying code.**
|
||||
@@ -1134,6 +1134,11 @@ sfall_funcX metarule functions
|
||||
- Plays the specified animation while simultaneously moving the object to the given tile
|
||||
- `delay`: delay from the previous animation. A value of -1 will execute the specified animation immediately after the previous one in the sequence ends
|
||||
|
||||
----
|
||||
#### signal_close_game
|
||||
`void sfall_func0("signal_close_game")`
|
||||
- Works in a similar way to vanilla function: `metarule(METARULE_SIGNAL_END_GAME, 0)`, but it will then close the game instead of only returning the player to the main menu
|
||||
|
||||
|
||||
****
|
||||
_See other documentation files (arrays.md, hookscripts.md) for related functions reference._
|
||||
|
||||
Reference in New Issue
Block a user