mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Replaced 'Take All' hotkey mod with UI hotkeys mod
Minor edits to code/documents.
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
|
||||
UI Hotkeys mod for Fallout 2 by NovaRain
|
||||
----------------------------------------
|
||||
|
||||
- closes some game interfaces by pressing their hotkeys again:
|
||||
* 'I' key for Inventory
|
||||
* 'S' key for Skilldex
|
||||
* 'Z' key for Pip-Boy
|
||||
|
||||
- extends the functionality of the 'Space' key (Caps Lock must be off):
|
||||
* takes all items in the loot screen
|
||||
* makes the offer in the barter screen
|
||||
|
||||
Requires sfall 3.5 or higher
|
||||
|
||||
*/
|
||||
|
||||
#include "..\headers\sfall\sfall.h"
|
||||
#include "..\headers\sfall\dik.h"
|
||||
|
||||
procedure start;
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
register_hook(HOOK_KEYPRESS);
|
||||
end else begin
|
||||
variable
|
||||
event := get_sfall_arg,
|
||||
keyDX := get_sfall_arg,
|
||||
mode;
|
||||
|
||||
if (event) then begin
|
||||
mode := get_game_mode;
|
||||
if (keyDX == DIK_I and (mode bwand INVENTORY)) then begin
|
||||
tap_key(DIK_ESCAPE);
|
||||
end else if (keyDX == DIK_S and (mode bwand SKILLDEX)) then begin
|
||||
tap_key(DIK_ESCAPE);
|
||||
end else if (keyDX == DIK_Z and (mode bwand PIPBOY)) then begin
|
||||
tap_key(DIK_ESCAPE);
|
||||
end else if (keyDX == DIK_SPACE) then begin
|
||||
if (mode bwand INTFACELOOT) then begin
|
||||
tap_key(DIK_CAPITAL);
|
||||
tap_key(DIK_A);
|
||||
tap_key(DIK_CAPITAL);
|
||||
end else if (mode bwand BARTER) then begin
|
||||
tap_key(DIK_M);
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,22 @@
|
||||
UI Hotkeys mod for Fallout 2 by NovaRain
|
||||
----------------------------------------
|
||||
|
||||
- closes some game interfaces by pressing their hotkeys again:
|
||||
* 'I' key for Inventory
|
||||
* 'S' key for Skilldex
|
||||
* 'Z' key for Pip-Boy
|
||||
|
||||
- extends the functionality of the 'Space' key (Caps Lock must be off):
|
||||
* takes all items in the loot screen
|
||||
* makes the offer in the barter screen
|
||||
|
||||
- Note:
|
||||
* the uppercase 'A' (shift + A if Caps Lock is off) is the built-in hotkey for the TAKE ALL button on the loot screen
|
||||
* the lowercase 'm' is the built-in hotkey for the OFFER button on the barter screen
|
||||
|
||||
|
||||
Requires sfall 3.5 or higher
|
||||
|
||||
To use, copy gl_uihotkeys.int to your scripts folder.
|
||||
|
||||
This mod is a simple example of how you can use HOOK_KEYPRESS hooks.
|
||||
Reference in New Issue
Block a user