mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added a new example mod gl_auto_closebox
Updated gl_highlighting_lite example mod. Updated engine structs.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
|
||||
Auto-Close Containers mod for Fallout 2 by Mr.Stalin
|
||||
----------------------------------------------------
|
||||
|
||||
- automatically closes the container after looting
|
||||
|
||||
Requires sfall 4.2.2/3.8.29 or higher
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\define_extra.h"
|
||||
|
||||
procedure start;
|
||||
|
||||
variable lootObject;
|
||||
|
||||
procedure start begin
|
||||
if (game_loaded) then begin
|
||||
register_hook_proc_spec(HOOK_GAMEMODECHANGE, start);
|
||||
end else begin
|
||||
variable mode := get_game_mode;
|
||||
if (mode andAlso mode != INTFACELOOT) then return;
|
||||
if (mode == INTFACELOOT) then begin
|
||||
lootObject := loot_obj;
|
||||
if (obj_type(lootObject) != OBJ_TYPE_ITEM) then lootObject = 0;
|
||||
end else if (lootObject andAlso get_sfall_arg_at(1) == INTFACELOOT) then begin
|
||||
obj_close(lootObject);
|
||||
lootObject = 0;
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,9 @@
|
||||
Auto-Close Containers mod for Fallout 2 by Mr.Stalin
|
||||
----------------------------------------------------
|
||||
|
||||
- automatically closes the container after looting
|
||||
|
||||
|
||||
Requires sfall 4.2.2/3.8.29 or higher.
|
||||
|
||||
To use, copy gl_auto_closebox.int to your scripts folder.
|
||||
@@ -1,4 +1,4 @@
|
||||
Auto Doors mod v1.1 for Fallout 2 by Mr.Stalin
|
||||
Auto Doors mod v1.2 for Fallout 2 by Mr.Stalin
|
||||
----------------------------------------------
|
||||
|
||||
- allows the player to automatically open/walk through unlocked doors when not in combat
|
||||
|
||||
Binary file not shown.
@@ -100,8 +100,16 @@ procedure KeyPressHandler begin
|
||||
end
|
||||
end
|
||||
|
||||
// visual glitch fix - for 3.8.29+
|
||||
procedure GameModeChangeHandler begin
|
||||
if isHighlight and (get_game_mode bwand (INTFACELOOT bwor BARTER)) then begin
|
||||
isHighlight := false;
|
||||
call ToggleHighlight(false);
|
||||
end
|
||||
end
|
||||
|
||||
procedure InventoryMoveHandler begin
|
||||
// remove item outline when player picks up the item
|
||||
// remove item outline when player picks up the item - for 3.8.18+
|
||||
if (isHighlight and get_sfall_arg == 7) then set_outline(get_sfall_arg, 0);
|
||||
end
|
||||
|
||||
@@ -121,6 +129,7 @@ procedure start begin
|
||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
||||
|
||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
||||
register_hook_proc(HOOK_GAMEMODECHANGE, GameModeChangeHandler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMoveHandler);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "..\scripting\headers\sfall.h"
|
||||
#include "..\scripting\headers\define_lite.h"
|
||||
#include "..\scripting\headers\define_extra.h"
|
||||
#include "..\scripting\headers\command_lite.h"
|
||||
#include "..\scripting\headers\dik.h"
|
||||
/*
|
||||
#include "..\scripting\headers\lib.arrays.h"
|
||||
|
||||
Reference in New Issue
Block a user