mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added real_dude_obj scripting function, useful for checking if currently controlling NPC or "real" character
This commit is contained in:
@@ -218,3 +218,5 @@
|
||||
#define outlined_object sfall_func0("outlined_object")
|
||||
#define get_ini_sections(file) sfall_func1("get_ini_sections", file)
|
||||
#define get_ini_section(file, sect) sfall_func2("get_ini_section", file, sect)
|
||||
#define set_dude_obj(critter) sfall_func1("set_dude_obj", critter)
|
||||
#define real_dude_obj sfall_func0("real_dude_obj")
|
||||
|
||||
@@ -134,6 +134,7 @@ static const SfallMetarule metaruleArray[] = {
|
||||
{"tile_refresh_display", sf_tile_refresh_display, 0, 0},
|
||||
{"outlined_object", sf_outlined_object, 0, 0},
|
||||
{"set_dude_obj", sf_set_dude_obj, 1, 1, {ARG_OBJECT}},
|
||||
{"real_dude_obj", sf_real_dude_obj, 0, 0},
|
||||
};
|
||||
|
||||
void InitMetaruleTable() {
|
||||
|
||||
@@ -438,5 +438,9 @@ void sf_set_dude_obj(OpcodeContext& ctx) {
|
||||
}
|
||||
}
|
||||
|
||||
void sf_real_dude_obj(OpcodeContext& ctx) {
|
||||
ctx.setReturn(PartyControl::RealDudeObject());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,5 +81,7 @@ void sf_item_weight(OpcodeContext&);
|
||||
|
||||
void sf_set_dude_obj(OpcodeContext&);
|
||||
|
||||
void sf_real_dude_obj(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user