mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "metarule_exist" script function.
Limited the maximum number of extra game msg files to 4096 (from 4.x). Code edit to Message.cpp and ScriptUtils.hpp.
This commit is contained in:
@@ -232,6 +232,7 @@
|
||||
#define get_cursor_mode sfall_func0("get_cursor_mode")
|
||||
#define get_flags(obj) sfall_func1("get_flags", obj)
|
||||
#define get_map_enter_position sfall_func0("get_map_enter_position")
|
||||
#define get_metarule_table sfall_func0("get_metarule_table")
|
||||
#define get_object_data(obj, offset) sfall_func2("get_object_data", obj, offset)
|
||||
#define get_outline(obj) sfall_func1("get_outline", obj)
|
||||
#define intface_hide sfall_func0("intface_hide")
|
||||
@@ -242,6 +243,7 @@
|
||||
#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")
|
||||
#define metarule_exist(metarule) sfall_func1("metarule_exist", metarule)
|
||||
#define npc_engine_level_up(toggle) sfall_func1("npc_engine_level_up", toggle)
|
||||
#define obj_under_cursor(crSwitch, inclDude) sfall_func2("obj_under_cursor", crSwitch, inclDude)
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
|
||||
@@ -305,7 +305,7 @@ Some utility/math functions are available:
|
||||
> string message_str_game(int fileId, int messageId)
|
||||
- works exactly the same as message_str, except you get messages from files in "text\<language>\game\" directory
|
||||
- use GAME_MSG_* defines or mstr_* macros from sfall.h to use specific msg file
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
- Additional game msg files added by ExtraGameMsgFileList setting will have consecutive fileIds assigned beginning from 0x2000 to 0x2FFF. (e.g. if you set ExtraGameMsgFileList=foo,bar in ddraw.ini, foo.msg will be associated with 0x2000 and bar.msg with 0x2001.)
|
||||
|
||||
> int sneak_success
|
||||
- returns 1 if the player is currently sneaking, and last sneak attempt (roll against skill) was successful; 0 otherwise
|
||||
@@ -359,8 +359,11 @@ Some utility/math functions are available:
|
||||
> array sfall_func0("get_metarule_table")
|
||||
- returns names of all currently available scripting functions (via sfall_funcX)
|
||||
|
||||
> bool sfall_func1("metarule_exist", string metaruleName)
|
||||
- returns True if the specified name of metarule (sfall_funcX) function exists in the current version of sfall
|
||||
|
||||
> int sfall_func1("spatial_radius", object object)
|
||||
- return radius of spatial script, associated with given dummy-object (returned by create_spatial)
|
||||
- returns radius of spatial script, associated with given dummy-object (returned by create_spatial)
|
||||
|
||||
> object sfall_func2("critter_inven_obj2", object invenObj, int type)
|
||||
- works just like vanilla critter_inven_obj, but correctly reports item in player's inactive hand slot
|
||||
|
||||
Reference in New Issue
Block a user