diff --git a/artifacts/config_files/sfall-mods.ini b/artifacts/config_files/sfall-mods.ini index 86beef7e..f59dddaf 100644 --- a/artifacts/config_files/sfall-mods.ini +++ b/artifacts/config_files/sfall-mods.ini @@ -7,9 +7,15 @@ Key=42 ; Set to 1 to also highlight containers Containers=1 +; Set to 1 to ignore NO_HIGHLIGHT flag on objects and highlight them regardless +IgnoreNoHighlight=0 + ; Set to 1 to also highlight lootable corpses Corpses=1 +; Set to 1 to also highlight alive critters +Critters=0 + ; Set to 1 to only highlight objects in the player's line-of-sight CheckLOS=0 diff --git a/artifacts/mods/gl_highlighting.int b/artifacts/mods/gl_highlighting.int index 31771aea..b771c352 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 654fc21c..2e695ddc 100644 --- a/artifacts/mods/gl_highlighting.ssl +++ b/artifacts/mods/gl_highlighting.ssl @@ -4,7 +4,7 @@ Previously was part of sfall itself, now a separate mod. Features: - - highlighting items, containers (optional) and dead bodies (optional) on the ground + - highlighting items, containers (optional), critters (optional) and dead bodies (optional) on the ground - configurable hotkey is used to trigger highlight - only objects in direct line-of-sight of player are highlighted (optional) - motion scanner is required to enable highlight (optional) @@ -28,7 +28,9 @@ variable configSection := "Highlighting"; variable highlightKey; variable alsoContainer; +variable ignoreNoHighlight; variable alsoCorpse; +variable alsoCritter; variable checkLOS; variable outlineColor; variable motionScanner; @@ -37,7 +39,7 @@ variable highlightFailMsg2; procedure ToggleHighlightObject(variable obj, variable enable) begin if obj and (not enable or not checkLOS 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) or (not NO_HIGHLIGHT(obj)) then begin + if (alsoContainer and obj_item_subtype(obj) == item_type_container) or (not (NO_HIGHLIGHT(obj) and not ignoreNoHighlight)) then begin if (enable) then set_outline(obj, outlineColor); else set_outline(obj, 0); end @@ -58,6 +60,13 @@ procedure ToggleHighlight(variable enable) begin end end end + if (alsoCritter) then begin + foreach obj in list_as_array(LIST_CRITTERS) begin + if critter_state(obj) != CRITTER_IS_DEAD then begin + call ToggleHighlightObject(obj, enable); + end + end + end tile_refresh_display; end @@ -66,7 +75,7 @@ procedure KeyPressHandler begin scanCode := get_sfall_arg, scanner, charges; - if scanCode == highlightKey then begin + if scanCode == highlightKey and not (get_game_mode BWAND INTFACELOOT) then begin if pressed then begin if motionScanner then begin scanner := obj_carrying_pid_obj(dude_obj, PID_MOTION_SENSOR); @@ -101,7 +110,9 @@ procedure start begin highlightKey := GetConfig(configSection, "Key", 0); alsoContainer := GetConfig(configSection, "Containers", 0); + ignoreNoHighlight := GetConfig(configSection, "IgnoreNoHighlight", 0); alsoCorpse := GetConfig(configSection, "Corpses", 0); + alsoCritter := GetConfig(configSection, "Critters", 0); checkLOS := GetConfig(configSection, "CheckLOS", 0); outlineColor := GetConfig(configSection, "OutlineColor", 16); if (outlineColor < 1) then outlineColor := 64;