mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Deleted duplicate code in the script. Added check for sfall version.
This commit is contained in:
Binary file not shown.
@@ -34,10 +34,7 @@ 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)) 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 (alsoContainer and obj_item_subtype(obj) == item_type_container) or (not NO_HIGHLIGHT(obj)) then begin
|
||||
if (enable) then set_outline(obj, outlineColor);
|
||||
else set_outline(obj, 0);
|
||||
end
|
||||
@@ -94,7 +91,7 @@ procedure KeyPressHandler begin
|
||||
end
|
||||
|
||||
procedure start begin
|
||||
if game_loaded then begin
|
||||
if game_loaded and (sfall_ver_major >= 4) then begin
|
||||
call InitConfigs;
|
||||
|
||||
highlightKey := GetConfig(configSection, "Key", 0);
|
||||
@@ -102,8 +99,8 @@ procedure start begin
|
||||
outlineColor := GetConfig(configSection, "OutlineColor", 0);
|
||||
motionScanner := GetConfig(configSection, "MotionScanner", 1);
|
||||
|
||||
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
|
||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
||||
highlightFailMsg1 := Translate("HighlightFail1", "You aren't carrying a motion sensor.");
|
||||
highlightFailMsg2 := Translate("HighlightFail2", "Your motion sensor is out of charge.");
|
||||
|
||||
register_hook_proc(HOOK_KEYPRESS, KeyPressHandler);
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user