mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Backported the code of four hookscripts from 4.x.
* FINDTARGET, BARTERPRICE, WITHINPERCEPTION, and INVENTORYMOVE. For unifying the behavior of common hooks between 3.8 and 4.x. Added the example script of WITHINPERCEPTION from 4.x. Updated gl_highlighting_lite.
This commit is contained in:
Binary file not shown.
@@ -100,6 +100,11 @@ procedure KeyPressHandler begin
|
||||
end
|
||||
end
|
||||
|
||||
procedure InventoryMoveHandler begin
|
||||
// remove item outline when player picks up the item
|
||||
if (isHighlight and get_sfall_arg == 7) then set_outline(get_sfall_arg, 0);
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded and (sfall_ver_major < 4) then begin
|
||||
call InitConfigs;
|
||||
@@ -116,5 +121,6 @@ procedure start begin
|
||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
||||
|
||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
||||
register_hook_proc(HOOK_INVENTORYMOVE, InventoryMoveHandler);
|
||||
end
|
||||
end
|
||||
|
||||
@@ -17,5 +17,5 @@ Also, you should disable the built-in function in ddraw.ini (ToggleItemHighlight
|
||||
|
||||
Note that due to the lack of newer game hooks in sfall 3.8.x, there are some minor visual glitches with the lite version:
|
||||
- items will be kept highlighted when entering combat while holding the highlight key.
|
||||
- when you pick up items while holding the highlight key, they will be kept highlighted if you drop them on the ground.
|
||||
- when you pick up items while holding the highlight key, they will be kept highlighted if you drop them on the ground (fixed for 3.8.18+).
|
||||
Both glitches can bo solved by pressing and releasing the highlight key again.
|
||||
|
||||
Reference in New Issue
Block a user