diff --git a/artifacts/config_files/sfall-mods.ini b/artifacts/config_files/sfall-mods.ini index 33f9ef53..042967a7 100644 --- a/artifacts/config_files/sfall-mods.ini +++ b/artifacts/config_files/sfall-mods.ini @@ -1,11 +1,11 @@ [Highlighting] ; DX scandode of a key to press to highlight items on the ground -; 207 - END key -Key=207 +; 42 - SHIFT key +Key=42 -; Set to 1 to ignore NO_HIGHLIGHT flag present on most containers -IgnoreFlags=1 +; Set to 1 also highlight containers +Containers=1 ; Set the color of outlines, available colors: ; 1 - glowing red @@ -21,7 +21,7 @@ OutlineColor=32 ; 0 - ignored ; 1 - requires Motion Scanner present in player inventory to activate highlighting ; 2 - requires Motion Scanner and also requires 1 charge on every use (depleted scanner will not work anymore) -MotionScanner=2 +MotionScanner=1 [CombatControl] diff --git a/artifacts/mods/gl_highlighting.int b/artifacts/mods/gl_highlighting.int index 629e5418..5e8aed6f 100644 Binary files a/artifacts/mods/gl_highlighting.int and b/artifacts/mods/gl_highlighting.int differ diff --git a/artifacts/mods/gl_highlighting.ssl b/artifacts/mods/gl_highlighting.ssl index 9b9cd23f..a447a1c1 100644 --- a/artifacts/mods/gl_highlighting.ssl +++ b/artifacts/mods/gl_highlighting.ssl @@ -26,18 +26,21 @@ variable configSection := "Highlighting"; variable highlightKey; -variable ignoreFlags; +variable alsoContainer; variable outlineColor; variable motionScanner; variable highlightFailMsg1; variable highlightFailMsg2; procedure ToggleHighlightObject(variable obj, variable enable) begin - if obj - and (not enable or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) - and (ignoreFlags or not NO_HIGHLIGHT(obj)) then begin - if (enable) then set_outline(obj, outlineColor); - else set_outline(obj, 0); + if obj and (not enable or not obj_blocking_line(dude_obj, tile_num(obj), BLOCKING_TYPE_SHOOT)) then begin + if (alsoContainer and obj_item_subtype(obj) == item_type_container) then begin + if (enable) then set_outline(obj, outlineColor); + else set_outline(obj, 0); + end else if (not NO_HIGHLIGHT(obj)) then begin + if (enable) then set_outline(obj, outlineColor); + else set_outline(obj, 0); + end end end @@ -95,7 +98,7 @@ procedure start begin call InitConfigs; highlightKey := GetConfig(configSection, "Key", 0); - ignoreFlags := GetConfig(configSection, "IgnoreFlags", 0); + alsoContainer := GetConfig(configSection, "Containers", 0); outlineColor := GetConfig(configSection, "OutlineColor", 0); motionScanner := GetConfig(configSection, "MotionScanner", 1);