Added "obj_under_cursor" script function.

Backported some script functions from 4.0: lock_is_jammed, unjam_lock.
This commit is contained in:
NovaRain
2018-11-04 09:14:02 +08:00
parent e9df81ac78
commit 08a891a0fc
8 changed files with 61 additions and 0 deletions
@@ -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 -------
------------------------