mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "obj_under_cursor" script function.
Backported some script functions from 4.0: lock_is_jammed, unjam_lock.
This commit is contained in:
@@ -224,6 +224,8 @@
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define inventory_redraw(invSide) sfall_func1("inventory_redraw", invSide)
|
||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
||||
#define lock_is_jammed(obj) sfall_func1("lock_is_jammed", obj)
|
||||
#define obj_under_cursor(crSwitch, inclDude) sfall_func2("obj_under_cursor", crSwitch, inclDude)
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
#define set_cursor_mode(mode) sfall_func1("set_cursor_mode", mode)
|
||||
#define set_flags(obj, flags) sfall_func2("set_flags", obj, flags)
|
||||
@@ -232,3 +234,4 @@
|
||||
#define set_outline(obj, color) sfall_func2("set_outline", obj, color)
|
||||
#define spatial_radius(obj) sfall_func1("spatial_radius", obj)
|
||||
#define tile_refresh_display sfall_func0("tile_refresh_display")
|
||||
#define unjam_lock(obj) sfall_func1("unjam_lock", obj)
|
||||
|
||||
@@ -424,6 +424,13 @@ Some utility/math functions are available:
|
||||
- displays player stats in the inventory screen display window
|
||||
- works only in opened inventory
|
||||
|
||||
> int sfall_func1("lock_is_jammed", object)
|
||||
- returns 1 if the lock (container or scenery) is currently jammed, 0 otherwise
|
||||
|
||||
> void sfall_func1("unjam_lock", object)
|
||||
- unjams a lock immediately without having to wait until the next day, or leave the map and then return after 24 hours
|
||||
- does not work in use_skill_on_p_proc procedure
|
||||
|
||||
> array sfall_func0("get_map_enter_position")
|
||||
- returns an array of the player's position data (index 0 - tile, 1 - elevation, 2 - rotation) when entering the map through exit grids
|
||||
- if entering from the world map, the tile value will be -1
|
||||
@@ -449,6 +456,11 @@ Some utility/math functions are available:
|
||||
- works just like vanilla CreateWin function, but creates a window with MoveOnTop flag if the flags argument is not specified, and allows to set additional flags for the created window
|
||||
- MoveOnTop flag allows the created window to be placed on top of the game interface
|
||||
|
||||
> object sfall_func2("obj_under_cursor", bool crSwitch, bool inclDude)
|
||||
- returns the object under the cursor on the main game screen
|
||||
- crSwitch: True - only checks critters and ignores their cover (roof tiles, walls, scenery, etc.), False - checks all objects (can't check critters under objects)
|
||||
- passing False to the inclDude argument will ignore dude_obj
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
Reference in New Issue
Block a user