initial files
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
private [ "_vehmarkers", "_markedveh", "_cfg", "_vehtomark", "_supporttomark", "_marker" ];
|
||||
|
||||
_vehmarkers = [];
|
||||
_markedveh = [];
|
||||
_cfg = configFile >> "cfgVehicles";
|
||||
_vehtomark = [];
|
||||
|
||||
_support_to_skip = [
|
||||
KP_liberation_recycle_building,
|
||||
KP_liberation_air_vehicle_building,
|
||||
"B_Slingload_01_Repair_F",
|
||||
"B_Slingload_01_Fuel_F",
|
||||
"B_Slingload_01_Ammo_F"
|
||||
];
|
||||
|
||||
{
|
||||
_vehtomark append _x;
|
||||
} forEach [KPLIB_b_light_classes, KPLIB_b_heavy_classes, KPLIB_b_air_classes, KPLIB_b_support_classes];
|
||||
|
||||
_vehtomark = _vehtomark - _support_to_skip;
|
||||
|
||||
while { true } do {
|
||||
|
||||
_markedveh = [];
|
||||
{
|
||||
if (alive _x && (toLower (typeof _x)) in _vehtomark && (count (crew _x)) == 0 && (_x distance2d startbase) > 500) then {
|
||||
_markedveh pushback _x;
|
||||
};
|
||||
} foreach vehicles;
|
||||
|
||||
if ( count _markedveh != count _vehmarkers ) then {
|
||||
{ deleteMarkerLocal _x; } foreach _vehmarkers;
|
||||
_vehmarkers = [];
|
||||
|
||||
{
|
||||
_marker = createMarkerLocal [ format [ "markedveh%1" ,_x], markers_reset ];
|
||||
_marker setMarkerColorLocal "ColorKhaki";
|
||||
_marker setMarkerTypeLocal "mil_dot";
|
||||
_marker setMarkerSizeLocal [ 0.75, 0.75 ];
|
||||
_vehmarkers pushback _marker;
|
||||
} foreach _markedveh;
|
||||
};
|
||||
|
||||
{
|
||||
_marker = _vehmarkers select (_markedveh find _x);
|
||||
_marker setMarkerPosLocal getpos _x;
|
||||
_marker setMarkerTextLocal (getText (_cfg >> typeOf _x >> "displayName"));
|
||||
|
||||
} foreach _markedveh;
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_all_fobs"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
uiSleep 3;
|
||||
|
||||
private _markers = [];
|
||||
private _markers_mobilespawns = [];
|
||||
|
||||
while {true} do {
|
||||
if (count _markers != count GRLIB_all_fobs) then {
|
||||
{deleteMarkerLocal _x;} forEach _markers;
|
||||
_markers = [];
|
||||
|
||||
for "_idx" from 0 to ((count GRLIB_all_fobs) - 1) do {
|
||||
private _marker = createMarkerLocal [format ["fobmarker%1", _idx], markers_reset];
|
||||
_marker setMarkerTypeLocal "b_hq";
|
||||
_marker setMarkerSizeLocal [1.5, 1.5];
|
||||
_marker setMarkerPosLocal (GRLIB_all_fobs select _idx);
|
||||
_marker setMarkerTextLocal format ["FOB %1",military_alphabet select _idx];
|
||||
_marker setMarkerColorLocal "ColorYellow";
|
||||
_markers pushback _marker;
|
||||
};
|
||||
};
|
||||
|
||||
if (KP_liberation_mobilerespawn) then {
|
||||
private _respawn_trucks = [] call KPLIB_fnc_getMobileRespawns;
|
||||
|
||||
if (count _markers_mobilespawns != count _respawn_trucks) then {
|
||||
{deleteMarkerLocal _x;} forEach _markers_mobilespawns;
|
||||
_markers_mobilespawns = [];
|
||||
|
||||
for "_idx" from 0 to ((count _respawn_trucks) - 1) do {
|
||||
_marker = createMarkerLocal [format ["mobilespawn%1", _idx], markers_reset];
|
||||
_marker setMarkerTypeLocal "mil_end";
|
||||
_marker setMarkerColorLocal "ColorYellow";
|
||||
_markers_mobilespawns pushback _marker;
|
||||
};
|
||||
};
|
||||
|
||||
if (count _respawn_trucks == count _markers_mobilespawns) then {
|
||||
for "_idx" from 0 to ((count _markers_mobilespawns) - 1) do {
|
||||
(_markers_mobilespawns select _idx) setMarkerPosLocal getPos (_respawn_trucks select _idx);
|
||||
(_markers_mobilespawns select _idx) setMarkerTextLocal format ["%1 %2", localize "STR_RESPAWN_TRUCK", mapGridPosition (_respawn_trucks select _idx)];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
@@ -0,0 +1,68 @@
|
||||
private [ "_iconed_groups", "_ticks", "_localgroup", "_grouptype", "_groupicon" ];
|
||||
|
||||
_iconed_groups = [];
|
||||
_ticks = 0;
|
||||
|
||||
setGroupIconsVisible [true,false];
|
||||
|
||||
while { true } do {
|
||||
{
|
||||
if ((_x != group player) && ((side _x == GRLIB_side_friendly))) then {
|
||||
if ( (_x in _iconed_groups) && (
|
||||
(count units _x == 0) || (side _x == GRLIB_side_friendly && (((leader _x) distance (markerPos GRLIB_respawn_marker) < 100) || ((leader _x) distance startbase < 500))))) then {
|
||||
clearGroupIcons _x;
|
||||
_iconed_groups = _iconed_groups - [_x];
|
||||
};
|
||||
|
||||
if ( !(_x in _iconed_groups) && (
|
||||
(count units _x > 0) && (side _x == GRLIB_side_friendly && (((leader _x) distance (markerPos GRLIB_respawn_marker) > 100) && ((leader _x) distance startbase > 500))))) then {
|
||||
clearGroupIcons _x;
|
||||
_localgroup = _x;
|
||||
_grouptype = [_localgroup] call KPLIB_fnc_getGroupType;
|
||||
_groupicon = "";
|
||||
switch (_grouptype) do {
|
||||
case "infantry": { _groupicon = "b_inf" };
|
||||
case "light": { _groupicon = "b_motor_inf" };
|
||||
case "heavy": { _groupicon = "b_armor" };
|
||||
case "air": { _groupicon = "b_air" };
|
||||
case "support": { _groupicon = "b_maint" };
|
||||
case "static": { _groupicon = "b_mortar" };
|
||||
case "uav": { _groupicon = "b_uav" };
|
||||
default { };
|
||||
};
|
||||
|
||||
_localgroup addGroupIcon [ _groupicon, [ 0,0 ] ];
|
||||
|
||||
if ( side _localgroup == GRLIB_side_friendly ) then {
|
||||
_groupiconsize = "group_0";
|
||||
_groupsize = (count (units _localgroup));
|
||||
if ( _groupsize >= 2 ) then { _groupiconsize = "group_1" };
|
||||
if ( _groupsize >= 6 ) then { _groupiconsize = "group_2" };
|
||||
if ( _groupsize >= 10 ) then { _groupiconsize = "group_3" };
|
||||
|
||||
_localgroup addGroupIcon [ _groupiconsize, [ 0,0 ] ];
|
||||
};
|
||||
|
||||
_iconed_groups pushback _x;
|
||||
};
|
||||
};
|
||||
} foreach allGroups;
|
||||
|
||||
{
|
||||
_color = [];
|
||||
if ( isplayer leader _x ) then {
|
||||
_color = [0.8,0.8,0,1];
|
||||
} else {
|
||||
_color = [0,0.3,0.8,1];
|
||||
};
|
||||
_x setGroupIconParams [_color,"",1,true];
|
||||
} foreach _iconed_groups;
|
||||
|
||||
_ticks = _ticks + 1;
|
||||
if ( _ticks >= 15 ) then {
|
||||
_ticks = 0;
|
||||
_iconed_groups = [];
|
||||
};
|
||||
|
||||
sleep 4.7;
|
||||
};
|
||||
@@ -0,0 +1,52 @@
|
||||
private ["_kp_markers_array","_kp_markers_start","_kp_markers_change","_kp_markers_pos","_kp_markers_posx","_kp_markers_posy","_kp_markers_name","_kp_markers_color"];
|
||||
|
||||
waitUntil {sleep 0.1; !isNil "save_is_loaded" && {save_is_loaded}};
|
||||
|
||||
_kp_markers_array = [];
|
||||
_kp_markers_start = 0.2;
|
||||
_kp_markers_change = 0.05;
|
||||
|
||||
while {true} do {
|
||||
{deleteMarkerLocal _x;} forEach _kp_markers_array;
|
||||
_kp_markers_array = [];
|
||||
{
|
||||
if ((side _x == GRLIB_side_enemy) && (({!captive _x} count (units _x) ) > 0) && ([(getpos leader _x), GRLIB_side_friendly, GRLIB_radiotower_size] call KPLIB_fnc_getNearestTower != "")) then {
|
||||
_kp_markers_pos = getPosATL leader _x;
|
||||
_kp_markers_posx = floor (_kp_markers_pos select 0);
|
||||
_kp_markers_posx = _kp_markers_posx - (_kp_markers_posx mod 500);
|
||||
_kp_markers_posy = floor (_kp_markers_pos select 1);
|
||||
_kp_markers_posy = _kp_markers_posy - (_kp_markers_posy mod 500);
|
||||
|
||||
// Chernarus Grid Fix
|
||||
if (worldName == "Chernarus") then {
|
||||
_kp_markers_posy = _kp_markers_posy - 140;
|
||||
if ((_kp_markers_posy + 500) < (_kp_markers_pos select 1)) then {
|
||||
_kp_markers_posy = _kp_markers_posy + 500;
|
||||
};
|
||||
};
|
||||
|
||||
// Sahrani Grid Fix
|
||||
if (worldName == "Sara") then {
|
||||
_kp_markers_posy = _kp_markers_posy - 20;
|
||||
if ((_kp_markers_posy + 500) < (_kp_markers_pos select 1)) then {
|
||||
_kp_markers_posy = _kp_markers_posy + 500;
|
||||
};
|
||||
};
|
||||
|
||||
_kp_markers_name = format["kp_marker_grid_%1_%2", _kp_markers_posx, _kp_markers_posy];
|
||||
_kp_markers_color = format["Color%1", side _x];
|
||||
|
||||
if ((markerShape _kp_markers_name) isEqualTo "RECTANGLE") then {
|
||||
_kp_markers_name setMarkerAlphaLocal ((markerAlpha _kp_markers_name) + _kp_markers_change);
|
||||
} else {
|
||||
createMarkerLocal[_kp_markers_name, [_kp_markers_posx + 250, _kp_markers_posy + 250, 0]];
|
||||
_kp_markers_name setMarkerShapeLocal "RECTANGLE";
|
||||
_kp_markers_name setMarkerSizeLocal [250,250];
|
||||
_kp_markers_name setMarkerColorLocal _kp_markers_color;
|
||||
_kp_markers_name setMarkerAlphaLocal (_kp_markers_start + _kp_markers_change);
|
||||
_kp_markers_array pushBack _kp_markers_name;
|
||||
};
|
||||
};
|
||||
} forEach allGroups;
|
||||
uiSleep (60 + (random 60));
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
private [ "_huronlocal" ];
|
||||
|
||||
"huronmarker" setMarkerTextLocal "Potato 01";
|
||||
|
||||
while { true } do {
|
||||
_huronlocal = [] call KPLIB_fnc_potatoScan;
|
||||
if ( !( isNull _huronlocal) ) then {
|
||||
"huronmarker" setmarkerposlocal (getpos _huronlocal);
|
||||
} else {
|
||||
"huronmarker" setmarkerposlocal markers_reset;
|
||||
};
|
||||
sleep 4.9;
|
||||
};
|
||||
@@ -0,0 +1,36 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "GRLIB_vehicle_to_military_base_links"};
|
||||
waitUntil {!isNil "blufor_sectors"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _vehicle_unlock_markers = [];
|
||||
private _cfg = configFile >> "cfgVehicles";
|
||||
|
||||
{
|
||||
_x params ["_vehicle", "_base"];
|
||||
private _marker = createMarkerLocal [format ["vehicleunlockmarker%1", _base], [(markerpos _base) select 0, ((markerpos _base) select 1) + 125]];
|
||||
_marker setMarkerTextLocal (getText (_cfg >> _vehicle >> "displayName"));
|
||||
_marker setMarkerColorLocal GRLIB_color_enemy;
|
||||
_marker setMarkerTypeLocal "mil_pickup";
|
||||
_vehicle_unlock_markers pushback [_marker, _base];
|
||||
} forEach GRLIB_vehicle_to_military_base_links;
|
||||
|
||||
private _sector_count = -1;
|
||||
|
||||
uiSleep 1;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {
|
||||
uiSleep 1;
|
||||
count blufor_sectors != _sector_count
|
||||
};
|
||||
|
||||
{_x setMarkerColorLocal GRLIB_color_enemy;} forEach (sectors_allSectors - blufor_sectors);
|
||||
{_x setMarkerColorLocal GRLIB_color_friendly;} forEach blufor_sectors;
|
||||
|
||||
{
|
||||
_x params ["_marker", "_base"];
|
||||
_marker setMarkerColorLocal ([GRLIB_color_enemy, GRLIB_color_friendly] select (_base in blufor_sectors));
|
||||
} forEach _vehicle_unlock_markers;
|
||||
_sector_count = count blufor_sectors;
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
createMarkerLocal ["opfor_bg_marker", markers_reset];
|
||||
"opfor_bg_marker" setMarkerTypeLocal "mil_unknown";
|
||||
"opfor_bg_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
createMarkerLocal ["opfor_capture_marker", markers_reset];
|
||||
"opfor_capture_marker" setMarkerTypeLocal "mil_objective";
|
||||
"opfor_capture_marker" setMarkerColorLocal GRLIB_color_enemy_bright;
|
||||
|
||||
if ( isNil "sector_timer" ) then { sector_timer = 0 };
|
||||
|
||||
while { true } do {
|
||||
sleep 1;
|
||||
if ( sector_timer > 0 ) then {
|
||||
"opfor_capture_marker" setMarkerTextLocal format ["%1",([sector_timer] call KPLIB_fnc_secondsToTimer)];
|
||||
sector_timer = sector_timer - 1;
|
||||
} else {
|
||||
"opfor_capture_marker" setMarkerTextLocal "VULNERABLE";
|
||||
waitUntil{
|
||||
sleep 1;
|
||||
sector_timer > 0
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_production_markers"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _KP_liberation_production_markers_old = [0];
|
||||
|
||||
while {GRLIB_endgame == 0} do {
|
||||
waitUntil {sleep 5;
|
||||
!(_KP_liberation_production_markers_old isEqualTo KP_liberation_production_markers)
|
||||
};
|
||||
|
||||
{
|
||||
private _marker_text = (_x select 4) + " [";
|
||||
if (_x select 1) then {_marker_text = _marker_text + "S";};
|
||||
if (_x select 2) then {_marker_text = _marker_text + "A";};
|
||||
if (_x select 3) then {_marker_text = _marker_text + "F";};
|
||||
_marker_text = _marker_text + "]";
|
||||
(_x select 0) setMarkerTextLocal _marker_text;
|
||||
} forEach KP_liberation_production_markers;
|
||||
|
||||
_KP_liberation_production_markers_old = +KP_liberation_production_markers;
|
||||
};
|
||||
Reference in New Issue
Block a user