mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "display_stats" script function #113
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#include "..\..\..\FalloutEngine\Fallout2.h"
|
||||
#include "..\..\..\InputFuncs.h"
|
||||
#include "..\..\BarBoxes.h"
|
||||
#include "..\..\LoadGameHook.h"
|
||||
#include "..\..\ScriptExtender.h"
|
||||
#include "..\OpcodeContext.h"
|
||||
|
||||
@@ -449,5 +450,12 @@ void sf_set_cursor_mode(OpcodeContext& ctx) {
|
||||
fo::func::gmouse_3d_set_mode(ctx.arg(0).asInt());
|
||||
}
|
||||
|
||||
void sf_display_stats(OpcodeContext& ctx) {
|
||||
// calling the function outside of inventory screen will crash the game
|
||||
if (GetLoopFlags() & INVENTORY) {
|
||||
__asm call fo::funcoffs::display_stats_
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,5 +87,7 @@ void sf_get_cursor_mode(OpcodeContext&);
|
||||
|
||||
void sf_set_cursor_mode(OpcodeContext&);
|
||||
|
||||
void sf_display_stats(OpcodeContext&);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,6 +78,7 @@ static const SfallMetarule* currentMetarule;
|
||||
static const SfallMetarule metarules[] = {
|
||||
{"car_gas_amount", sf_car_gas_amount, 0, 0},
|
||||
{"critter_inven_obj2", sf_critter_inven_obj2, 2, 2, {ARG_OBJECT, ARG_INT}},
|
||||
{"display_stats", sf_display_stats, 0, 0},
|
||||
{"exec_map_update_scripts", sf_exec_map_update_scripts, 0, 0},
|
||||
{"get_cursor_mode", sf_get_cursor_mode, 0, 0},
|
||||
{"get_flags", sf_get_flags, 1, 1, {ARG_OBJECT}},
|
||||
|
||||
Reference in New Issue
Block a user