gl_highlighting: separate colors for containers and corpses

- Items and corpses blending together can be an issue
This commit is contained in:
phobos2077
2024-06-27 23:25:25 +02:00
parent a8163b6b0c
commit abd62dd834
3 changed files with 19 additions and 2 deletions
+7 -1
View File
@@ -15,7 +15,7 @@ Critters=0
; Set to 1 to only highlight objects in the player's line-of-sight ; Set to 1 to only highlight objects in the player's line-of-sight
CheckLOS=1 CheckLOS=1
; Set the color of outlines for items, corpses, and containers; available colors: ; Set the color of outlines for items; available colors:
; 1 - glowing red ; 1 - glowing red
; 2 - red ; 2 - red
; 4 - grey ; 4 - grey
@@ -26,6 +26,12 @@ CheckLOS=1
; You can set a custom color from the game palette by multiplying the color index value by 256 (in 4.2.7 or later) ; You can set a custom color from the game palette by multiplying the color index value by 256 (in 4.2.7 or later)
OutlineColor=16 OutlineColor=16
; Set the color of outlines for corpses
OutlineColorCorpses=4
; Set the color of outlines for containers
OutlineColorContainers=4
; Motion Scanner mode: ; Motion Scanner mode:
; 0 - ignored ; 0 - ignored
; 1 - requires Motion Sensor to be present in the player's inventory to activate highlighting ; 1 - requires Motion Sensor to be present in the player's inventory to activate highlighting
Binary file not shown.
+12 -1
View File
@@ -15,7 +15,7 @@
NOTE: this script requires compiler from sfall modderspack with -s option NOTE: this script requires compiler from sfall modderspack with -s option
(short circuit evaluation) (short circuit evaluation)
version 1.2 version 1.3
**/ **/
@@ -36,6 +36,8 @@ variable alsoCorpse;
variable alsoCritter; variable alsoCritter;
variable checkLOS; variable checkLOS;
variable outlineColor; variable outlineColor;
variable outlineColorCorpses;
variable outlineColorContainers;
variable motionScanner; variable motionScanner;
variable highlightFailMsg1; variable highlightFailMsg1;
variable highlightFailMsg2; variable highlightFailMsg2;
@@ -65,6 +67,12 @@ procedure GetOutlineColor(variable obj, variable isCritter) begin
if checkLOS and not DudeCanSee(obj) then if checkLOS and not DudeCanSee(obj) then
return 0; return 0;
if obj_type(obj) == OBJ_TYPE_CRITTER then
return outlineColorCorpses;
if obj_item_subtype(obj) == item_type_container then
return outlineColorContainers;
return outlineColor; return outlineColor;
end end
@@ -165,6 +173,9 @@ procedure start begin
alsoCritter := GetConfig(configSection, "Critters", 0); alsoCritter := GetConfig(configSection, "Critters", 0);
checkLOS := GetConfig(configSection, "CheckLOS", 0); checkLOS := GetConfig(configSection, "CheckLOS", 0);
outlineColor := GetConfig(configSection, "OutlineColor", 16); outlineColor := GetConfig(configSection, "OutlineColor", 16);
outlineColorCorpses := GetConfig(configSection, "OutlineColorCorpses", 16);
outlineColorContainers := GetConfig(configSection, "OutlineColorContainers", 16);
if (outlineColor < 1) then outlineColor := 64; if (outlineColor < 1) then outlineColor := 64;
motionScanner := GetConfig(configSection, "MotionScanner", 0); motionScanner := GetConfig(configSection, "MotionScanner", 0);