Change in Highlighting mod, items with set flag 'NO_HIGHLIGHT' will no longer be highlighted.

This commit is contained in:
Mr.Stalin
2017-04-07 21:54:57 +03:00
parent e34a00148f
commit bb52a6d9cb
3 changed files with 15 additions and 12 deletions
Binary file not shown.
+10 -7
View File
@@ -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);