mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "lock_is_jammed" and "unjam_lock" script functions.
This commit is contained in:
@@ -223,6 +223,7 @@
|
||||
#define intface_redraw sfall_func0("intface_redraw")
|
||||
#define intface_show sfall_func0("intface_show")
|
||||
#define item_weight(obj) sfall_func1("item_weight", obj)
|
||||
#define lock_is_jammed(obj) sfall_func1("lock_is_jammed", obj)
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
#define real_dude_obj sfall_func0("real_dude_obj")
|
||||
#define set_car_intface_art(artIndex) sfall_func1("set_car_intface_art", artIndex)
|
||||
@@ -233,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)
|
||||
|
||||
@@ -373,7 +373,7 @@ Some utility/math functions are available:
|
||||
- executes map_update_p_proc for all objects on map and global/hook scripts as well
|
||||
|
||||
> void sfall_func2("set_ini_setting", string setting, int/string value)
|
||||
- writes an integer or a string value to an ini file in the Fallout directory. If the ini file doesn't exist, it will be created
|
||||
- writes an integer or a string value to an ini file in the Fallout directory. If the ini file does not exist, it will be created
|
||||
- The setting argument works in the same way as in get_ini_setting; seperate the file name, section and key with a '|' character; e.g. 'set_ini_setting("myini.ini|mysec|var1", 42)'
|
||||
- The file name is limited to 63 chars, including the extension
|
||||
- The section name is limited to 32 characters
|
||||
@@ -435,6 +435,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
|
||||
- does not work in use_skill_on_p_proc and use_obj_on_proc procedures
|
||||
|
||||
------------------------
|
||||
------ MORE INFO -------
|
||||
------------------------
|
||||
|
||||
@@ -91,6 +91,7 @@ static const SfallMetarule metarules[] = {
|
||||
{"intface_redraw", sf_intface_redraw, 0, 0},
|
||||
{"intface_show", sf_intface_show, 0, 0},
|
||||
{"item_weight", sf_item_weight, 1, 1, {ARG_OBJECT}},
|
||||
{"lock_is_jammed", sf_lock_is_jammed, 1, 1, {ARG_OBJECT}},
|
||||
{"outlined_object", sf_outlined_object, 0, 0},
|
||||
{"real_dude_obj", sf_real_dude_obj, 0, 0},
|
||||
{"set_car_intface_art", sf_set_car_intface_art, 1, 1, {ARG_INT}},
|
||||
@@ -101,6 +102,7 @@ static const SfallMetarule metarules[] = {
|
||||
{"set_outline", sf_set_outline, 2, 2, {ARG_OBJECT, ARG_INT}},
|
||||
{"spatial_radius", sf_spatial_radius, 1, 1, {ARG_OBJECT}},
|
||||
{"tile_refresh_display", sf_tile_refresh_display, 0, 0},
|
||||
{"unjam_lock", sf_unjam_lock, 1, 1, {ARG_OBJECT}},
|
||||
{"validate_test", sf_test, 2, 5, {ARG_INT, ARG_NUMBER, ARG_STRING, ARG_OBJECT, ARG_ANY}},
|
||||
};
|
||||
|
||||
|
||||
@@ -409,5 +409,13 @@ void sf_car_gas_amount(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::var::carGasAmount);
|
||||
}
|
||||
|
||||
void sf_lock_is_jammed(OpcodeContext& ctx) {
|
||||
ctx.setReturn(fo::func::obj_lock_is_jammed(ctx.arg(0).asObject()));
|
||||
}
|
||||
|
||||
void sf_unjam_lock(OpcodeContext& ctx) {
|
||||
fo::func::obj_unjam_lock(ctx.arg(0).asObject());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,5 +85,9 @@ void sf_real_dude_obj(OpcodeContext&);
|
||||
|
||||
void sf_car_gas_amount(OpcodeContext&);
|
||||
|
||||
void sf_lock_is_jammed(OpcodeContext&);
|
||||
|
||||
void sf_unjam_lock(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user