Skip to content

Commit

Permalink
update defense markers
Browse files Browse the repository at this point in the history
  • Loading branch information
tbox1911 committed Feb 1, 2025
1 parent 59ff41b commit c002728
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
33 changes: 20 additions & 13 deletions core.liberation/scripts/server/base/fob_markers.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,26 @@ while { true } do {
_markers_def = [];
{
private _sector = (_x select 0);
private _marker = createMarkerLocal [format ["defense_%1", _sector], markers_reset];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "loc_defend";
private _color = "ColorGrey";
// wait for Arma 3 v2.20
// switch (_x select 1) do {
// case 1: { _color = "#(0.25, 0.25, 0.25, 1.00)" }; // "ColorWhite
// case 2: { _color = "#(0.50, 0.50, 0.50, 1.00)" }; // "ColorGrey"
// case 3: { _color = "#(0.75, 0.75, 0.75, 1.00)" }; // "ColorBlack
// };
_marker setMarkerColorLocal _color;
_marker setMarkerPos (markerPos _sector);
_markers_def pushback _marker;
if (_sector in blufor_sectors) then {
private _marker = createMarkerLocal [format ["defense_%1", _sector], markers_reset];
_marker setMarkerShapeLocal "ICON";
_marker setMarkerTypeLocal "loc_defend";
private _color = "ColorGrey";
// wait for Arma 3 v2.20
// switch (_x select 1) do {
// case 1: { _color = "#(0.25, 0.25, 0.25, 1.00)" }; // "ColorWhite"
// case 2: { _color = "#(0.50, 0.50, 0.50, 1.00)" }; // "ColorGrey"
// case 3: { _color = "#(0.75, 0.75, 0.75, 1.00)" }; // "ColorBlack"
// };
switch (_x select 1) do {
case 1: { _color = "ColorWhite" };
case 2: { _color = "ColorGrey" };
case 3: { _color = "ColorBlack" };
};
_marker setMarkerColorLocal _color;
_marker setMarkerPos (markerPos _sector);
_markers_def pushback _marker;
};
} forEach GRLIB_sector_defense;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ params ["_sector", "_defense"];
private _index = { if ((_x select 0) == _sector) exitWith { _forEachIndex } } forEach GRLIB_sector_defense;

if (isNil "_index") then {
if (_sector in blufor_sectors) then { GRLIB_sector_defense pushBack [_sector, _defense] };
GRLIB_sector_defense pushBack [_sector, _defense];
} else {
if (_defense == 0) then {
GRLIB_sector_defense deleteAt _index;
Expand Down

0 comments on commit c002728

Please sign in to comment.