initial files
This commit is contained in:
20
kp_liberation.brf_sumava/scripts/server/CfgFunctions.hpp
Normal file
20
kp_liberation.brf_sumava/scripts/server/CfgFunctions.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
class server_highcommand {
|
||||
file = "scripts\server\highcommand";
|
||||
|
||||
class highcommand {ext = ".fsm";};
|
||||
};
|
||||
|
||||
class server_sector {
|
||||
file = "scripts\server\sector";
|
||||
|
||||
class destroyFob {};
|
||||
class sectorMonitor {ext = ".fsm";};
|
||||
class spawnSectorCrates {};
|
||||
class spawnSectorIntel {};
|
||||
};
|
||||
|
||||
class server_support {
|
||||
file = "scripts\server\support";
|
||||
|
||||
class createSuppModules {};
|
||||
};
|
||||
@@ -0,0 +1,48 @@
|
||||
private _grp = _this select 0;
|
||||
private _basepos = getpos (leader _grp);
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
private _wpPositions = [
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360]
|
||||
];
|
||||
|
||||
private _waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
@@ -0,0 +1,85 @@
|
||||
private _grp = _this select 0;
|
||||
private _flagpos = _this select 1;
|
||||
private _basepos = getpos (leader _grp);
|
||||
private _is_infantry = false;
|
||||
private _wpPositions = [];
|
||||
private _waypoint = [];
|
||||
if (vehicle (leader _grp) == (leader _grp)) then {_is_infantry = true;};
|
||||
|
||||
sleep 5;
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
sleep 1;
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
sleep 1;
|
||||
|
||||
if (_is_infantry) then {
|
||||
_wpPositions = [
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360],
|
||||
_flagpos getPos [random 150, random 360]
|
||||
];
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
} else {
|
||||
_waypoint = _grp addWaypoint [_basepos, 1];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
};
|
||||
|
||||
_grp setCurrentWaypoint [_grp, 0];
|
||||
|
||||
waitUntil {
|
||||
sleep 10;
|
||||
({alive _x} count (units _grp) == 0) || !(isNull ((leader _grp) findNearestEnemy (leader _grp)))
|
||||
};
|
||||
|
||||
if ({alive _x} count (units _grp) > 0) then {
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0)};
|
||||
sleep 1;
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
sleep 1;
|
||||
_wpPositions = [
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360],
|
||||
_basepos getPos [random 150, random 360]
|
||||
];
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 0, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
if (_is_infantry) then {
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
} else {
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
};
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 1, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 2, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 3, 10];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_wpPositions select 4, 10];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_grp setCurrentWaypoint [_grp, 0];
|
||||
};
|
||||
@@ -0,0 +1,53 @@
|
||||
params [
|
||||
["_grp", grpNull, [grpNull]]
|
||||
];
|
||||
|
||||
if (isNull _grp) exitWith {};
|
||||
if (isNil "reset_battlegroups_ai") then {reset_battlegroups_ai = false};
|
||||
|
||||
sleep (5 + (random 5));
|
||||
|
||||
private _objPos = [getPos (leader _grp)] call KPLIB_fnc_getNearestBluforObjective;
|
||||
|
||||
[_objPos] remoteExec ["remote_call_incoming"];
|
||||
|
||||
private _startpos = getPos (leader _grp);
|
||||
|
||||
private _waypoint = [];
|
||||
while {((getPos (leader _grp)) distance _startpos) < 100} do {
|
||||
|
||||
while {!((waypoints _grp) isEqualTo [])} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} forEach units _grp;
|
||||
|
||||
_startpos = getPos (leader _grp);
|
||||
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [_objPos, 100];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
sleep 90;
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
sleep 5;
|
||||
(((units _grp) select {alive _x}) isEqualTo []) || reset_battlegroups_ai
|
||||
};
|
||||
|
||||
sleep (5 + (random 5));
|
||||
reset_battlegroups_ai = false;
|
||||
|
||||
if (!((units _grp) isEqualTo []) && (GRLIB_endgame == 0)) then {
|
||||
[_grp] spawn battlegroup_ai;
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
params ["_unit", ["_sector", ""]];
|
||||
|
||||
_unit setUnitPos "UP";
|
||||
_unit disableAI "PATH";
|
||||
private _move_is_disabled = true;
|
||||
private _hostiles = 0;
|
||||
private _ratio = 0.4;
|
||||
private _range = 40;
|
||||
|
||||
while {_move_is_disabled && local _unit && alive _unit && !(captive _unit)} do {
|
||||
|
||||
if !(_sector isEqualTo "") then {
|
||||
_ratio = [_sector] call KPLIB_fnc_getBluforRatio;
|
||||
};
|
||||
|
||||
_range = floor (linearConversion [0, 1, _ratio, 0, GRLIB_capture_size / 3 * 2, true]);
|
||||
|
||||
_hostiles = ((getPos _unit) nearEntities [["Man"], _range]) select {side _x == GRLIB_side_friendly};
|
||||
|
||||
if (_move_is_disabled &&
|
||||
{
|
||||
(_sector in blufor_sectors) ||
|
||||
{!(_hostiles isEqualTo [])} ||
|
||||
{damage _unit > 0.25}
|
||||
}
|
||||
) then {
|
||||
_move_is_disabled = false;
|
||||
_unit enableAI "PATH";
|
||||
_unit setUnitPos "AUTO";
|
||||
};
|
||||
|
||||
if (_move_is_disabled) then {
|
||||
private _target = assignedTarget _unit;
|
||||
if(!(isnull _target)) then {
|
||||
private _vd = (getPosASL _target) vectorDiff (getpos _unit);
|
||||
private _newdir = (_vd select 0) atan2 (_vd select 1);
|
||||
if (_newdir < 0) then {_dir = 360 + _newdir};
|
||||
_unit setdir (_newdir);
|
||||
};
|
||||
};
|
||||
sleep 5;
|
||||
};
|
||||
60
kp_liberation.brf_sumava/scripts/server/ai/patrol_ai.sqf
Normal file
60
kp_liberation.brf_sumava/scripts/server/ai/patrol_ai.sqf
Normal file
@@ -0,0 +1,60 @@
|
||||
private _grp = _this select 0;
|
||||
private _waypoint = [];
|
||||
if ( isNil "reinforcements_sector_under_attack" ) then { reinforcements_sector_under_attack = "" };
|
||||
|
||||
while { count (units _grp) > 0 } do {
|
||||
|
||||
if ( reinforcements_sector_under_attack != "" ) then {
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos reinforcements_sector_under_attack, 50];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
sleep 300;
|
||||
};
|
||||
|
||||
if ( reinforcements_sector_under_attack == "" ) then {
|
||||
private _sectors_patrol = [];
|
||||
private _patrol_startpos = getpos (leader _grp);
|
||||
{
|
||||
if ( _patrol_startpos distance (markerpos _x) < 2500) then {
|
||||
_sectors_patrol pushBack _x;
|
||||
};
|
||||
} foreach (sectors_allSectors - blufor_sectors);
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
{
|
||||
_waypoint = _grp addWaypoint [markerpos _x, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
} foreach _sectors_patrol;
|
||||
|
||||
_waypoint = _grp addWaypoint [_patrol_startpos, 300];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _grp addWaypoint [_patrol_startpos , 300];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
};
|
||||
|
||||
waitUntil { sleep 5;(count (units _grp) == 0) || (reinforcements_sector_under_attack != "") };
|
||||
};
|
||||
52
kp_liberation.brf_sumava/scripts/server/ai/prisonner_ai.sqf
Normal file
52
kp_liberation.brf_sumava/scripts/server/ai/prisonner_ai.sqf
Normal file
@@ -0,0 +1,52 @@
|
||||
params ["_unit", ["_force_surrender", false]];
|
||||
|
||||
if ((!_force_surrender) && ((random 100) > GRLIB_surrender_chance)) exitWith {};
|
||||
|
||||
if ((_unit isKindOf "Man") && (alive _unit) && (side group _unit == GRLIB_side_enemy)) then {
|
||||
|
||||
if (vehicle _unit != _unit) then {deleteVehicle _unit};
|
||||
|
||||
sleep (random 5);
|
||||
|
||||
if (alive _unit) then {
|
||||
|
||||
removeAllWeapons _unit;
|
||||
if (typeof _unit != pilot_classname) then {
|
||||
removeHeadgear _unit;
|
||||
};
|
||||
removeBackpack _unit;
|
||||
removeVest _unit;
|
||||
_unit unassignItem "NVGoggles_OPFOR";
|
||||
_unit removeItem "NVGoggles_OPFOR";
|
||||
_unit unassignItem "NVGoggles_INDEP";
|
||||
_unit removeItem "NVGoggles_INDEP";
|
||||
_unit setUnitPos "UP";
|
||||
sleep 1;
|
||||
private _grp = createGroup [GRLIB_side_civilian, true];
|
||||
[_unit] joinSilent _grp;
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_unit, true], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_unit disableAI "ANIM";
|
||||
_unit disableAI "MOVE";
|
||||
_unit playmove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
|
||||
sleep 2;
|
||||
_unit setCaptive true;
|
||||
};
|
||||
waitUntil {sleep 1;
|
||||
!alive _unit || side group _unit == GRLIB_side_friendly
|
||||
};
|
||||
|
||||
if (alive _unit) then {
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_unit, false], _unit] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_unit enableAI "ANIM";
|
||||
_unit enableAI "MOVE";
|
||||
_unit setCaptive false;
|
||||
};
|
||||
sleep 1;
|
||||
[_unit] remoteExec ["remote_call_prisonner", _unit];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,74 @@
|
||||
params [
|
||||
["_transVeh", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (isNull _transVeh) exitWith {};
|
||||
sleep 1;
|
||||
|
||||
private _transGrp = (group (driver _transVeh));
|
||||
private _start_pos = getpos _transVeh;
|
||||
private _objPos = [getpos _transVeh] call KPLIB_fnc_getNearestBluforObjective;
|
||||
private _unload_distance = 500;
|
||||
private _crewcount = count crew _transVeh;
|
||||
|
||||
waitUntil {
|
||||
sleep 0.2;
|
||||
!(alive _transVeh) ||
|
||||
!(alive (driver _transVeh)) ||
|
||||
(((_transVeh distance _objPos) < _unload_distance) && !(surfaceIsWater (getpos _transVeh)))
|
||||
};
|
||||
|
||||
if ((alive _transVeh) && (alive (driver _transVeh))) then {
|
||||
_infGrp = createGroup [GRLIB_side_enemy, true];
|
||||
|
||||
{
|
||||
[_x, _start_pos, _infGrp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
} foreach ([] call KPLIB_fnc_getSquadComp);
|
||||
|
||||
{_x moveInCargo _transVeh} forEach (units _infGrp);
|
||||
|
||||
while {(count (waypoints _infGrp)) != 0} do {deleteWaypoint ((waypoints _infGrp) select 0);};
|
||||
|
||||
sleep 3;
|
||||
|
||||
private _transVehWp = _transGrp addWaypoint [getpos _transVeh, 0,0];
|
||||
_transVehWp setWaypointType "TR UNLOAD";
|
||||
_transVehWp setWaypointCompletionRadius 200;
|
||||
|
||||
private _infWp = _infGrp addWaypoint [getpos _transVeh, 0];
|
||||
_infWp setWaypointType "GETOUT";
|
||||
_infWp setWaypointCompletionRadius 200;
|
||||
|
||||
_infWp synchronizeWaypoint [_transVehWp];
|
||||
|
||||
{unassignVehicle _transVeh} forEach (units _infGrp);
|
||||
_infGrp leaveVehicle _transVeh;
|
||||
(units _infGrp) allowGetIn false;
|
||||
|
||||
private _infWp_2 = _infGrp addWaypoint [getpos _transVeh, 250];
|
||||
_infWp_2 setWaypointType "MOVE";
|
||||
_infWp_2 setWaypointCompletionRadius 5;
|
||||
|
||||
waitUntil {sleep 0.5; _crewcount >= count crew _transVeh};
|
||||
|
||||
sleep 5;
|
||||
|
||||
while {(count (waypoints _transGrp)) != 0} do {deleteWaypoint ((waypoints _transGrp) select 0);};
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
_transVehWp setWaypointSpeed "NORMAL";
|
||||
_transVehWp setWaypointBehaviour "COMBAT";
|
||||
_transVehWp setWaypointCombatMode "RED";
|
||||
_transVehWp setWaypointCompletionRadius 30;
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "SAD";
|
||||
|
||||
_transVehWp = _transGrp addWaypoint [_objPos, 100];
|
||||
_transVehWp setWaypointType "CYCLE";
|
||||
|
||||
sleep 10;
|
||||
|
||||
[_infGrp] spawn battlegroup_ai;
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_civ_rep"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Loop spawned on: %1", debug_source], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
KP_liberation_asymmetric_sectors = [];
|
||||
|
||||
while {GRLIB_endgame == 0} do {
|
||||
private _sectors_to_remove = [];
|
||||
|
||||
{
|
||||
if (!(_x in blufor_sectors) || (KP_liberation_civ_rep > -25)) then {
|
||||
_sectors_to_remove pushBack _x;
|
||||
};
|
||||
} forEach KP_liberation_asymmetric_sectors;
|
||||
|
||||
KP_liberation_asymmetric_sectors = KP_liberation_asymmetric_sectors - _sectors_to_remove;
|
||||
|
||||
if (KP_liberation_civ_rep <= -25) then {
|
||||
{
|
||||
private _sector = _x;
|
||||
private _blocked = false;
|
||||
private _units_at_sector = [markerPos _sector, GRLIB_sector_size, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
|
||||
|
||||
{
|
||||
if ((_x select 0) == _sector) exitWith {
|
||||
if ((((_x select 1) + 1800) < time) && (_units_at_sector == 0)) then {
|
||||
asymm_blocked_sectors = asymm_blocked_sectors - [_x];
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 removed from blocked sectors", markerText (_x select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
_blocked = true;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 still blocked for ambush", markerText (_x select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
};
|
||||
} forEach asymm_blocked_sectors;
|
||||
|
||||
if ((_units_at_sector > 0) && !(_sector in KP_liberation_asymmetric_sectors) && !_blocked) then {
|
||||
KP_liberation_asymmetric_sectors pushBack _sector;
|
||||
|
||||
if ((random 100) <= KP_liberation_resistance_ambush_chance) then {
|
||||
private _hc = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
private _ieds = round (([] call KPLIB_fnc_crGetMulti) * GRLIB_difficulty_modifier);
|
||||
|
||||
if (isNull _hc) then {
|
||||
[_sector, _ieds] spawn manage_asymIED;
|
||||
[_sector] spawn asym_sector_ambush;
|
||||
} else {
|
||||
[_sector, _ieds] remoteExec ["manage_asymIED", _hc];
|
||||
[_sector] remoteExec ["asym_sector_ambush",_hc];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!(_units_at_sector > 0) && (_sector in KP_liberation_asymmetric_sectors)) then {
|
||||
KP_liberation_asymmetric_sectors = KP_liberation_asymmetric_sectors - [_sector];
|
||||
};
|
||||
} forEach ((sectors_capture + sectors_bigtown) select {_x in blufor_sectors});
|
||||
};
|
||||
publicVariable "KP_liberation_asymmetric_sectors";
|
||||
publicVariable "asymm_blocked_sectors";
|
||||
sleep 10;
|
||||
};
|
||||
@@ -0,0 +1,140 @@
|
||||
params ["_convoy"];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1: spawning ambush", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _pos = [0,0,0];
|
||||
|
||||
switch ((_convoy select 7)) do {
|
||||
case 2: {_pos = (_convoy select 3) getPos [(_convoy select 8) * 400, (_convoy select 3) getDir (_convoy select 2)]};
|
||||
case 4: {_pos = (_convoy select 2) getPos [(_convoy select 8) * 400, (_convoy select 2) getDir (_convoy select 3)]};
|
||||
default {[format ["Logistic convoy %1 ambush: convoy is not travelling", (_convoy select 0)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
|
||||
if (_pos isEqualTo [0,0,0]) exitWith {[format ["Logistic convoy %1 ambush: no position", (_convoy select 0)], "ERROR"] call KPLIB_fnc_log;};
|
||||
|
||||
private _roadObj = [_pos, 400, []] call BIS_fnc_nearestRoad;
|
||||
if (isNull _roadObj) exitWith {
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: no road near current convoy position", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
KP_liberation_convoy_ambush_check = 1;
|
||||
};
|
||||
|
||||
KP_liberation_convoy_ambush_check = 2;
|
||||
KP_liberation_convoy_ambush_inProgress = true;
|
||||
[0, getPos _roadObj] remoteExec ["asymm_notifications"];
|
||||
|
||||
private _vehicleArray = [];
|
||||
for "_i" from 1 to (_convoy select 1) do {
|
||||
private _veh = createVehicle [KP_liberation_truck_classname, getPos _roadObj, [], 50, "NONE"];
|
||||
_veh setDir (getDir _roadObj);
|
||||
{
|
||||
private _damage = random 0.6;
|
||||
if ((_x find "Wheel") != -1) then {
|
||||
_damage = _damage + 0.6;
|
||||
} else {
|
||||
_damage = _damage + 0.3;
|
||||
};
|
||||
if (_damage > 1) then {_damage = 1.0};
|
||||
_veh setHitPointDamage [_x, _damage];
|
||||
} forEach ((getAllHitPointsDamage _veh) select 0);
|
||||
_vehicleArray pushBack _veh;
|
||||
|
||||
private _driver = createVehicle [crewman_classname, getPos _veh, [], 12, "NONE"];
|
||||
_driver setDamage 1;
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: truck spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _supplies = (_convoy select 6) select 0;
|
||||
private _ammo = (_convoy select 6) select 1;
|
||||
private _fuel = (_convoy select 6) select 2;
|
||||
private _crateArray = [];
|
||||
|
||||
while {_supplies > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_supplies / 100) < 1) then {
|
||||
_amount = _supplies;
|
||||
};
|
||||
_supplies = _supplies - _amount;
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
|
||||
while {_ammo > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_ammo / 100) < 1) then {
|
||||
_amount = _ammo;
|
||||
};
|
||||
_ammo = _ammo - _amount;
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
|
||||
while {_fuel > 0} do {
|
||||
private _amount = 100;
|
||||
if ((_fuel / 100) < 1) then {
|
||||
_amount = _fuel;
|
||||
};
|
||||
_fuel = _fuel - _amount;
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _roadObj] call KPLIB_fnc_createCrate;
|
||||
_crate setPos (_crate getPos [random 60, random 360]);
|
||||
_crateArray pushBack [_crate];
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: resource spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _grp = [getPos _roadObj] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
|
||||
private _waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 150];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas spawning done", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _waitingTime = KP_liberation_convoy_ambush_duration;
|
||||
|
||||
while {(({alive _x} count (units _grp)) > 0) && (_waitingTime > 0)} do {
|
||||
uiSleep 1;
|
||||
private _player_near = false;
|
||||
{
|
||||
if (((_x distance _roadObj) < 250) && (alive _x)) exitWith {_player_near = true};
|
||||
} foreach allPlayers;
|
||||
|
||||
if !(_player_near) then {
|
||||
_waitingTime = _waitingTime - 1;
|
||||
};
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: ambush finished", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
|
||||
KP_liberation_convoy_ambush_inProgress = false;
|
||||
|
||||
if ((_waitingTime <= 0) && (({alive _x} count (units _grp)) > 0)) then {
|
||||
[2] remoteExec ["asymm_notifications"];
|
||||
private _gain = 0;
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
_gain = _gain + 2;
|
||||
};
|
||||
} forEach (units _grp);
|
||||
{
|
||||
if ((typeOf (_x select 0)) == KP_liberation_ammo_crate) then {
|
||||
_gain = _gain + 3;
|
||||
} else {
|
||||
_gain = _gain + 2;
|
||||
};
|
||||
deleteVehicle (_x select 0);
|
||||
} forEach _crateArray;
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength + _gain;
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas escaped", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
[1] remoteExec ["asymm_notifications"];
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1 ambush: guerillas defeated", (_convoy select 0)], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
params ["_sector", "_count"];
|
||||
|
||||
if (_count <= 0) exitWith {};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf for %1 spawned on: %2", markerText _sector, debug_source], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {sleep 1; _sector in KP_liberation_asymmetric_sectors};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> spawning IED %1 at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _activation_radius_infantry = 6.66;
|
||||
private _activation_radius_vehicles = 10;
|
||||
private _spread = 7;
|
||||
private _infantry_trigger = 1 + (ceil (random 2));
|
||||
private _vehicle_trigger = 1;
|
||||
private _ied_type = selectRandom ["IEDLandBig_F","IEDLandSmall_F","IEDUrbanBig_F","IEDUrbanSmall_F"];
|
||||
private _ied_obj = objNull;
|
||||
private _roadobj = [(markerPos (_sector) getPos [random (200), random (360)]), 200, []] call BIS_fnc_nearestRoad;
|
||||
private _goes_boom = false;
|
||||
private _ied_marker = "";
|
||||
|
||||
if (_count > 0) then {
|
||||
[_sector, _count - 1] spawn manage_asymIED;
|
||||
};
|
||||
|
||||
if (!(isnull _roadobj)) then {
|
||||
private _roadpos = getpos _roadobj;
|
||||
_ied_obj = createMine [_ied_type, _roadpos getPos [_spread, random (360)], [], 0];
|
||||
_ied_obj setdir (random 360);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> IED %1 spawned at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
while {(_sector in KP_liberation_asymmetric_sectors) && (mineActive _ied_obj) && !_goes_boom} do {
|
||||
_nearinfantry = ((getpos _ied_obj) nearEntities ["Man", _activation_radius_infantry]) select {side _x == GRLIB_side_friendly};
|
||||
_nearvehicles = ((getpos _ied_obj) nearEntities [["Car", "Tank", "Air"], _activation_radius_vehicles]) select {side _x == GRLIB_side_friendly};
|
||||
if (count _nearinfantry >= _infantry_trigger || count _nearvehicles >= _vehicle_trigger) then {
|
||||
_ied_obj setDamage 1;
|
||||
stats_ieds_detonated = stats_ieds_detonated + 1; publicVariable "stats_ieds_detonated";
|
||||
_goes_boom = true;
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
} else {
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["manage_asymIED.sqf -> _roadobj is Null for IED %1 at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
|
||||
if ((KP_liberation_asymmetric_debug > 0) && !(isNull _roadobj)) then {[format ["manage_asymIED.sqf -> exit IED %1 loop at %2", _count, markerText _sector], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
sleep 60;
|
||||
|
||||
if (!(isNull _ied_obj)) then {deleteVehicle _ied_obj;};
|
||||
@@ -0,0 +1,17 @@
|
||||
// Scripts
|
||||
// Logistic convoy ambush
|
||||
logistic_convoy_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\convoy\logistic_convoy_ambush.sqf";
|
||||
// IED spawner for blufor sectors
|
||||
manage_asymIED = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\ied\manage_asymIED.sqf";
|
||||
// Spawner for guerilla ambushes in blufor sectors
|
||||
asym_sector_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\asym_sector_ambush.sqf";
|
||||
// Spawner for guerilla forces who join a fight at an opfor sector
|
||||
sector_guerilla = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\sector_guerilla.sqf";
|
||||
|
||||
// Globals
|
||||
// List sectors which are just liberated. Preventing direct ambush spawn.
|
||||
asymm_blocked_sectors = [];
|
||||
publicVariable "asymm_blocked_sectors";
|
||||
|
||||
// Start module loop
|
||||
execVM "scripts\server\asymmetric\asymmetric_loop.sqf";
|
||||
@@ -0,0 +1,74 @@
|
||||
params ["_sector"];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf for %1 spawned on: %2 - Time: %3", markerText _sector, debug_source, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {sleep 1; _sector in KP_liberation_asymmetric_sectors};
|
||||
|
||||
private _buildings = (nearestObjects [(markerPos _sector), ["House"], 75]) select {(alive _x) && !((typeOf _x) in KP_liberation_cr_ign_buildings)};
|
||||
private _positions = [];
|
||||
{
|
||||
_positions = _positions + ([_x] call BIS_fnc_buildingPositions);
|
||||
} forEach _buildings;
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Found %1 suitable buildings in %2 - Time: %3", count _buildings, markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _position_indexes = [];
|
||||
private _position_count = count _positions;
|
||||
while {count _position_indexes < 10} do {
|
||||
private _nextposit = floor (random _position_count);
|
||||
if !(_nextposit in _position_indexes) then {
|
||||
_position_indexes pushback _nextposit;
|
||||
};
|
||||
};
|
||||
|
||||
private _grp = [(markerPos _sector)] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
_grp setBehaviour "STEALTH";
|
||||
private _idxposit = 0;
|
||||
{
|
||||
_x setpos (_positions select (_position_indexes select _idxposit));
|
||||
_x setUnitPos "UP";
|
||||
doStop _x;
|
||||
|
||||
_idxposit = _idxposit + 1;
|
||||
} forEach (units _grp);
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Units spawned in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _attack = false;
|
||||
|
||||
while {(_sector in KP_liberation_asymmetric_sectors) && (!isNull _grp)} do {
|
||||
private _blufor_near = {alive _x && side _x == GRLIB_side_friendly} count ((getpos (leader _grp)) nearEntities [["LAND"], 140]);
|
||||
if ((_blufor_near > 0) && !_attack) then {
|
||||
_attack = true;
|
||||
{
|
||||
_x setUnitPos "AUTO";
|
||||
} forEach (units _grp);
|
||||
(units _grp) doFollow (leader _grp);
|
||||
_grp setBehaviour "COMBAT";
|
||||
_grp setCombatMode "RED";
|
||||
private _waypoint = _grp addWaypoint [markerpos _sector, 20];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 150];
|
||||
_waypoint setWaypointType "SAD";
|
||||
};
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Exit Loop in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
sleep 60;
|
||||
|
||||
if (!isNull _grp) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} forEach (units _grp);
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["asym_sector_ambush.sqf -> Ambush dropped in %1 - Time: %2", markerText _sector, diag_tickTime], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
@@ -0,0 +1,131 @@
|
||||
params ["_sector"];
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 (%2) - sector_guerilla spawned on: %3", (markerText _sector), _sector, debug_source], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _startpos = (markerPos _sector) getPos [(1200 + (round (random 400))), (random 360)];
|
||||
|
||||
while {(([_startpos, 500, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount) > 0) || (surfaceIsWater _startpos)} do {
|
||||
_startpos = (markerPos _sector) getPos [(1200 + (round (random 400))), (random 360)];
|
||||
};
|
||||
|
||||
private _incDir = (markerPos _sector) getDir _startpos;
|
||||
private _incString = "unknown";
|
||||
|
||||
if (_incDir < 23) then {
|
||||
_incString = "N";
|
||||
} else {
|
||||
if (_incDir < 68) then {
|
||||
_incString = "NE";
|
||||
} else {
|
||||
if (_incDir < 113) then {
|
||||
_incString = "E";
|
||||
} else {
|
||||
if (_incDir < 158) then {
|
||||
_incString = "SE";
|
||||
} else {
|
||||
if (_incDir < 203) then {
|
||||
_incString = "S";
|
||||
} else {
|
||||
if (_incDir < 248) then {
|
||||
_incString = "SW";
|
||||
} else {
|
||||
if (_incDir < 293) then {
|
||||
_incString = "W";
|
||||
} else {
|
||||
if (_incDir < 338) then {
|
||||
_incString = "NW";
|
||||
} else {
|
||||
_incString = "N";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
[5, [(markerText _sector), _incString]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
|
||||
|
||||
private _spawnedGroups = [];
|
||||
private _grp = [_startpos] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow (leader _grp)} forEach (units _grp);
|
||||
|
||||
private _waypoint = _grp addWaypoint [markerpos _sector, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 200];
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 200];
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 200];
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 200];
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_spawnedGroups pushBack _grp;
|
||||
|
||||
sleep 30;
|
||||
|
||||
if (((random 100) <= 25) && !(KP_liberation_guerilla_vehicles isEqualTo [])) then {
|
||||
private _vehicle = (selectRandom KP_liberation_guerilla_vehicles) createVehicle _startpos;
|
||||
[_vehicle] call KPLIB_fnc_allowCrewInImmobile;
|
||||
|
||||
private _grp = [_startpos, 2] call KPLIB_fnc_spawnGuerillaGroup;
|
||||
((units _grp) select 0) moveInDriver _vehicle;
|
||||
((units _grp) select 1) moveInGunner _vehicle;
|
||||
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 30;
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _grp addWaypoint [markerpos _sector, 300];
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_spawnedGroups pushBack _grp;
|
||||
};
|
||||
|
||||
waitUntil {sleep 60; !(_sector in active_sectors)};
|
||||
|
||||
sleep 60;
|
||||
|
||||
private _strengthChanged = false;
|
||||
|
||||
{
|
||||
if (!isNull _x) then {
|
||||
{
|
||||
if (alive _x) then {
|
||||
deleteVehicle _x;
|
||||
KP_liberation_guerilla_strength = KP_liberation_guerilla_strength + 2;
|
||||
_strengthChanged = true;
|
||||
};
|
||||
} forEach (units _x);
|
||||
};
|
||||
} forEach _spawnedGroups;
|
||||
|
||||
if (!isServer && _strengthChanged) then {
|
||||
publicVariableServer "KP_liberation_guerilla_strength";
|
||||
};
|
||||
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Sector %1 (%2) - sector_guerilla dropped on: %3", (markerText _sector), _sector, debug_source], "ASYMMETRIC"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
@@ -0,0 +1,40 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
huron = objNull;
|
||||
|
||||
// Detect possible huron from loaded save data
|
||||
private _savedHuron = vehicles select {(toLower (typeOf _x)) isEqualTo (toLower huron_typename)};
|
||||
if !(_savedHuron isEqualTo []) then {
|
||||
huron = _savedHuron select 0;
|
||||
};
|
||||
|
||||
while {true} do {
|
||||
// Spawn new huron if not loaded or destroyed
|
||||
if !(alive huron) then {
|
||||
huron = huron_typename createVehicle [(getposATL huronspawn) select 0, (getposATL huronspawn) select 1, ((getposATL huronspawn) select 2) + 0.2];
|
||||
huron enableSimulationGlobal false;
|
||||
huron allowdamage false;
|
||||
huron setDir (getDir huronspawn);
|
||||
huron setPosATL (getposATL huronspawn);
|
||||
huron setDamage 0;
|
||||
sleep 0.5;
|
||||
huron enableSimulationGlobal true;
|
||||
huron setDamage 0;
|
||||
huron allowdamage true;
|
||||
[huron] call KPLIB_fnc_addObjectInit;
|
||||
};
|
||||
[huron] call KPLIB_fnc_clearCargo;
|
||||
huron setVariable ["ace_medical_isMedicalVehicle", true, true];
|
||||
publicVariable "huron";
|
||||
|
||||
// Wait until huron is destroyed to respawn it
|
||||
waitUntil {sleep 5; !alive huron};
|
||||
stats_spartan_respawns = stats_spartan_respawns + 1;
|
||||
sleep 10;
|
||||
|
||||
// Delete wreck, if near startbase
|
||||
if (huron distance startbase < 500) then {
|
||||
deletevehicle huron;
|
||||
};
|
||||
};
|
||||
73
kp_liberation.brf_sumava/scripts/server/base/startgame.sqf
Normal file
73
kp_liberation.brf_sumava/scripts/server/base/startgame.sqf
Normal file
@@ -0,0 +1,73 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
// Check if there is no FOB yet (new campaign)
|
||||
if (GRLIB_all_fobs isEqualTo []) then {
|
||||
|
||||
// Prebuild FOB (parameter setting) or spawn FOB box
|
||||
if (GRLIB_build_first_fob) then {
|
||||
// Only accept spawnpoints which are at least 800m away from any sector
|
||||
private _y = "";
|
||||
private _validPlaces = sectors_opfor select {
|
||||
_y = _x;
|
||||
(sectors_allSectors findIf {((markerPos _x) distance2d (markerPos _y)) < 800}) isEqualTo -1
|
||||
};
|
||||
|
||||
// Spawn first FOB on random valid spawnpoint
|
||||
[markerPos (selectRandom _validPlaces), true] remoteExec ["build_fob_remote_call", 2];
|
||||
} else {
|
||||
// Spawn FOB box and wait until the first FOB was built
|
||||
private _fobbox = objNull;
|
||||
while {GRLIB_all_fobs isEqualTo []} do {
|
||||
_fobbox = ([FOB_box_typename, FOB_truck_typename] select KP_liberation_fob_vehicle) createVehicle (getposATL base_boxspawn);
|
||||
_fobbox setdir getDir base_boxspawn;
|
||||
_fobbox setposATL (getposATL base_boxspawn);
|
||||
[_fobbox, true] call KPLIB_fnc_clearCargo;
|
||||
[_fobbox] call KPLIB_fnc_addObjectInit;
|
||||
|
||||
// If the FOB box has fallen into the sea or is destroyed, start again with spawning a new one
|
||||
waitUntil {
|
||||
sleep 1;
|
||||
!(alive _fobbox) || !(GRLIB_all_fobs isEqualTo []) || (((getPosASL _fobbox) select 2) < 0)
|
||||
};
|
||||
sleep 10;
|
||||
};
|
||||
deleteVehicle _fobbox;
|
||||
};
|
||||
|
||||
// Wait a short time before paradropping the start resource crates
|
||||
waitUntil {sleep 1; !(GRLIB_all_fobs isEqualTo [])};
|
||||
if (KP_liberation_tutorial && {["KPLIB_Tasks_Tutorial_Fob"] call BIS_fnc_taskExists}) then {
|
||||
waitUntil {sleep 1; ["KPLIB_Tasks_Tutorial_Fob_02"] call BIS_fnc_taskCompleted};
|
||||
sleep 3;
|
||||
} else {
|
||||
sleep 10;
|
||||
};
|
||||
|
||||
// Spawn start resource crates and attach them to parachutes
|
||||
KPLIB_startCrates = [];
|
||||
private _crate = objNull;
|
||||
for "_i" from 1 to 6 do {
|
||||
_crate = createVehicle [
|
||||
(KPLIB_crates select (_i % 3)),
|
||||
[((GRLIB_all_fobs select 0) select 0), ((GRLIB_all_fobs select 0) select 1), 150],
|
||||
[],
|
||||
80,
|
||||
"FLY"
|
||||
];
|
||||
[_crate, true] call KPLIB_fnc_clearCargo;
|
||||
_crate setVariable ["KP_liberation_crate_value", 100, true];
|
||||
[_crate, 500] remoteExec ["setMass", _crate];
|
||||
[objNull, _crate] call BIS_fnc_curatorObjectEdited;
|
||||
if (KP_liberation_ace) then {[_crate, true, [0, 1.5, 0], 0] remoteExec ["ace_dragging_fnc_setCarryable"];};
|
||||
KPLIB_startCrates pushBack _crate;
|
||||
};
|
||||
|
||||
// Spawn green smoke on the crates short before they hit the ground
|
||||
uiSleep 25;
|
||||
private _smoke = objNull;
|
||||
{
|
||||
_smoke = "SmokeShellGreen" createVehicle (getPos _x);
|
||||
_smoke attachTo [_x];
|
||||
} forEach KPLIB_startCrates;
|
||||
};
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
Spawning of start vehicles at placeholder objects
|
||||
|
||||
This file spawns the so called "start vehicles" like boats
|
||||
and little birds at the starting base/carrier.
|
||||
|
||||
The array at the end can be used to add start vehicles
|
||||
by using the variable name of the grasscutter placeholder
|
||||
and the variable defined in the preset or a direct classname.
|
||||
|
||||
Format: [<variable name of placeholder without number>, <variable from preset or a classname>]
|
||||
|
||||
E.g. the variables of the grasscutter placeholder objects for the
|
||||
little birds are named "littlebird_0", "littlebird_1", etc.
|
||||
while the variable from the preset is KP_liberation_little_bird_classname.
|
||||
This leads to the entry below.
|
||||
|
||||
You can also remove unwanted start vehicles by deleting the corresponding line
|
||||
in the array below. Just keep the correct comma separation in mind.
|
||||
Refer to: https://github.com/KillahPotatoes/KP-Liberation/wiki/EN_ImportantHints#commas-inside-an-array
|
||||
*/
|
||||
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _placeholder = objNull;
|
||||
private _spawnPos = [];
|
||||
private _veh = objNull;
|
||||
{
|
||||
_x params ["_id", "_classname"];
|
||||
|
||||
for [{_i = 0}, {!isNil ([_id, _i] joinString "")}, {_i = _i + 1}] do {
|
||||
_placeholder = missionNamespace getVariable ([_id, _i] joinString "");
|
||||
_spawnPos = getPosATL _placeholder;
|
||||
_veh = _classname createVehicle [_spawnPos select 0, _spawnPos select 1, (_spawnPos select 2) + 0.2];
|
||||
_veh enableSimulationGlobal false;
|
||||
_veh allowDamage false;
|
||||
_veh setDir (getDir _placeholder);
|
||||
_veh setPosATL _spawnPos;
|
||||
[_veh] call KPLIB_fnc_clearCargo;
|
||||
sleep 0.5;
|
||||
_veh enableSimulationGlobal true;
|
||||
_veh setDamage 0;
|
||||
_veh allowDamage true;
|
||||
_veh setVariable ["KP_liberation_preplaced", true, true];
|
||||
[_veh] call KPLIB_fnc_addObjectInit;
|
||||
};
|
||||
} forEach [
|
||||
["littlebird_", KP_liberation_little_bird_classname],
|
||||
["boat_", KP_liberation_boat_classname]
|
||||
];
|
||||
@@ -0,0 +1,38 @@
|
||||
if (isNil "infantry_weight") then {infantry_weight = 33;};
|
||||
if (isNil "armor_weight") then {armor_weight = 33;};
|
||||
if (isNil "air_weight") then {air_weight = 33;};
|
||||
|
||||
sleep 1800;
|
||||
private _sleeptime = 0;
|
||||
private _target_player = objNull;
|
||||
private _target_pos = "";
|
||||
while {GRLIB_csat_aggressivity >= 0.9 && GRLIB_endgame == 0} do {
|
||||
_sleeptime = (1800 + (random 1800)) / (([] call KPLIB_fnc_getOpforFactor) * GRLIB_csat_aggressivity);
|
||||
|
||||
if (combat_readiness >= 80) then {_sleeptime = _sleeptime * 0.75;};
|
||||
if (combat_readiness >= 90) then {_sleeptime = _sleeptime * 0.75;};
|
||||
if (combat_readiness >= 95) then {_sleeptime = _sleeptime * 0.75;};
|
||||
|
||||
sleep _sleeptime;
|
||||
|
||||
waitUntil {sleep 5;
|
||||
combat_readiness >= 70 && {armor_weight >= 50 || air_weight >= 50}
|
||||
};
|
||||
|
||||
_target_player = objNull;
|
||||
{
|
||||
if (
|
||||
(armor_weight >= 50 && {(objectParent _x) isKindOf "Tank"})
|
||||
|| (air_weight >= 50 && {(objectParent _x) isKindOf "Air"})
|
||||
) exitWith {
|
||||
_target_player = _x;
|
||||
};
|
||||
} forEach (allPlayers - entities "HeadlessClient_F");
|
||||
|
||||
if (!isNull _target_player) then {
|
||||
_target_pos = [99999, getPos _target_player] call KPLIB_fnc_getNearestSector;
|
||||
if !(_target_pos isEqualTo "") then {
|
||||
[_target_pos] spawn spawn_air;
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
sleep (900 / GRLIB_csat_aggressivity);
|
||||
private _sleeptime = 0;
|
||||
while {GRLIB_csat_aggressivity > 0.9 && GRLIB_endgame == 0} do {
|
||||
_sleeptime = (1800 + (random 1800)) / (([] call KPLIB_fnc_getOpforFactor) * GRLIB_csat_aggressivity);
|
||||
|
||||
if (combat_readiness >= 80) then {_sleeptime = _sleeptime * 0.75;};
|
||||
if (combat_readiness >= 90) then {_sleeptime = _sleeptime * 0.75;};
|
||||
if (combat_readiness >= 95) then {_sleeptime = _sleeptime * 0.75;};
|
||||
|
||||
sleep _sleeptime;
|
||||
|
||||
if (!isNil "GRLIB_last_battlegroup_time") then {
|
||||
waitUntil {
|
||||
sleep 5;
|
||||
diag_tickTime > (GRLIB_last_battlegroup_time + (2100 / GRLIB_csat_aggressivity))
|
||||
};
|
||||
};
|
||||
|
||||
if (
|
||||
(count (allPlayers - entities "HeadlessClient_F") >= (6 / GRLIB_csat_aggressivity))
|
||||
&& {combat_readiness >= (60 - (5 * GRLIB_csat_aggressivity))}
|
||||
&& {[] call KPLIB_fnc_getOpforCap < GRLIB_battlegroup_cap}
|
||||
&& {diag_fps > 15.0}
|
||||
) then {
|
||||
["", (random 100) < 45] spawn spawn_battlegroup;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
waitUntil {!isNil "save_is_loaded" && {save_is_loaded}};
|
||||
|
||||
while {true} do {
|
||||
if ((count blufor_sectors) >= ((count sectors_allSectors) * 0.9)) then {
|
||||
if (combat_readiness > 0) then {
|
||||
combat_readiness = combat_readiness - 0.25;
|
||||
};
|
||||
} else {
|
||||
if (
|
||||
(combat_readiness < ((count blufor_sectors) * 2) && combat_readiness < 35)
|
||||
|| (combat_readiness < ((count blufor_sectors) * 1.25) && combat_readiness < 60)
|
||||
) then {
|
||||
combat_readiness = combat_readiness + 0.25;
|
||||
stats_readiness_earned = stats_readiness_earned + 0.25;
|
||||
};
|
||||
};
|
||||
if (combat_readiness > 100.0 && GRLIB_difficulty_modifier < 2) then {combat_readiness = 100.0};
|
||||
sleep (180 + random (180));
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
params ["_first_objective"];
|
||||
|
||||
if (opfor_air isEqualTo []) exitWith {false};
|
||||
|
||||
private _planes_number = ((floor linearConversion [40, 100, combat_readiness, 1, 3]) min 3) max 0;
|
||||
|
||||
if (_planes_number < 1) exitWith {};
|
||||
|
||||
private _class = selectRandom opfor_air;
|
||||
private _spawnPoint = ([sectors_airspawn, [_first_objective], {(markerPos _x) distance _input0}, "ASCEND"] call BIS_fnc_sortBy) select 0;
|
||||
private _spawnPos = [];
|
||||
private _plane = objNull;
|
||||
private _grp = createGroup [GRLIB_side_enemy, true];
|
||||
|
||||
for "_i" from 1 to _planes_number do {
|
||||
_spawnPos = markerPos _spawnPoint;
|
||||
_spawnPos = [(((_spawnPos select 0) + 500) - random 1000), (((_spawnPos select 1) + 500) - random 1000), 200];
|
||||
_plane = createVehicle [_class, _spawnPos, [], 0, "FLY"];
|
||||
createVehicleCrew _plane;
|
||||
_plane flyInHeight (120 + (random 180));
|
||||
_plane addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
|
||||
[_plane] call KPLIB_fnc_addObjectInit;
|
||||
{_x addMPEventHandler ["MPKilled", {_this spawn kill_manager}];} forEach (crew _plane);
|
||||
(crew _plane) joinSilent _grp;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
while {!((waypoints _grp) isEqualTo [])} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
sleep 1;
|
||||
{_x doFollow leader _grp} forEach (units _grp);
|
||||
sleep 1;
|
||||
|
||||
private _waypoint = _grp addWaypoint [_first_objective, 500];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
|
||||
_waypoint = _grp addWaypoint [_first_objective, 500];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
|
||||
_waypoint = _grp addWaypoint [_first_objective, 500];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "AWARE";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
|
||||
for "_i" from 1 to 6 do {
|
||||
_waypoint = _grp addWaypoint [_first_objective, 500];
|
||||
_waypoint setWaypointType "SAD";
|
||||
};
|
||||
|
||||
_waypoint = _grp addWaypoint [_first_objective, 500];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_grp setCurrentWaypoint [_grp, 2];
|
||||
@@ -0,0 +1,89 @@
|
||||
// TODO Refactor and create function
|
||||
params [
|
||||
["_spawn_marker", "", [""]],
|
||||
["_infOnly", false, [false]]
|
||||
];
|
||||
|
||||
if (GRLIB_endgame == 1) exitWith {};
|
||||
|
||||
_spawn_marker = [[2000, 1000] select _infOnly, 3000, false, markerPos _spawn_marker] call KPLIB_fnc_getOpforSpawnPoint;
|
||||
|
||||
if !(_spawn_marker isEqualTo "") then {
|
||||
GRLIB_last_battlegroup_time = diag_tickTime;
|
||||
|
||||
private _bg_groups = [];
|
||||
private _selected_opfor_battlegroup = [];
|
||||
private _target_size = (round (GRLIB_battlegroup_size * ([] call KPLIB_fnc_getOpforFactor) * (sqrt GRLIB_csat_aggressivity))) min 16;
|
||||
if (combat_readiness < 60) then {_target_size = round (_target_size * 0.65);};
|
||||
|
||||
[_spawn_marker] remoteExec ["remote_call_battlegroup"];
|
||||
|
||||
if (worldName in KP_liberation_battlegroup_clearance) then {
|
||||
[markerPos _spawn_marker, 15] call KPLIB_fnc_createClearance;
|
||||
};
|
||||
|
||||
if (_infOnly) then {
|
||||
// Infantry units to choose from
|
||||
private _infClasses = [KPLIB_o_inf_classes, militia_squad] select (combat_readiness < 50);
|
||||
|
||||
// Adjust target size for infantry
|
||||
_target_size = 12 max (_target_size * 4);
|
||||
|
||||
// Create infantry groups with up to 8 units per squad
|
||||
private _grp = createGroup [GRLIB_side_enemy, true];
|
||||
for "_i" from 0 to (_target_size - 1) do {
|
||||
if (_i > 0 && {(_i % 8) isEqualTo 0}) then {
|
||||
_bg_groups pushBack _grp;
|
||||
_grp = createGroup [GRLIB_side_enemy, true];
|
||||
};
|
||||
[selectRandom _infClasses, markerPos _spawn_marker, _grp] call KPLIB_fnc_createManagedUnit;
|
||||
};
|
||||
[_grp] spawn battlegroup_ai;
|
||||
_bg_groups pushBack _grp;
|
||||
} else {
|
||||
private _vehicle_pool = [opfor_battlegroup_vehicles, opfor_battlegroup_vehicles_low_intensity] select (combat_readiness < 50);
|
||||
|
||||
while {count _selected_opfor_battlegroup < _target_size} do {
|
||||
_selected_opfor_battlegroup pushback (selectRandom _vehicle_pool);
|
||||
};
|
||||
|
||||
private ["_nextgrp", "_vehicle"];
|
||||
{
|
||||
_nextgrp = createGroup [GRLIB_side_enemy, true];
|
||||
_vehicle = [markerpos _spawn_marker, _x] call KPLIB_fnc_spawnVehicle;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
(crew _vehicle) joinSilent _nextgrp;
|
||||
[_nextgrp] spawn battlegroup_ai;
|
||||
_bg_groups pushback _nextgrp;
|
||||
|
||||
if ((_x in opfor_troup_transports) && ([] call KPLIB_fnc_getOpforCap < GRLIB_battlegroup_cap)) then {
|
||||
if (_vehicle isKindOf "Air") then {
|
||||
[[markerPos _spawn_marker] call KPLIB_fnc_getNearestBluforObjective, _vehicle] spawn send_paratroopers;
|
||||
} else {
|
||||
[_vehicle] spawn troup_transport;
|
||||
};
|
||||
};
|
||||
} forEach _selected_opfor_battlegroup;
|
||||
|
||||
if (GRLIB_csat_aggressivity > 0.9) then {
|
||||
[[markerPos _spawn_marker] call KPLIB_fnc_getNearestBluforObjective] spawn spawn_air;
|
||||
};
|
||||
};
|
||||
|
||||
sleep 3;
|
||||
|
||||
combat_readiness = (combat_readiness - (round ((count _bg_groups) + (random (count _bg_groups))))) max 0;
|
||||
stats_hostile_battlegroups = stats_hostile_battlegroups + 1;
|
||||
|
||||
{
|
||||
if (local _x) then {
|
||||
_headless_client = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
if (!isNull _headless_client) then {
|
||||
_x setGroupOwner (owner _headless_client);
|
||||
};
|
||||
};
|
||||
sleep 1;
|
||||
} forEach _bg_groups;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
params ["_informant"];
|
||||
|
||||
if (isServer && alive _informant) then {
|
||||
resources_intel = resources_intel + KP_liberation_civinfo_intel;
|
||||
[2] spawn F_cr_changeCR;
|
||||
[1] remoteExec ["civinfo_notifications"];
|
||||
|
||||
sleep 6;
|
||||
|
||||
if ((random 100) <= KP_liberation_civinfo_task_chance) then {
|
||||
private _hc = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
|
||||
if (isNull _hc) then {
|
||||
[] spawn civinfo_task;
|
||||
} else {
|
||||
[] remoteExec ["civinfo_task", _hc];
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,79 @@
|
||||
waitUntil {sleep 10; ({_x in sectors_capture || _x in sectors_bigtown} count blufor_sectors) > 0};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["Loop spawned on: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
while {true} do {
|
||||
uiSleep (KP_liberation_civinfo_min + round (random (KP_liberation_civinfo_max - KP_liberation_civinfo_min)));
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {["Informant sleep passed", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
waitUntil {
|
||||
sleep 10;
|
||||
({_x in sectors_capture || _x in sectors_bigtown} count blufor_sectors) > 0 &&
|
||||
KP_liberation_civ_rep >= 25
|
||||
};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {["Informant waitUntil passed", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
if ((KP_liberation_civinfo_chance >= (random 100)) && GRLIB_endgame == 0) then {
|
||||
private _sector = selectRandom (blufor_sectors select {_x in sectors_capture || _x in sectors_bigtown});
|
||||
private _house = (nearestObjects [[((markerPos _sector select 0) - 100 + (random 200)), ((markerPos _sector select 1) - 100 + (random 200))],["House", "Building"], 100]) select 0;
|
||||
|
||||
private _grp = createGroup [GRLIB_side_civilian, true];
|
||||
private _informant = [selectRandom civilians, markerPos _sector, _grp] call KPLIB_fnc_createManagedUnit;
|
||||
private _waiting_time = KP_liberation_civinfo_duration;
|
||||
|
||||
_informant setPos (selectRandom (_house buildingPos -1));
|
||||
_informant setUnitPos "UP";
|
||||
sleep 1;
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_informant, true], _informant] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_informant disableAI "ANIM";
|
||||
_informant disableAI "MOVE";
|
||||
_informant playmove "AmovPercMstpSnonWnonDnon_AmovPercMstpSsurWnonDnon";
|
||||
sleep 2;
|
||||
_informant setCaptive true;
|
||||
};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["Informant %1 spawned on: %2 - Position: %3", name _informant, debug_source, getPos _informant], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
[0, [((((getPos _informant) select 0) + 200) - random 400),((((getPos _informant) select 1) + 200) - random 400),0]] remoteExec ["civinfo_notifications"];
|
||||
|
||||
while {alive _informant && ((side (group _informant)) == GRLIB_side_civilian) && _waiting_time > 0} do {
|
||||
uiSleep 1;
|
||||
private _player_near = false;
|
||||
{
|
||||
if (((_x distance _informant) < 150) && (alive _x)) exitWith {_player_near = true};
|
||||
} foreach allPlayers;
|
||||
|
||||
if !(_player_near) then {
|
||||
_waiting_time = _waiting_time - 1;
|
||||
};
|
||||
|
||||
if ((KP_liberation_civinfo_debug > 0) && ((_waiting_time % 60) == 0)) then {[format ["Informant will despawn in %1 minutes", round (_waiting_time / 60)], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
|
||||
if (_waiting_time > 0) then {
|
||||
if (alive _informant) then {
|
||||
if (KP_liberation_ace) then {
|
||||
["ace_captives_setSurrendered", [_informant, false], _informant] call CBA_fnc_targetEvent;
|
||||
} else {
|
||||
_informant enableAI "ANIM";
|
||||
_informant enableAI "MOVE";
|
||||
};
|
||||
sleep 1;
|
||||
[_informant] remoteExec ["civinfo_escort"];
|
||||
} else {
|
||||
if (KP_liberation_civinfo_debug > 0) then {["Informant is dead", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
[3] remoteExec ["civinfo_notifications"];
|
||||
};
|
||||
} else {
|
||||
deleteVehicle _informant;
|
||||
if (KP_liberation_civinfo_debug > 0) then {["Informant despawned", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
[2] remoteExec ["civinfo_notifications"];
|
||||
};
|
||||
} else {
|
||||
if (KP_liberation_civinfo_debug > 0) then {["Informant spawn chance missed", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
// Scripts
|
||||
// Task selection and spawning
|
||||
civinfo_task = compileFinal preprocessFileLineNumbers "scripts\server\civinformant\tasks\civinfo_task.sqf";
|
||||
|
||||
// Start spawn loop
|
||||
execVM "scripts\server\civinformant\civinfo_loop.sqf";
|
||||
@@ -0,0 +1,76 @@
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_task.sqf spawned on: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _spawn_marker = [2000,999999,false] call KPLIB_fnc_getOpforSpawnPoint;
|
||||
private _roadObj = [markerPos _spawn_marker, 400, []] call BIS_fnc_nearestRoad;
|
||||
|
||||
if (isNull _roadObj) exitWith {if (KP_liberation_civinfo_debug > 0) then {["civinfo_task.sqf -> no road found", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};};
|
||||
|
||||
private _veh = createVehicle [opfor_mrap, getPos _roadObj, [], 0, "NONE"];
|
||||
_veh setDir (getDir _roadObj);
|
||||
{
|
||||
if ((_x find "FWheel") != -1) then {
|
||||
_veh setHitPointDamage [_x, 1];
|
||||
};
|
||||
} forEach ((getAllHitPointsDamage _veh) select 0);
|
||||
|
||||
private _grp = createGroup [GRLIB_side_enemy, true];
|
||||
private _hvt = [opfor_officer, getPos _roadObj, _grp, "CAPTAIN", 30] call KPLIB_fnc_createManagedUnit;
|
||||
|
||||
for "_i" from 1 to 4 do {
|
||||
[selectRandom militia_squad, _grp, _grp] call KPLIB_fnc_createManagedUnit;
|
||||
sleep 0.1;
|
||||
};
|
||||
|
||||
private _waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointCompletionRadius 10;
|
||||
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
|
||||
_waypoint = _grp addWaypoint [getPos _roadObj, 100];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_task.sqf -> vehicle and group created on: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _marker_pos = [((((getPos _roadObj) select 0) + 200) - random 400),((((getPos _roadObj) select 1) + 200) - random 400),0];
|
||||
|
||||
[4, _marker_pos] remoteExec ["civinfo_notifications"];
|
||||
|
||||
private _time_remaining = KP_liberation_civinfo_task_duration;
|
||||
|
||||
while {(alive _hvt) && _time_remaining > 0} do {
|
||||
uiSleep 1;
|
||||
private _player_near = false;
|
||||
{
|
||||
if (((_x distance _veh) < 1000) && (alive _x)) exitWith {_player_near = true};
|
||||
} foreach allPlayers;
|
||||
|
||||
if !(_player_near) then {
|
||||
_time_remaining = _time_remaining - 1;
|
||||
};
|
||||
if ((KP_liberation_civinfo_debug > 0) && ((_time_remaining % 60) == 0)) then {[format ["civinfo_task.sqf -> Task will despawn in %1 minutes", round (_time_remaining / 60)], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
|
||||
if (KP_liberation_civinfo_debug > 0) then {[format ["civinfo_task.sqf -> loop exited on: %1", debug_source], "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
if (alive _hvt) then {
|
||||
deleteVehicle _veh;
|
||||
{deleteVehicle _x} forEach (units _grp);
|
||||
[6] remoteExec ["civinfo_notifications"];
|
||||
if (KP_liberation_civinfo_debug > 0) then {["civinfo_task.sqf -> Task despawned", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
} else {
|
||||
combat_readiness = round (combat_readiness * 0.6);
|
||||
if (!isServer) then {
|
||||
publicVariableServer "combat_readiness";
|
||||
};
|
||||
[5] remoteExec ["civinfo_notifications"];
|
||||
if (KP_liberation_civinfo_debug > 0) then {["civinfo_task.sqf -> Task ended with success", "CIVINFO"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
params ["_amount", ["_negative", false]];
|
||||
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["changeCR called - Parameters [%1, %2]", _amount, _negative], "CIVREP"] call KPLIB_fnc_log;};
|
||||
|
||||
if (_negative) then {
|
||||
KP_liberation_civ_rep = KP_liberation_civ_rep - _amount;
|
||||
} else {
|
||||
KP_liberation_civ_rep = KP_liberation_civ_rep + _amount;
|
||||
};
|
||||
|
||||
KP_liberation_civ_rep = -100 max (KP_liberation_civ_rep min 100);
|
||||
|
||||
// Set correct resistance standing
|
||||
private _resistanceEnemy = [0, 1] select (KP_liberation_civ_rep < 25);
|
||||
private _resistanceFriendly = [0, 1] select (KP_liberation_civ_rep >= -25);
|
||||
|
||||
GRLIB_side_resistance setFriend [GRLIB_side_enemy, _resistanceEnemy];
|
||||
GRLIB_side_enemy setFriend [GRLIB_side_resistance, _resistanceEnemy];
|
||||
GRLIB_side_resistance setFriend [GRLIB_side_friendly, _resistanceFriendly];
|
||||
GRLIB_side_friendly setFriend [GRLIB_side_resistance, _resistanceFriendly];
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["changeCR finished - New value: %1", KP_liberation_civ_rep], "CIVREP"] call KPLIB_fnc_log;};
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["%1 getFriend %2: %3 - %1 getFriend %4: %5", GRLIB_side_resistance, GRLIB_side_enemy, (GRLIB_side_resistance getFriend GRLIB_side_enemy), GRLIB_side_friendly, (GRLIB_side_resistance getFriend GRLIB_side_friendly)], "CIVREP"] call KPLIB_fnc_log;};
|
||||
@@ -0,0 +1,11 @@
|
||||
params ["_sector"];
|
||||
|
||||
private _return = 0;
|
||||
|
||||
if (KP_liberation_cr_param_buildings) then {
|
||||
_return = count (nearestObjects [markerPos _sector, ["House"], 1.5 * GRLIB_capture_size] select {(damage _x == 0) && !((typeOf _x) in KP_liberation_cr_ign_buildings)});
|
||||
} else {
|
||||
_return = count (nearestObjects [markerPos _sector, ["House"], 1.5 * GRLIB_capture_size] select {(alive _x) && !((typeOf _x) in KP_liberation_cr_ign_buildings)});
|
||||
};
|
||||
|
||||
_return
|
||||
@@ -0,0 +1,25 @@
|
||||
params ["_sector"];
|
||||
|
||||
if (_sector in sectors_bigtown || _sector in sectors_capture) then {
|
||||
private _penalty = 0;
|
||||
|
||||
{
|
||||
if (_sector == (_x select 0)) exitWith {_penalty = (_x select 1) - ([_sector] call F_cr_getBuildings)};
|
||||
} forEach KP_liberation_cr_sectorbuildings;
|
||||
|
||||
stats_civilian_buildings_destroyed = stats_civilian_buildings_destroyed + _penalty;
|
||||
|
||||
_penalty = _penalty * KP_liberation_cr_building_penalty;
|
||||
|
||||
if (_penalty > 0) then {
|
||||
[1, [(_penalty / KP_liberation_cr_building_penalty)]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
|
||||
};
|
||||
|
||||
if (_sector in sectors_bigtown) then {
|
||||
[(2 * KP_liberation_cr_sector_gain - _penalty), false] spawn F_cr_changeCR;
|
||||
} else {
|
||||
[(KP_liberation_cr_sector_gain - _penalty), false] spawn F_cr_changeCR;
|
||||
};
|
||||
|
||||
[format ["Civilian sector %1 (%2) captured. Penalty: %3", markerText _sector, _sector, _penalty], "CIVREP"] call KPLIB_fnc_log;
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
/*
|
||||
f_kp_cr_woundedAnim.sqf
|
||||
Author: veteran29
|
||||
|
||||
Description:
|
||||
Play random wounded animation on given unit
|
||||
*/
|
||||
params ["_unit"];
|
||||
|
||||
private _anim = selectRandom ["Acts_CivilInjuredHead_1", "Acts_CivilInjuredArms_1", "Acts_CivilInjuredChest_1", "Acts_CivilInjuredLegs_1", "Acts_CivilInjuredGeneral_1", "Acts_SittingWounded_loop"];
|
||||
[_unit, _anim] remoteExec ["switchMove"];
|
||||
@@ -0,0 +1,61 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Cargo_House_V1_F",
|
||||
"Land_Cargo_House_V2_F",
|
||||
"Land_Cargo_House_V3_F",
|
||||
"Land_Cargo_HQ_V1_F",
|
||||
"Land_Cargo_Patrol_V1_F",
|
||||
"Land_Cargo_Tower_V1_F",
|
||||
"Land_Carousel_01_F",
|
||||
"Land_Communication_anchor_F",
|
||||
"Land_Crane_F",
|
||||
"Land_d_Addon_02_V1_F",
|
||||
"Land_d_House_Big_01_V1_F",
|
||||
"Land_d_House_Big_02_V1_F",
|
||||
"Land_d_House_Small_01_V1_F",
|
||||
"Land_d_House_Small_02_V1_F",
|
||||
"Land_d_Shop_01_V1_F",
|
||||
"Land_d_Shop_02_V1_F",
|
||||
"Land_d_Stone_HouseBig_V1_F",
|
||||
"Land_d_Stone_HouseSmall_V1_F",
|
||||
"Land_d_Stone_Shed_V1_F",
|
||||
"Land_d_Windmill01_F",
|
||||
"Land_Dome_Big_F",
|
||||
"Land_dp_transformer_F",
|
||||
"Land_Flush_Light_green_F",
|
||||
"Land_Flush_Light_yellow_F",
|
||||
"Land_fs_feed_F",
|
||||
"Land_fs_roof_F",
|
||||
"Land_HighVoltageColumn_F",
|
||||
"Land_HighVoltageColumnWire_F",
|
||||
"Land_HighVoltageEnd_F",
|
||||
"Land_HighVoltageTower_large_F",
|
||||
"Land_HighVoltageTower_largeCorner_F",
|
||||
"Land_IndPipe2_big_ground1_F",
|
||||
"Land_IndPipe2_big_ground2_F",
|
||||
"Land_IndPipe2_bigL_R_F",
|
||||
"Land_LampAirport_F",
|
||||
"Land_LampAirport_off_F",
|
||||
"Land_LampDecor_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampSolar_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_LifeguardTower_01_F",
|
||||
"Land_nav_pier_m_F",
|
||||
"Land_Pier_F",
|
||||
"Land_Pier_small_F",
|
||||
"Land_PierLadder_F",
|
||||
"Land_PowerPoleWooden_L_F",
|
||||
"Land_PowerWireBig_direct_F",
|
||||
"Land_PowerWireBig_left_F",
|
||||
"Land_PowerWireBig_right_F",
|
||||
"Land_Research_house_V1_F",
|
||||
"Land_runway_edgelight",
|
||||
"Land_runway_edgelight_blue_F",
|
||||
"Land_SlideCastle_F",
|
||||
"Land_spp_Mirror_F",
|
||||
"Land_TTowerSmall_1_F",
|
||||
"Land_TTowerSmall_2_F"
|
||||
];
|
||||
@@ -0,0 +1,157 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_A_Crane_02a",
|
||||
"Land_A_Crane_02b",
|
||||
"Land_A_FuelStation_Shed",
|
||||
"Land_BoatSmall_1",
|
||||
"Land_BoatSmall_2a",
|
||||
"Land_BoatSmall_2b",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Company3_2",
|
||||
"Land_D_Mlyn_Vys",
|
||||
"Land_D_Pec_Vez1",
|
||||
"Land_D_Pec_Vez2",
|
||||
"Land_D_Vez_Mlyn",
|
||||
"Land_Farm_WTower",
|
||||
"Land_Gate_Wood1_5",
|
||||
"Land_Gate_wood2_5",
|
||||
"Land_Ind_BoardsPack1",
|
||||
"Land_Ind_BoardsPack2",
|
||||
"Land_Ind_Expedice_1",
|
||||
"Land_Ind_Expedice_2",
|
||||
"Land_Ind_Expedice_3",
|
||||
"Land_Ind_IlluminantTower",
|
||||
"Land_Ind_Mlyn_01",
|
||||
"Land_Ind_Mlyn_02",
|
||||
"Land_Ind_Mlyn_03",
|
||||
"Land_Ind_Mlyn_04",
|
||||
"Land_Ind_Mlyn_D1",
|
||||
"Land_Ind_Mlyn_D2",
|
||||
"Land_Ind_SawMillPen",
|
||||
"Land_Ind_Shed_01_end",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"Land_Ind_Shed_02_end",
|
||||
"Land_Ind_Shed_02_main",
|
||||
"Land_Ind_SiloVelke_most",
|
||||
"Land_Ind_TankSmall",
|
||||
"Land_Ind_TankSmall2",
|
||||
"Land_Ind_Timbers",
|
||||
"Land_IndPipe1_stair",
|
||||
"Land_IndPipe2_big_18",
|
||||
"Land_IndPipe2_big_18ladder",
|
||||
"Land_IndPipe2_big_9",
|
||||
"Land_IndPipe2_big_ground1",
|
||||
"Land_IndPipe2_big_ground2",
|
||||
"Land_IndPipe2_big_support",
|
||||
"Land_IndPipe2_bigBuild1_R",
|
||||
"Land_IndPipe2_bigBuild2_L",
|
||||
"Land_IndPipe2_bigL_L",
|
||||
"Land_IndPipe2_bigL_R",
|
||||
"Land_IndPipe2_Small_9",
|
||||
"Land_IndPipe2_Small_ground1",
|
||||
"Land_IndPipe2_Small_ground2",
|
||||
"Land_IndPipe2_SmallBuild1_R",
|
||||
"Land_IndPipe2_SmallBuild2_R",
|
||||
"Land_IndPipe2_SmallL_L",
|
||||
"Land_IndPipe2_SmallL_R",
|
||||
"Land_IndPipe2_T_L",
|
||||
"Land_IndPipe2_T_R",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Lampa_ind",
|
||||
"Land_Lampa_ind_zebr",
|
||||
"Land_Lampa_sidl",
|
||||
"Land_Lampa_sidl_2",
|
||||
"Land_Lampa_sidl_3",
|
||||
"Land_loco_742_blue",
|
||||
"Land_Misc_Cargo1Ao",
|
||||
"Land_Misc_Cargo1B",
|
||||
"Land_Misc_Cargo1Bo",
|
||||
"Land_Misc_Cargo1C",
|
||||
"Land_Misc_Cargo1D",
|
||||
"Land_Misc_Cargo2B",
|
||||
"Land_Misc_Cargo2C",
|
||||
"Land_Misc_Cargo2D",
|
||||
"Land_Misc_Cargo2E",
|
||||
"Land_Misc_deerstand",
|
||||
"Land_Misc_GContainer_Big",
|
||||
"Land_Misc_Scaffolding",
|
||||
"Land_Molo_drevo_bs",
|
||||
"Land_Molo_drevo_end",
|
||||
"Land_Nasypka",
|
||||
"Land_Nav_Boathouse_PierT",
|
||||
"land_nav_pier_c",
|
||||
"land_nav_pier_c_270",
|
||||
"land_nav_pier_c_90",
|
||||
"land_nav_pier_c_big",
|
||||
"land_nav_pier_C_L10",
|
||||
"land_nav_pier_C_R10",
|
||||
"land_nav_pier_C_R30",
|
||||
"land_nav_pier_c_t15",
|
||||
"land_nav_pier_c_t20",
|
||||
"land_nav_pier_c2",
|
||||
"land_nav_pier_c2_end",
|
||||
"land_nav_pier_F_17",
|
||||
"land_nav_pier_F_23",
|
||||
"Land_nav_pier_m_2",
|
||||
"land_nav_pier_m_end",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_PowLines_ConcL",
|
||||
"Land_PowLines_WoodL",
|
||||
"Land_Psi_bouda",
|
||||
"Land_Pumpa",
|
||||
"Land_Rail_Semafor",
|
||||
"Land_Rail_Zavora",
|
||||
"Land_ruin_wall",
|
||||
"Land_seno_balik",
|
||||
"Land_Shed_M02",
|
||||
"Land_sign_altar",
|
||||
"Land_sign_balota",
|
||||
"Land_Sign_Bar_RU",
|
||||
"Land_sign_berezino",
|
||||
"Land_Sign_BES",
|
||||
"Land_sign_chernogorsk",
|
||||
"Land_sign_elektrozavodsk",
|
||||
"Land_sign_kamenka",
|
||||
"Land_sign_kamyshovo",
|
||||
"Land_sign_komarovo",
|
||||
"Land_sign_solnichnyi",
|
||||
"Land_SignB_Gov",
|
||||
"Land_SignB_GovPolice",
|
||||
"Land_SignB_GovSchool",
|
||||
"Land_SignB_GovSign",
|
||||
"Land_SignB_Hotel_CZ2",
|
||||
"Land_SignB_PostOffice",
|
||||
"Land_SignB_Pub_CZ1",
|
||||
"Land_SignB_Pub_CZ2",
|
||||
"Land_SignB_Pub_CZ3",
|
||||
"Land_SignB_Pub_RU1",
|
||||
"Land_SignB_Pub_RU2",
|
||||
"Land_SignB_Pub_RU3",
|
||||
"Land_sloup_vn",
|
||||
"Land_sloup_vn_drat",
|
||||
"Land_sloup_vn_drat_d",
|
||||
"Land_sloup_vn_dratZ",
|
||||
"Land_Stoplight02",
|
||||
"Land_Tec",
|
||||
"Land_Trafostanica_velka",
|
||||
"Land_Trafostanica_velka_draty",
|
||||
"Land_Vez",
|
||||
"Land_Vez_Pec",
|
||||
"Land_wagon_box",
|
||||
"Land_Wall_CBrk_5_D",
|
||||
"Land_Wall_CGry_5_D",
|
||||
"Land_Wall_Gate_Ind1_L",
|
||||
"Land_Wall_Gate_Ind1_R",
|
||||
"Land_Wall_Gate_Ind2A_L",
|
||||
"Land_Wall_Gate_Ind2A_R",
|
||||
"Land_Wall_Gate_Ind2B_L",
|
||||
"Land_Wall_Gate_Ind2B_R",
|
||||
"Land_Wall_Gate_Ind2Rail_L",
|
||||
"Land_Wall_Gate_Ind2Rail_R",
|
||||
"Land_Wall_Gate_Kolchoz",
|
||||
"Land_Wall_Gate_Village",
|
||||
"Land_Wall_Gate_Wood1"
|
||||
];
|
||||
@@ -0,0 +1,159 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_A_Crane_02a",
|
||||
"Land_popelnice",
|
||||
"Land_fuel_tank_small",
|
||||
"Land_A_Crane_02b",
|
||||
"Land_A_FuelStation_Shed",
|
||||
"Land_BoatSmall_1",
|
||||
"Land_BoatSmall_2a",
|
||||
"Land_BoatSmall_2b",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Company3_2",
|
||||
"Land_D_Mlyn_Vys",
|
||||
"Land_D_Pec_Vez1",
|
||||
"Land_D_Pec_Vez2",
|
||||
"Land_D_Vez_Mlyn",
|
||||
"Land_Farm_WTower",
|
||||
"Land_Gate_Wood1_5",
|
||||
"Land_Gate_wood2_5",
|
||||
"Land_Ind_BoardsPack1",
|
||||
"Land_Ind_BoardsPack2",
|
||||
"Land_Ind_Expedice_1",
|
||||
"Land_Ind_Expedice_2",
|
||||
"Land_Ind_Expedice_3",
|
||||
"Land_Ind_IlluminantTower",
|
||||
"Land_Ind_Mlyn_01",
|
||||
"Land_Ind_Mlyn_02",
|
||||
"Land_Ind_Mlyn_03",
|
||||
"Land_Ind_Mlyn_04",
|
||||
"Land_Ind_Mlyn_D1",
|
||||
"Land_Ind_Mlyn_D2",
|
||||
"Land_Ind_SawMillPen",
|
||||
"Land_Ind_Shed_01_end",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"Land_Ind_Shed_02_end",
|
||||
"Land_Ind_Shed_02_main",
|
||||
"Land_Ind_SiloVelke_most",
|
||||
"Land_Ind_TankSmall",
|
||||
"Land_Ind_TankSmall2",
|
||||
"Land_Ind_Timbers",
|
||||
"Land_IndPipe1_stair",
|
||||
"Land_IndPipe2_big_18",
|
||||
"Land_IndPipe2_big_18ladder",
|
||||
"Land_IndPipe2_big_9",
|
||||
"Land_IndPipe2_big_ground1",
|
||||
"Land_IndPipe2_big_ground2",
|
||||
"Land_IndPipe2_big_support",
|
||||
"Land_IndPipe2_bigBuild1_R",
|
||||
"Land_IndPipe2_bigBuild2_L",
|
||||
"Land_IndPipe2_bigL_L",
|
||||
"Land_IndPipe2_bigL_R",
|
||||
"Land_IndPipe2_Small_9",
|
||||
"Land_IndPipe2_Small_ground1",
|
||||
"Land_IndPipe2_Small_ground2",
|
||||
"Land_IndPipe2_SmallBuild1_R",
|
||||
"Land_IndPipe2_SmallBuild2_R",
|
||||
"Land_IndPipe2_SmallL_L",
|
||||
"Land_IndPipe2_SmallL_R",
|
||||
"Land_IndPipe2_T_L",
|
||||
"Land_IndPipe2_T_R",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Lampa_ind",
|
||||
"Land_Lampa_ind_zebr",
|
||||
"Land_Lampa_sidl",
|
||||
"Land_Lampa_sidl_2",
|
||||
"Land_Lampa_sidl_3",
|
||||
"Land_loco_742_blue",
|
||||
"Land_Misc_Cargo1Ao",
|
||||
"Land_Misc_Cargo1B",
|
||||
"Land_Misc_Cargo1Bo",
|
||||
"Land_Misc_Cargo1C",
|
||||
"Land_Misc_Cargo1D",
|
||||
"Land_Misc_Cargo2B",
|
||||
"Land_Misc_Cargo2C",
|
||||
"Land_Misc_Cargo2D",
|
||||
"Land_Misc_Cargo2E",
|
||||
"Land_Misc_deerstand",
|
||||
"Land_Misc_GContainer_Big",
|
||||
"Land_Misc_Scaffolding",
|
||||
"Land_Molo_drevo_bs",
|
||||
"Land_Molo_drevo_end",
|
||||
"Land_Nasypka",
|
||||
"Land_Nav_Boathouse_PierT",
|
||||
"land_nav_pier_c",
|
||||
"land_nav_pier_c_270",
|
||||
"land_nav_pier_c_90",
|
||||
"land_nav_pier_c_big",
|
||||
"land_nav_pier_C_L10",
|
||||
"land_nav_pier_C_R10",
|
||||
"land_nav_pier_C_R30",
|
||||
"land_nav_pier_c_t15",
|
||||
"land_nav_pier_c_t20",
|
||||
"land_nav_pier_c2",
|
||||
"land_nav_pier_c2_end",
|
||||
"land_nav_pier_F_17",
|
||||
"land_nav_pier_F_23",
|
||||
"Land_nav_pier_m_2",
|
||||
"land_nav_pier_m_end",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_PowLines_ConcL",
|
||||
"Land_PowLines_WoodL",
|
||||
"Land_Psi_bouda",
|
||||
"Land_Pumpa",
|
||||
"Land_Rail_Semafor",
|
||||
"Land_Rail_Zavora",
|
||||
"Land_ruin_wall",
|
||||
"Land_seno_balik",
|
||||
"Land_Shed_M02",
|
||||
"Land_sign_altar",
|
||||
"Land_sign_balota",
|
||||
"Land_Sign_Bar_RU",
|
||||
"Land_sign_berezino",
|
||||
"Land_Sign_BES",
|
||||
"Land_sign_chernogorsk",
|
||||
"Land_sign_elektrozavodsk",
|
||||
"Land_sign_kamenka",
|
||||
"Land_sign_kamyshovo",
|
||||
"Land_sign_komarovo",
|
||||
"Land_sign_solnichnyi",
|
||||
"Land_SignB_Gov",
|
||||
"Land_SignB_GovPolice",
|
||||
"Land_SignB_GovSchool",
|
||||
"Land_SignB_GovSign",
|
||||
"Land_SignB_Hotel_CZ2",
|
||||
"Land_SignB_PostOffice",
|
||||
"Land_SignB_Pub_CZ1",
|
||||
"Land_SignB_Pub_CZ2",
|
||||
"Land_SignB_Pub_CZ3",
|
||||
"Land_SignB_Pub_RU1",
|
||||
"Land_SignB_Pub_RU2",
|
||||
"Land_SignB_Pub_RU3",
|
||||
"Land_sloup_vn",
|
||||
"Land_sloup_vn_drat",
|
||||
"Land_sloup_vn_drat_d",
|
||||
"Land_sloup_vn_dratZ",
|
||||
"Land_Stoplight02",
|
||||
"Land_Tec",
|
||||
"Land_Trafostanica_velka",
|
||||
"Land_Trafostanica_velka_draty",
|
||||
"Land_Vez",
|
||||
"Land_Vez_Pec",
|
||||
"Land_wagon_box",
|
||||
"Land_Wall_CBrk_5_D",
|
||||
"Land_Wall_CGry_5_D",
|
||||
"Land_Wall_Gate_Ind1_L",
|
||||
"Land_Wall_Gate_Ind1_R",
|
||||
"Land_Wall_Gate_Ind2A_L",
|
||||
"Land_Wall_Gate_Ind2A_R",
|
||||
"Land_Wall_Gate_Ind2B_L",
|
||||
"Land_Wall_Gate_Ind2B_R",
|
||||
"Land_Wall_Gate_Ind2Rail_L",
|
||||
"Land_Wall_Gate_Ind2Rail_R",
|
||||
"Land_Wall_Gate_Kolchoz",
|
||||
"Land_Wall_Gate_Village",
|
||||
"Land_Wall_Gate_Wood1"
|
||||
];
|
||||
@@ -0,0 +1,84 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Bunker_02_double_F",
|
||||
"Land_Bunker_02_left_F",
|
||||
"Land_Bunker_02_light_double_F",
|
||||
"Land_Bunker_02_light_left_F",
|
||||
"Land_Bunker_02_light_right_F",
|
||||
"Land_Bunker_02_right_F",
|
||||
"Land_Calvary_03_F",
|
||||
"Land_CastleRuins_01_wall_10m_F",
|
||||
"Land_CastleRuins_01_wall_d_L_F",
|
||||
"Land_CastleRuins_01_wall_d_R_F",
|
||||
"Land_ChickenCoop_01_F",
|
||||
"Land_cmp_Shed_dam_F",
|
||||
"Land_Communication_F",
|
||||
"Land_ConcreteWell_02_F",
|
||||
"Land_Cross_01_small_F",
|
||||
"Land_DeerStand_01_F",
|
||||
"Land_DPP_01_waterCooler_F",
|
||||
"Land_DryToilet_01_F",
|
||||
"Land_FeedRack_01_F",
|
||||
"Land_FeedStorage_01_F",
|
||||
"Land_FuelStation_03_pump_F",
|
||||
"Land_Grave_08_F",
|
||||
"Land_Grave_09_F",
|
||||
"Land_Grave_10_F",
|
||||
"Land_Grave_11_F",
|
||||
"Land_GraveFence_01_F",
|
||||
"Land_GraveFence_02_F",
|
||||
"Land_GraveFence_03_F",
|
||||
"Land_GraveFence_04_F",
|
||||
"Land_Greenhouse_01_damaged_F",
|
||||
"Land_GuardTower_02_F",
|
||||
"Land_HighVoltageEnd_F",
|
||||
"Land_HighVoltageTower_large_F",
|
||||
"Land_Hutch_01_F",
|
||||
"Land_IndPipe3_big_ground1_F",
|
||||
"Land_IndPipe3_big_ground2_F",
|
||||
"Land_IndPipe3_bigL_L_F",
|
||||
"Land_IndPipe3_bigL_R_F",
|
||||
"Land_LampDecor_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampIndustrial_01_F",
|
||||
"Land_LampIndustrial_01_off_F",
|
||||
"Land_LampIndustrial_02_F",
|
||||
"Land_LampIndustrial_02_off_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_02_amplion_F",
|
||||
"Land_LampStreet_02_amplion_off_F",
|
||||
"Land_LampStreet_02_double_F",
|
||||
"Land_LampStreet_02_double_off_F",
|
||||
"Land_LampStreet_02_F",
|
||||
"Land_LampStreet_02_off_F",
|
||||
"Land_LampStreet_02_triple_off_F",
|
||||
"Land_Power_Pole_Wood1_Amp",
|
||||
"Land_Power_Pole_Wood1_Lamp_Amp",
|
||||
"Land_Power_Pole_Wood1_Lamp",
|
||||
"Land_Power_Pole_Wood1",
|
||||
"Land_Power_Pole_Wood3",
|
||||
"Land_PowerLine_01_wire_50m_F",
|
||||
"Land_PowerLine_01_wire_50m_main_F",
|
||||
"Land_PowerLine_02_pole_junction_A_F",
|
||||
"Land_powerline_02_pole_junction_nest_a_f",
|
||||
"Land_PowerLine_02_pole_small_A_F",
|
||||
"Land_PowerLine_02_pole_small_end_A_F",
|
||||
"Land_PowerLine_02_pole_small_F",
|
||||
"Land_powerline_02_pole_small_hook_end_f",
|
||||
"Land_PowerLine_02_pole_small_hook_F",
|
||||
"Land_powerline_02_pole_small_hook_junction_f",
|
||||
"Land_PowerLine_03_pole_end_F",
|
||||
"Land_PowerLine_03_pole_F",
|
||||
"Land_PowerLine_03_pole_junction_F",
|
||||
"Land_PowerWireBig_direct_F",
|
||||
"Land_PowerWireBig_end_F",
|
||||
"Land_Radar_01_airshaft_F",
|
||||
"Land_Rail_ConcreteRamp_F",
|
||||
"Land_Rail_Crossing_Barrier_F",
|
||||
"Land_Sawmill_01_illuminati_tower_F",
|
||||
"Land_Shed_06_F",
|
||||
"Land_Shed_10_F",
|
||||
"Land_StoneWell_01_F",
|
||||
"Land_TelephoneLine_01_wire_50m_main_F",
|
||||
"Land_TTowerSmall_2_F"
|
||||
];
|
||||
@@ -0,0 +1,122 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"land_gm_euro_beersign_01",
|
||||
"land_gm_euro_beersign_02",
|
||||
"land_gm_euro_beersign_03",
|
||||
"land_gm_euro_beersign_04",
|
||||
"land_gm_euro_beersign_05",
|
||||
"land_gm_euro_bridge_01_25_pathlod",
|
||||
"land_gm_euro_bridge_02_20_pathlod",
|
||||
"land_gm_euro_bridge_03_50_pathlod",
|
||||
"land_gm_euro_busstop_01",
|
||||
"land_gm_euro_busstop_02",
|
||||
"land_gm_euro_deerstand_01",
|
||||
"land_gm_euro_fuelpump_01_e",
|
||||
"land_gm_euro_fuelpump_01_w",
|
||||
"land_gm_euro_fuelpump_02_e",
|
||||
"land_gm_euro_fuelpump_02_w",
|
||||
"land_gm_euro_fuelstation_02",
|
||||
"land_gm_euro_gardenshed_01",
|
||||
"land_gm_euro_gardenshed_05",
|
||||
"land_gm_euro_gardenshed_06",
|
||||
"land_gm_euro_misc_awning_01",
|
||||
"land_gm_euro_misc_awning_02",
|
||||
"land_gm_euro_misc_awning_03",
|
||||
"land_gm_euro_misc_awning_04",
|
||||
"land_gm_euro_misc_awning_05",
|
||||
"land_gm_euro_misc_bargate_01_open",
|
||||
"land_gm_euro_misc_bargate_02",
|
||||
"land_gm_euro_misc_chickencoop_01",
|
||||
"land_gm_euro_misc_clothesline_01",
|
||||
"land_gm_euro_misc_clothesline_02",
|
||||
"land_gm_euro_misc_container_02_blu",
|
||||
"land_gm_euro_misc_container_02_grn",
|
||||
"land_gm_euro_misc_container_02_gry",
|
||||
"land_gm_euro_misc_container_02_orn",
|
||||
"land_gm_euro_misc_feh_62_e",
|
||||
"land_gm_euro_misc_mailbox_01_01",
|
||||
"land_gm_euro_misc_mailbox_01_02",
|
||||
"land_gm_euro_misc_mailbox_02_01",
|
||||
"land_gm_euro_misc_mailbox_02_02",
|
||||
"land_gm_euro_misc_mailbox_03_01",
|
||||
"land_gm_euro_misc_mailbox_03_02",
|
||||
"land_gm_euro_misc_mailbox_04_01",
|
||||
"land_gm_euro_misc_mailbox_04_02",
|
||||
"land_gm_euro_misc_mailbox_05_01",
|
||||
"land_gm_euro_misc_mailbox_05_02",
|
||||
"land_gm_euro_misc_mailbox_06_01",
|
||||
"land_gm_euro_misc_mailbox_06_02",
|
||||
"land_gm_euro_misc_postbox_e",
|
||||
"land_gm_euro_misc_postbox_w",
|
||||
"land_gm_euro_misc_powerbox_04_w",
|
||||
"land_gm_euro_misc_powerbox_05",
|
||||
"land_gm_euro_misc_sandbox_01",
|
||||
"land_gm_euro_misc_telh_78_w",
|
||||
"land_gm_euro_misc_trashbin_02",
|
||||
"land_gm_euro_powerline_01_01",
|
||||
"land_gm_euro_powerline_01_02",
|
||||
"land_gm_euro_powerline_01_50_0",
|
||||
"land_gm_euro_powerline_02_01",
|
||||
"land_gm_euro_powerline_02_02",
|
||||
"land_gm_euro_powerline_02_03",
|
||||
"land_gm_euro_powerline_02_50_0",
|
||||
"land_gm_euro_powerline_02_50_23",
|
||||
"land_gm_euro_powerline_02_50_5",
|
||||
"land_gm_euro_powerline_03_01_e",
|
||||
"land_gm_euro_powerline_03_01_w",
|
||||
"land_gm_euro_powerline_03_100_0",
|
||||
"land_gm_euro_powerline_03_100_23",
|
||||
"land_gm_euro_powerline_03_100_5",
|
||||
"land_gm_euro_pubsign_01",
|
||||
"land_gm_euro_pubsign_02",
|
||||
"land_gm_euro_pubsign_03",
|
||||
"land_gm_euro_pubsign_04",
|
||||
"land_gm_euro_pubsign_05",
|
||||
"land_gm_euro_pubsign_06",
|
||||
"land_gm_euro_shed_02",
|
||||
"land_gm_euro_sidewall_01",
|
||||
"land_gm_fence_garden_02_300",
|
||||
"land_gm_fence_garden_04_300",
|
||||
"land_gm_fence_garden_06_300",
|
||||
"land_gm_fence_garden_07_300",
|
||||
"land_gm_fence_garden_08_400",
|
||||
"land_gm_fence_garden_09_400",
|
||||
"land_gm_fence_garden_10_300",
|
||||
"land_gm_fence_garden_13_300_01",
|
||||
"land_gm_fence_garden_13_300_02",
|
||||
"land_gm_fence_garden_13_300_03",
|
||||
"land_gm_fence_garden_13_300_04",
|
||||
"land_gm_fence_garden_13_post",
|
||||
"land_gm_fence_garden_15_400",
|
||||
"land_gm_fence_railing_01_200",
|
||||
"land_gm_fence_railing_02_200",
|
||||
"land_gm_fence_railing_03_60",
|
||||
"land_gm_gc_ds977_50",
|
||||
"land_gm_gc_lamp_01_01",
|
||||
"land_gm_gc_lamp_02_01",
|
||||
"land_gm_gc_lamp_03",
|
||||
"land_gm_gc_lamp_04",
|
||||
"land_gm_ge_einheitssirene_57",
|
||||
"land_gm_ge_lamp_01_01",
|
||||
"land_gm_ge_lamp_01_02",
|
||||
"land_gm_ge_lamp_02_01",
|
||||
"land_gm_ge_lamp_02_02",
|
||||
"land_gm_ge_lamp_03_01",
|
||||
"land_gm_ge_lamp_05",
|
||||
"land_gm_inset_pub_01",
|
||||
"land_gm_inset_shop_empty_01",
|
||||
"land_gm_inset_shop_grocer_01",
|
||||
"land_gm_inset_shop_grocer_02_e",
|
||||
"land_gm_inset_shop_grocer_02_w",
|
||||
"land_gm_inset_shop_post_01",
|
||||
"land_gm_inset_shop_toystore_01",
|
||||
"land_gm_sign_ge_post_01",
|
||||
"land_gm_sign_ge_post_02",
|
||||
"land_gm_wall_castle_01_arches_01",
|
||||
"land_gm_wall_castle_01_corner_01",
|
||||
"land_gm_wall_castle_01_end_01",
|
||||
"land_gm_wall_castle_01_end_02",
|
||||
"land_gm_wall_castle_01_gate_01",
|
||||
"land_gm_wall_castle_01_stairs_01",
|
||||
"land_gm_wall_castle_01_tower_01",
|
||||
"land_gm_wall_castle_01_wall_01"
|
||||
];
|
||||
@@ -0,0 +1,122 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"land_gm_euro_beersign_01",
|
||||
"land_gm_euro_beersign_02",
|
||||
"land_gm_euro_beersign_03",
|
||||
"land_gm_euro_beersign_04",
|
||||
"land_gm_euro_beersign_05",
|
||||
"land_gm_euro_bridge_01_25_pathlod",
|
||||
"land_gm_euro_bridge_02_20_pathlod",
|
||||
"land_gm_euro_bridge_03_50_pathlod",
|
||||
"land_gm_euro_busstop_01",
|
||||
"land_gm_euro_busstop_02",
|
||||
"land_gm_euro_deerstand_01",
|
||||
"land_gm_euro_fuelpump_01_e",
|
||||
"land_gm_euro_fuelpump_01_w",
|
||||
"land_gm_euro_fuelpump_02_e",
|
||||
"land_gm_euro_fuelpump_02_w",
|
||||
"land_gm_euro_fuelstation_02_win",
|
||||
"land_gm_euro_gardenshed_01",
|
||||
"land_gm_euro_gardenshed_05",
|
||||
"land_gm_euro_gardenshed_06",
|
||||
"land_gm_euro_misc_awning_01_win",
|
||||
"land_gm_euro_misc_awning_02_win",
|
||||
"land_gm_euro_misc_awning_03_win",
|
||||
"land_gm_euro_misc_awning_04_win",
|
||||
"land_gm_euro_misc_awning_05_win",
|
||||
"land_gm_euro_misc_bargate_01_open",
|
||||
"land_gm_euro_misc_bargate_02",
|
||||
"land_gm_euro_misc_chickencoop_01",
|
||||
"land_gm_euro_misc_clothesline_01_win",
|
||||
"land_gm_euro_misc_clothesline_02_win",
|
||||
"land_gm_euro_misc_container_02_blu",
|
||||
"land_gm_euro_misc_container_02_grn",
|
||||
"land_gm_euro_misc_container_02_gry",
|
||||
"land_gm_euro_misc_container_02_orn",
|
||||
"land_gm_euro_misc_feh_62_e",
|
||||
"land_gm_euro_misc_mailbox_01_01",
|
||||
"land_gm_euro_misc_mailbox_01_02",
|
||||
"land_gm_euro_misc_mailbox_02_01",
|
||||
"land_gm_euro_misc_mailbox_02_02",
|
||||
"land_gm_euro_misc_mailbox_03_01",
|
||||
"land_gm_euro_misc_mailbox_03_02",
|
||||
"land_gm_euro_misc_mailbox_04_01",
|
||||
"land_gm_euro_misc_mailbox_04_02",
|
||||
"land_gm_euro_misc_mailbox_05_01",
|
||||
"land_gm_euro_misc_mailbox_05_02",
|
||||
"land_gm_euro_misc_mailbox_06_01",
|
||||
"land_gm_euro_misc_mailbox_06_02",
|
||||
"land_gm_euro_misc_postbox_e",
|
||||
"land_gm_euro_misc_postbox_w",
|
||||
"land_gm_euro_misc_powerbox_04_w",
|
||||
"land_gm_euro_misc_powerbox_05",
|
||||
"land_gm_euro_misc_sandbox_01",
|
||||
"land_gm_euro_misc_telh_78_w",
|
||||
"land_gm_euro_misc_trashbin_02",
|
||||
"land_gm_euro_powerline_01_01",
|
||||
"land_gm_euro_powerline_01_02",
|
||||
"land_gm_euro_powerline_01_50_0",
|
||||
"land_gm_euro_powerline_02_01",
|
||||
"land_gm_euro_powerline_02_02",
|
||||
"land_gm_euro_powerline_02_03",
|
||||
"land_gm_euro_powerline_02_50_0",
|
||||
"land_gm_euro_powerline_02_50_23",
|
||||
"land_gm_euro_powerline_02_50_5",
|
||||
"land_gm_euro_powerline_03_01_e",
|
||||
"land_gm_euro_powerline_03_01_w",
|
||||
"land_gm_euro_powerline_03_100_0",
|
||||
"land_gm_euro_powerline_03_100_23",
|
||||
"land_gm_euro_powerline_03_100_5",
|
||||
"land_gm_euro_pubsign_01",
|
||||
"land_gm_euro_pubsign_02",
|
||||
"land_gm_euro_pubsign_03",
|
||||
"land_gm_euro_pubsign_04",
|
||||
"land_gm_euro_pubsign_05",
|
||||
"land_gm_euro_pubsign_06",
|
||||
"land_gm_euro_shed_02_win",
|
||||
"land_gm_euro_sidewall_01",
|
||||
"land_gm_fence_garden_02_300",
|
||||
"land_gm_fence_garden_04_300",
|
||||
"land_gm_fence_garden_06_300",
|
||||
"land_gm_fence_garden_07_300",
|
||||
"land_gm_fence_garden_08_400",
|
||||
"land_gm_fence_garden_09_400",
|
||||
"land_gm_fence_garden_10_300",
|
||||
"land_gm_fence_garden_13_300_01",
|
||||
"land_gm_fence_garden_13_300_02",
|
||||
"land_gm_fence_garden_13_300_03",
|
||||
"land_gm_fence_garden_13_300_04",
|
||||
"land_gm_fence_garden_13_post",
|
||||
"land_gm_fence_garden_15_400",
|
||||
"land_gm_fence_railing_01_200",
|
||||
"land_gm_fence_railing_02_200",
|
||||
"land_gm_fence_railing_03_60",
|
||||
"land_gm_gc_ds977_50",
|
||||
"land_gm_gc_lamp_01_01",
|
||||
"land_gm_gc_lamp_02_01",
|
||||
"land_gm_gc_lamp_03",
|
||||
"land_gm_gc_lamp_04",
|
||||
"land_gm_ge_einheitssirene_57",
|
||||
"land_gm_ge_lamp_01_01",
|
||||
"land_gm_ge_lamp_01_02",
|
||||
"land_gm_ge_lamp_02_01",
|
||||
"land_gm_ge_lamp_02_02",
|
||||
"land_gm_ge_lamp_03_01",
|
||||
"land_gm_ge_lamp_05",
|
||||
"land_gm_inset_pub_01",
|
||||
"land_gm_inset_shop_empty_01",
|
||||
"land_gm_inset_shop_grocer_01",
|
||||
"land_gm_inset_shop_grocer_02_e",
|
||||
"land_gm_inset_shop_grocer_02_w",
|
||||
"land_gm_inset_shop_post_01",
|
||||
"land_gm_inset_shop_toystore_01",
|
||||
"land_gm_sign_ge_post_01",
|
||||
"land_gm_sign_ge_post_02",
|
||||
"land_gm_wall_castle_01_arches_01",
|
||||
"land_gm_wall_castle_01_corner_01",
|
||||
"land_gm_wall_castle_01_end_01",
|
||||
"land_gm_wall_castle_01_end_02",
|
||||
"land_gm_wall_castle_01_gate_01",
|
||||
"land_gm_wall_castle_01_stairs_01",
|
||||
"land_gm_wall_castle_01_tower_01",
|
||||
"land_gm_wall_castle_01_wall_01"
|
||||
];
|
||||
@@ -0,0 +1,100 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Cargo_House_V1_F",
|
||||
"Land_Cargo_House_V2_F",
|
||||
"Land_Cargo_House_V3_F",
|
||||
"Land_Cargo_HQ_V1_F",
|
||||
"Land_Cargo_HQ_V3_F",
|
||||
"Land_Cargo_Patrol_V1_F",
|
||||
"Land_Cargo_Patrol_V3_F",
|
||||
"Land_Carousel_01_F",
|
||||
"Land_cmp_Shed_dam_F",
|
||||
"Land_Communication_F",
|
||||
"Land_Crane_F",
|
||||
"Land_Factory_Conv1_10_F",
|
||||
"Land_Factory_Conv2_F",
|
||||
"Land_ffaa_casa_caseta_peq",
|
||||
"Land_fs_feed_F",
|
||||
"Land_FuelStation_Feed_F",
|
||||
"Land_FuelStation_Shed_F",
|
||||
"Land_IndPipe2_big_ground1_F",
|
||||
"Land_Jbad_Cargo1_int",
|
||||
"Land_Jbad_Cargo2_int",
|
||||
"Land_Jbad_Cargo3_int",
|
||||
"Land_Jbad_Cargo4_int",
|
||||
"Land_Jbad_Cargo5_int",
|
||||
"Land_Jbad_Cargo6_int",
|
||||
"Land_Jbad_Cargo7_int",
|
||||
"Land_jbad_Com_tower",
|
||||
"Land_Jbad_Ind_Coltan_Conv1_10",
|
||||
"Land_Jbad_Ind_Coltan_Conv1_Main",
|
||||
"Land_Jbad_Ind_Coltan_Main",
|
||||
"Land_Jbad_Ind_Conveyer",
|
||||
"Land_Jbad_Ind_FuelStation_Feed",
|
||||
"Land_Jbad_Ind_FuelStation_Shed",
|
||||
"Land_Jbad_Ind_FuelStation_Sign",
|
||||
"Land_Jbad_Ind_Shed_01",
|
||||
"Land_Jbad_Ind_Shed_02",
|
||||
"Land_Jbad_Kamenny_most30",
|
||||
"Land_Jbad_Lamp_small",
|
||||
"Land_Jbad_Lamp_Street1",
|
||||
"Land_Jbad_lampa_ind",
|
||||
"Land_jbad_Misc_Cable",
|
||||
"Land_jbad_Misc_Cable_Rugs1",
|
||||
"Land_jbad_Misc_ConcBox",
|
||||
"Land_jbad_Misc_ConcOutlet",
|
||||
"Land_jbad_Misc_Rubble",
|
||||
"Land_Jbad_Misc_Well_C",
|
||||
"Land_Jbad_Misc_Well_L",
|
||||
"Land_Jbad_most_stred30",
|
||||
"Land_jbad_terrace",
|
||||
"Land_jbad_Wall_L_2m5",
|
||||
"Land_jbad_Wall_L_2m5_corner",
|
||||
"Land_jbad_Wall_L_2m5_corner_dam",
|
||||
"Land_jbad_Wall_L_2m5_dam",
|
||||
"Land_jbad_Wall_L_2m5_gate",
|
||||
"Land_jbad_Wall_L_2m5_gate_dam",
|
||||
"Land_jbad_wall_l_5m",
|
||||
"Land_jbad_wall_l_5m_dam",
|
||||
"Land_jbad_wall_l_5m_damV2",
|
||||
"Land_jbad_Wall_L_Mosque_1",
|
||||
"Land_jbad_Wall_L_Mosque_1_dam",
|
||||
"Land_jbad_Wall_L_Mosque_2",
|
||||
"Land_jbad_Wall_L_Mosque_2_dam",
|
||||
"Land_jbad_Wall_L1_2m5",
|
||||
"Land_jbad_Wall_L1_2m5_dam",
|
||||
"Land_jbad_Wall_L1_5m",
|
||||
"Land_jbad_Wall_L1_5m_dam",
|
||||
"Land_jbad_wall_l1_gate",
|
||||
"Land_jbad_Wall_L1_Pillar",
|
||||
"Land_jbad_Wall_L1_Pillar_dam",
|
||||
"Land_jbad_Wall_L2_5m",
|
||||
"Land_jbad_Wall_L2_5m_dam",
|
||||
"Land_jbad_wall_L2_5m_End",
|
||||
"Land_jbad_wall_l2_5m_End_dam",
|
||||
"Land_jbad_Wall_L3_5m",
|
||||
"Land_jbad_Wall_L3_5m_dam",
|
||||
"Land_jbad_wall_l3_gate",
|
||||
"Land_jbad_Wall_L3_Pillar",
|
||||
"Land_LampAirport_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_LandMark_F",
|
||||
"Land_Medevac_house_V1_F",
|
||||
"Land_Medevac_HQ_V1_F",
|
||||
"Land_NavigLight",
|
||||
"Land_Pier_F",
|
||||
"Land_Pier_small_F",
|
||||
"Land_Research_house_V1_F",
|
||||
"Land_runway_edgelight",
|
||||
"Land_runway_edgelight_blue_F",
|
||||
"Land_spp_Mirror_F",
|
||||
"Land_TentHangar_V1_dam_F",
|
||||
"Land_TentHangar_V1_F",
|
||||
"Land_TTowerBig_2_F",
|
||||
"Land_TTowerSmall_1_F",
|
||||
"Land_TTowerSmall_2_F",
|
||||
"Land_u_Addon_01_V1_dam_F"
|
||||
];
|
||||
@@ -0,0 +1,61 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Bunker_01_big_F",
|
||||
"Land_Bunker_01_small_F",
|
||||
"Land_cargo_addon02_V1_F",
|
||||
"Land_Cargo_House_V4_F",
|
||||
"Land_Cargo_Patrol_V4_F",
|
||||
"Land_Cargo_Tower_V4_F",
|
||||
"Land_Carousel_01_F",
|
||||
"Land_Communication_F",
|
||||
"Land_d_House_Big_01_V1_F",
|
||||
"Land_d_House_Big_02_V1_F",
|
||||
"Land_d_House_Small_01_V1_F",
|
||||
"Land_d_House_Small_02_V1_F",
|
||||
"Land_d_Stone_HouseBig_V1_F",
|
||||
"Land_d_Stone_HouseSmall_V1_F",
|
||||
"Land_d_Stone_Shed_V1_F",
|
||||
"Land_Flush_Light_green_F",
|
||||
"Land_Flush_Light_red_F",
|
||||
"Land_Flush_Light_yellow_F",
|
||||
"Land_fs_feed_F",
|
||||
"Land_fs_roof_F",
|
||||
"Land_FuelStation_01_pump_malevil_F",
|
||||
"Land_FuelStation_01_roof_malevil_F",
|
||||
"Land_FuelStation_Feed_F",
|
||||
"Land_IndPipe2_big_18ladder_F",
|
||||
"Land_IndPipe2_big_ground1_F",
|
||||
"Land_IndPipe2_big_ground2_F",
|
||||
"Land_IndPipe2_bigL_L_F",
|
||||
"Land_IndPipe2_bigL_R_F",
|
||||
"Land_LampAirport_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_MetalShelter_01_F",
|
||||
"Land_MetalShelter_02_F",
|
||||
"Land_nav_pier_m_F",
|
||||
"Land_NavigLight",
|
||||
"Land_NavigLight_3_F",
|
||||
"Land_Pier_addon",
|
||||
"Land_Pier_Box_F",
|
||||
"Land_Pier_F",
|
||||
"Land_Pier_small_F",
|
||||
"Land_PierLadder_F",
|
||||
"Land_PortableLight_single_F",
|
||||
"Land_PowerLine_01_pole_junction_F",
|
||||
"Land_PowerLine_01_pole_small_F",
|
||||
"Land_PowerLine_01_pole_tall_F",
|
||||
"Land_PowerLine_01_pole_transformer_F",
|
||||
"Land_PowerLine_01_wire_50m_F",
|
||||
"Land_PowerLine_01_wire_50m_main_F",
|
||||
"Land_runway_edgelight",
|
||||
"Land_runway_edgelight_blue_F",
|
||||
"Land_SlideCastle_F",
|
||||
"Land_SM_01_shelter_wide_F",
|
||||
"Land_TentHangar_V1_F",
|
||||
"Land_TTowerSmall_1_F",
|
||||
"Land_TTowerSmall_2_F",
|
||||
"MetalBarrel_burning_F"
|
||||
];
|
||||
@@ -0,0 +1,103 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_AfDum_mesto2",
|
||||
"Land_AfDum_mesto2L",
|
||||
"Land_AfDum_mesto3",
|
||||
"Land_bouda_plech",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Dulni_bs",
|
||||
"Land_Dum_zboreny",
|
||||
"Land_Dum_zboreny_total",
|
||||
"Land_Helfenburk_budova2",
|
||||
"Land_Helfenburk_cimburi",
|
||||
"Land_Helfenburk_zed",
|
||||
"Land_Hlaska",
|
||||
"Land_Hut03",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Kontejner_papir",
|
||||
"Land_Kontejner_plasty",
|
||||
"Land_Kontejner_sklo",
|
||||
"Land_Kostel_trosky",
|
||||
"Land_ladder",
|
||||
"Land_ladder_half",
|
||||
"Land_Lampa_ind",
|
||||
"Land_Lampa_ind_b",
|
||||
"Land_Lampa_ind_zebr",
|
||||
"Land_Lampa_sidl",
|
||||
"Land_Lampa_sidl_2",
|
||||
"Land_Lampa_sidl_3",
|
||||
"Land_Lampa_vysoka",
|
||||
"Land_Leseni2x",
|
||||
"Land_Leseni4x",
|
||||
"Land_Majak_podesta",
|
||||
"Land_Molo_beton",
|
||||
"Land_Molo_drevo_bs",
|
||||
"Land_Molo_drevo_end",
|
||||
"Land_Molo_krychle",
|
||||
"Land_Molo_krychle2",
|
||||
"Land_Nabrezi",
|
||||
"Land_Nabrezi_najezd",
|
||||
"Land_Nasypka",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_istan1_rovny_gate",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_Plot_zboreny",
|
||||
"Land_Plot_zed_drevo1_branka",
|
||||
"Land_Podesta_1_cornl",
|
||||
"Land_Podesta_1_cornp",
|
||||
"Land_Podesta_1_cube",
|
||||
"Land_Podesta_1_cube_long",
|
||||
"Land_Podesta_1_mid",
|
||||
"Land_Podesta_1_mid_cornl",
|
||||
"Land_Podesta_1_mid_cornp",
|
||||
"Land_Podesta_1_stairs",
|
||||
"Land_Podesta_1_stairs2",
|
||||
"Land_Podesta_1_stairs3",
|
||||
"Land_Podesta_1_stairs4",
|
||||
"Land_Podesta_10",
|
||||
"Land_Podesta_5",
|
||||
"Land_Podesta_s10",
|
||||
"Land_Podesta_s5",
|
||||
"Land_Posed",
|
||||
"Land_Psi_bouda",
|
||||
"Land_Pumpa",
|
||||
"Land_seno_balik",
|
||||
"Land_sloup_vn",
|
||||
"Land_sloup_vn_drat",
|
||||
"Land_sloup_vn_dratZ",
|
||||
"land_statek_brana_open",
|
||||
"Land_Stoplight01",
|
||||
"Land_Stoplight02",
|
||||
"Land_Trafostanica_mala",
|
||||
"Land_Trafostanica_velka",
|
||||
"Land_Trafostanica_velka_draty",
|
||||
"Land_Vez",
|
||||
"Land_Vysilac_FM",
|
||||
"Land_Vysilac_FM2",
|
||||
"Land_water_tank",
|
||||
"Land_Zastavka_jih",
|
||||
"Land_Zastavka_sever",
|
||||
"Land_Zavora",
|
||||
"Land_Zavora_2_a1",
|
||||
"Land_Fuel_tank_big",
|
||||
"Land_Ind_Shed_01_end",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"land_nav_pier_c_t15",
|
||||
"Land_popelnice",
|
||||
"land_nav_pier_F_23",
|
||||
"land_nav_pier_m_end",
|
||||
"Land_nav_pier_m_2",
|
||||
"Land_A_statue01",
|
||||
"Land_Misc_GContainer_Big",
|
||||
"Land_fuel_tank_small",
|
||||
"Land_Misc_Cargo1B",
|
||||
"Land_Misc_Cargo1D",
|
||||
"Land_Misc_Cargo1C",
|
||||
"land_nav_pier_F_17",
|
||||
"Land_Ind_TankSmall2",
|
||||
"Land_LifeguardTower_01_F",
|
||||
"Land_Pier_F",
|
||||
"Land_Zed_dira_civil"
|
||||
];
|
||||
@@ -0,0 +1,81 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_A_Castle_Bastion",
|
||||
"Land_A_Crane_02a",
|
||||
"Land_A_Crane_02b",
|
||||
"Land_A_CraneCon",
|
||||
"Land_BoatSmall_1",
|
||||
"Land_BoatSmall_2a",
|
||||
"Land_BoatSmall_2b",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Communication_F",
|
||||
"Land_Farm_WTower",
|
||||
"Land_Ind_BoardsPack1",
|
||||
"Land_Ind_BoardsPack2",
|
||||
"Land_Ind_Expedice_3",
|
||||
"Land_Ind_FuelStation_Feed_EP1",
|
||||
"Land_Ind_FuelStation_Shed_EP1",
|
||||
"Land_Ind_IlluminantTower",
|
||||
"Land_Ind_SawMillPen",
|
||||
"Land_Ind_Shed_01_end",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"Land_Ind_Shed_02_end",
|
||||
"Land_Ind_Shed_02_EP1",
|
||||
"Land_Ind_Shed_02_main",
|
||||
"Land_Ind_Timbers",
|
||||
"Land_IndPipe1_stair",
|
||||
"Land_IndPipe2_Small_9",
|
||||
"Land_IndPipe2_Small_ground2",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Lamp_Small_EP1",
|
||||
"Land_Lamp_Street1_EP1",
|
||||
"Land_Lampa_ind",
|
||||
"Land_Lampa_Ind_EP1",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_loco_742_blue",
|
||||
"Land_Majak_podesta",
|
||||
"Land_Misc_Cargo1Ao_EP1",
|
||||
"Land_Misc_Cargo1B",
|
||||
"Land_Misc_Cargo1B_EP1",
|
||||
"Land_Misc_Cargo1Bo_EP1",
|
||||
"Land_Misc_Cargo1C",
|
||||
"Land_Misc_Cargo1C_EP1",
|
||||
"Land_Misc_Cargo1D",
|
||||
"Land_Misc_Cargo1D_EP1",
|
||||
"Land_Misc_Cargo2B",
|
||||
"Land_Misc_Cargo2B_EP1",
|
||||
"Land_Misc_Cargo2C",
|
||||
"Land_Misc_Cargo2C_EP1",
|
||||
"Land_Misc_Cargo2D",
|
||||
"Land_Misc_Cargo2E",
|
||||
"Land_Misc_Scaffolding",
|
||||
"Land_Misc_Well_C_EP1",
|
||||
"Land_Misc_Well_L_EP1",
|
||||
"Land_Nav_Boathouse_PierR",
|
||||
"Land_Nav_Boathouse_PierT",
|
||||
"land_nav_pier_c",
|
||||
"land_nav_pier_c_270",
|
||||
"land_nav_pier_c_90",
|
||||
"land_nav_pier_C_L10",
|
||||
"land_nav_pier_C_R30",
|
||||
"land_nav_pier_c_t20",
|
||||
"land_nav_pier_c2_end",
|
||||
"land_nav_pier_F_23",
|
||||
"Land_PowLines_Conc2L_EP1",
|
||||
"land_statek_brana_open",
|
||||
"Land_Terrace_K_1_EP1",
|
||||
"Land_Trafostanica_mala",
|
||||
"Land_Trafostanica_velka",
|
||||
"Land_Vez",
|
||||
"Land_Vysilac_FM",
|
||||
"Land_Wall_L_2m5_gate_EP1",
|
||||
"Land_Wall_L_Mosque_1_EP1",
|
||||
"Land_Wall_L_Mosque_2_EP1",
|
||||
"Land_Wall_L1_gate_EP1",
|
||||
"Land_Wall_L3_5m_EP1",
|
||||
"Land_Wall_L3_gate_EP1",
|
||||
"Land_Wall_L3_pillar_EP1",
|
||||
"Land_water_tank"
|
||||
];
|
||||
@@ -0,0 +1,85 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_AfDum_mesto2",
|
||||
"Land_AfDum_mesto2L",
|
||||
"Land_AfDum_mesto3",
|
||||
"Land_bouda_plech",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Dulni_bs",
|
||||
"Land_Dum_zboreny",
|
||||
"Land_Dum_zboreny_total",
|
||||
"Land_Helfenburk_budova2",
|
||||
"Land_Helfenburk_cimburi",
|
||||
"Land_Helfenburk_zed",
|
||||
"Land_Hlaska",
|
||||
"Land_Hut03",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Kontejner_papir",
|
||||
"Land_Kontejner_plasty",
|
||||
"Land_Kontejner_sklo",
|
||||
"Land_Kostel_trosky",
|
||||
"Land_ladder",
|
||||
"Land_ladder_half",
|
||||
"Land_Lampa_ind",
|
||||
"Land_Lampa_ind_b",
|
||||
"Land_Lampa_ind_zebr",
|
||||
"Land_Lampa_sidl",
|
||||
"Land_Lampa_sidl_2",
|
||||
"Land_Lampa_sidl_3",
|
||||
"Land_Lampa_vysoka",
|
||||
"Land_Leseni2x",
|
||||
"Land_Leseni4x",
|
||||
"Land_Majak_podesta",
|
||||
"Land_Molo_beton",
|
||||
"Land_Molo_drevo_bs",
|
||||
"Land_Molo_drevo_end",
|
||||
"Land_Molo_krychle",
|
||||
"Land_Molo_krychle2",
|
||||
"Land_Nabrezi",
|
||||
"Land_Nabrezi_najezd",
|
||||
"Land_Nasypka",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_istan1_rovny_gate",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_Plot_zboreny",
|
||||
"Land_Plot_zed_drevo1_branka",
|
||||
"Land_Podesta_1_cornl",
|
||||
"Land_Podesta_1_cornp",
|
||||
"Land_Podesta_1_cube",
|
||||
"Land_Podesta_1_cube_long",
|
||||
"Land_Podesta_1_mid",
|
||||
"Land_Podesta_1_mid_cornl",
|
||||
"Land_Podesta_1_mid_cornp",
|
||||
"Land_Podesta_1_stairs",
|
||||
"Land_Podesta_1_stairs2",
|
||||
"Land_Podesta_1_stairs3",
|
||||
"Land_Podesta_1_stairs4",
|
||||
"Land_Podesta_10",
|
||||
"Land_Podesta_5",
|
||||
"Land_Podesta_s10",
|
||||
"Land_Podesta_s5",
|
||||
"Land_Posed",
|
||||
"Land_Psi_bouda",
|
||||
"Land_Pumpa",
|
||||
"Land_seno_balik",
|
||||
"Land_sloup_vn",
|
||||
"Land_sloup_vn_drat",
|
||||
"Land_sloup_vn_dratZ",
|
||||
"land_statek_brana_open",
|
||||
"Land_Stoplight01",
|
||||
"Land_Stoplight02",
|
||||
"Land_Trafostanica_mala",
|
||||
"Land_Trafostanica_velka",
|
||||
"Land_Trafostanica_velka_draty",
|
||||
"Land_Vez",
|
||||
"Land_Vysilac_FM",
|
||||
"Land_Vysilac_FM2",
|
||||
"Land_water_tank",
|
||||
"Land_Zastavka_jih",
|
||||
"Land_Zastavka_sever",
|
||||
"Land_Zavora",
|
||||
"Land_Zavora_2_a1",
|
||||
"Land_Zed_dira_civil"
|
||||
];
|
||||
@@ -0,0 +1,11 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Communication_F",
|
||||
"LAND_fort2",
|
||||
"Land_fortified_nest_big_ep1",
|
||||
"Land_LampShabby_F",
|
||||
"Land_misc_well_c_ep1",
|
||||
"Land_statek_brana_open",
|
||||
"Land_vez",
|
||||
"Land_Vysilac_FM",
|
||||
"Land_Water_Tank"
|
||||
];
|
||||
@@ -0,0 +1,36 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_BoatSmall_1",
|
||||
"Land_BoatSmall_2a",
|
||||
"Land_BoatSmall_2b",
|
||||
"Land_Fort_Watchtower_EP1",
|
||||
"Land_fortified_nest_big_EP1",
|
||||
"Land_fortified_nest_small_EP1",
|
||||
"Land_Ind_FuelStation_Feed_EP1",
|
||||
"Land_Ind_FuelStation_Shed_EP1",
|
||||
"Land_Ind_Shed_02_EP1",
|
||||
"Land_Lamp_Small_EP1",
|
||||
"Land_Lamp_Street1_EP1",
|
||||
"Land_Lampa_Ind_EP1",
|
||||
"Land_Misc_Cargo1B_EP1",
|
||||
"Land_Misc_Cargo1Bo_EP1",
|
||||
"Land_Misc_Cargo1C_EP1",
|
||||
"Land_Misc_Cargo2B_EP1",
|
||||
"Land_Misc_Cargo2C_EP1",
|
||||
"Land_Misc_Well_C_EP1",
|
||||
"Land_Misc_Well_L_EP1",
|
||||
"Land_Nav_Boathouse_PierR",
|
||||
"Land_PowLine_wire_A_left_EP1",
|
||||
"Land_PowLine_wire_A_right_EP1",
|
||||
"Land_PowLine_wire_AB_EP1",
|
||||
"Land_PowLine_wire_BB_EP1",
|
||||
"Land_PowLines_Conc2L_EP1",
|
||||
"Land_Terrace_K_1_EP1",
|
||||
"Land_Vez",
|
||||
"Land_Wall_L_2m5_gate_EP1",
|
||||
"Land_Wall_L_Mosque_1_EP1",
|
||||
"Land_Wall_L_Mosque_2_EP1",
|
||||
"Land_Wall_L1_gate_EP1",
|
||||
"Land_Wall_L3_5m_EP1",
|
||||
"Land_Wall_L3_gate_EP1",
|
||||
"Land_Wall_L3_pillar_EP1"
|
||||
];
|
||||
@@ -0,0 +1,74 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Cargo_House_V4_F",
|
||||
"Land_Cargo_Patrol_V4_F",
|
||||
"Land_Cargo_Tower_V4_F",
|
||||
"Land_Communication_F",
|
||||
"Land_ContainerLine_01_F",
|
||||
"Land_ContainerLine_02_F",
|
||||
"Land_ContainerLine_03_F",
|
||||
"Land_DPP_01_waterCooler_F",
|
||||
"Land_DPP_01_waterCooler_ladder_F",
|
||||
"Land_FireEscape_01_short_F",
|
||||
"Land_FireEscape_01_tall_F",
|
||||
"Land_Flush_Light_green_F",
|
||||
"Land_Flush_Light_red_F",
|
||||
"Land_Flush_Light_yellow_F",
|
||||
"Land_FuelStation_01_pump_F",
|
||||
"Land_FuelStation_02_pump_F",
|
||||
"Land_FuelStation_02_roof_F",
|
||||
"Land_GantryCrane_01_F",
|
||||
"Land_LampDecor_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampSolar_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_MetalShelter_01_F",
|
||||
"Land_MetalShelter_02_F",
|
||||
"Land_MobileCrane_01_F",
|
||||
"Land_MobileCrane_01_hook_F",
|
||||
"Land_NavigLight_3_F",
|
||||
"Land_NavigLight_3_short_F",
|
||||
"Land_PierConcrete_01_4m_ladders_F",
|
||||
"Land_PierWooden_01_10m_noRails_F",
|
||||
"Land_PierWooden_01_16m_F",
|
||||
"Land_PierWooden_01_dock_F",
|
||||
"Land_PierWooden_01_hut_F",
|
||||
"Land_PierWooden_01_ladder_F",
|
||||
"Land_PierWooden_01_platform_F",
|
||||
"Land_PierWooden_02_16m_F",
|
||||
"Land_PierWooden_02_30deg_F",
|
||||
"Land_PierWooden_02_barrel_F",
|
||||
"Land_PierWooden_02_hut_F",
|
||||
"Land_PierWooden_02_ladder_F",
|
||||
"Land_PortableLight_single_F",
|
||||
"Land_PowerLine_01_pole_end_v1_F",
|
||||
"Land_PowerLine_01_pole_end_v2_F",
|
||||
"Land_PowerLine_01_pole_junction_F",
|
||||
"Land_PowerLine_01_pole_lamp_F",
|
||||
"Land_PowerLine_01_pole_small_F",
|
||||
"Land_PowerLine_01_pole_tall_F",
|
||||
"Land_PowerLine_01_pole_transformer_F",
|
||||
"Land_PowerLine_01_wire_50m_F",
|
||||
"Land_PowerLine_01_wire_50m_main_F",
|
||||
"Land_QuayConcrete_01_5m_ladder_F",
|
||||
"Land_runway_edgelight",
|
||||
"Land_runway_edgelight_blue_F",
|
||||
"Land_Shed_06_F",
|
||||
"Land_SM_01_shelter_narrow_F",
|
||||
"Land_SM_01_shelter_wide_F",
|
||||
"Land_SY_01_conveyor_end_F",
|
||||
"Land_SY_01_reclaimer_F",
|
||||
"Land_SY_01_shiploader_arm_F",
|
||||
"Land_SY_01_shiploader_F",
|
||||
"Land_Track_01_bridge_F",
|
||||
"Land_TTowerBig_1_F",
|
||||
"Land_TTowerBig_2_F",
|
||||
"Land_TTowerSmall_1_F",
|
||||
"Land_Walkover_01_F",
|
||||
"Land_Warehouse_01_ladder_F",
|
||||
"Land_Warehouse_02_ladder_F",
|
||||
"Land_WarehouseShelter_01_F",
|
||||
"Land_WoodenShelter_01_F"
|
||||
];
|
||||
@@ -0,0 +1,155 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_Barn_W_01_dam",
|
||||
"Land_Barracks_01_grey_F",
|
||||
"Land_BellTower_01_V1_F",
|
||||
"Land_BoatSmall_1",
|
||||
"Land_BoatSmall_2a",
|
||||
"Land_BoatSmall_2b",
|
||||
"Land_cargo_house_slum_F",
|
||||
"Land_cmp_Shed_F",
|
||||
"Land_cmp_Tower_F",
|
||||
"Land_CncShelter_F",
|
||||
"Land_Communication_F",
|
||||
"Land_Dirthump01",
|
||||
"Land_dp_smallTank_F",
|
||||
"Land_DPP_01_waterCooler_ladder_F",
|
||||
"Land_Dulni_bs",
|
||||
"Land_FireEscape_01_short_F",
|
||||
"Land_FuelStation_01_pump_F",
|
||||
"Land_FuelStation_02_pump_F",
|
||||
"Land_FuelStation_Build_PMC",
|
||||
"Land_Gate_IndVar2_5",
|
||||
"Land_Gate_Wood1_5",
|
||||
"Land_Gate_wood2_5",
|
||||
"Land_GuardHouse_01_F",
|
||||
"Land_hag_bridge_rail",
|
||||
"Land_Hag_Garage",
|
||||
"Land_hopper_old_PMC",
|
||||
"Land_Hut06",
|
||||
"Land_i_Addon_03_V1_F",
|
||||
"Land_i_Addon_03mid_V1_F",
|
||||
"Land_i_Addon_04_V1_F",
|
||||
"Land_i_Barracks_V2_F",
|
||||
"Land_i_Garage_V1_F",
|
||||
"Land_i_Garage_V2_F",
|
||||
"Land_Ind_BoardsPack1",
|
||||
"Land_Ind_BoardsPack2",
|
||||
"Land_Ind_MalyKomin",
|
||||
"Land_Ind_SawMillPen",
|
||||
"Land_Ind_Shed_01_EP1",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"Land_Ind_Shed_02_end",
|
||||
"Land_Ind_Shed_02_EP1",
|
||||
"Land_Ind_Shed_02_main",
|
||||
"Land_Ind_TankSmall",
|
||||
"Land_Ind_TankSmall2",
|
||||
"Land_Ind_Timbers",
|
||||
"Land_Ind_Vysypka",
|
||||
"Land_Ind_Workshop01_box",
|
||||
"Land_KBud",
|
||||
"Land_Kontejner",
|
||||
"Land_Kulna",
|
||||
"Land_LampDecor_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_Leseni2x",
|
||||
"Land_Leseni4x",
|
||||
"Land_Mausoleum_01_F",
|
||||
"Land_MBG_ATC_Segment",
|
||||
"Land_MBG_Beach_Chair_1",
|
||||
"Land_MBG_Beach_Chair_2",
|
||||
"Land_Metal_Shed_F",
|
||||
"Land_MetalShelter_01_F",
|
||||
"Land_MetalShelter_02_F",
|
||||
"Land_Mil_Barracks",
|
||||
"Land_MilOffices_V1_F",
|
||||
"Land_Misc_Cargo1Ao",
|
||||
"Land_Misc_Cargo1B",
|
||||
"Land_Misc_Cargo1Bo",
|
||||
"Land_Misc_Cargo1C",
|
||||
"Land_Misc_Cargo1E",
|
||||
"Land_Misc_Cargo1F",
|
||||
"Land_Misc_deerstand",
|
||||
"Land_Misc_GContainer_Big",
|
||||
"Land_Misc_Scaffolding",
|
||||
"Land_Misc_Well_C_EP1",
|
||||
"Land_Molo_krychle",
|
||||
"Land_Nasypka",
|
||||
"Land_PierLadder_F",
|
||||
"Land_PierWooden_01_10m_noRails_F",
|
||||
"Land_PierWooden_01_ladder_F",
|
||||
"Land_PierWooden_01_platform_F",
|
||||
"Land_PierWooden_02_16m_F",
|
||||
"Land_PierWooden_02_ladder_F",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_istan1_rovny_gate",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_Plot_zed_drevo1_branka",
|
||||
"Land_popelnice",
|
||||
"Land_PortableLight_double_F",
|
||||
"Land_PortableLight_single_F",
|
||||
"Land_Posed",
|
||||
"Land_Psi_bouda",
|
||||
"Land_pumpa",
|
||||
"Land_Rail_Zavora",
|
||||
"Land_ReservoirTank_Rust_F",
|
||||
"Land_ruin_01",
|
||||
"Land_ruin_01_PMC",
|
||||
"Land_ruin_chimney",
|
||||
"Land_ruin_chimney_PMC",
|
||||
"Land_ruin_rubble",
|
||||
"Land_ruin_wall",
|
||||
"Land_ruin_walldoor",
|
||||
"Land_Sara_zluty_statek_in",
|
||||
"Land_SCF_01_heap_bagasse_F",
|
||||
"Land_seno_balik",
|
||||
"Land_Shed_03_F",
|
||||
"Land_Shed_04_F",
|
||||
"Land_Shed_06_F",
|
||||
"Land_Shed_07_F",
|
||||
"Land_Shed_Big_F",
|
||||
"Land_Shed_M01",
|
||||
"Land_Shed_M01_EP1",
|
||||
"Land_Shed_M02",
|
||||
"Land_Shed_M03",
|
||||
"Land_Shed_Small_F",
|
||||
"Land_Shed_W01",
|
||||
"Land_Shed_W02_EP1",
|
||||
"Land_Shed_W03",
|
||||
"Land_Shed_wooden",
|
||||
"Land_SignB_Hotel_CZ2",
|
||||
"Land_SignB_Hotel_CZ3",
|
||||
"Land_SignB_Pharmacy",
|
||||
"Land_Slum_House01_F",
|
||||
"Land_Slum_House02_F",
|
||||
"Land_Slum_House03_F",
|
||||
"Land_SM_01_shed_unfinished_F",
|
||||
"Land_SM_01_shelter_narrow_F",
|
||||
"Land_SM_01_shelter_wide_F",
|
||||
"Land_TTowerBig_2_F",
|
||||
"Land_u_Addon_01_V1_dam_F",
|
||||
"Land_u_Addon_01_V1_F",
|
||||
"Land_u_Shed_Ind_F",
|
||||
"Land_Walkover_01_F",
|
||||
"Land_Wall_CBrk_5_D",
|
||||
"Land_Wall_CGry_5_D",
|
||||
"Land_Wall_Gate_Ind1_L",
|
||||
"Land_Wall_Gate_Ind1_R",
|
||||
"Land_Wall_Gate_Ind2A_L",
|
||||
"Land_Wall_Gate_Ind2A_R",
|
||||
"Land_Wall_Gate_Ind2B_L",
|
||||
"Land_Wall_Gate_Ind2B_R",
|
||||
"Land_Wall_Gate_Ind2Rail_L",
|
||||
"Land_Wall_Gate_Ind2Rail_R",
|
||||
"Land_Wall_Gate_Village",
|
||||
"Land_Wall_Gate_Wood1",
|
||||
"Land_Warehouse_01_ladder_F",
|
||||
"Land_WindmillPump_01_F",
|
||||
"Land_WoodenShelter_01_F",
|
||||
"Land_zavora_2"
|
||||
];
|
||||
@@ -0,0 +1,278 @@
|
||||
KP_liberation_cr_ign_buildings = [
|
||||
"Land_A_Castle_Bastion",
|
||||
"Land_A_Castle_Gate",
|
||||
"Land_A_Castle_Stairs_A",
|
||||
"Land_A_Castle_Wall1_20",
|
||||
"Land_A_Castle_Wall1_Corner",
|
||||
"Land_A_Castle_Wall1_Corner_2",
|
||||
"Land_A_Castle_Wall1_End",
|
||||
"Land_A_Castle_Wall1_End_2",
|
||||
"Land_A_Castle_Wall2_Corner_2",
|
||||
"Land_A_Castle_WallS_5_D",
|
||||
"Land_A_Castle_WallS_End",
|
||||
"Land_balken_125_025_025_clean_cnc",
|
||||
"Land_balken_125_025_025_cnc",
|
||||
"Land_balken_250_025_025_clean_cnc",
|
||||
"Land_balken_250_025_025_cnc",
|
||||
"Land_balken_250_025_025_wood",
|
||||
"Land_balken_500_025_025_clean_cnc",
|
||||
"Land_balken_500_025_025_cnc",
|
||||
"Land_balken_500_025_025_wood",
|
||||
"Land_boden_125_125_025_clean_cnc",
|
||||
"Land_boden_125_125_025_cnc",
|
||||
"Land_boden_125_125_025_wood",
|
||||
"Land_boden_250_250_025_clean_cnc",
|
||||
"Land_boden_250_250_025_cnc",
|
||||
"Land_boden_250_250_025_wood",
|
||||
"Land_boden_500_500_025_clean_cnc",
|
||||
"Land_boden_500_500_025_cnc",
|
||||
"Land_boden_500_500_025_wood",
|
||||
"Land_bouda_plech",
|
||||
"Land_Brana02",
|
||||
"Land_Brana02nodoor",
|
||||
"Land_Cargo_Patrol_V1_F",
|
||||
"Land_Carousel_01_F",
|
||||
"Land_Climbing_Obstacle",
|
||||
"Land_Communication_F",
|
||||
"Land_Crane_F",
|
||||
"Land_d_Addon_02_V1_F",
|
||||
"Land_d_House_Big_01_V1_F",
|
||||
"Land_d_House_Big_02_V1_F",
|
||||
"Land_d_Stone_HouseSmall_V1_F",
|
||||
"Land_d_Stone_Shed_V1_F",
|
||||
"Land_deox_BarrierGateOpenable",
|
||||
"Land_deox_carport_a1",
|
||||
"Land_deox_carport_a2",
|
||||
"Land_deox_fachwerkA1",
|
||||
"Land_deox_fachwerkB1",
|
||||
"Land_deox_fachwerkC2",
|
||||
"Land_deox_fachwerkD2",
|
||||
"Land_deox_fachwerkE1",
|
||||
"Land_deox_fachwerkE1B",
|
||||
"Land_deox_fachwerkE1O",
|
||||
"Land_deox_fachwerkS1",
|
||||
"Land_deox_fachwerkS1_offen",
|
||||
"Land_deox_fachwerkS1Giebel",
|
||||
"Land_deox_fachwerkSO1",
|
||||
"Land_deox_fachwerkSO1_offen",
|
||||
"Land_deox_fence_B1",
|
||||
"Land_deox_fence_B2",
|
||||
"Land_deox_fence_B3",
|
||||
"Land_deox_fence_C1",
|
||||
"Land_deox_fence_C1s",
|
||||
"Land_deox_fwh_dach",
|
||||
"Land_deox_fwh_dach2",
|
||||
"Land_deox_fwh_dach3",
|
||||
"Land_deox_fwhE1",
|
||||
"Land_deox_fwhf1",
|
||||
"Land_deox_gate_A1",
|
||||
"Land_deox_gate_B1",
|
||||
"Land_deox_gate_B2",
|
||||
"Land_deox_gate_B2door",
|
||||
"Land_deox_gate_B3",
|
||||
"Land_deox_gate_B3door",
|
||||
"Land_deox_gate_B5",
|
||||
"Land_deox_gate_c1",
|
||||
"Land_deox_House_D_medium3_4",
|
||||
"Land_deox_rampe_a1",
|
||||
"Land_deox_rampe_c1",
|
||||
"Land_deox_rampe_d1",
|
||||
"Land_deox_rampe_d3",
|
||||
"Land_deox_tuer1",
|
||||
"Land_deox_unterbau1a",
|
||||
"Land_deox_unterbau1b",
|
||||
"Land_deox_unterbau1c",
|
||||
"Land_deox_unterbau2a",
|
||||
"Land_deox_unterbau2b",
|
||||
"Land_deox_wall01",
|
||||
"Land_deox_wall01s",
|
||||
"Land_deox_wall02",
|
||||
"Land_deox_wall02s",
|
||||
"Land_deox_wall06",
|
||||
"Land_Dirthump01",
|
||||
"Land_Dirthump01_EP1",
|
||||
"Land_Dirthump02",
|
||||
"Land_Dirthump02_EP1",
|
||||
"Land_Dirthump03",
|
||||
"Land_Dirthump03_EP1",
|
||||
"Land_ecke_075_025_300_clean_cnc",
|
||||
"Land_ecke_075_025_300_wood",
|
||||
"Land_Factory_Conv1_10_F",
|
||||
"Land_Factory_Conv1_Main_F",
|
||||
"Land_Farm_WTower",
|
||||
"Land_fenster_250_025_300_clean_cnc",
|
||||
"Land_fenster_250_025_300_cnc",
|
||||
"Land_fenster_250_025_300_wood",
|
||||
"Land_Gate_IndVar2_5",
|
||||
"Land_Gate_Wood1_5",
|
||||
"Land_Gate_wood2_5",
|
||||
"Land_glass_125_0025_125",
|
||||
"Land_glass_125_0025_300",
|
||||
"Land_glass_250_0025_300",
|
||||
"Land_glass_500_0025_300",
|
||||
"Land_glass_platte_500_500_0025",
|
||||
"Land_Grave_dirt_F",
|
||||
"Land_Grave_forest_F",
|
||||
"Land_Grave_rocks_F",
|
||||
"Land_HighVoltageTower_F",
|
||||
"Land_Hut03",
|
||||
"Land_i_House_Small_02_V2_dam_F",
|
||||
"Land_i_House_Small_02_V3_dam_F",
|
||||
"Land_i_Stone_Shed_V1_dam_F",
|
||||
"Land_i_Stone_Shed_V2_dam_F",
|
||||
"Land_Ind_BoardsPack1",
|
||||
"Land_Ind_BoardsPack2",
|
||||
"Land_Ind_Expedice_1",
|
||||
"Land_Ind_Expedice_3",
|
||||
"Land_Ind_Mlyn_03",
|
||||
"Land_Ind_SawMillPen",
|
||||
"Land_Ind_Shed_01_end",
|
||||
"Land_Ind_Shed_01_EP1",
|
||||
"Land_Ind_Shed_01_main",
|
||||
"Land_Ind_Shed_02_end",
|
||||
"Land_Ind_Shed_02_EP1",
|
||||
"Land_Ind_Shed_02_main",
|
||||
"Land_Ind_TankSmall",
|
||||
"Land_Ind_TankSmall2",
|
||||
"Land_Ind_TankSmall2_EP1",
|
||||
"Land_Ind_Timbers",
|
||||
"Land_Kontejner",
|
||||
"Land_Kontejner_papir",
|
||||
"Land_Kontejner_plasty",
|
||||
"Land_Kontejner_sklo",
|
||||
"Land_Kostel_trosky",
|
||||
"Land_ladder",
|
||||
"Land_Lampa_cut",
|
||||
"Land_Lampa_Ind_EP1",
|
||||
"Land_LampDecor_F",
|
||||
"Land_LampHalogen_F",
|
||||
"Land_LampHarbour_F",
|
||||
"Land_LampShabby_F",
|
||||
"Land_LampStreet_F",
|
||||
"Land_LampStreet_small_F",
|
||||
"Land_Leseni2x",
|
||||
"Land_Leseni4x",
|
||||
"Land_LifeguardTower_01_F",
|
||||
"Land_lift",
|
||||
"Land_Majak_podesta",
|
||||
"Land_MBG_Cinderwall_2p5",
|
||||
"Land_MBG_Cinderwall_5",
|
||||
"Land_MBG_Cinderwall_5_Corner",
|
||||
"Land_MBG_Cinderwall_5_Gate",
|
||||
"Land_mbg_cinderwall_5_low",
|
||||
"Land_MBG_Cinderwall_5_SteelDoor",
|
||||
"Land_MBG_Cinderwall_5_WoodDoor",
|
||||
"Land_MBG_Cinderwall_5dam",
|
||||
"Land_MBG_Shoothouse_1",
|
||||
"Land_Misc_Cargo1A_EP1",
|
||||
"Land_Misc_Cargo1B_EP1",
|
||||
"Land_Misc_Cargo1Bo",
|
||||
"Land_Misc_Cargo1C_EP1",
|
||||
"Land_Misc_Cargo1D_EP1",
|
||||
"Land_Misc_Cargo1E",
|
||||
"Land_Misc_Cargo1E_EP1",
|
||||
"Land_Misc_Cargo1F",
|
||||
"Land_Misc_Cargo1G",
|
||||
"Land_Misc_CargoMarket1a_EP1",
|
||||
"Land_Misc_Coltan_Heap_EP1",
|
||||
"Land_Misc_deerstand",
|
||||
"Land_Misc_GContainer_Big",
|
||||
"Land_Misc_Scaffolding",
|
||||
"Land_Misc_Well_C_EP1",
|
||||
"Land_Misc_Well_L_EP1",
|
||||
"Land_Molo_krychle",
|
||||
"Land_Molo_krychle2",
|
||||
"Land_MXDorfschild",
|
||||
"Land_Nasypka",
|
||||
"land_nav_pier_c",
|
||||
"land_nav_pier_F_17",
|
||||
"land_nav_pier_F_23",
|
||||
"Land_Obstacle_Climb_F",
|
||||
"Land_pfeiler_025_025_300_clean_cnc",
|
||||
"Land_pfeiler_025_025_300_cnc",
|
||||
"Land_pfeiler_025_025_300_wood",
|
||||
"Land_Plot_green_branka",
|
||||
"Land_Plot_green_vrata",
|
||||
"Land_Plot_istan1_rovny_gate",
|
||||
"Land_Plot_rust_branka",
|
||||
"Land_Plot_rust_vrata",
|
||||
"Land_Plot_zboreny",
|
||||
"Land_Plot_zed_drevo1_branka",
|
||||
"Land_plp_ctm_PartitioningFenceGreyDoorOpen",
|
||||
"Land_Podesta_1_cornl",
|
||||
"Land_Podesta_1_cornp",
|
||||
"Land_Podesta_1_cube",
|
||||
"Land_Podesta_1_cube_long",
|
||||
"Land_Podesta_1_mid",
|
||||
"Land_Podesta_1_mid_cornl",
|
||||
"Land_Podesta_1_mid_cornp",
|
||||
"Land_Podesta_1_stairs",
|
||||
"Land_Podesta_1_stairs2",
|
||||
"Land_Podesta_1_stairs4",
|
||||
"Land_Podesta_10",
|
||||
"Land_Podesta_5",
|
||||
"Land_Podesta_s10",
|
||||
"Land_Podesta_s5",
|
||||
"Land_pool_water",
|
||||
"Land_PortableLight_double_F",
|
||||
"Land_PortableLight_single_F",
|
||||
"Land_Posed",
|
||||
"Land_PowerWireSmall_direct_F",
|
||||
"Land_PowLines_Conc2L_EP1",
|
||||
"Land_PowLines_ConcL",
|
||||
"Land_PowLines_WoodL",
|
||||
"Land_Psi_bouda",
|
||||
"Land_R_HouseV_2L",
|
||||
"Land_Ruin_Cowshed_a_PMC",
|
||||
"Land_Ruin_Cowshed_b_PMC",
|
||||
"Land_Ruin_Cowshed_c_PMC",
|
||||
"Land_ruin_rubble",
|
||||
"Land_Ruiny_obvod_3",
|
||||
"Land_seno_balik",
|
||||
"Land_Shed_M02",
|
||||
"Land_SignB_Hotel_CZ",
|
||||
"Land_SignB_Hotel_CZ2",
|
||||
"Land_SlideCastle_F",
|
||||
"land_statek_brana_open",
|
||||
"Land_Stoplight01",
|
||||
"Land_Stoplight02",
|
||||
"Land_t_light_r",
|
||||
"Land_TACO_Lampa_sidl",
|
||||
"Land_TACO_Lampa_sidl_2",
|
||||
"Land_TACO_Lampa_sidl_3",
|
||||
"Land_Tec",
|
||||
"Land_teich_klein",
|
||||
"Land_treppe_250_100_150_clean_cnc",
|
||||
"Land_treppe_250_100_150_cnc",
|
||||
"Land_treppe_250_100_150_wood",
|
||||
"Land_TTowerBig_2_F",
|
||||
"Land_ture_250_025_300_clean_cnc",
|
||||
"Land_ture_250_025_300_cnc",
|
||||
"Land_ture_250_025_300_wood",
|
||||
"Land_u_Addon_01_V1_dam_F",
|
||||
"Land_Wall_CGry_5_D",
|
||||
"Land_Wall_Gate_Ind1_L",
|
||||
"Land_Wall_Gate_Ind2A_L",
|
||||
"Land_Wall_Gate_Ind2A_R",
|
||||
"Land_Wall_Gate_Ind2B_L",
|
||||
"Land_Wall_Gate_Ind2B_R",
|
||||
"Land_Wall_Gate_Ind2Rail_L",
|
||||
"Land_Wall_Gate_Ind2Rail_R",
|
||||
"Land_Wall_Gate_Kolchoz",
|
||||
"Land_Wall_Gate_Village",
|
||||
"Land_Wall_Gate_Wood1",
|
||||
"Land_Wall_L1_gate_EP1",
|
||||
"Land_wand_125_025_300_clean_cnc",
|
||||
"Land_wand_125_025_300_cnc",
|
||||
"Land_wand_125_025_300_wood",
|
||||
"Land_wand_250_025_300_clean_cnc",
|
||||
"Land_wand_250_025_300_cnc",
|
||||
"Land_wand_250_025_300_wood",
|
||||
"Land_wand_500_025_300_clean_cnc",
|
||||
"Land_wand_500_025_300_cnc",
|
||||
"Land_wand_500_025_300_wood",
|
||||
"Land_xCam_Build_00",
|
||||
"Land_Zastavka_jih",
|
||||
"Land_Zastavka_sever",
|
||||
"Land_zavora_2"
|
||||
];
|
||||
@@ -0,0 +1,38 @@
|
||||
private _start = diag_tickTime;
|
||||
if (isServer) then {["init_buildings.sqf initialising...", "CIVREP"] call KPLIB_fnc_log;};
|
||||
|
||||
switch (worldName) do {
|
||||
case "Chernarus": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\chernarus.sqf"};
|
||||
case "cup_chernarus_A3": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\chernarus2020.sqf"};
|
||||
case "Enoch": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\enoch.sqf"};
|
||||
case "gm_weferlingen_summer": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\gm_weferlingen_summer.sqf"};
|
||||
case "gm_weferlingen_winter": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\gm_weferlingen_winter.sqf"};
|
||||
case "lythium": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\lythium.sqf"};
|
||||
case "Malden": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\malden.sqf"};
|
||||
case "panthera3": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\panthera3.sqf"};
|
||||
case "pja310": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\pja310.sqf"};
|
||||
case "Sara": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\sara.sqf"};
|
||||
case "song_bin_tanh": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\song_bin_tanh.sqf"};
|
||||
case "Takistan": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\takistan.sqf"};
|
||||
case "Tanoa": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\tanoa.sqf"};
|
||||
case "WL_Rosche": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\wl_rosche.sqf"};
|
||||
case "xcam_taunus": {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\xcam_taunus.sqf"};
|
||||
default {call compile preprocessFileLineNumbers "scripts\server\civrep\ignored\altis.sqf"};
|
||||
};
|
||||
|
||||
KP_liberation_cr_sectorbuildings = [];
|
||||
|
||||
{
|
||||
KP_liberation_cr_sectorbuildings pushBack [_x, [_x] call F_cr_getBuildings];
|
||||
} forEach sectors_capture;
|
||||
|
||||
{
|
||||
KP_liberation_cr_sectorbuildings pushBack [_x, [_x] call F_cr_getBuildings];
|
||||
} forEach sectors_bigtown;
|
||||
|
||||
if (isServer) then {[format ["init_buildings.sqf finished. Time needed: %1 seconds", diag_ticktime - _start], "CIVREP"] call KPLIB_fnc_log;};
|
||||
if (KP_liberation_civrep_debug > 0) then {
|
||||
{
|
||||
[format ["%1: %2", markerText (_x select 0), (_x select 1)], "CIVREP"] call KPLIB_fnc_log;
|
||||
} forEach KP_liberation_cr_sectorbuildings;
|
||||
};
|
||||
@@ -0,0 +1,15 @@
|
||||
// Functions
|
||||
// Get buildings count for sector
|
||||
F_cr_getBuildings = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_getBuildings.sqf";
|
||||
// Change CR value
|
||||
F_cr_changeCR = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_changeCR.sqf";
|
||||
// Reputation gain for liberating a sector
|
||||
F_cr_liberatedSector = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_liberatedSector.sqf";
|
||||
// Play random wounded animation on unit
|
||||
F_cr_woundedAnim = compileFinal preprocessFileLineNumbers "scripts\server\civrep\fnc\f_kp_cr_woundedAnim.sqf";
|
||||
|
||||
// Scripts
|
||||
// Spawn wounded civilians in a sector
|
||||
civrep_wounded_civs = compileFinal preprocessFileLineNumbers "scripts\server\civrep\wounded\civrep_wounded_civs.sqf";
|
||||
// Count initial buildings on each city and bigtown
|
||||
execVM "scripts\server\civrep\init_buildings.sqf";
|
||||
@@ -0,0 +1,66 @@
|
||||
params ["_sector"];
|
||||
|
||||
if (!(_sector in sectors_bigtown) && !(_sector in sectors_capture) && !(_sector in sectors_factory)) exitWith {};
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["civrep_wounded_civs.sqf -> Spawned for %1 on: %2", markerText _sector, debug_source], "CIVREP"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _count = 2 + (ceil (random 2));
|
||||
private _grp = creategroup [GRLIB_side_civilian, true];
|
||||
private _civs = [];
|
||||
private _markers = [];
|
||||
|
||||
for "_i" from 1 to _count do {
|
||||
private _pos = (markerPos _sector) getPos [(50 + (random 150)), (random 360)];
|
||||
while {(surfaceIsWater _pos) || ((count ([_pos, 30] call KPLIB_fnc_getNearbyPlayers)) > 0)} do {
|
||||
_pos = (markerPos _sector) getPos [(50 + (random 200)), (random 360)];
|
||||
};
|
||||
private _civ = [selectRandom civilians, _pos, _grp] call KPLIB_fnc_createManagedUnit;
|
||||
_civ setDir (random 360);
|
||||
{_civ disableAI _x} forEach ["ANIM", "TARGET", "AUTOTARGET", "MOVE"];
|
||||
removeAllItems _civ;
|
||||
_civ setDamage 0.5;
|
||||
_civ call F_cr_woundedAnim;
|
||||
if (KP_liberation_ace) then {[_civ] remoteExec ["KPLIB_fnc_crAddAceAction"];};
|
||||
_civs pushBack _civ;
|
||||
private _marker = createMarker ["wounded_marker_" + str _i, [((_pos select 0) - 20 + (random 40)),((_pos select 1) - 20 + (random 40))]];
|
||||
_marker setMarkerShape "ELLIPSE";
|
||||
_marker setMarkerSize [25,25];
|
||||
_marker setMarkerColor "ColorCIV";
|
||||
_marker setMarkerAlpha 0.35;
|
||||
_markers pushBack _marker;
|
||||
};
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["civrep_wounded_civs.sqf -> Spawned %1 wounded civilians at %2", _count, markerText _sector], "CIVREP"] remoteExecCall ["KPLIB_fnc_log", 2];};
|
||||
|
||||
private _units_near = [markerPos _sector, 300, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
|
||||
private _healed_civs = [];
|
||||
|
||||
while {_units_near > 0} do {
|
||||
_units_near = [markerPos _sector, 300, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount;
|
||||
{
|
||||
if (((damage _x) < 0.5) && !(_x in _healed_civs)) then {
|
||||
(_markers select _forEachIndex) setMarkerAlpha 0;
|
||||
private _civ = _x;
|
||||
[_civ, "AinjPpneMstpSnonWnonDnon_kneel"] remoteExec ["switchMove"];
|
||||
sleep 2;
|
||||
{_civ enableAI _x} forEach ["ANIM", "TARGET", "AUTOTARGET", "MOVE"];
|
||||
[4, [(name _civ)]] remoteExec ["KPLIB_fnc_crGlobalMsg"];
|
||||
[KP_liberation_cr_wounded_gain] call F_cr_changeCR;
|
||||
_healed_civs pushBack _civ;
|
||||
stats_civilians_healed = stats_civilians_healed +1;
|
||||
}
|
||||
} forEach _civs;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
sleep 60;
|
||||
|
||||
{
|
||||
deleteVehicle _x;
|
||||
} forEach _civs;
|
||||
|
||||
{
|
||||
deleteMarker _x;
|
||||
} forEach _markers;
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["civrep_wounded_civs.sqf -> dropped at %1", markerText _sector], "CIVREP"] remoteExecCall ["KPLIB_fnc_log", 2]};
|
||||
@@ -0,0 +1,30 @@
|
||||
if (!GRLIB_permissions_param) exitWith {};
|
||||
|
||||
waitUntil {!isNil "GRLIB_permissions"};
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
|
||||
private _default_permissions = [];
|
||||
{if ((_x select 0) == "Default") exitWith {_default_permissions = (_x select 2);}} foreach GRLIB_permissions;
|
||||
|
||||
if (count _default_permissions > 0) then {
|
||||
private _all_players_uids = [];
|
||||
{if ((_x select 0) != "Default") then {_all_players_uids pushback (_x select 0)}} foreach GRLIB_permissions;
|
||||
|
||||
private _old_count = count GRLIB_permissions;
|
||||
{
|
||||
if !(((getPlayerUID _x) in _all_players_uids) || ((getPlayerUID _x) isEqualTo "")) then {
|
||||
GRLIB_permissions pushBack [getPlayerUID _x, name _x, _default_permissions];
|
||||
};
|
||||
} foreach (allPlayers - entities "HeadlessClient_F");
|
||||
|
||||
if (_old_count != count GRLIB_permissions) then {
|
||||
publicVariable "GRLIB_permissions"
|
||||
};
|
||||
};
|
||||
|
||||
sleep 10;
|
||||
|
||||
};
|
||||
@@ -0,0 +1,105 @@
|
||||
sleep 5;
|
||||
|
||||
if ([] call KP_liberation_victoryCheck && GRLIB_endgame != 1) then {
|
||||
GRLIB_endgame = 1;
|
||||
publicVariable "GRLIB_endgame";
|
||||
{_x allowDamage false; (vehicle _x) allowDamage false;} forEach allPlayers;
|
||||
|
||||
private _rabbits = round (random 75) + round (random 80);
|
||||
|
||||
publicstats = [];
|
||||
publicstats pushback stats_ammo_produced;
|
||||
publicstats pushback stats_ammo_spent;
|
||||
publicstats pushback stats_blufor_soldiers_killed;
|
||||
publicstats pushback stats_blufor_soldiers_recruited;
|
||||
publicstats pushback stats_blufor_teamkills;
|
||||
publicstats pushback stats_blufor_vehicles_built;
|
||||
publicstats pushback stats_blufor_vehicles_killed;
|
||||
publicstats pushback stats_civilian_buildings_destroyed;
|
||||
publicstats pushback stats_civilian_vehicles_killed;
|
||||
publicstats pushback stats_civilian_vehicles_killed_by_players;
|
||||
publicstats pushback stats_civilian_vehicles_seized;
|
||||
publicstats pushback stats_civilians_healed;
|
||||
publicstats pushback stats_civilians_killed;
|
||||
publicstats pushback stats_civilians_killed_by_players;
|
||||
publicstats pushback stats_fobs_built;
|
||||
publicstats pushback stats_fobs_lost;
|
||||
publicstats pushback stats_fuel_produced;
|
||||
publicstats pushback stats_fuel_spent;
|
||||
publicstats pushback stats_hostile_battlegroups;
|
||||
publicstats pushback stats_ieds_detonated;
|
||||
publicstats pushback stats_opfor_killed_by_players;
|
||||
publicstats pushback stats_opfor_soldiers_killed;
|
||||
publicstats pushback stats_opfor_vehicles_killed;
|
||||
publicstats pushback stats_opfor_vehicles_killed_by_players;
|
||||
publicstats pushback stats_player_deaths;
|
||||
publicstats pushback stats_playtime;
|
||||
publicstats pushback stats_prisoners_captured;
|
||||
publicstats pushback stats_readiness_earned;
|
||||
publicstats pushback stats_reinforcements_called;
|
||||
publicstats pushback stats_resistance_killed;
|
||||
publicstats pushback stats_resistance_teamkills;
|
||||
publicstats pushback stats_resistance_teamkills_by_players;
|
||||
publicstats pushback stats_secondary_objectives;
|
||||
publicstats pushback stats_sectors_liberated;
|
||||
publicstats pushback stats_sectors_lost;
|
||||
publicstats pushback stats_spartan_respawns;
|
||||
publicstats pushback stats_supplies_produced;
|
||||
publicstats pushback stats_supplies_spent;
|
||||
publicstats pushback stats_vehicles_recycled;
|
||||
publicstats pushback _rabbits;
|
||||
|
||||
publicstats remoteExec ["remote_call_endgame"];
|
||||
|
||||
private _playtime_days = floor (stats_playtime / 86400);
|
||||
private _playtime_hours = floor ((stats_playtime % 86400) / 3600);
|
||||
private _playtime_minutes = floor ((stats_playtime % 3600) / 60);
|
||||
private _playtime_seconds = stats_playtime % 60;
|
||||
|
||||
["------------------------------------", "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Playtime: %1 days, %2 hours, %3 minutes, %4 seconds", _playtime_days, _playtime_hours, _playtime_minutes, _playtime_seconds], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["OPFOR infantry killed: %1", stats_opfor_soldiers_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["OPFOR infantry killed by players: %1", stats_opfor_killed_by_players], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["OPFOR vehicles destroyed: %1", stats_opfor_vehicles_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["OPFOR vehicles destroyed by players: %1", stats_opfor_vehicles_killed_by_players], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["BLUFOR infantry recruited: %1", stats_blufor_soldiers_recruited], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["BLUFOR infantry killed: %1", stats_blufor_soldiers_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["BLUFOR vehicles built: %1", stats_blufor_vehicles_built], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["BLUFOR vehicles destroyed: %1", stats_blufor_vehicles_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Player deaths: %1", stats_player_deaths], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["BLUFOR friendly fire incidents: %1", stats_blufor_teamkills], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Resistance fighters killed: %1", stats_resistance_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Resistance fighters (friendly) killed: %1", stats_resistance_teamkills], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Resistance fighters (friendly) killed by players: %1", stats_resistance_teamkills_by_players], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilians killed: %1", stats_civilians_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilians killed by players: %1", stats_civilians_killed_by_players], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilians healed: %1", stats_civilians_healed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilian vehicles destroyed: %1", stats_civilian_vehicles_killed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilian vehicles destroyed by players: %1", stats_civilian_vehicles_killed_by_players], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilian vehicles seized: %1", stats_civilian_vehicles_seized], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Civilian buildings destroyed: %1", stats_civilian_buildings_destroyed], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Vehicles recycled: %1", stats_vehicles_recycled], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Ammunition units produced: %1", stats_ammo_produced], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Ammunition units spent: %1", stats_ammo_spent], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Fuel units produced: %1", stats_fuel_produced], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Fuel units spent: %1", stats_fuel_spent], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Supply units produced: %1", stats_supplies_produced], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Supply units spent: %1", stats_supplies_spent], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Sectors liberated: %1", stats_sectors_liberated], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Sectors lost: %1", stats_sectors_lost], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["FOBs built: %1", stats_fobs_built], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["FOBs lost: %1", stats_fobs_lost], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Secondary objectives accomplished: %1", stats_secondary_objectives], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Prisoners captured: %1", stats_prisoners_captured], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Hostile battlegroups called: %1", stats_hostile_battlegroups], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Hostile reinforcements called: %1", stats_reinforcements_called], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Total combat readiness raised: %1", round stats_readiness_earned], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["IEDs detonated: %1", stats_ieds_detonated], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Number of Potato 01 losses: %1", stats_spartan_respawns], "MISSION END"] call KPLIB_fnc_log;
|
||||
[format ["Rabbits killed: %1", _rabbits], "MISSION END"] call KPLIB_fnc_log;
|
||||
["------------------------------------", "MISSION END"] call KPLIB_fnc_log;
|
||||
|
||||
sleep 20;
|
||||
|
||||
{if !(isPlayer _x) then {deleteVehicle _x;}} forEach allUnits;
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
private [ "_nextvehicle", "_nearestfob", "_reset_ticker" ];
|
||||
|
||||
_cleanup_classnames = [];
|
||||
{
|
||||
_cleanup_classnames append _x;
|
||||
} forEach [KPLIB_b_light_classes, KPLIB_b_heavy_classes, KPLIB_b_air_classes];
|
||||
|
||||
while { GRLIB_cleanup_vehicles > 0 } do {
|
||||
|
||||
sleep 600;
|
||||
|
||||
{
|
||||
_reset_ticker = true;
|
||||
_nextvehicle = _x;
|
||||
_nearestfob = [ getpos _nextvehicle ] call KPLIB_fnc_getNearestFob;
|
||||
if ( count _nearestfob == 3 ) then {
|
||||
if ( ( _nextvehicle distance _nearestfob > ( 1.2 * GRLIB_fob_range ) ) && ( _nextvehicle distance startbase > ( 1.2 * GRLIB_fob_range ) ) ) then {
|
||||
if ((toLower (typeof _nextvehicle)) in _cleanup_classnames) then {
|
||||
if ( count ( crew _nextvehicle ) == 0 ) then {
|
||||
_nextvehicle setVariable [ "GRLIB_empty_vehicle_ticker", ( _nextvehicle getVariable [ "GRLIB_empty_vehicle_ticker", 0 ] ) + 1 ];
|
||||
_reset_ticker = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
} ;
|
||||
|
||||
if ( _reset_ticker ) then {
|
||||
_nextvehicle setVariable [ "GRLIB_empty_vehicle_ticker", 0 ];
|
||||
};
|
||||
|
||||
if ( _nextvehicle getVariable [ "GRLIB_empty_vehicle_ticker", 0 ] >= ( 6 * GRLIB_cleanup_vehicles ) ) then {
|
||||
deleteVehicle _nextvehicle;
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
} foreach vehicles;
|
||||
};
|
||||
@@ -0,0 +1,4 @@
|
||||
while {true} do {
|
||||
5 setFog [0, 0, 0];
|
||||
sleep 30;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
while {true} do {
|
||||
if (GRLIB_shorter_nights && (daytime > 20 || daytime < 4)) then {
|
||||
setTimeMultiplier (GRLIB_time_factor * 4);
|
||||
} else {
|
||||
setTimeMultiplier GRLIB_time_factor;
|
||||
};
|
||||
sleep 10;
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
private _weathers = [
|
||||
[0.25],
|
||||
[0, 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55],
|
||||
[0, 0.1, 0.15, 0.2, 0.25, 0.3, 0.325, 0.35, 0.375, 0.4, 0.425, 0.45, 0.475, 0.5, 0.525, 0.55, 0.575, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1]
|
||||
] select (GRLIB_weather_param - 1);
|
||||
|
||||
private _newWeather = selectRandom _weathers;
|
||||
0 setOvercast _newWeather;
|
||||
forceWeatherChange;
|
||||
|
||||
[format ["Set initial weather to: %1 - Param Value: %2 - Time: %3", _newWeather, GRLIB_weather_param, diag_tickTime], "WEATHER"] call KPLIB_fnc_log;
|
||||
|
||||
while {GRLIB_endgame == 0} do {
|
||||
_newWeather = selectRandom _weathers;
|
||||
(3600 * timeMultiplier) setOvercast _newWeather;
|
||||
[format ["Set next weather transition to: %1 - Time: %2", _newWeather, diag_tickTime], "WEATHER"] call KPLIB_fnc_log;
|
||||
sleep 3000; // Slighty less than weather transition time, as sleep duration is depending on FPS
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
waitUntil { !isNil "save_is_loaded" };
|
||||
waitUntil { save_is_loaded };
|
||||
|
||||
while { true } do {
|
||||
sleep 1;
|
||||
stats_playtime = stats_playtime + 1;
|
||||
};
|
||||
575
kp_liberation.brf_sumava/scripts/server/game/save_manager.sqf
Normal file
575
kp_liberation.brf_sumava/scripts/server/game/save_manager.sqf
Normal file
@@ -0,0 +1,575 @@
|
||||
scriptName "KPLIB_saveLoop";
|
||||
|
||||
private _start = diag_tickTime;
|
||||
["----- Loading save data", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Handle possible enabled "wipe save" mission parameters
|
||||
if (GRLIB_param_wipe_savegame_1 == 1 && GRLIB_param_wipe_savegame_2 == 1) then {
|
||||
profileNamespace setVariable [GRLIB_save_key,nil];
|
||||
saveProfileNamespace;
|
||||
["Save wiped via mission parameters", "SAVE"] call KPLIB_fnc_log;
|
||||
} else {
|
||||
["No save wipe", "SAVE"] call KPLIB_fnc_log;
|
||||
};
|
||||
|
||||
// Auto save when last player exits
|
||||
if (hasInterface) then {
|
||||
[] spawn {
|
||||
waitUntil {!isNull findDisplay 46};
|
||||
(findDisplay 46) displayAddEventHandler ["Unload", {
|
||||
if (!isServer) exitWith {};
|
||||
["Player server exit. Saving mission data.", "SAVE"] call KPLIB_fnc_log;
|
||||
[] call KPLIB_fnc_doSave;
|
||||
}];
|
||||
};
|
||||
} else {
|
||||
addMissionEventHandler ["HandleDisconnect", {
|
||||
if !(allPlayers isEqualTo []) exitWith {false};
|
||||
params ["_unit"];
|
||||
deleteVehicle _unit;
|
||||
["Last player disconnected. Saving mission data.", "SAVE"] call KPLIB_fnc_log;
|
||||
[] call KPLIB_fnc_doSave;
|
||||
}];
|
||||
};
|
||||
|
||||
// All classnames of objects which should be saved
|
||||
KPLIB_classnamesToSave = [toLower FOB_typename, toLower huron_typename];
|
||||
|
||||
/*
|
||||
--- Locals ---
|
||||
Variables which are only used inside the save_manager.sqf
|
||||
*/
|
||||
// All AI squads
|
||||
private _aiGroups = [];
|
||||
// Current campaign date and time
|
||||
private _dateTime = [];
|
||||
// Vehicles which shouldn't be handled in the kill manager
|
||||
private _noKillHandler = [toLower FOB_typename, toLower huron_typename];
|
||||
// All objects which should be loaded/saved
|
||||
private _objectsToSave = [];
|
||||
// All storages which are handled for resource persistence
|
||||
private _resourceStorages = [];
|
||||
// Collection array for the statistic values
|
||||
private _stats = [];
|
||||
// Collection array for the enemy weights
|
||||
private _weights = [];
|
||||
// All mines around FOBs
|
||||
private _allMines = [];
|
||||
// All unclaimed crates from crate spawning sectors
|
||||
private _allCrates = [];
|
||||
|
||||
/*
|
||||
--- Globals ---
|
||||
Initializes global variables which are used at several places in the framework
|
||||
*/
|
||||
|
||||
// Enemy weight for anti air
|
||||
air_weight = 33;
|
||||
// Enemy weight for anti armor
|
||||
armor_weight = 33;
|
||||
// Blufor sectors
|
||||
blufor_sectors = [];
|
||||
// Enemy combat readiness (0-100)
|
||||
combat_readiness = 0;
|
||||
// All FOBs
|
||||
GRLIB_all_fobs = [];
|
||||
// Player permissions data
|
||||
GRLIB_permissions = [];
|
||||
// Vehicle unlock links
|
||||
GRLIB_vehicle_to_military_base_links = [];
|
||||
// Enemy weight for anti infantry
|
||||
infantry_weight = 33;
|
||||
// Civilian reputation value (-100 - +100)
|
||||
KP_liberation_civ_rep = 0;
|
||||
// Clearances
|
||||
KP_liberation_clearances = [];
|
||||
// Strength value of the resistance forces
|
||||
KP_liberation_guerilla_strength = 0;
|
||||
// Logistic handling data
|
||||
KP_liberation_logistics = [];
|
||||
// Production handling data
|
||||
KP_liberation_production = [];
|
||||
// Factory markers to display the current available facilities
|
||||
KP_liberation_production_markers = [];
|
||||
// Radio tower classnames per radio tower sector
|
||||
KPLIB_sectorTowers = [];
|
||||
// Sectors under attack
|
||||
KPLIB_sectorsUnderAttack = [];
|
||||
// Global Intel resource
|
||||
resources_intel = 0;
|
||||
// State if the save is fully loaded
|
||||
save_is_loaded = false;
|
||||
|
||||
// Add all buildings for saving and kill manager ignore
|
||||
_noKillHandler append KPLIB_b_buildings_classes;
|
||||
KPLIB_classnamesToSave append KPLIB_b_buildings_classes;
|
||||
KPLIB_classnamesToSave append KPLIB_b_allVeh_classes;
|
||||
|
||||
// Add opfor and civilian vehicles for saving
|
||||
KPLIB_classnamesToSave append KPLIB_o_allVeh_classes;
|
||||
KPLIB_classnamesToSave append civilian_vehicles;
|
||||
|
||||
// Remove duplicates
|
||||
KPLIB_classnamesToSave = KPLIB_classnamesToSave arrayIntersect KPLIB_classnamesToSave;
|
||||
|
||||
/*
|
||||
--- Statistic Variables ---
|
||||
*/
|
||||
|
||||
stats_ammo_produced = 0;
|
||||
stats_ammo_spent = 0;
|
||||
stats_blufor_soldiers_killed = 0;
|
||||
stats_blufor_soldiers_recruited = 0;
|
||||
stats_blufor_teamkills = 0;
|
||||
stats_blufor_vehicles_built = 0;
|
||||
stats_blufor_vehicles_killed = 0;
|
||||
stats_civilian_buildings_destroyed = 0;
|
||||
stats_civilian_vehicles_killed = 0;
|
||||
stats_civilian_vehicles_killed_by_players = 0;
|
||||
stats_civilian_vehicles_seized = 0;
|
||||
stats_civilians_healed = 0;
|
||||
stats_civilians_killed = 0;
|
||||
stats_civilians_killed_by_players = 0;
|
||||
stats_fobs_built = 0;
|
||||
stats_fobs_lost = 0;
|
||||
stats_fuel_produced = 0;
|
||||
stats_fuel_spent = 0;
|
||||
stats_hostile_battlegroups = 0;
|
||||
stats_ieds_detonated = 0;
|
||||
stats_opfor_killed_by_players = 0;
|
||||
stats_opfor_soldiers_killed = 0;
|
||||
stats_opfor_vehicles_killed = 0;
|
||||
stats_opfor_vehicles_killed_by_players = 0;
|
||||
stats_player_deaths = 0;
|
||||
stats_playtime = 0;
|
||||
stats_prisoners_captured = 0;
|
||||
stats_readiness_earned = 0;
|
||||
stats_reinforcements_called = 0;
|
||||
stats_resistance_killed = 0;
|
||||
stats_resistance_teamkills = 0;
|
||||
stats_resistance_teamkills_by_players = 0;
|
||||
stats_secondary_objectives = 0;
|
||||
stats_sectors_liberated = 0;
|
||||
stats_sectors_lost = 0;
|
||||
stats_spartan_respawns = 0;
|
||||
stats_supplies_produced = 0;
|
||||
stats_supplies_spent = 0;
|
||||
stats_vehicles_recycled = 0;
|
||||
|
||||
// Prevent saving/duplication of objects placed in Eden
|
||||
{
|
||||
_x setVariable ["KP_liberation_edenObject", true];
|
||||
} forEach (allMissionObjects "");
|
||||
|
||||
// Get possible save data
|
||||
private _saveData = profileNamespace getVariable GRLIB_save_key;
|
||||
|
||||
// Load save data, when retrieved
|
||||
if (!isNil "_saveData") then {
|
||||
|
||||
// Convert from string to array
|
||||
if (_saveData isEqualType "") then {
|
||||
_saveData = parseSimpleArray _saveData;
|
||||
};
|
||||
|
||||
if (((_saveData select 0) select 0) isEqualType 0) then {
|
||||
[format ["Save data from version: %1", (_saveData select 0) joinstring "."], "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
_dateTime = _saveData select 1;
|
||||
_objectsToSave = _saveData select 2;
|
||||
_resourceStorages = _saveData select 3;
|
||||
_stats = _saveData select 4;
|
||||
_weights = _saveData select 5;
|
||||
_aiGroups = _saveData select 6;
|
||||
blufor_sectors = _saveData select 7;
|
||||
combat_readiness = _saveData select 8;
|
||||
GRLIB_all_fobs = _saveData select 9;
|
||||
GRLIB_permissions = _saveData select 10;
|
||||
GRLIB_vehicle_to_military_base_links = _saveData select 11;
|
||||
KP_liberation_civ_rep = _saveData select 12;
|
||||
KP_liberation_clearances = _saveData select 13;
|
||||
KP_liberation_guerilla_strength = _saveData select 14;
|
||||
KP_liberation_logistics = _saveData select 15;
|
||||
KP_liberation_production = _saveData select 16;
|
||||
KP_liberation_production_markers = _saveData select 17;
|
||||
resources_intel = _saveData select 18;
|
||||
_allMines = _saveData param [19, []];
|
||||
_allCrates = _saveData param [20, []];
|
||||
KPLIB_sectorTowers = _saveData param [21, []];
|
||||
|
||||
stats_ammo_produced = _stats select 0;
|
||||
stats_ammo_spent = _stats select 1;
|
||||
stats_blufor_soldiers_killed = _stats select 2;
|
||||
stats_blufor_soldiers_recruited = _stats select 3;
|
||||
stats_blufor_teamkills = _stats select 4;
|
||||
stats_blufor_vehicles_built = _stats select 5;
|
||||
stats_blufor_vehicles_killed = _stats select 6;
|
||||
stats_civilian_buildings_destroyed = _stats select 7;
|
||||
stats_civilian_vehicles_killed = _stats select 8;
|
||||
stats_civilian_vehicles_killed_by_players = _stats select 9;
|
||||
stats_civilian_vehicles_seized = _stats select 10;
|
||||
stats_civilians_healed = _stats select 11;
|
||||
stats_civilians_killed = _stats select 12;
|
||||
stats_civilians_killed_by_players = _stats select 13;
|
||||
stats_fobs_built = _stats select 14;
|
||||
stats_fobs_lost = _stats select 15;
|
||||
stats_fuel_produced = _stats select 16;
|
||||
stats_fuel_spent = _stats select 17;
|
||||
stats_hostile_battlegroups = _stats select 18;
|
||||
stats_ieds_detonated = _stats select 19;
|
||||
stats_opfor_killed_by_players = _stats select 20;
|
||||
stats_opfor_soldiers_killed = _stats select 21;
|
||||
stats_opfor_vehicles_killed = _stats select 22;
|
||||
stats_opfor_vehicles_killed_by_players = _stats select 23;
|
||||
stats_player_deaths = _stats select 24;
|
||||
stats_playtime = _stats select 25;
|
||||
stats_prisoners_captured = _stats select 26;
|
||||
stats_readiness_earned = _stats select 27;
|
||||
stats_reinforcements_called = _stats select 28;
|
||||
stats_resistance_killed = _stats select 29;
|
||||
stats_resistance_teamkills = _stats select 30;
|
||||
stats_resistance_teamkills_by_players = _stats select 31;
|
||||
stats_secondary_objectives = _stats select 32;
|
||||
stats_sectors_liberated = _stats select 33;
|
||||
stats_sectors_lost = _stats select 34;
|
||||
stats_spartan_respawns = _stats select 35;
|
||||
stats_supplies_produced = _stats select 36;
|
||||
stats_supplies_spent = _stats select 37;
|
||||
stats_vehicles_recycled = _stats select 38;
|
||||
} else {
|
||||
// --- Compatibility for older save data ---
|
||||
["Save data from version: pre 0.96.5", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
blufor_sectors = _saveData select 0;
|
||||
GRLIB_all_fobs = _saveData select 1;
|
||||
_objectsToSave = _saveData select 2;
|
||||
_dateTime = _saveData select 3;
|
||||
combat_readiness = _saveData select 4;
|
||||
_resourceStorages = _saveData select 5;
|
||||
KP_liberation_production = _saveData select 6;
|
||||
KP_liberation_logistics = _saveData select 7;
|
||||
_stats = _saveData select 8;
|
||||
_weights = _saveData select 9;
|
||||
GRLIB_vehicle_to_military_base_links = _saveData select 10;
|
||||
GRLIB_permissions = _saveData select 11;
|
||||
_aiGroups = _saveData select 12;
|
||||
resources_intel = _saveData select 13;
|
||||
KP_liberation_civ_rep = _saveData select 15;
|
||||
KP_liberation_production_markers = _saveData select 16;
|
||||
KP_liberation_guerilla_strength = _saveData select 17;
|
||||
|
||||
stats_opfor_soldiers_killed = _stats select 0;
|
||||
stats_opfor_killed_by_players = _stats select 1;
|
||||
stats_blufor_soldiers_killed = _stats select 2;
|
||||
stats_player_deaths = _stats select 3;
|
||||
stats_opfor_vehicles_killed = _stats select 4;
|
||||
stats_opfor_vehicles_killed_by_players = _stats select 5;
|
||||
stats_blufor_vehicles_killed = _stats select 6;
|
||||
stats_blufor_soldiers_recruited = _stats select 7;
|
||||
stats_blufor_vehicles_built = _stats select 8;
|
||||
stats_civilians_killed = _stats select 9;
|
||||
stats_civilians_killed_by_players = _stats select 10;
|
||||
stats_sectors_liberated = _stats select 11;
|
||||
stats_playtime = _stats select 12;
|
||||
stats_spartan_respawns = _stats select 13;
|
||||
stats_secondary_objectives = _stats select 14;
|
||||
stats_hostile_battlegroups = _stats select 15;
|
||||
stats_ieds_detonated = _stats select 16;
|
||||
stats_reinforcements_called = _stats select 19;
|
||||
stats_prisoners_captured = _stats select 20;
|
||||
stats_blufor_teamkills = _stats select 21;
|
||||
stats_vehicles_recycled = _stats select 22;
|
||||
stats_ammo_spent = _stats select 23;
|
||||
stats_sectors_lost = _stats select 24;
|
||||
stats_fobs_built = _stats select 25;
|
||||
stats_fobs_lost = _stats select 26;
|
||||
stats_readiness_earned = _stats select 27;
|
||||
};
|
||||
|
||||
// Extract weigths from collection array
|
||||
infantry_weight = _weights select 0;
|
||||
armor_weight = _weights select 1;
|
||||
air_weight = _weights select 2;
|
||||
|
||||
// Set correct resistance standing
|
||||
private _resistanceEnemy = [0, 1] select (KP_liberation_civ_rep < 25);
|
||||
private _resistanceFriendly = [0, 1] select (KP_liberation_civ_rep >= -25);
|
||||
|
||||
GRLIB_side_resistance setFriend [GRLIB_side_enemy, _resistanceEnemy];
|
||||
GRLIB_side_enemy setFriend [GRLIB_side_resistance, _resistanceEnemy];
|
||||
GRLIB_side_resistance setFriend [GRLIB_side_friendly, _resistanceFriendly];
|
||||
GRLIB_side_friendly setFriend [GRLIB_side_resistance, _resistanceFriendly];
|
||||
|
||||
if (KP_liberation_civrep_debug > 0) then {[format ["%1 getFriend %2: %3 - %1 getFriend %4: %5", GRLIB_side_resistance, GRLIB_side_enemy, (GRLIB_side_resistance getFriend GRLIB_side_enemy), GRLIB_side_friendly, (GRLIB_side_resistance getFriend GRLIB_side_friendly)], "CIVREP"] call KPLIB_fnc_log;};
|
||||
|
||||
// Apply current date and time
|
||||
if (_dateTime isEqualType []) then {
|
||||
setDate _dateTime;
|
||||
} else {
|
||||
setDate [2045, 6, 6, _dateTime, 0]; // Compatibility for older save data
|
||||
};
|
||||
|
||||
// Create clearances
|
||||
{
|
||||
[_x select 0, _x select 1] call KPLIB_fnc_createClearance;
|
||||
} forEach KP_liberation_clearances;
|
||||
|
||||
// Collection array for all objects which are loaded
|
||||
private _spawnedObjects = [];
|
||||
|
||||
// Spawn all saved objects
|
||||
private _object = objNull;
|
||||
{
|
||||
// Fetch data of saved object
|
||||
_x params ["_class", "_pos", "_vecDir", "_vecUp", ["_hasCrew", false]];
|
||||
|
||||
// This will be removed if we reach a 0.96.7 due to more released Arma 3 DLCs until we finish 0.97.0
|
||||
if !(((_saveData select 0) select 0) isEqualType 0) then {
|
||||
// Pre 0.96.5 compatibility with repair building, as it was replaced by default with a different classname
|
||||
if ((KP_liberation_recycle_building != "Land_CarService_F") && (_class == "Land_CarService_F")) then {
|
||||
_class = KP_liberation_recycle_building;
|
||||
};
|
||||
|
||||
// Pre 0.96.5 compatibility with air building, as it was replaced by default with a different classname
|
||||
if ((KP_liberation_air_vehicle_building != "Land_Radar_Small_F") && (_class == "Land_Radar_Small_F")) then {
|
||||
_class = KP_liberation_air_vehicle_building;
|
||||
};
|
||||
};
|
||||
|
||||
// Only spawn, if the classname is still in the presets
|
||||
if ((toLower _class) in KPLIB_classnamesToSave) then {
|
||||
|
||||
// Create object without damage handling and simulation
|
||||
_object = createVehicle [_class, _pos, [], 0, "CAN_COLLIDE"];
|
||||
_object allowdamage false;
|
||||
_object enableSimulation false;
|
||||
|
||||
// Add object to spawned objects collection
|
||||
_spawnedObjects pushBack _object;
|
||||
|
||||
// Reposition spawned object
|
||||
_object setPosWorld _pos;
|
||||
_object setVectorDirAndUp [_vecDir, _vecUp];
|
||||
|
||||
// Process KP object init
|
||||
[_object] call KPLIB_fnc_addObjectInit;
|
||||
|
||||
// Apply kill manager handling, if not excluded
|
||||
if !((toLower _class) in _noKillHandler) then {
|
||||
_object addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
|
||||
};
|
||||
|
||||
// Set enemy vehicle as captured
|
||||
if ((toLower _class) in KPLIB_o_allVeh_classes) then {
|
||||
_object setVariable ["KPLIB_captured", true, true];
|
||||
};
|
||||
|
||||
// Set civilian vehicle as seized
|
||||
if (_class in civilian_vehicles) then {
|
||||
_object setVariable ["KPLIB_seized", true, true];
|
||||
};
|
||||
|
||||
// Determine if cargo should be cleared
|
||||
[_object] call KPLIB_fnc_clearCargo;
|
||||
|
||||
// Add blufor crew, if it had crew or is a UAV
|
||||
if ((unitIsUAV _object) || _hascrew) then {
|
||||
[_object] call KPLIB_fnc_forceBluforCrew;
|
||||
};
|
||||
};
|
||||
} forEach _objectsToSave;
|
||||
|
||||
// Re-enable physics on the spawned objects
|
||||
{
|
||||
_x enableSimulation true;
|
||||
_x setdamage 0;
|
||||
_x allowdamage true;
|
||||
} forEach _spawnedObjects;
|
||||
["Saved buildings and vehicles placed", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Spawn all saved mines
|
||||
private _mine = objNull;
|
||||
{
|
||||
_x params ["_minePos", "_dirAndUp", "_class", "_known"];
|
||||
|
||||
_mine = createVehicle [_class, _minePos, [], 0];
|
||||
_mine setPosWorld _minePos;
|
||||
_mine setVectorDirAndUp _dirAndUp;
|
||||
|
||||
// reveal mine to player side if it was detected
|
||||
if (_known) then {
|
||||
GRLIB_side_friendly revealMine _mine;
|
||||
};
|
||||
|
||||
} forEach _allMines;
|
||||
["Saved mines placed", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Spawn saved resource storages and their content
|
||||
{
|
||||
_x params ["_class", "_pos", "_vecDir", "_vecUp", "_supply", "_ammo", "_fuel"];
|
||||
|
||||
// Only spawn, if the classname is still in the presets
|
||||
if ((toLower _class) in KPLIB_classnamesToSave) then {
|
||||
|
||||
// Create object without damage handling and simulation
|
||||
_object = createVehicle [_class, _pos, [], 0, "CAN_COLLIDE"];
|
||||
_object allowdamage false;
|
||||
_object enableSimulation false;
|
||||
|
||||
// Reposition spawned object
|
||||
_object setPosWorld _pos;
|
||||
_object setVectorDirAndUp [_vecDir, _vecUp];
|
||||
|
||||
// Re-enable physics on spawned object
|
||||
_object setdamage 0;
|
||||
_object enableSimulation true;
|
||||
_object allowdamage true;
|
||||
|
||||
// Mark it as FOB storage
|
||||
_object setVariable ["KP_liberation_storage_type", 0, true];
|
||||
|
||||
// Fill storage with saved resources
|
||||
[floor _supply, floor _ammo, floor _fuel, _object] call KPLIB_fnc_fillStorage;
|
||||
};
|
||||
} forEach _resourceStorages;
|
||||
["Saved FOB storages placed and filled", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Spawn saved sector storages and their content
|
||||
private _storage = [];
|
||||
{
|
||||
_storage = _x select 3;
|
||||
|
||||
// Spawn storage, if sector has valid storage
|
||||
if ((count _storage) == 3) then {
|
||||
_storage params ["_pos", "_dir", "_vecUp"];
|
||||
|
||||
// Create object without damage handling and simulation
|
||||
_object = createVehicle [KP_liberation_small_storage_building, _pos, [], 0, "CAN_COLLIDE"];
|
||||
_object enableSimulationGlobal false;
|
||||
_object allowdamage false;
|
||||
|
||||
// Reposition spawned object
|
||||
_object setdir _dir;
|
||||
_object setVectorUp _vecUp;
|
||||
_object setPosATL _pos;
|
||||
|
||||
// Re-enable physics on spawned object
|
||||
_object setdamage 0;
|
||||
_object enableSimulation true;
|
||||
_object allowdamage true;
|
||||
|
||||
// Mark it as sector storage
|
||||
_object setVariable ["KP_liberation_storage_type", 1, true];
|
||||
|
||||
// Fill storage
|
||||
[floor (_x select 9), floor (_x select 10), floor (_x select 11), _object] call KPLIB_fnc_fillStorage;
|
||||
};
|
||||
} forEach KP_liberation_production;
|
||||
["Saved sector storages placed and filled", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Spawn BLUFOR AI groups
|
||||
// This will be removed if we reach a 0.96.7 due to more released Arma 3 DLCs until we finish 0.97.0
|
||||
private _grp = grpNull;
|
||||
if (((_saveData select 0) select 0) isEqualType 0) then {
|
||||
{
|
||||
_x params ["_spawnPos", "_units"];
|
||||
_grp = createGroup [GRLIB_side_friendly, true];
|
||||
{
|
||||
[_x, [_spawnPos, _grp] select (_forEachIndex > 0), _grp] call KPLIB_fnc_createManagedUnit;
|
||||
} forEach _units;
|
||||
} forEach _aiGroups;
|
||||
} else {
|
||||
// Pre 0.96.5 compatibility
|
||||
private _pos = [];
|
||||
private _dir = 0;
|
||||
private _unit = objNull;
|
||||
{
|
||||
_grp = createGroup [GRLIB_side_friendly, true];
|
||||
{
|
||||
_pos = [(_x select 1) select 0, (_x select 1) select 1, ((_x select 1) select 2) + 0.2];
|
||||
_dir = _x select 2;
|
||||
_unit = [(_x select 0), _pos, _grp] call KPLIB_fnc_createManagedUnit;
|
||||
_unit setDir _dir;
|
||||
_unit setPosATL _pos;
|
||||
} forEach _x;
|
||||
} forEach _aiGroups;
|
||||
};
|
||||
["Saved AI units placed", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Spawn all saved sector crates
|
||||
{
|
||||
_x call KPLIB_fnc_createCrate;
|
||||
} forEach _allCrates;
|
||||
["Saved crates placed", "SAVE"] call KPLIB_fnc_log;
|
||||
} else {
|
||||
["Save nil", "SAVE"] call KPLIB_fnc_log;
|
||||
};
|
||||
|
||||
publicVariable "stats_civilian_vehicles_seized";
|
||||
publicVariable "stats_ieds_detonated";
|
||||
publicVariable "blufor_sectors";
|
||||
publicVariable "GRLIB_all_fobs";
|
||||
publicVariable "KPLIB_sectorsUnderAttack";
|
||||
publicVariable "KP_liberation_clearances";
|
||||
|
||||
// Check for deleted military sectors or deleted classnames in the locked vehicles array
|
||||
GRLIB_vehicle_to_military_base_links = GRLIB_vehicle_to_military_base_links select {((_x select 0) in elite_vehicles) && ((_x select 1) in sectors_military)};
|
||||
|
||||
// Remove links for vehicles of possibly removed mods
|
||||
GRLIB_vehicle_to_military_base_links = GRLIB_vehicle_to_military_base_links select {[_x select 0] call KPLIB_fnc_checkClass};
|
||||
|
||||
// Check for additions in the locked vehicles array
|
||||
private _lockedVehCount = count GRLIB_vehicle_to_military_base_links;
|
||||
if ((_lockedVehCount < (count sectors_military)) && (_lockedVehCount < (count elite_vehicles))) then {
|
||||
private _assignedVehicles = [];
|
||||
private _assignedBases = [];
|
||||
private _nextVehicle = "";
|
||||
private _nextBase = "";
|
||||
|
||||
{
|
||||
_assignedVehicles pushBack (_x select 0);
|
||||
_assignedBases pushBack (_x select 1);
|
||||
} forEach GRLIB_vehicle_to_military_base_links;
|
||||
|
||||
// Add new entries, when there are elite vehicles and military sectors are not yet assigned
|
||||
while {((count _assignedVehicles) < (count elite_vehicles)) && ((count _assignedBases) < (count sectors_military))} do {
|
||||
_nextVehicle = selectRandom (elite_vehicles - _assignedVehicles);
|
||||
_nextBase = selectRandom (sectors_military - _assignedBases);
|
||||
_assignedVehicles pushBack _nextVehicle;
|
||||
_assignedBases pushBack _nextBase;
|
||||
GRLIB_vehicle_to_military_base_links pushBack [_nextVehicle, _nextBase];
|
||||
};
|
||||
["Additional military sectors or unlockable vehicles detected and assigned", "SAVE"] call KPLIB_fnc_log;
|
||||
};
|
||||
|
||||
publicVariable "GRLIB_vehicle_to_military_base_links";
|
||||
publicVariable "GRLIB_permissions";
|
||||
save_is_loaded = true; publicVariable "save_is_loaded";
|
||||
|
||||
[format ["----- Saved data loaded - Time needed: %1 seconds", diag_tickTime - _start], "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
// Start the save loop
|
||||
private _saveTime = time + KP_liberation_save_interval;
|
||||
while {true} do {
|
||||
waitUntil {
|
||||
sleep 0.5;
|
||||
(time > _saveTime) || {GRLIB_endgame == 1};
|
||||
};
|
||||
_start = diag_tickTime;
|
||||
|
||||
// Exit the while and wipe save, if campaign ended
|
||||
if (GRLIB_endgame == 1) exitWith {
|
||||
profileNamespace setVariable [GRLIB_save_key, nil];
|
||||
saveProfileNamespace;
|
||||
};
|
||||
|
||||
[] call KPLIB_fnc_doSave;
|
||||
|
||||
if (KP_liberation_savegame_debug > 0) then {[format ["Campaign saved - Time needed: %1 seconds", diag_tickTime - _start], "SAVE"] call KPLIB_fnc_log;};
|
||||
|
||||
_saveTime = time + KP_liberation_save_interval;
|
||||
};
|
||||
|
||||
["Left saving loop", "SAVE"] call KPLIB_fnc_log;
|
||||
|
||||
true
|
||||
@@ -0,0 +1,72 @@
|
||||
if (!isDedicated) exitWith {};
|
||||
|
||||
_serverDuration = (KP_liberation_restart * 60 * 60);
|
||||
|
||||
[format ["Restart Timer Set To %1", _serverDuration], "RESTART"] call KPLIB_fnc_log;
|
||||
|
||||
private _30minspassed = false;
|
||||
private _15minspassed = false;
|
||||
private _5minspassed = false;
|
||||
private _60secondspassed = false;
|
||||
|
||||
private _timeStart = diag_tickTime;
|
||||
|
||||
private ["_timeSinceStart","_timeUntilRestart"];
|
||||
while{true} do
|
||||
{
|
||||
_timeSinceStart = diag_tickTime - _timeStart;
|
||||
_timeUntilRestart = _serverDuration - _timeSinceStart;
|
||||
|
||||
switch true do
|
||||
{
|
||||
case ((_timeUntilRestart < (1 * 60)) && !_60secondspassed) :
|
||||
{
|
||||
["lib_restart_60_s"] remoteExecCall ["BIS_fnc_showNotification"];
|
||||
["60 seconds until server restart.", "RESTART"] call KPLIB_fnc_log;
|
||||
_60secondspassed = true;
|
||||
_5minspassed = true;
|
||||
_15minspassed = true;
|
||||
_30minspassed = true;
|
||||
};
|
||||
case ((_timeUntilRestart < (5 * 60)) && !_5minspassed) :
|
||||
{
|
||||
["lib_restart_5_min"] remoteExecCall ["BIS_fnc_showNotification"];
|
||||
["5 minutes until server restart.", "RESTART"] call KPLIB_fnc_log;
|
||||
_5minspassed = true;
|
||||
_15minspassed = true;
|
||||
_30minspassed = true;
|
||||
};
|
||||
case ((_timeUntilRestart < (15 * 60)) && !_15minspassed) :
|
||||
{
|
||||
["lib_restart_15_min"] remoteExecCall ["BIS_fnc_showNotification"];
|
||||
["15 minutes until server restart.", "RESTART"] call KPLIB_fnc_log;
|
||||
_15minspassed = true;
|
||||
_30minspassed = true;
|
||||
};
|
||||
case ((_timeUntilRestart < (30 * 60)) && !_30minspassed) :
|
||||
{
|
||||
["lib_restart_30_min"] remoteExecCall ["BIS_fnc_showNotification"];
|
||||
["30 minutes until server restart.", "RESTART"] call KPLIB_fnc_log;
|
||||
_30minspassed = true;
|
||||
};
|
||||
};
|
||||
|
||||
if(_timeSinceStart > _serverDuration) then
|
||||
{
|
||||
["Restart timeout elapsed, attempting server shutdown.", "RESTART"] call KPLIB_fnc_log;
|
||||
sleep 5;
|
||||
|
||||
private _myPass = call compile preprocessFileLineNumbers "\userconfig\restart\myPass.hpp";
|
||||
private _shutdownSuccess = _myPass serverCommand (["#restart", "#restartserver"] select ((productVersion select 6) isEqualTo "Windows"));
|
||||
|
||||
if(_shutdownSuccess) then
|
||||
{
|
||||
["Shutting down server!", "RESTART"] call KPLIB_fnc_log;
|
||||
}
|
||||
else
|
||||
{
|
||||
["Shutdown failed!", "RESTART"] call KPLIB_fnc_log;
|
||||
};
|
||||
};
|
||||
sleep 15;
|
||||
};
|
||||
@@ -0,0 +1,21 @@
|
||||
uiSleep 3;
|
||||
|
||||
private _sector = "";
|
||||
private _saved = [];
|
||||
private _classname = "";
|
||||
private _tower = objNull;
|
||||
|
||||
{
|
||||
_sector = _x;
|
||||
_saved = KPLIB_sectorTowers select {(_x select 0) isEqualTo _sector};
|
||||
if (_saved isEqualTo []) then {
|
||||
_classname = selectRandom KPLIB_radioTowerClassnames;
|
||||
KPLIB_sectorTowers pushBack [_sector, _classname];
|
||||
} else {
|
||||
_classname = (_saved select 0) select 1;
|
||||
};
|
||||
_tower = _classname createVehicle (markerpos _x);
|
||||
_tower setPos (markerpos _x);
|
||||
_tower setVectorUp [0, 0, 1];
|
||||
_tower addEventHandler ["HandleDamage", {0}];
|
||||
} forEach sectors_tower;
|
||||
@@ -0,0 +1,41 @@
|
||||
sync_eco = []; publicVariable "sync_eco";
|
||||
|
||||
waitUntil{!isNil "save_is_loaded"};
|
||||
waitUntil{!isNil "KP_liberation_production"};
|
||||
waitUntil{!isNil "KP_liberation_logistics"};
|
||||
waitUntil{!isNil "KP_liberation_production_markers"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
if (KP_liberation_production_markers isEqualTo []) then {
|
||||
{
|
||||
private _facility = selectRandom [[true,false,false], [false,true,false], [false,false,true]];
|
||||
KP_liberation_production_markers pushBack [_x, _facility select 0, _facility select 1, _facility select 2, markerText _x];
|
||||
} forEach sectors_factory;
|
||||
};
|
||||
|
||||
private _KP_liberation_production_old = [0];
|
||||
private _KP_liberation_logistics_old = [0];
|
||||
|
||||
while {true} do {
|
||||
|
||||
waitUntil {sleep 0.25;
|
||||
!(_KP_liberation_production_old isEqualTo KP_liberation_production)
|
||||
|| !(_KP_liberation_logistics_old isEqualTo KP_liberation_logistics)
|
||||
};
|
||||
{
|
||||
private _sector = _x;
|
||||
{
|
||||
if ((_sector select 1) == (_x select 0)) exitWith {
|
||||
_x set [1, (_sector select 4)];
|
||||
_x set [2, (_sector select 5)];
|
||||
_x set [3, (_sector select 6)];
|
||||
};
|
||||
} forEach KP_liberation_production_markers;
|
||||
} forEach KP_liberation_production;
|
||||
sleep 0.25;
|
||||
sync_eco = [KP_liberation_production,KP_liberation_logistics,KP_liberation_production_markers];
|
||||
publicVariable "sync_eco";
|
||||
|
||||
_KP_liberation_production_old = +KP_liberation_production;
|
||||
_KP_liberation_logistics_old = +KP_liberation_logistics;
|
||||
};
|
||||
@@ -0,0 +1,103 @@
|
||||
sync_vars = []; publicVariable "sync_vars";
|
||||
|
||||
waitUntil{!isNil "save_is_loaded"};
|
||||
waitUntil{!isNil "KP_liberation_fob_resources"};
|
||||
waitUntil{!isNil "KP_liberation_supplies_global"};
|
||||
waitUntil{!isNil "KP_liberation_ammo_global"};
|
||||
waitUntil{!isNil "KP_liberation_fuel_global"};
|
||||
waitUntil{!isNil "combat_readiness"};
|
||||
waitUntil{!isNil "unitcap"};
|
||||
waitUntil{!isNil "KP_liberation_heli_count"};
|
||||
waitUntil{!isNil "KP_liberation_plane_count"};
|
||||
waitUntil{!isNil "KP_liberation_heli_slots"};
|
||||
waitUntil{!isNil "KP_liberation_plane_slots"};
|
||||
waitUntil{!isNil "resources_intel"};
|
||||
waitUntil{!isNil "infantry_cap"};
|
||||
waitUntil{!isNil "KP_liberation_civ_rep"};
|
||||
waitUntil{!isNil "KP_liberation_guerilla_strength"};
|
||||
waitUntil{!isNil "infantry_weight"};
|
||||
waitUntil{!isNil "armor_weight"};
|
||||
waitUntil{!isNil "air_weight"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
private _KP_liberation_fob_resources_old = [];
|
||||
private _KP_liberation_supplies_global_old = -1;
|
||||
private _KP_liberation_ammo_global_old = -1;
|
||||
private _KP_liberation_fuel_global_old = -1;
|
||||
private _unitcap_old = -1;
|
||||
private _KP_liberation_heli_count_old = -1;
|
||||
private _KP_liberation_plane_count_old = -1;
|
||||
private _KP_liberation_heli_slots_old = -1;
|
||||
private _KP_liberation_plane_slots_old = -1;
|
||||
private _combat_readiness_old = -1;
|
||||
private _resources_intel_old = -999;
|
||||
private _infantry_cap_old = -999;
|
||||
private _KP_liberation_civ_rep_old = -999;
|
||||
private _KP_liberation_guerilla_strength_old = -999;
|
||||
private _infantry_weight_old = -1;
|
||||
private _armor_weight_old = -1;
|
||||
private _air_weight_old = -1;
|
||||
|
||||
while {true} do {
|
||||
waitUntil {sleep 0.25;
|
||||
!(_KP_liberation_fob_resources_old isEqualTo KP_liberation_fob_resources)
|
||||
|| _KP_liberation_supplies_global_old != KP_liberation_supplies_global
|
||||
|| _KP_liberation_ammo_global_old != KP_liberation_ammo_global
|
||||
|| _KP_liberation_fuel_global_old != KP_liberation_fuel_global
|
||||
|| _unitcap_old != unitcap
|
||||
|| _KP_liberation_heli_count_old != KP_liberation_heli_count
|
||||
|| _KP_liberation_plane_count_old != KP_liberation_plane_count
|
||||
|| _KP_liberation_heli_slots_old != KP_liberation_heli_slots
|
||||
|| _KP_liberation_plane_slots_old != KP_liberation_plane_slots
|
||||
|| _combat_readiness_old != combat_readiness
|
||||
|| _resources_intel_old != resources_intel
|
||||
|| _infantry_cap_old != infantry_cap
|
||||
|| _KP_liberation_civ_rep_old != KP_liberation_civ_rep
|
||||
|| _KP_liberation_guerilla_strength_old != KP_liberation_guerilla_strength
|
||||
|| _infantry_weight_old != infantry_weight
|
||||
|| _armor_weight_old != armor_weight
|
||||
|| _air_weight_old != air_weight
|
||||
};
|
||||
|
||||
if (KP_liberation_guerilla_strength < 0) then {KP_liberation_guerilla_strength = 0;};
|
||||
|
||||
sleep 0.25;
|
||||
sync_vars = [
|
||||
KP_liberation_fob_resources,
|
||||
KP_liberation_supplies_global,
|
||||
KP_liberation_ammo_global,
|
||||
KP_liberation_fuel_global,
|
||||
unitcap,
|
||||
KP_liberation_heli_count,
|
||||
KP_liberation_plane_count,
|
||||
KP_liberation_heli_slots,
|
||||
KP_liberation_plane_slots,
|
||||
combat_readiness,
|
||||
resources_intel,
|
||||
infantry_cap,
|
||||
KP_liberation_civ_rep,
|
||||
KP_liberation_guerilla_strength,
|
||||
infantry_weight,
|
||||
armor_weight,
|
||||
air_weight
|
||||
];
|
||||
publicVariable "sync_vars";
|
||||
|
||||
_KP_liberation_fob_resources_old = +KP_liberation_fob_resources;
|
||||
_KP_liberation_supplies_global_old = KP_liberation_supplies_global;
|
||||
_KP_liberation_ammo_global_old = KP_liberation_ammo_global;
|
||||
_KP_liberation_fuel_global_old = KP_liberation_fuel_global;
|
||||
_unitcap_old = unitcap;
|
||||
_KP_liberation_heli_count_old = KP_liberation_heli_count;
|
||||
_KP_liberation_plane_count_old = KP_liberation_plane_count;
|
||||
_KP_liberation_heli_slots_old = KP_liberation_heli_slots;
|
||||
_KP_liberation_plane_slots_old = KP_liberation_plane_slots;
|
||||
_combat_readiness_old = combat_readiness;
|
||||
_resources_intel_old = resources_intel;
|
||||
_infantry_cap_old = infantry_cap;
|
||||
_KP_liberation_civ_rep_old = KP_liberation_civ_rep;
|
||||
_KP_liberation_guerilla_strength_old = KP_liberation_guerilla_strength;
|
||||
_infantry_weight_old = infantry_weight;
|
||||
_armor_weight_old = armor_weight;
|
||||
_air_weight_old = air_weight;
|
||||
};
|
||||
@@ -0,0 +1,61 @@
|
||||
waitUntil {!isNil "huron_typename"};
|
||||
|
||||
// Classnames of objects which should be added as editable for Zeus
|
||||
private _vehicleClassnames = [toLower huron_typename];
|
||||
{
|
||||
_vehicleClassnames append _x;
|
||||
} forEach [
|
||||
KPLIB_crates,
|
||||
KPLIB_b_light_classes,
|
||||
KPLIB_b_heavy_classes,
|
||||
KPLIB_b_air_classes,
|
||||
KPLIB_b_static_classes,
|
||||
KPLIB_b_support_classes
|
||||
];
|
||||
if (KP_liberation_enemies_zeus) then {_vehicleClassnames append KPLIB_o_allVeh_classes;};
|
||||
|
||||
private _valids = [];
|
||||
private _toRemove = [];
|
||||
private _toAdd = [];
|
||||
|
||||
while {true} do {
|
||||
waitUntil {sleep 1; !(allCurators isEqualTo [])};
|
||||
|
||||
// Add units
|
||||
_valids = allUnits select {
|
||||
(alive _x) // Alive
|
||||
&& {
|
||||
(KP_liberation_enemies_zeus && {!(side (group _x) isEqualTo GRLIB_side_civilian)}) // Not civilian side, if enemy adding is enabled
|
||||
|| {side (group _x) isEqualTo GRLIB_side_friendly} // Player side if enemy adding is disabled
|
||||
}
|
||||
&& {((str _x) find "BIS_SUPP_HQ_") isEqualTo -1} // Not a HQ entity from support module
|
||||
};
|
||||
|
||||
// Add vehicles
|
||||
_valids append (vehicles select {
|
||||
(alive _x) // Alive
|
||||
&& {
|
||||
((toLower (typeOf _x)) in _vehicleClassnames) // In valid classnames
|
||||
|| (_x getVariable ["KPLIB_captured", false]) // or captured
|
||||
|| (_x getVariable ["KPLIB_seized", false]) // or seized
|
||||
}
|
||||
&& {isNull (attachedTo _x)} // Not attached to something
|
||||
});
|
||||
|
||||
// Add playable units
|
||||
_valids append switchableUnits;
|
||||
_valids append playableUnits;
|
||||
|
||||
{
|
||||
// Remove death or attached units
|
||||
_toRemove = ((curatorEditableObjects _x) select {!(alive _x) || !(isNull (attachedTo _x))});
|
||||
|
||||
// Filter already added units of this curator
|
||||
_toAdd = _valids - (curatorEditableObjects _x);
|
||||
|
||||
// Add and remove units
|
||||
_x addCuratorEditableObjects [_toAdd, true];
|
||||
_x removeCuratorEditableObjects [_toRemove, true];
|
||||
} forEach allCurators;
|
||||
sleep 9;
|
||||
};
|
||||
@@ -0,0 +1,433 @@
|
||||
/*%FSM<COMPILE "C:\Games\steamapps\common\Arma 3 Tools\FSMEditor\scriptedFSM.cfg, KPLIB High Command">*/
|
||||
/*%FSM<HEAD>*/
|
||||
/*
|
||||
item0[] = {"Author__KPLIB_Dev",0,250,0.000000,0.000000,100.000000,50.000000,0.000000,"Author:" \n "KPLIB Dev Team"};
|
||||
item1[] = {"save_and_cmdr_ready",4,218,0.000000,75.000000,100.000000,125.000000,0.000000,"save and" \n "cmdr ready?"};
|
||||
item2[] = {"Init_High_Command",2,250,0.000000,150.000000,100.000000,200.000000,0.000000,"Init" \n "High Command" \n "Module"};
|
||||
item3[] = {"not_server_",4,218,125.000000,0.000000,225.000000,50.000000,2.000000,"not server?"};
|
||||
item4[] = {"Exit",1,250,250.000000,0.000000,350.000000,50.000000,0.000000,"Exit"};
|
||||
item5[] = {"_",8,218,0.000000,375.000000,100.000000,425.000000,0.000000,""};
|
||||
item6[] = {"Wait_for_Command",2,250,0.000000,450.000000,100.000000,500.000000,0.000000,"Wait for" \n "Commander"};
|
||||
item7[] = {"Commander_available",4,218,0.000000,525.000000,100.000000,575.000000,0.000000,"Commander" \n "available?"};
|
||||
item8[] = {"Synchronize_Commander",2,250,0.000000,600.000000,100.000000,650.000000,0.000000,"Synchronize" \n "Commander to" \n "module"};
|
||||
item9[] = {"_",8,218,0.000000,675.000000,100.000000,725.000000,0.000000,""};
|
||||
item10[] = {"Start_High_Command",2,250,0.000000,750.000000,100.000000,800.000000,0.000000,"Start" \n "High Command" \n "sync"};
|
||||
item11[] = {"_",8,218,0.000000,825.000000,100.000000,875.000000,0.000000,""};
|
||||
item12[] = {"Remove_empty_gro",2,250,0.000000,900.000000,100.000000,950.000000,0.000000,"Remove empty" \n "groups"};
|
||||
item13[] = {"_",8,218,0.000000,975.000000,100.000000,1025.000000,0.000000,""};
|
||||
item14[] = {"Add_new_groups",2,250,0.000000,1050.000000,100.000000,1100.000000,0.000000,"Add new groups"};
|
||||
item15[] = {"_",8,218,125.000000,750.000000,225.000000,800.000000,0.000000,""};
|
||||
item16[] = {"",7,210,171.000000,1071.000000,179.000000,1079.000000,0.000000,""};
|
||||
item17[] = {"Commander_died_",4,218,-125.000000,450.000000,-25.000000,500.000000,1.000000,"Commander" \n "died?"};
|
||||
item18[] = {"",7,210,-79.000008,1071.000000,-70.999992,1079.000000,0.000000,""};
|
||||
item19[] = {"",7,210,-79.000000,921.000000,-71.000000,929.000000,0.000000,""};
|
||||
item20[] = {"",7,210,-79.000008,771.000000,-70.999992,779.000000,0.000000,""};
|
||||
item21[] = {"",7,210,-79.000000,621.000000,-71.000000,629.000000,0.000000,""};
|
||||
item22[] = {"campaign_finished",4,218,250.000000,450.000000,350.000000,500.000000,1.000000,"campaign" \n "finished?"};
|
||||
item23[] = {"Exit_1",1,250,375.000000,450.000000,475.000000,500.000000,0.000000,"Exit"};
|
||||
item24[] = {"",7,210,296.000000,1071.000000,304.000000,1079.000000,0.000000,""};
|
||||
item25[] = {"MARTA_created_",4,218,0.000000,225.000000,100.000000,275.000000,0.000000,"MARTA" \n "created?"};
|
||||
item26[] = {"Init_MARTA",2,250,0.000000,300.000000,100.000000,350.000000,0.000000,"Init MARTA"};
|
||||
link0[] = {0,1};
|
||||
link1[] = {0,3};
|
||||
link2[] = {1,2};
|
||||
link3[] = {2,25};
|
||||
link4[] = {3,4};
|
||||
link5[] = {5,6};
|
||||
link6[] = {6,7};
|
||||
link7[] = {6,22};
|
||||
link8[] = {7,8};
|
||||
link9[] = {8,9};
|
||||
link10[] = {8,21};
|
||||
link11[] = {9,10};
|
||||
link12[] = {10,11};
|
||||
link13[] = {10,20};
|
||||
link14[] = {11,12};
|
||||
link15[] = {12,13};
|
||||
link16[] = {12,19};
|
||||
link17[] = {13,14};
|
||||
link18[] = {14,16};
|
||||
link19[] = {14,18};
|
||||
link20[] = {15,10};
|
||||
link21[] = {16,15};
|
||||
link22[] = {16,24};
|
||||
link23[] = {17,6};
|
||||
link24[] = {18,19};
|
||||
link25[] = {19,20};
|
||||
link26[] = {20,21};
|
||||
link27[] = {21,17};
|
||||
link28[] = {22,23};
|
||||
link29[] = {24,22};
|
||||
link30[] = {25,26};
|
||||
link31[] = {26,5};
|
||||
globals[] = {0.000000,0,0,0,0,640,480,1,51,6316128,1,-591.886047,787.545105,1145.687378,155.900024,1232,884,1};
|
||||
window[] = {2,-1,-1,-1,-1,889,130,1570,130,3,1250};
|
||||
*//*%FSM</HEAD>*/
|
||||
class FSM
|
||||
{
|
||||
fsmName = "KPLIB High Command";
|
||||
class States
|
||||
{
|
||||
/*%FSM<STATE "Author__KPLIB_Dev">*/
|
||||
class Author__KPLIB_Dev
|
||||
{
|
||||
name = "Author__KPLIB_Dev";
|
||||
itemno = 0;
|
||||
init = /*%FSM<STATEINIT""">*/"// This FSM is part of KP Liberation" \n
|
||||
"// https://github.com/KillahPotatoes/KP-Liberation" \n
|
||||
"// MIT License - http://www.opensource.org/licenses/MIT" \n
|
||||
"" \n
|
||||
"// Local variables" \n
|
||||
"private _grp = createGroup sideLogic;" \n
|
||||
"private _cmdr = objNull;" \n
|
||||
"private _hcGrps = [];" \n
|
||||
"private _newGrps = [];"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "not_server_">*/
|
||||
class not_server_
|
||||
{
|
||||
itemno = 3;
|
||||
priority = 2.000000;
|
||||
to="Exit";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isServer"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "save_and_cmdr_ready">*/
|
||||
class save_and_cmdr_ready
|
||||
{
|
||||
itemno = 1;
|
||||
priority = 0.000000;
|
||||
to="Init_High_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/"_cmdr = [] call KPLIB_fnc_getCommander;"/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNil ""save_is_loaded""" \n
|
||||
"&& {save_is_loaded}" \n
|
||||
"&& {time > 5}" \n
|
||||
"&& {alive _cmdr}"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Init_High_Command">*/
|
||||
class Init_High_Command
|
||||
{
|
||||
name = "Init_High_Command";
|
||||
itemno = 2;
|
||||
init = /*%FSM<STATEINIT""">*/"[""High Command started"", ""HIGHCOMMAND""] call KPLIB_fnc_log;" \n
|
||||
"" \n
|
||||
"// Spawn module" \n
|
||||
"private _module = _grp createUnit [""HighCommand"", [0, 0, 0], [], 0, ""NONE""];" \n
|
||||
"publicVariable ""BIS_HC_mainscope"";" \n
|
||||
"_module synchronizeObjectsAdd [_cmdr];" \n
|
||||
"" \n
|
||||
"// Logging function for the FSM" \n
|
||||
"private _logging = {" \n
|
||||
" if (KP_liberation_highcommand_debug > 0) then {" \n
|
||||
" [format _this, ""HIGHCOMMAND""] call KPLIB_fnc_log;" \n
|
||||
" };" \n
|
||||
"};"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "MARTA_created_">*/
|
||||
class MARTA_created_
|
||||
{
|
||||
itemno = 25;
|
||||
priority = 0.000000;
|
||||
to="Init_MARTA";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!isNil ""BIS_marta_mainscope"""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Exit">*/
|
||||
class Exit
|
||||
{
|
||||
name = "Exit";
|
||||
itemno = 4;
|
||||
init = /*%FSM<STATEINIT""">*/"[" \n
|
||||
" format [""High Command was started on %1"", debug_source]," \n
|
||||
" ""FSM ABORT""" \n
|
||||
"] remoteExecCall [""KPLIB_fnc_log"", 2];"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Wait_for_Command">*/
|
||||
class Wait_for_Command
|
||||
{
|
||||
name = "Wait_for_Command";
|
||||
itemno = 6;
|
||||
init = /*%FSM<STATEINIT""">*/"[""Waiting for Commander""] call _logging;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "campaign_finished">*/
|
||||
class campaign_finished
|
||||
{
|
||||
itemno = 22;
|
||||
priority = 1.000000;
|
||||
to="Exit_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"GRLIB_endgame > 0"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "Commander_available">*/
|
||||
class Commander_available
|
||||
{
|
||||
itemno = 7;
|
||||
priority = 0.000000;
|
||||
to="Synchronize_Commander";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"alive ([] call KPLIB_fnc_getCommander)"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Synchronize_Commander">*/
|
||||
class Synchronize_Commander
|
||||
{
|
||||
name = "Synchronize_Commander";
|
||||
itemno = 8;
|
||||
init = /*%FSM<STATEINIT""">*/"[""Commander alive and gets synchronized""] call _logging;" \n
|
||||
"" \n
|
||||
"if !(([] call KPLIB_fnc_getCommander) in (synchronizedObjects _module)) then {" \n
|
||||
" {" \n
|
||||
" _cmdr hcRemoveGroup _x;" \n
|
||||
" } forEach (hcAllGroups _cmdr);" \n
|
||||
" _module synchronizeObjectsRemove [_cmdr];" \n
|
||||
"" \n
|
||||
" _cmdr = [] call KPLIB_fnc_getCommander;" \n
|
||||
" _module synchronizeObjectsAdd [_cmdr];" \n
|
||||
" _cmdr hcSetGroup [group _cmdr];" \n
|
||||
"};" \n
|
||||
""/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Commander_died_">*/
|
||||
class Commander_died_
|
||||
{
|
||||
itemno = 17;
|
||||
priority = 1.000000;
|
||||
to="Wait_for_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!alive _cmdr"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "_">*/
|
||||
class _
|
||||
{
|
||||
itemno = 9;
|
||||
priority = 0.000000;
|
||||
to="Start_High_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Start_High_Command">*/
|
||||
class Start_High_Command
|
||||
{
|
||||
name = "Start_High_Command";
|
||||
itemno = 10;
|
||||
init = /*%FSM<STATEINIT""">*/"// Get all groups which are currently added to high command" \n
|
||||
"_hcGrps = hcAllGroups _cmdr;" \n
|
||||
"" \n
|
||||
"// Get all groups with at least one member alive" \n
|
||||
"// and not already added to high command" \n
|
||||
"_newGrps = allGroups select {" \n
|
||||
" (side _x) isEqualTo GRLIB_side_friendly" \n
|
||||
" && {!(_x in _hcGrps)}" \n
|
||||
" && {!(((units _x) select {alive _x}) isEqualTo [])}" \n
|
||||
" && {!(_cmdr in (units _x))}" \n
|
||||
" && {(((units _x) apply {str _x}) findIf {_x find ""BIS_SUPP_HQ_"" != -1}) isEqualTo -1}" \n
|
||||
"};"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Commander_died_">*/
|
||||
class Commander_died_
|
||||
{
|
||||
itemno = 17;
|
||||
priority = 1.000000;
|
||||
to="Wait_for_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!alive _cmdr"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "_">*/
|
||||
class _
|
||||
{
|
||||
itemno = 11;
|
||||
priority = 0.000000;
|
||||
to="Remove_empty_gro";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Remove_empty_gro">*/
|
||||
class Remove_empty_gro
|
||||
{
|
||||
name = "Remove_empty_gro";
|
||||
itemno = 12;
|
||||
init = /*%FSM<STATEINIT""">*/"{" \n
|
||||
" _cmdr hcRemoveGroup _x;" \n
|
||||
"} forEach (_hcGrps select {" \n
|
||||
" ((units _x) findIf {alive _x}) == -1" \n
|
||||
" || {_cmdr in (units _x)}" \n
|
||||
" || {(((units _x) apply {str _x}) findIf {_x find ""BIS_SUPP_HQ_"" != -1}) != -1}" \n
|
||||
"});"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Commander_died_">*/
|
||||
class Commander_died_
|
||||
{
|
||||
itemno = 17;
|
||||
priority = 1.000000;
|
||||
to="Wait_for_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!alive _cmdr"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "_">*/
|
||||
class _
|
||||
{
|
||||
itemno = 13;
|
||||
priority = 0.000000;
|
||||
to="Add_new_groups";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Add_new_groups">*/
|
||||
class Add_new_groups
|
||||
{
|
||||
name = "Add_new_groups";
|
||||
itemno = 14;
|
||||
init = /*%FSM<STATEINIT""">*/"{" \n
|
||||
" _cmdr hcSetGroup [_x];" \n
|
||||
"} forEach _newGrps;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "Commander_died_">*/
|
||||
class Commander_died_
|
||||
{
|
||||
itemno = 17;
|
||||
priority = 1.000000;
|
||||
to="Wait_for_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"!alive _cmdr"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "campaign_finished">*/
|
||||
class campaign_finished
|
||||
{
|
||||
itemno = 22;
|
||||
priority = 1.000000;
|
||||
to="Exit_1";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/"GRLIB_endgame > 0"/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
/*%FSM<LINK "_">*/
|
||||
class _
|
||||
{
|
||||
itemno = 15;
|
||||
priority = 0.000000;
|
||||
to="Start_High_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Exit_1">*/
|
||||
class Exit_1
|
||||
{
|
||||
name = "Exit_1";
|
||||
itemno = 23;
|
||||
init = /*%FSM<STATEINIT""">*/"[""High Command exited due to finished campaign""] call _logging;"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
/*%FSM<STATE "Init_MARTA">*/
|
||||
class Init_MARTA
|
||||
{
|
||||
name = "Init_MARTA";
|
||||
itemno = 26;
|
||||
init = /*%FSM<STATEINIT""">*/"// Set MARTA rules again, otherwise all groups are cyan on dedicated" \n
|
||||
"// This is caused by the fact that BIS_fnc_sidecolor returns always" \n
|
||||
"// [0,1,1,0.8] on dedicated server." \n
|
||||
"// e.g. [west] call BIS_fnc_sidecolor returns [0,1,1,0.8]" \n
|
||||
"// As this is used in modules_f\marta\data\scripts\main.sqf it causes" \n
|
||||
"// the issue on dedicated servers, if using that module." \n
|
||||
"BIS_marta_mainscope setvariable [""rules""," \n
|
||||
"[" \n
|
||||
" [""o_"", [[0.5, 0, 0, 1], [0, 0.3, 0.6, 1]] select (GRLIB_side_enemy isEqualTo west)]," \n
|
||||
" [""b_"", [[0.5, 0, 0, 1], [0, 0.3, 0.6, 1]] select (GRLIB_side_friendly isEqualTo west)]," \n
|
||||
" [""n_"", [0, 0.5, 0, 1]]," \n
|
||||
" [""n_"", [0.4, 0, 0.5, 1]]" \n
|
||||
"], true];"/*%FSM</STATEINIT""">*/;
|
||||
precondition = /*%FSM<STATEPRECONDITION""">*/""/*%FSM</STATEPRECONDITION""">*/;
|
||||
class Links
|
||||
{
|
||||
/*%FSM<LINK "_">*/
|
||||
class _
|
||||
{
|
||||
itemno = 5;
|
||||
priority = 0.000000;
|
||||
to="Wait_for_Command";
|
||||
precondition = /*%FSM<CONDPRECONDITION""">*/""/*%FSM</CONDPRECONDITION""">*/;
|
||||
condition=/*%FSM<CONDITION""">*/""/*%FSM</CONDITION""">*/;
|
||||
action=/*%FSM<ACTION""">*/""/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
};
|
||||
};
|
||||
/*%FSM</STATE>*/
|
||||
};
|
||||
initState="Author__KPLIB_Dev";
|
||||
finalStates[] =
|
||||
{
|
||||
"Exit",
|
||||
"Exit_1",
|
||||
};
|
||||
};
|
||||
/*%FSM</COMPILE>*/
|
||||
128
kp_liberation.brf_sumava/scripts/server/init_server.sqf
Normal file
128
kp_liberation.brf_sumava/scripts/server/init_server.sqf
Normal file
@@ -0,0 +1,128 @@
|
||||
// AI
|
||||
add_civ_waypoints = compileFinal preprocessFileLineNumbers "scripts\server\ai\add_civ_waypoints.sqf";
|
||||
add_defense_waypoints = compileFinal preprocessFileLineNumbers "scripts\server\ai\add_defense_waypoints.sqf";
|
||||
battlegroup_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\battlegroup_ai.sqf";
|
||||
building_defence_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\building_defence_ai.sqf";
|
||||
patrol_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\patrol_ai.sqf";
|
||||
prisonner_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\prisonner_ai.sqf";
|
||||
troup_transport = compileFinal preprocessFileLineNumbers "scripts\server\ai\troup_transport.sqf";
|
||||
|
||||
// Battlegroup
|
||||
spawn_air = compileFinal preprocessFileLineNumbers "scripts\server\battlegroup\spawn_air.sqf";
|
||||
spawn_battlegroup = compileFinal preprocessFileLineNumbers "scripts\server\battlegroup\spawn_battlegroup.sqf";
|
||||
|
||||
// Game
|
||||
check_victory_conditions = compileFinal preprocessFileLineNumbers "scripts\server\game\check_victory_conditions.sqf";
|
||||
|
||||
// Patrol
|
||||
manage_one_civilian_patrol = compileFinal preprocessFileLineNumbers "scripts\server\patrols\manage_one_civilian_patrol.sqf";
|
||||
manage_one_patrol = compileFinal preprocessFileLineNumbers "scripts\server\patrols\manage_one_patrol.sqf";
|
||||
reinforcements_manager = compileFinal preprocessFileLineNumbers "scripts\server\patrols\reinforcements_manager.sqf";
|
||||
send_paratroopers = compileFinal preprocessFileLineNumbers "scripts\server\patrols\send_paratroopers.sqf";
|
||||
|
||||
// Secondary objectives
|
||||
fob_hunting = compileFinal preprocessFileLineNumbers "scripts\server\secondary\fob_hunting.sqf";
|
||||
convoy_hijack = compileFinal preprocessFileLineNumbers "scripts\server\secondary\convoy_hijack.sqf";
|
||||
search_and_rescue = compileFinal preprocessFileLineNumbers "scripts\server\secondary\search_and_rescue.sqf";
|
||||
|
||||
// Sector
|
||||
attack_in_progress_fob = compileFinal preprocessFileLineNumbers "scripts\server\sector\attack_in_progress_fob.sqf";
|
||||
attack_in_progress_sector = compileFinal preprocessFileLineNumbers "scripts\server\sector\attack_in_progress_sector.sqf";
|
||||
ied_manager = compileFinal preprocessFileLineNumbers "scripts\server\sector\ied_manager.sqf";
|
||||
manage_one_sector = compileFinal preprocessFileLineNumbers "scripts\server\sector\manage_one_sector.sqf";
|
||||
wait_to_spawn_sector = compileFinal preprocessFileLineNumbers "scripts\server\sector\wait_to_spawn_sector.sqf";
|
||||
|
||||
// Globals
|
||||
active_sectors = []; publicVariable "active_sectors";
|
||||
|
||||
execVM "scripts\server\base\startgame.sqf";
|
||||
execVM "scripts\server\base\huron_manager.sqf";
|
||||
execVM "scripts\server\base\startvehicle_spawn.sqf";
|
||||
[] call KPLIB_fnc_createSuppModules;
|
||||
execVM "scripts\server\battlegroup\counter_battlegroup.sqf";
|
||||
execVM "scripts\server\battlegroup\random_battlegroups.sqf";
|
||||
execVM "scripts\server\battlegroup\readiness_increase.sqf";
|
||||
execVM "scripts\server\game\apply_default_permissions.sqf";
|
||||
execVM "scripts\server\game\cleanup_vehicles.sqf";
|
||||
if (!KP_liberation_fog_param) then {execVM "scripts\server\game\fucking_set_fog.sqf";};
|
||||
execVM "scripts\server\game\manage_time.sqf";
|
||||
execVM "scripts\server\game\manage_weather.sqf";
|
||||
execVM "scripts\server\game\playtime.sqf";
|
||||
execVM "scripts\server\game\save_manager.sqf";
|
||||
execVM "scripts\server\game\spawn_radio_towers.sqf";
|
||||
execVM "scripts\server\game\synchronise_vars.sqf";
|
||||
execVM "scripts\server\game\synchronise_eco.sqf";
|
||||
execVM "scripts\server\game\zeus_synchro.sqf";
|
||||
execVM "scripts\server\offloading\show_fps.sqf";
|
||||
execVM "scripts\server\patrols\civilian_patrols.sqf";
|
||||
execVM "scripts\server\patrols\manage_patrols.sqf";
|
||||
execVM "scripts\server\patrols\reinforcements_resetter.sqf";
|
||||
if (KP_liberation_ailogistics) then {execVM "scripts\server\resources\manage_logistics.sqf";};
|
||||
execVM "scripts\server\resources\manage_resources.sqf";
|
||||
execVM "scripts\server\resources\recalculate_resources.sqf";
|
||||
execVM "scripts\server\resources\recalculate_timer.sqf";
|
||||
execVM "scripts\server\resources\recalculate_timer_sector.sqf";
|
||||
execVM "scripts\server\resources\unit_cap.sqf";
|
||||
execVM "scripts\server\sector\lose_sectors.sqf";
|
||||
|
||||
KPLIB_fsm_sectorMonitor = [] call KPLIB_fnc_sectorMonitor;
|
||||
if (KP_liberation_high_command) then {KPLIB_fsm_highcommand = [] call KPLIB_fnc_highcommand;};
|
||||
|
||||
// Select FOB templates
|
||||
switch (KP_liberation_preset_opfor) do {
|
||||
case 1: {
|
||||
KPLIB_fob_templates = [
|
||||
"scripts\fob_templates\apex\template1.sqf",
|
||||
"scripts\fob_templates\apex\template2.sqf",
|
||||
"scripts\fob_templates\apex\template3.sqf",
|
||||
"scripts\fob_templates\apex\template4.sqf",
|
||||
"scripts\fob_templates\apex\template5.sqf"
|
||||
];
|
||||
};
|
||||
case 12: {
|
||||
KPLIB_fob_templates = [
|
||||
"scripts\fob_templates\unsung\template1.sqf",
|
||||
"scripts\fob_templates\unsung\template2.sqf",
|
||||
"scripts\fob_templates\unsung\template3.sqf",
|
||||
"scripts\fob_templates\unsung\template4.sqf",
|
||||
"scripts\fob_templates\unsung\template5.sqf"
|
||||
];
|
||||
};
|
||||
default {
|
||||
KPLIB_fob_templates = [
|
||||
"scripts\fob_templates\default\template1.sqf",
|
||||
"scripts\fob_templates\default\template2.sqf",
|
||||
"scripts\fob_templates\default\template3.sqf",
|
||||
"scripts\fob_templates\default\template4.sqf",
|
||||
"scripts\fob_templates\default\template5.sqf",
|
||||
"scripts\fob_templates\default\template6.sqf",
|
||||
"scripts\fob_templates\default\template7.sqf",
|
||||
"scripts\fob_templates\default\template8.sqf",
|
||||
"scripts\fob_templates\default\template9.sqf",
|
||||
"scripts\fob_templates\default\template10.sqf"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
// Civil Reputation
|
||||
execVM "scripts\server\civrep\init_module.sqf";
|
||||
|
||||
// Civil Informant
|
||||
execVM "scripts\server\civinformant\init_module.sqf";
|
||||
|
||||
// Asymmetric Threats
|
||||
execVM "scripts\server\asymmetric\init_module.sqf";
|
||||
|
||||
// Groupcheck for deletion when empty
|
||||
execVM "scripts\server\offloading\group_diag.sqf";
|
||||
|
||||
{
|
||||
if ((_x != player) && (_x distance (markerPos GRLIB_respawn_marker) < 200 )) then {
|
||||
deleteVehicle _x;
|
||||
};
|
||||
} forEach allUnits;
|
||||
|
||||
// Server Restart Script from K4s0
|
||||
if (KP_liberation_restart > 0) then {
|
||||
execVM "scripts\server\game\server_restart.sqf";
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
waitUntil {sleep 1; !isNil "active_sectors"};
|
||||
|
||||
while {true} do {
|
||||
uiSleep 600;
|
||||
private _markedgroups = 0;
|
||||
{
|
||||
private _groupOwner = groupOwner _x;
|
||||
private _owner = "Server";
|
||||
|
||||
if (_groupOwner != 2) then {
|
||||
_owner = name ((allPlayers select {_groupOwner == (owner _x)}) select 0);
|
||||
};
|
||||
|
||||
if !(isNil "_owner") then {
|
||||
if !(isGroupDeletedWhenEmpty _x) then {
|
||||
if (local _x) then {
|
||||
_x deleteGroupWhenEmpty true;
|
||||
} else {
|
||||
[_x, true] remoteExec ["deleteGroupWhenEmpty", groupOwner _x];
|
||||
};
|
||||
_markedgroups = _markedgroups + 1;
|
||||
};
|
||||
};
|
||||
} forEach allGroups;
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
add_civ_waypoints = compileFinal preprocessFileLineNumbers "scripts\server\ai\add_civ_waypoints.sqf";
|
||||
add_defense_waypoints = compileFinal preprocessFileLineNumbers "scripts\server\ai\add_defense_waypoints.sqf";
|
||||
battlegroup_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\battlegroup_ai.sqf";
|
||||
building_defence_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\building_defence_ai.sqf";
|
||||
patrol_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\patrol_ai.sqf";
|
||||
prisonner_ai = compileFinal preprocessFileLineNumbers "scripts\server\ai\prisonner_ai.sqf";
|
||||
troup_transport = compileFinal preprocessFileLineNumbers "scripts\server\ai\troup_transport.sqf";
|
||||
|
||||
ied_manager = compileFinal preprocessFileLineNumbers "scripts\server\sector\ied_manager.sqf";
|
||||
manage_one_sector = compileFinal preprocessFileLineNumbers "scripts\server\sector\manage_one_sector.sqf";
|
||||
wait_to_spawn_sector = compileFinal preprocessFileLineNumbers "scripts\server\sector\wait_to_spawn_sector.sqf";
|
||||
manage_asymIED = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\ied\manage_asymIED.sqf";
|
||||
sector_guerilla = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\sector_guerilla.sqf";
|
||||
asym_sector_ambush = compileFinal preprocessFileLineNumbers "scripts\server\asymmetric\random\asym_sector_ambush.sqf";
|
||||
civinfo_task = compileFinal preprocessFileLineNumbers "scripts\server\civinformant\tasks\civinfo_task.sqf";
|
||||
|
||||
execVM "scripts\client\misc\synchronise_vars.sqf";
|
||||
execVM "scripts\client\misc\synchronise_eco.sqf";
|
||||
execVM "scripts\server\offloading\show_fps.sqf";
|
||||
@@ -0,0 +1,51 @@
|
||||
private _sourcestr = "Server";
|
||||
private _position = 0;
|
||||
|
||||
if (!isServer) then {
|
||||
if (!isNil "HC1") then {
|
||||
if (!isNull HC1) then {
|
||||
if (local HC1) then {
|
||||
_sourcestr = "HC1";
|
||||
_position = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!isNil "HC2") then {
|
||||
if (!isNull HC2) then {
|
||||
if (local HC2) then {
|
||||
_sourcestr = "HC2";
|
||||
_position = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if (!isNil "HC3") then {
|
||||
if (!isNull HC3) then {
|
||||
if (local HC3) then {
|
||||
_sourcestr = "HC3";
|
||||
_position = 3;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
private _myfpsmarker = createMarker [format ["fpsmarker%1", _sourcestr], [0, -500 - (500 * _position)]];
|
||||
_myfpsmarker setMarkerType "mil_start";
|
||||
_myfpsmarker setMarkerSize [0.7, 0.7];
|
||||
|
||||
while {true} do {
|
||||
|
||||
private _myfps = diag_fps;
|
||||
private _localgroups = {local _x} count allGroups;
|
||||
private _localunits = {local _x} count allUnits;
|
||||
|
||||
_myfpsmarker setMarkerColor "ColorGREEN";
|
||||
if (_myfps < 30) then {_myfpsmarker setMarkerColor "ColorYELLOW";};
|
||||
if (_myfps < 20) then {_myfpsmarker setMarkerColor "ColorORANGE";};
|
||||
if (_myfps < 10) then {_myfpsmarker setMarkerColor GRLIB_color_enemy_bright;};
|
||||
|
||||
_myfpsmarker setMarkerText format ["%1: %2 fps, %3 local groups, %4 local units", _sourcestr, (round (_myfps * 100.0)) / 100.0, _localgroups, _localunits];
|
||||
|
||||
sleep 15;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
if ( GRLIB_civilian_activity > 0 ) then {
|
||||
for [ {_i=0}, {_i < GRLIB_civilians_amount}, {_i=_i+1} ] do { [] spawn manage_one_civilian_patrol };
|
||||
};
|
||||
@@ -0,0 +1,120 @@
|
||||
private [ "_spawnsector", "_grp", "_usable_sectors", "_spawntype", "_civnumber", "_vehdriver", "_spawnpos", "_civveh", "_sectors_patrol",
|
||||
"_patrol_startpos", "_waypoint", "_grpspeed", "_sectors_patrol_random", "_sectorcount", "_nextsector", "_nearestroad" ];
|
||||
|
||||
_civveh = objNull;
|
||||
|
||||
sleep (150 + (random 150));
|
||||
_spawnsector = "";
|
||||
|
||||
if ( isNil "active_sectors" ) then { active_sectors = [] };
|
||||
|
||||
while { GRLIB_endgame == 0 } do {
|
||||
|
||||
_spawnsector = "";
|
||||
_usable_sectors = [];
|
||||
{
|
||||
if ((([markerPos _x, 1000, GRLIB_side_friendly] call KPLIB_fnc_getUnitsCount) == 0) && (count ([markerPos _x, 3500] call KPLIB_fnc_getNearbyPlayers) > 0)) then {
|
||||
_usable_sectors pushback _x;
|
||||
}
|
||||
|
||||
} foreach ((sectors_bigtown + sectors_capture + sectors_factory) - (active_sectors));
|
||||
|
||||
if ( count _usable_sectors > 0 ) then {
|
||||
_spawnsector = selectRandom _usable_sectors;
|
||||
|
||||
_grp = createGroup [GRLIB_side_civilian, true];
|
||||
if ( random 100 < 33) then {
|
||||
_civnumber = 1 + (floor (random 2));
|
||||
while { count units _grp < _civnumber } do {
|
||||
[selectRandom civilians, markerPos _spawnsector, _grp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
};
|
||||
_grpspeed = "LIMITED";
|
||||
} else {
|
||||
|
||||
_nearestroad = objNull;
|
||||
while { isNull _nearestroad } do {
|
||||
_nearestroad = [(markerPos (_spawnsector)) getPos [random (100), random (360)], 200, []] call BIS_fnc_nearestRoad;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
_spawnpos = getpos _nearestroad;
|
||||
|
||||
[selectRandom civilians, _spawnpos, _grp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
_civveh = (selectRandom civilian_vehicles) createVehicle _spawnpos;
|
||||
_civveh setpos _spawnpos;
|
||||
_civveh addMPEventHandler ['MPKilled', {_this spawn kill_manager}];
|
||||
_civveh addEventHandler ["HandleDamage", { private [ "_damage" ]; if (( side (_this select 3) != GRLIB_side_friendly ) && ( side (_this select 3) != GRLIB_side_enemy )) then { _damage = 0 } else { _damage = _this select 2 }; _damage } ];
|
||||
((units _grp) select 0) moveInDriver _civveh;
|
||||
((units _grp) select 0) disableAI "FSM";
|
||||
((units _grp) select 0) disableAI "AUTOCOMBAT";
|
||||
_grpspeed = "LIMITED";
|
||||
|
||||
};
|
||||
|
||||
{ _x addEventHandler ["HandleDamage", { private [ "_damage" ]; if (( side (_this select 3) != GRLIB_side_friendly ) && ( side (_this select 3) != GRLIB_side_enemy )) then { _damage = 0 } else { _damage = _this select 2 }; _damage } ]; } foreach units _grp;
|
||||
|
||||
_sectors_patrol = [];
|
||||
_patrol_startpos = getpos (leader _grp);
|
||||
{
|
||||
if ((_patrol_startpos distance (markerpos _x) < 5000) && (count ([markerPos _x, 4000] call KPLIB_fnc_getNearbyPlayers) > 0)) then {
|
||||
_sectors_patrol pushback _x;
|
||||
};
|
||||
} foreach (sectors_bigtown + sectors_capture + sectors_factory);
|
||||
|
||||
_sectors_patrol_random = [];
|
||||
_sectorcount = count _sectors_patrol;
|
||||
while { count _sectors_patrol_random < _sectorcount } do {
|
||||
_nextsector = selectRandom _sectors_patrol;
|
||||
_sectors_patrol_random pushback _nextsector;
|
||||
_sectors_patrol = _sectors_patrol - [_nextsector];
|
||||
|
||||
};
|
||||
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow leader _grp} foreach units _grp;
|
||||
|
||||
{
|
||||
_nearestroad = [(markerPos _x) getPos [random(100), random(360)], 200, []] call BIS_fnc_nearestRoad;
|
||||
if ( isNull _nearestroad ) then {
|
||||
_waypoint = _grp addWaypoint [ markerpos _x, 100 ];
|
||||
} else {
|
||||
_waypoint = _grp addWaypoint [ getpos _nearestroad, 0 ];
|
||||
};
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed _grpspeed;
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
} foreach _sectors_patrol_random;
|
||||
|
||||
_waypoint = _grp addWaypoint [_patrol_startpos , 100];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
if ( local _grp ) then {
|
||||
_headless_client = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
if ( !isNull _headless_client ) then {
|
||||
_grp setGroupOwner ( owner _headless_client );
|
||||
};
|
||||
};
|
||||
|
||||
waitUntil {
|
||||
sleep (30 + (random 30));
|
||||
((({alive _x} count (units _grp)) == 0) || (count ([getpos leader _grp, 4000] call KPLIB_fnc_getNearbyPlayers) == 0))
|
||||
};
|
||||
|
||||
if ( count (units _grp) > 0 ) then {
|
||||
if (count ([getpos leader _grp, 4000] call KPLIB_fnc_getNearbyPlayers) == 0) then {
|
||||
|
||||
if ( !(isNull _civveh) ) then {
|
||||
if ( { ( alive _x ) && (side group _x == GRLIB_side_friendly ) } count (crew _civveh) == 0 ) then {
|
||||
deleteVehicle _civveh
|
||||
};
|
||||
};
|
||||
|
||||
{ deletevehicle _x } foreach units _grp;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
sleep 150 + (random (150));
|
||||
};
|
||||
@@ -0,0 +1,83 @@
|
||||
params [ "_minimum_readiness", "_is_infantry" ];
|
||||
private [ "_headless_client" ];
|
||||
|
||||
waitUntil { !isNil "blufor_sectors" };
|
||||
waitUntil { !isNil "combat_readiness" };
|
||||
|
||||
while { GRLIB_endgame == 0 } do {
|
||||
waitUntil { sleep 0.3; count blufor_sectors >= 3; };
|
||||
waitUntil { sleep 0.3; combat_readiness >= (_minimum_readiness / GRLIB_difficulty_modifier); };
|
||||
|
||||
sleep (random 30);
|
||||
|
||||
while { [] call KPLIB_fnc_getOpforCap > GRLIB_patrol_cap } do {
|
||||
sleep (random 30);
|
||||
};
|
||||
|
||||
_grp = grpNull;
|
||||
|
||||
_spawn_marker = "";
|
||||
while { _spawn_marker == "" } do {
|
||||
_spawn_marker = [2000,5000,true] call KPLIB_fnc_getOpforSpawnPoint;
|
||||
if ( _spawn_marker == "" ) then {
|
||||
sleep (150 + (random 150));
|
||||
};
|
||||
};
|
||||
|
||||
_sector_spawn_pos = [(((markerpos _spawn_marker) select 0) - 500) + (random 1000),(((markerpos _spawn_marker) select 1) - 500) + (random 1000),0];
|
||||
|
||||
if (_is_infantry) then {
|
||||
_grp = createGroup [GRLIB_side_enemy, true];
|
||||
_squad = [] call KPLIB_fnc_getSquadComp;
|
||||
{
|
||||
[_x, _sector_spawn_pos, _grp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
} foreach _squad;
|
||||
} else {
|
||||
|
||||
private [ "_vehicle_object" ];
|
||||
if ((combat_readiness > 75) && ((random 100) > 85) && !(opfor_choppers isEqualTo [])) then {
|
||||
_vehicle_object = [_sector_spawn_pos, selectRandom opfor_choppers] call KPLIB_fnc_spawnVehicle;
|
||||
} else {
|
||||
_vehicle_object = [_sector_spawn_pos, [] call KPLIB_fnc_getAdaptiveVehicle] call KPLIB_fnc_spawnVehicle;
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
_grp = group ((crew _vehicle_object) select 0);
|
||||
};
|
||||
|
||||
[_grp] spawn patrol_ai;
|
||||
|
||||
_started_time = time;
|
||||
_patrol_continue = true;
|
||||
|
||||
if ( local _grp ) then {
|
||||
_headless_client = [] call KPLIB_fnc_getLessLoadedHC;
|
||||
if ( !isNull _headless_client ) then {
|
||||
_grp setGroupOwner ( owner _headless_client );
|
||||
};
|
||||
};
|
||||
|
||||
while { _patrol_continue } do {
|
||||
sleep 60;
|
||||
if ( count (units _grp) == 0 ) then {
|
||||
_patrol_continue = false;
|
||||
} else {
|
||||
if ( time - _started_time > 900 ) then {
|
||||
if ( [ getpos (leader _grp) , 4000 , GRLIB_side_friendly ] call KPLIB_fnc_getUnitsCount == 0 ) then {
|
||||
_patrol_continue = false;
|
||||
{
|
||||
if ( vehicle _x != _x ) then {
|
||||
[(vehicle _x)] call KPLIB_fnc_cleanOpforVehicle;
|
||||
};
|
||||
deleteVehicle _x;
|
||||
} foreach (units _grp);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
if ( !([] call KPLIB_fnc_isBigtownActive) ) then {
|
||||
sleep (600.0 / GRLIB_difficulty_modifier);
|
||||
};
|
||||
|
||||
};
|
||||
@@ -0,0 +1,24 @@
|
||||
_combat_triggers = [20,40,50,65,80,95];
|
||||
if ( GRLIB_unitcap < 0.9 ) then { _combat_triggers = [20,45,90]; };
|
||||
if ( GRLIB_unitcap > 1.3 ) then { _combat_triggers = [15,25,40,65,75,85,95]; };
|
||||
|
||||
_combat_triggers_infantry = [15,35,45,60,70,85];
|
||||
if ( GRLIB_unitcap < 0.9 ) then { _combat_triggers_infantry = [15,40,80]; };
|
||||
if ( GRLIB_unitcap > 1.3 ) then { _combat_triggers_infantry = [10,20,35,55,70,80,90]; };
|
||||
|
||||
sleep 5;
|
||||
|
||||
waitUntil { sleep 0.3; !isNil "blufor_sectors" };
|
||||
waitUntil { sleep 0.3; count blufor_sectors > 3 };
|
||||
|
||||
if (worldName != "song_bin_tanh") then {
|
||||
{
|
||||
[_x, false] spawn manage_one_patrol;
|
||||
sleep 1;
|
||||
} foreach _combat_triggers;
|
||||
};
|
||||
|
||||
{
|
||||
[_x, true] spawn manage_one_patrol;
|
||||
sleep 1;
|
||||
} foreach _combat_triggers_infantry;
|
||||
@@ -0,0 +1,39 @@
|
||||
params ["_targetsector"];
|
||||
|
||||
if (combat_readiness > 15) then {
|
||||
|
||||
private _init_units_count = (([markerPos _targetsector, GRLIB_capture_size, GRLIB_side_enemy] call KPLIB_fnc_getUnitsCount));
|
||||
|
||||
if !(_targetsector in sectors_bigtown) then {
|
||||
while {(_init_units_count * 0.75) <= ([markerPos _targetsector, GRLIB_capture_size, GRLIB_side_enemy] call KPLIB_fnc_getUnitsCount)} do {
|
||||
sleep 5;
|
||||
};
|
||||
};
|
||||
|
||||
if (_targetsector in active_sectors) then {
|
||||
|
||||
private _nearestower = [markerpos _targetsector, GRLIB_side_enemy, GRLIB_radiotower_size * 1.4] call KPLIB_fnc_getNearestTower;
|
||||
|
||||
if !(isNil "_nearestower") then {
|
||||
private _reinforcements_time = (((((markerpos _nearestower) distance (markerpos _targetsector)) / 1000) ^ 1.66 ) * 120) / (GRLIB_difficulty_modifier * GRLIB_csat_aggressivity);
|
||||
if (_targetsector in sectors_bigtown) then {
|
||||
_reinforcements_time = _reinforcements_time * 0.35;
|
||||
};
|
||||
private _current_timer = time;
|
||||
|
||||
waitUntil {sleep 1; (_current_timer + _reinforcements_time < time) || (_targetsector in blufor_sectors) || (_nearestower in blufor_sectors)};
|
||||
|
||||
sleep 15;
|
||||
|
||||
if ((_targetsector in active_sectors) && !(_targetsector in blufor_sectors) && !(_nearestower in blufor_sectors) && (!([] call KPLIB_fnc_isBigtownActive) || _targetsector in sectors_bigtown)) then {
|
||||
reinforcements_sector_under_attack = _targetsector;
|
||||
reinforcements_set = true;
|
||||
["lib_reinforcements",[markertext _targetsector]] remoteExec ["bis_fnc_shownotification"];
|
||||
if ((random combat_readiness) > (20 + (30 / GRLIB_csat_aggressivity))) then {
|
||||
[_targetsector] spawn send_paratroopers;
|
||||
};
|
||||
stats_reinforcements_called = stats_reinforcements_called + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,16 @@
|
||||
_reset_time = 1800;
|
||||
|
||||
reinforcements_set = false;
|
||||
|
||||
while { true } do {
|
||||
|
||||
waitUntil { sleep 0.3; reinforcements_set };
|
||||
reinforcements_set = false;
|
||||
|
||||
_localtime = time;
|
||||
|
||||
waitUntil { sleep 0.3; ( time > ( _localtime + _reset_time ) ) || reinforcements_set };
|
||||
|
||||
if ( !reinforcements_set && !([] call KPLIB_fnc_isBigtownActive) ) then { reinforcements_sector_under_attack = ""; }
|
||||
|
||||
};
|
||||
@@ -0,0 +1,140 @@
|
||||
params [
|
||||
["_targetsector", "", ["",[]]],
|
||||
["_chopper_type", objNull, [objNull]]
|
||||
];
|
||||
|
||||
if (_targetsector isEqualTo "" || opfor_choppers isEqualTo []) exitWith {false};
|
||||
|
||||
private _targetpos = _targetsector;
|
||||
if (_targetpos isEqualType "") then {
|
||||
_targetpos = markerPos _targetsector;
|
||||
};
|
||||
private _spawnsector = ([sectors_airspawn, [_targetpos], {(markerpos _x) distance _input0}, "ASCEND"] call BIS_fnc_sortBy) select 0;
|
||||
private _newvehicle = objNull;
|
||||
private _pilot_group = grpNull;
|
||||
if (isNull _chopper_type) then {
|
||||
_chopper_type = selectRandom opfor_choppers;
|
||||
|
||||
while {!(_chopper_type in opfor_troup_transports)} do {
|
||||
_chopper_type = selectRandom opfor_choppers;
|
||||
};
|
||||
|
||||
_newvehicle = createVehicle [_chopper_type, markerpos _spawnsector, [], 0, "FLY"];
|
||||
createVehicleCrew _newvehicle;
|
||||
sleep 0.1;
|
||||
|
||||
_pilot_group = createGroup [GRLIB_side_enemy, true];
|
||||
(crew _newvehicle) joinSilent _pilot_group;
|
||||
|
||||
_newvehicle addMPEventHandler ["MPKilled", {_this spawn kill_manager}];
|
||||
{_x addMPEventHandler ["MPKilled", {_this spawn kill_manager}];} forEach (crew _newvehicle);
|
||||
} else {
|
||||
_newvehicle = _chopper_type;
|
||||
_pilot_group = group _newvehicle;
|
||||
};
|
||||
|
||||
private _para_group = createGroup [GRLIB_side_enemy, true];
|
||||
|
||||
while {(count (units _para_group)) < 8} do {
|
||||
[opfor_paratrooper, markerPos _spawnsector, _para_group] call KPLIB_fnc_createManagedUnit;
|
||||
};
|
||||
|
||||
{removeBackpack _x; _x addBackPack "B_parachute"; _x moveInCargo _newvehicle;} forEach (units _para_group);
|
||||
|
||||
while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
|
||||
while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
|
||||
sleep 0.2;
|
||||
{_x doFollow leader _pilot_group} forEach units _pilot_group;
|
||||
{_x doFollow leader _para_group} forEach units _para_group;
|
||||
sleep 0.2;
|
||||
|
||||
_newvehicle flyInHeight 100;
|
||||
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 25];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "CARELESS";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 25];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "FULL";
|
||||
_waypoint setWaypointBehaviour "CARELESS";
|
||||
_waypoint setWaypointCombatMode "BLUE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 700];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 700];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 700];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 100;
|
||||
_pilot_group setCurrentWaypoint [_pilot_group, 1];
|
||||
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "NORMAL";
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "YELLOW";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
_pilot_group setCurrentWaypoint [_para_group, 1];
|
||||
|
||||
_newvehicle flyInHeight 100;
|
||||
|
||||
waitUntil {sleep 1;
|
||||
!(alive _newvehicle) || (damage _newvehicle > 0.2 ) || (_newvehicle distance _targetpos < 400)
|
||||
};
|
||||
|
||||
_newvehicle flyInHeight 100;
|
||||
|
||||
{
|
||||
unassignVehicle _x;
|
||||
moveout _x;
|
||||
sleep 0.5;
|
||||
} forEach (units _para_group);
|
||||
|
||||
_newvehicle flyInHeight 100;
|
||||
|
||||
sleep 0.2;
|
||||
while {(count (waypoints _pilot_group)) != 0} do {deleteWaypoint ((waypoints _pilot_group) select 0);};
|
||||
while {(count (waypoints _para_group)) != 0} do {deleteWaypoint ((waypoints _para_group) select 0);};
|
||||
sleep 0.2;
|
||||
{_x doFollow leader _pilot_group} foreach units _pilot_group;
|
||||
{_x doFollow leader _para_group} foreach units _para_group;
|
||||
sleep 0.2;
|
||||
|
||||
_newvehicle flyInHeight 100;
|
||||
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 200];
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 200];
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 200];
|
||||
_waypoint setWaypointBehaviour "COMBAT";
|
||||
_waypoint setWaypointCombatMode "RED";
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 200];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _pilot_group addWaypoint [_targetpos, 200];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_pilot_group setCurrentWaypoint [_pilot_group, 1];
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_waypoint = _para_group addWaypoint [_targetpos, 100];
|
||||
_waypoint setWaypointType "SAD";
|
||||
_pilot_group setCurrentWaypoint [_para_group, 1];
|
||||
@@ -0,0 +1,40 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_index", "_clientID"];
|
||||
|
||||
private ["_time","_nextState"];
|
||||
|
||||
logiError = 0;
|
||||
|
||||
if ((((KP_liberation_logistics select _index) select 7) == 0) || (((KP_liberation_logistics select _index) select 7) == 5) || (((KP_liberation_logistics select _index) select 7) == 6)) exitWith {logiError = 1;(localize "STR_LOGISTIC_STANDBY_ERROR") remoteExec ["hint",_clientID]; _clientID publicVariableClient "logiError";};
|
||||
|
||||
switch ((KP_liberation_logistics select _index) select 7) do {
|
||||
case 1;
|
||||
case 3: {
|
||||
_time = ceil (((ceil ((((KP_liberation_logistics select _index) select 6) select 0) / 100)) + (ceil ((((KP_liberation_logistics select _index) select 6) select 1) / 100)) + (ceil ((((KP_liberation_logistics select _index) select 6) select 2) / 100))) / 3);
|
||||
_time = _time + 1;
|
||||
};
|
||||
case 2;
|
||||
case 4: {
|
||||
_time = ceil ((((KP_liberation_logistics select _index) select 2) distance2D ((KP_liberation_logistics select _index) select 3)) / 400);
|
||||
_time = _time - ((KP_liberation_logistics select _index) select 8);
|
||||
|
||||
_time = _time + (ceil (((ceil ((((KP_liberation_logistics select _index) select 6) select 0) / 100)) + (ceil ((((KP_liberation_logistics select _index) select 6) select 1) / 100)) + (ceil ((((KP_liberation_logistics select _index) select 6) select 2) / 100))) / 3));
|
||||
_time = _time + 1;
|
||||
};
|
||||
};
|
||||
|
||||
_nextState = switch ((KP_liberation_logistics select _index) select 7) do {case 1; case 2: {5}; case 3; case 4: {6};};
|
||||
|
||||
KP_liberation_logistics set [_index,[
|
||||
(KP_liberation_logistics select _index) select 0,
|
||||
(KP_liberation_logistics select _index) select 1,
|
||||
(KP_liberation_logistics select _index) select 2,
|
||||
(KP_liberation_logistics select _index) select 3,
|
||||
(KP_liberation_logistics select _index) select 4,
|
||||
(KP_liberation_logistics select _index) select 5,
|
||||
(KP_liberation_logistics select _index) select 6,
|
||||
_nextState,
|
||||
_time,
|
||||
0
|
||||
]];
|
||||
@@ -0,0 +1,16 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
private _newID = [count KP_liberation_logistics] call KPLIB_fnc_getMilitaryId;
|
||||
|
||||
KP_liberation_logistics append [[
|
||||
_newID, // ID
|
||||
0, // Truck Count
|
||||
[0,0,0], // Position Point A
|
||||
[0,0,0], // Position Point B
|
||||
[0,0,0], // Ressource transport count A -> B [S,A,F]
|
||||
[0,0,0], // Ressource transport count B -> A [S,A,F]
|
||||
[0,0,0], // Currently loaded [S,A,F]
|
||||
0, // Status (0 standby, 1 at A, 2 to B, 3 at B, 4 to A, 5 aborting to A, 6 aborting to B)
|
||||
-1, // Time left in current status
|
||||
0 // Special Flag (0 unload, 1 load, 2 no storage, 3 no ressources)
|
||||
]];
|
||||
@@ -0,0 +1,88 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_index", "_nearfob", "_clientID", "_supplies", "_ammo", "_fuel"];
|
||||
|
||||
logiError = 0;
|
||||
|
||||
private _storage_areas = (_nearfob nearobjects GRLIB_fob_range) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
|
||||
if ((count _storage_areas) == 0) exitWith {(localize "STR_LOGISTIC_CANTAFFORD") remoteExec ["hint",_clientID]; logiError = 1; _clientID publicVariableClient "logiError";};
|
||||
|
||||
private _price_s = 100;
|
||||
private _price_a = 0;
|
||||
private _price_f = 100;
|
||||
|
||||
if ((_price_s > _supplies) || (_price_a > _ammo) || (_price_f > _fuel)) exitWith {(localize "STR_LOGISTIC_CANTAFFORD") remoteExec ["hint",_clientID]; logiError = 1; _clientID publicVariableClient "logiError";};
|
||||
|
||||
{
|
||||
|
||||
|
||||
private _storage_positions = [];
|
||||
private _storedCrates = (attachedObjects _x);
|
||||
reverse _storedCrates;
|
||||
|
||||
{
|
||||
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
|
||||
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {
|
||||
if (_price_s > 0) then {
|
||||
if (_crateValue > _price_s) then {
|
||||
_crateValue = _crateValue - _price_s;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_s = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_s = _price_s - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_ammo_crate: {
|
||||
if (_price_a > 0) then {
|
||||
if (_crateValue > _price_a) then {
|
||||
_crateValue = _crateValue - _price_a;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_a = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_a = _price_a - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_fuel_crate: {
|
||||
if (_price_f > 0) then {
|
||||
if (_crateValue > _price_f) then {
|
||||
_crateValue = _crateValue - _price_f;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_f = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_f = _price_f - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach _storedCrates;
|
||||
|
||||
([_x] call KPLIB_fnc_getStoragePositions) params ["_storage_positions"];
|
||||
|
||||
private _area = _x;
|
||||
_i = 0;
|
||||
{
|
||||
_height = [typeOf _x] call KPLIB_fnc_getCrateHeight;
|
||||
detach _x;
|
||||
_x attachTo [_area, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
|
||||
_i = _i + 1;
|
||||
} forEach attachedObjects (_x);
|
||||
|
||||
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
|
||||
|
||||
} forEach _storage_areas;
|
||||
|
||||
please_recalculate = true;
|
||||
|
||||
(KP_liberation_logistics select _index) set [1, ((KP_liberation_logistics select _index) select 1) + 1];
|
||||
@@ -0,0 +1,101 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_sector", "_fac","_clientID"];
|
||||
|
||||
private _tempProduction = +KP_liberation_production;
|
||||
private _checkFor = 0;
|
||||
private _price_s = 100;
|
||||
private _price_a = 100;
|
||||
private _price_f = 100;
|
||||
private _success = false;
|
||||
|
||||
switch (_fac) do {
|
||||
case "supply": {_checkFor = 4;_price_s = 50};
|
||||
case "ammo": {_checkFor = 5;_price_a = 50;};
|
||||
case "fuel": {_checkFor = 6;_price_f = 50;};
|
||||
};
|
||||
|
||||
{
|
||||
if ((_x select 1) == (_sector select 1)) exitWith {
|
||||
if (((_x select 9) >= _price_s) && ((_x select 10) >= _price_a) && ((_x select 11) >= _price_f)) then {
|
||||
stats_supplies_spent = stats_supplies_spent + _price_s;
|
||||
stats_ammo_spent = stats_ammo_spent + _price_a;
|
||||
stats_fuel_spent = stats_fuel_spent + _price_f;
|
||||
|
||||
private _storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], 100];
|
||||
_storage = _storage select {(_x getVariable ["KP_liberation_storage_type",-1]) == 1};
|
||||
if ((count _storage) == 0) exitWith {};
|
||||
_storage = (_storage select 0);
|
||||
private _storedCrates = (attachedObjects _storage);
|
||||
reverse _storedCrates;
|
||||
|
||||
{
|
||||
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
|
||||
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {
|
||||
if (_price_s > 0) then {
|
||||
if (_crateValue > _price_s) then {
|
||||
_crateValue = _crateValue - _price_s;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_s = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_s = _price_s - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_ammo_crate: {
|
||||
if (_price_a > 0) then {
|
||||
if (_crateValue > _price_a) then {
|
||||
_crateValue = _crateValue - _price_a;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_a = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_a = _price_a - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_fuel_crate: {
|
||||
if (_price_f > 0) then {
|
||||
if (_crateValue > _price_f) then {
|
||||
_crateValue = _crateValue - _price_f;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_f = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_f = _price_f - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach _storedCrates;
|
||||
|
||||
private _i = 0;
|
||||
{
|
||||
private _height = [typeOf _x] call KPLIB_fnc_getCrateHeight;
|
||||
detach _x;
|
||||
_x attachTo [_storage, [(KP_liberation_small_storage_positions select _i) select 0, (KP_liberation_small_storage_positions select _i) select 1, _height]];
|
||||
_i = _i + 1;
|
||||
} forEach (attachedObjects _storage);
|
||||
|
||||
_x set [_checkFor, true];
|
||||
private _hint = format [localize "STR_PRODUCTION_FACBUILD_SUCCESS"];
|
||||
_hint remoteExec ["hint",_clientID];
|
||||
_success = true;
|
||||
} else {
|
||||
private _hint = format [localize "STR_PRODUCTION_FACBUILD_ERROR",_price_s,_price_a,_price_f];
|
||||
_hint remoteExec ["hint",_clientID];
|
||||
};
|
||||
};
|
||||
} forEach _tempProduction;
|
||||
|
||||
if (_success) then {
|
||||
KP_liberation_production = +_tempProduction;
|
||||
recalculate_sectors = true;
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params [ "_new_fob", "_create_fob_building" ];
|
||||
private [ "_fob_building", "_fob_pos" ];
|
||||
|
||||
GRLIB_all_fobs pushback _new_fob;
|
||||
publicVariable "GRLIB_all_fobs";
|
||||
|
||||
if ( _create_fob_building ) then {
|
||||
_fob_pos = [ (_new_fob select 0) + 15, (_new_fob select 1) + 2, 0 ];
|
||||
[_fob_pos, 20, true] call KPLIB_fnc_createClearance;
|
||||
_fob_building = FOB_typename createVehicle _fob_pos;
|
||||
_fob_building setpos _fob_pos;
|
||||
_fob_building setVectorUp [0,0,1];
|
||||
[_fob_building] call KPLIB_fnc_addObjectInit;
|
||||
sleep 1;
|
||||
};
|
||||
|
||||
[] spawn KPLIB_fnc_doSave;
|
||||
|
||||
sleep 3;
|
||||
[_new_fob, 0] remoteExec ["remote_call_fob"];
|
||||
|
||||
stats_fobs_built = stats_fobs_built + 1;
|
||||
|
||||
FOB_build_in_progress = false;
|
||||
publicVariable "FOB_build_in_progress";
|
||||
@@ -0,0 +1,91 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_price_s", "_price_a", "_price_f", "_typename", "_localtype", "_storage_areas"];
|
||||
|
||||
if ((_price_s > 0) || (_price_a > 0) || (_price_f > 0)) then {
|
||||
|
||||
stats_supplies_spent = stats_supplies_spent + _price_s;
|
||||
stats_ammo_spent = stats_ammo_spent + _price_a;
|
||||
stats_fuel_spent = stats_fuel_spent + _price_f;
|
||||
|
||||
{
|
||||
private _storage_positions = [];
|
||||
private _storedCrates = (attachedObjects _x);
|
||||
reverse _storedCrates;
|
||||
|
||||
{
|
||||
_crateValue = _x getVariable ["KP_liberation_crate_value",0];
|
||||
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {
|
||||
if (_price_s > 0) then {
|
||||
if (_crateValue > _price_s) then {
|
||||
_crateValue = _crateValue - _price_s;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_s = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_s = _price_s - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_ammo_crate: {
|
||||
if (_price_a > 0) then {
|
||||
if (_crateValue > _price_a) then {
|
||||
_crateValue = _crateValue - _price_a;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_a = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_a = _price_a - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_fuel_crate: {
|
||||
if (_price_f > 0) then {
|
||||
if (_crateValue > _price_f) then {
|
||||
_crateValue = _crateValue - _price_f;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_price_f = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_price_f = _price_f - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach _storedCrates;
|
||||
|
||||
([_x] call KPLIB_fnc_getStoragePositions) params ["_storage_positions"];
|
||||
|
||||
private _area = _x;
|
||||
_i = 0;
|
||||
{
|
||||
_height = [typeOf _x] call KPLIB_fnc_getCrateHeight;
|
||||
detach _x;
|
||||
_x attachTo [_area, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
|
||||
_i = _i + 1;
|
||||
} forEach attachedObjects (_x);
|
||||
|
||||
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
|
||||
|
||||
} forEach _storage_areas;
|
||||
|
||||
if ( _localtype == 8 ) then {
|
||||
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 10;
|
||||
} else {
|
||||
if ( _typename isKindOf "Man" ) then {
|
||||
stats_blufor_soldiers_recruited = stats_blufor_soldiers_recruited + 1;
|
||||
} else {
|
||||
if ( ! ( _typename isKindOf "Building" ) ) then {
|
||||
stats_blufor_vehicles_built = stats_blufor_vehicles_built + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
please_recalculate = true;
|
||||
};
|
||||
@@ -0,0 +1,49 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_price_s", "_price_a", "_price_f", "_storage_areas"];
|
||||
|
||||
if ((_price_s > 0) || (_price_a > 0) || (_price_f > 0)) then {
|
||||
{
|
||||
private _space = 0;
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_space = (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_space = (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_s > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_s / 100) < 1) then {
|
||||
_amount = _price_s;
|
||||
};
|
||||
_price_s = _price_s - _amount;
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_a > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_a / 100) < 1) then {
|
||||
_amount = _price_a;
|
||||
};
|
||||
_price_a = _price_a - _amount;
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_f > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_f / 100) < 1) then {
|
||||
_amount = _price_f;
|
||||
};
|
||||
_price_f = _price_f - _amount;
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
|
||||
} forEach _storage_areas;
|
||||
};
|
||||
@@ -0,0 +1,42 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_sector", "_new_production"];
|
||||
|
||||
private ["_tempProduction","_checkFor"];
|
||||
|
||||
_tempProduction = [];
|
||||
|
||||
{
|
||||
if ((_x select 1) == _sector) then {
|
||||
|
||||
switch (_new_production) do {
|
||||
case 1: {_checkFor = 5;};
|
||||
case 2: {_checkFor = 6;};
|
||||
default {_checkFor = 4;};
|
||||
};
|
||||
|
||||
if (_x select _checkFor) then {
|
||||
_tempProduction pushBack [
|
||||
(_x select 0),
|
||||
(_x select 1),
|
||||
(_x select 2),
|
||||
(_x select 3),
|
||||
(_x select 4),
|
||||
(_x select 5),
|
||||
(_x select 6),
|
||||
_new_production,
|
||||
KP_liberation_production_interval,
|
||||
(_x select 9),
|
||||
(_x select 10),
|
||||
(_x select 11)
|
||||
];
|
||||
} else {
|
||||
hint localize "STR_PRODUCTION_FACFALSE";
|
||||
_tempProduction pushBack _x;
|
||||
};
|
||||
} else {
|
||||
_tempProduction pushBack _x;
|
||||
};
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
KP_liberation_production = _tempProduction;
|
||||
@@ -0,0 +1,13 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_groupToDelete"];
|
||||
|
||||
private _temp = +KP_liberation_logistics;
|
||||
|
||||
_temp = _temp - [_groupToDelete];
|
||||
|
||||
{
|
||||
_x set [0, [_forEachIndex] call KPLIB_fnc_getMilitaryId];
|
||||
} forEach _temp;
|
||||
|
||||
KP_liberation_logistics = +_temp;
|
||||
@@ -0,0 +1,79 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_index", "_nearfob", "_clientID"];
|
||||
|
||||
logiError = 0;
|
||||
|
||||
if (((KP_liberation_logistics select _index) select 1) <= 0) exitWith {logiError = 1; _clientID publicVariableClient "logiError";};
|
||||
|
||||
private _storage_areas = (_nearfob nearobjects GRLIB_fob_range) select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
|
||||
if ((count _storage_areas) == 0) exitWith {(localize "STR_LOGISTIC_NOSPACE") remoteExec ["hint",_clientID]; logiError = 1; _clientID publicVariableClient "logiError";};
|
||||
|
||||
private _price_s = 50;
|
||||
private _price_a = 0;
|
||||
private _price_f = 50;
|
||||
|
||||
private _crateSum = (ceil(_price_s / 100)) + (ceil(_price_a / 100)) + (ceil(_price_f / 100));
|
||||
|
||||
private _spaceSum = 0;
|
||||
|
||||
{
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _crateSum) exitWith {(localize "STR_LOGISTIC_NOSPACE") remoteExec ["hint",_clientID]; logiError = 1; _clientID publicVariableClient "logiError";};
|
||||
|
||||
{
|
||||
private _space = 0;
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_space = (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_space = (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_s > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_s / 100) < 1) then {
|
||||
_amount = _price_s;
|
||||
};
|
||||
_price_s = _price_s - _amount;
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_a > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_a / 100) < 1) then {
|
||||
_amount = _price_a;
|
||||
};
|
||||
_price_a = _price_a - _amount;
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_f > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_f / 100) < 1) then {
|
||||
_amount = _price_f;
|
||||
};
|
||||
_price_f = _price_f - _amount;
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
|
||||
} forEach _storage_areas;
|
||||
|
||||
please_recalculate = true;
|
||||
|
||||
(KP_liberation_logistics select _index) set [1, ((KP_liberation_logistics select _index) select 1) - 1];
|
||||
@@ -0,0 +1,11 @@
|
||||
if ( !isServer ) exitWith {};
|
||||
|
||||
params [ "_intel_object" ];
|
||||
|
||||
if ( isNull _intel_object ) exitWith {};
|
||||
|
||||
_intel_yield = 8;
|
||||
deleteVehicle _intel_object;
|
||||
resources_intel = resources_intel + (floor (_intel_yield + (random _intel_yield)));
|
||||
|
||||
[1] remoteExec ["remote_call_intel"];
|
||||
@@ -0,0 +1,15 @@
|
||||
params ["_unit"];
|
||||
|
||||
private _milita_prisonner_intel_yield = 3;
|
||||
private _csat_prisonner_intel_yield = 6;
|
||||
|
||||
if (isServer) then {
|
||||
private _yield = _csat_prisonner_intel_yield;
|
||||
if ((typeof _unit) in militia_squad) then {
|
||||
_yield = _milita_prisonner_intel_yield;
|
||||
};
|
||||
resources_intel = resources_intel + ( _yield + (round (random _yield)));
|
||||
stats_prisoners_captured = stats_prisoners_captured + 1;
|
||||
|
||||
[0] remoteExec ["remote_call_intel"];
|
||||
};
|
||||
@@ -0,0 +1,56 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_object_recycled", "_price_s", "_price_a", "_price_f", "_storage_areas"];
|
||||
|
||||
if (isNull _object_recycled) exitWith {};
|
||||
if (!(alive _object_recycled)) exitWith {};
|
||||
|
||||
deleteVehicle _object_recycled;
|
||||
if ((_price_s > 0) || (_price_a > 0) || (_price_f > 0)) then {
|
||||
{
|
||||
private _space = 0;
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_space = (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_space = (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_s > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_s / 100) < 1) then {
|
||||
_amount = _price_s;
|
||||
};
|
||||
_price_s = _price_s - _amount;
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_a > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_a / 100) < 1) then {
|
||||
_amount = _price_a;
|
||||
};
|
||||
_price_a = _price_a - _amount;
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
while {(_space > 0) && (_price_f > 0)} do {
|
||||
private _amount = 100;
|
||||
if ((_price_f / 100) < 1) then {
|
||||
_amount = _price_f;
|
||||
};
|
||||
_price_f = _price_f - _amount;
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_space = _space - 1;
|
||||
};
|
||||
|
||||
if ((_price_s == 0) && (_price_a == 0) && (_price_f == 0)) exitWith {};
|
||||
} forEach _storage_areas;
|
||||
};
|
||||
please_recalculate = true;
|
||||
stats_vehicles_recycled = stats_vehicles_recycled + 1;
|
||||
@@ -0,0 +1,2 @@
|
||||
params ["_targetsector"];
|
||||
[_targetsector] spawn reinforcements_manager;
|
||||
@@ -0,0 +1,51 @@
|
||||
if (!isServer) exitWith {};
|
||||
|
||||
params ["_index", "_dest_a", "_ress_a", "_dest_b", "_ress_b", "_clientID"];
|
||||
|
||||
logiError = 0;
|
||||
|
||||
if ((_ress_a isEqualTo [0,0,0]) && (_ress_b isEqualTo [0,0,0])) then {
|
||||
logiError = 1;
|
||||
};
|
||||
|
||||
if (
|
||||
(((_ress_a select 0) != 0) && ((_ress_b select 0) != 0))
|
||||
|| (((_ress_a select 1) != 0) && ((_ress_b select 1) != 0))
|
||||
|| (((_ress_a select 2) != 0) && ((_ress_b select 2) != 0))
|
||||
) then {
|
||||
logiError = 1;
|
||||
};
|
||||
|
||||
if (_dest_a isEqualTo _dest_b) then {
|
||||
logiError = 1;
|
||||
};
|
||||
|
||||
{
|
||||
if (
|
||||
((((_x select 2) isEqualTo _dest_a)) || (((_x select 2) isEqualTo _dest_b)))
|
||||
&& ((((_x select 3) isEqualTo _dest_a)) || (((_x select 3) isEqualTo _dest_b)))
|
||||
) exitWith {logiError = 1;}
|
||||
} forEach KP_liberation_logistics;
|
||||
|
||||
if (logiError == 1) exitWith {(localize "STR_LOGISTIC_SAVE_ERROR") remoteExec ["hint",_clientID]; _clientID publicVariableClient "logiError";};
|
||||
|
||||
private _time = ceil (((ceil ((_ress_a select 0) / 100)) + (ceil ((_ress_a select 1) / 100)) + (ceil ((_ress_a select 2) / 100))) / 3);
|
||||
|
||||
if (_time > ((KP_liberation_logistics select _index) select 1)) then {
|
||||
_time = ((KP_liberation_logistics select _index) select 1);
|
||||
};
|
||||
|
||||
_time = _time + 1;
|
||||
|
||||
KP_liberation_logistics set [_index,[
|
||||
(KP_liberation_logistics select _index) select 0,
|
||||
(KP_liberation_logistics select _index) select 1,
|
||||
_dest_a,
|
||||
_dest_b,
|
||||
_ress_a,
|
||||
_ress_b,
|
||||
(KP_liberation_logistics select _index) select 6,
|
||||
1,
|
||||
_time,
|
||||
0
|
||||
]];
|
||||
@@ -0,0 +1,72 @@
|
||||
params ["_liberated_sector"];
|
||||
|
||||
private _combat_readiness_increase = 0;
|
||||
switch (true) do {
|
||||
case (_liberated_sector in sectors_bigtown): {_combat_readiness_increase = floor (random 10) * GRLIB_difficulty_modifier;};
|
||||
case (_liberated_sector in sectors_capture): {_combat_readiness_increase = floor (random 6) * GRLIB_difficulty_modifier;};
|
||||
case (_liberated_sector in sectors_military): {_combat_readiness_increase = 5 + (floor (random 11)) * GRLIB_difficulty_modifier;};
|
||||
case (_liberated_sector in sectors_factory): {_combat_readiness_increase = 3 + (floor (random 7)) * GRLIB_difficulty_modifier;};
|
||||
case (_liberated_sector in sectors_tower): {_combat_readiness_increase = floor (random 4);};
|
||||
};
|
||||
|
||||
combat_readiness = combat_readiness + _combat_readiness_increase;
|
||||
if (combat_readiness > 100.0 && GRLIB_difficulty_modifier <= 2.0) then {combat_readiness = 100.0};
|
||||
stats_readiness_earned = stats_readiness_earned + _combat_readiness_increase;
|
||||
|
||||
[_liberated_sector, 0] remoteExecCall ["remote_call_sector"];
|
||||
blufor_sectors pushback _liberated_sector; publicVariable "blufor_sectors";
|
||||
stats_sectors_liberated = stats_sectors_liberated + 1;
|
||||
|
||||
reset_battlegroups_ai = true; publicVariable "reset_battlegroups_ai";
|
||||
|
||||
if (_liberated_sector in sectors_factory) then {
|
||||
{
|
||||
if (_liberated_sector in _x) exitWith {KP_liberation_production = KP_liberation_production - [_x];};
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
private _sectorFacilities = (KP_liberation_production_markers select {_liberated_sector == (_x select 0)}) select 0;
|
||||
KP_liberation_production pushBack [
|
||||
markerText _liberated_sector,
|
||||
_liberated_sector,
|
||||
1,
|
||||
[],
|
||||
_sectorFacilities select 1,
|
||||
_sectorFacilities select 2,
|
||||
_sectorFacilities select 3,
|
||||
3,
|
||||
KP_liberation_production_interval,
|
||||
0,
|
||||
0,
|
||||
0
|
||||
];
|
||||
};
|
||||
|
||||
[_liberated_sector] spawn F_cr_liberatedSector;
|
||||
|
||||
if ((random 100) <= KP_liberation_cr_wounded_chance || (count blufor_sectors) == 1) then {
|
||||
[_liberated_sector] spawn civrep_wounded_civs;
|
||||
};
|
||||
|
||||
asymm_blocked_sectors pushBack [_liberated_sector, time];
|
||||
publicVariable "asymm_blocked_sectors";
|
||||
|
||||
[] spawn check_victory_conditions;
|
||||
|
||||
sleep 1;
|
||||
|
||||
[] spawn KPLIB_fnc_doSave;
|
||||
|
||||
sleep 45;
|
||||
|
||||
if (GRLIB_endgame == 0) then {
|
||||
if (
|
||||
!(_liberated_sector in sectors_tower)
|
||||
&& {
|
||||
(random (150 / (GRLIB_difficulty_modifier * GRLIB_csat_aggressivity))) < (combat_readiness - 15)
|
||||
|| _liberated_sector in sectors_bigtown
|
||||
}
|
||||
&& {[] call KPLIB_fnc_getOpforCap < GRLIB_battlegroup_cap}
|
||||
) then {
|
||||
[_liberated_sector, (random 100) < 45] spawn spawn_battlegroup;
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
if (!isServer) exitWith {false};
|
||||
|
||||
params [
|
||||
["_mission_index", -1, [0]]
|
||||
];
|
||||
|
||||
if (_mission_index < 0) exitWith {false};
|
||||
|
||||
if (isNil "GRLIB_secondary_starting") then { GRLIB_secondary_starting = false;};
|
||||
if (GRLIB_secondary_starting) exitWith {["Multiple calls to start secondary mission : shouldn't be possible, isn't allowed", "ERROR"] call KPLIB_fnc_log;};
|
||||
if (isNil "used_positions") then {used_positions = [];};
|
||||
|
||||
GRLIB_secondary_starting = true; publicVariable "GRLIB_secondary_starting";
|
||||
|
||||
resources_intel = resources_intel - ( GRLIB_secondary_missions_costs select _mission_index );
|
||||
|
||||
if (_mission_index == 0) then {[] spawn fob_hunting;};
|
||||
if (_mission_index == 1) then {[] spawn convoy_hijack;};
|
||||
if (_mission_index == 2) then {[] spawn search_and_rescue;};
|
||||
|
||||
GRLIB_secondary_starting = false; publicVariable "GRLIB_secondary_starting";
|
||||
|
||||
true
|
||||
@@ -0,0 +1,464 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_logistics"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
["Logistic management started", "LOGISTIC"] call KPLIB_fnc_log;
|
||||
|
||||
KP_liberation_convoy_ambush_inProgress = false;
|
||||
KP_liberation_convoy_ambush_check = 0;
|
||||
private _start = 0;
|
||||
while {GRLIB_endgame == 0} do {
|
||||
|
||||
if (((count (allPlayers - entities "HeadlessClient_F")) > 0) && ((count KP_liberation_logistics) > 0)) then {
|
||||
_start = diag_tickTime;
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic interval started: %1", diag_tickTime], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
|
||||
private _tempLogistics = +KP_liberation_logistics;
|
||||
|
||||
{
|
||||
private _locPos = -1;
|
||||
private _locRes = -1;
|
||||
switch (_x select 7) do {
|
||||
case 0: {};
|
||||
case 1;
|
||||
case 3: {
|
||||
if ((_x select 8) > 1) then {
|
||||
switch (_x select 7) do {case 1: {_locPos = 2; _locRes = 4;}; case 3: {_locPos = 3; _locRes = 5;};};
|
||||
switch (_x select 9) do {case 2: {_x set [9,0];}; case 3: {_x set [9,1];};};
|
||||
private _storage_areas = nearestObjects [(_x select _locPos), [KP_liberation_small_storage_building, KP_liberation_large_storage_building], 150];
|
||||
|
||||
if (((_x select 9) == 0) && !((_x select 6) isEqualTo [0,0,0])) then {
|
||||
|
||||
if ((count (_storage_areas)) == 0) exitWith {_x set [9,2];};
|
||||
|
||||
private _toProcess = ceil ((ceil (((_x select 6) select 0) / 100)) + (ceil (((_x select 6) select 1) / 100)) + (ceil (((_x select 6) select 2) / 100)));
|
||||
if (_toProcess > 3) then {_toProcess = 3;};
|
||||
private _spaceSum = 0;
|
||||
{
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _toProcess) exitWith {_x set [9,2];};
|
||||
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
private _currentIndex = _forEachIndex;
|
||||
private _processed = 0;
|
||||
while {_processed < _toProcess} do {
|
||||
{
|
||||
private _space = 0;
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_space = (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_space = (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 0) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 0) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 0;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0) - _amount,
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2)]
|
||||
];
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 1) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 1) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 1;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1) - _amount,
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2)]
|
||||
];
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 2) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 2) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 2;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2) - _amount]
|
||||
];
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
} forEach _storage_areas;
|
||||
};
|
||||
please_recalculate = true;
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
_x set [9,1];
|
||||
};
|
||||
|
||||
if (((_x select 9) == 1) && !((_x select _locRes) isEqualTo [0,0,0])) then {
|
||||
|
||||
if ((count (_storage_areas)) == 0) exitWith {_x set [9,3];};
|
||||
|
||||
private _supplyValue = 0;
|
||||
private _ammoValue = 0;
|
||||
private _fuelValue = 0;
|
||||
|
||||
{
|
||||
{
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {_supplyValue = _supplyValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_ammo_crate: {_ammoValue = _ammoValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_fuel_crate: {_fuelValue = _fuelValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach (attachedObjects _x);
|
||||
} forEach _storage_areas;
|
||||
|
||||
private _toProcess = ceil ((ceil (((_x select _locRes) select 0) / 100)) + (ceil (((_x select _locRes) select 1) / 100)) + (ceil (((_x select _locRes) select 2) / 100)));
|
||||
if (_toProcess > 3) then {_toProcess = 3;};
|
||||
|
||||
private _maxGetSupply = ((_x select _locRes) select 0);
|
||||
if (_maxGetSupply > 300) then {_maxGetSupply = 300;};
|
||||
private _maxGetAmmo = ((_x select _locRes) select 1);
|
||||
if (_maxGetAmmo > 300) then {_maxGetAmmo = 300;};
|
||||
private _maxGetFuel = ((_x select _locRes) select 2);
|
||||
if (_maxGetFuel > 300) then {_maxGetFuel = 300;};
|
||||
|
||||
private _getSupply = 0;
|
||||
private _getAmmo = 0;
|
||||
private _getFuel = 0;
|
||||
private _i = 0;
|
||||
private _j = 0;
|
||||
|
||||
while {(_i < _toProcess) && (_j < _toProcess)} do {
|
||||
if ((_maxGetSupply - _getSupply) > 0) then {
|
||||
if ((floor ((_maxGetSupply - _getSupply) / 100)) > 0) then {
|
||||
if ((_supplyValue - _getSupply) >= 100) then {
|
||||
_getSupply = _getSupply + 100;
|
||||
_i = _i + 1;
|
||||
};
|
||||
} else {
|
||||
if ((_maxGetSupply - _getSupply) <= (_supplyValue - _getSupply)) then {
|
||||
_getSupply = _maxGetSupply;
|
||||
_i = _i + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (((_maxGetAmmo - _getAmmo) > 0) && (_i < _toProcess)) then {
|
||||
if ((floor ((_maxGetAmmo - _getAmmo) / 100)) > 0) then {
|
||||
if ((_ammoValue - _getAmmo) >= 100) then {
|
||||
_getAmmo = _getAmmo + 100;
|
||||
_i = _i + 1;
|
||||
};
|
||||
} else {
|
||||
if ((_maxGetAmmo - _getAmmo) <= (_ammoValue - _getAmmo)) then {
|
||||
_getAmmo = _maxGetAmmo;
|
||||
_i = _i + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
if (((_maxGetFuel - _getFuel) > 0) && (_i < _toProcess)) then {
|
||||
if ((floor ((_maxGetFuel - _getFuel) / 100)) > 0) then {
|
||||
if ((_fuelValue - _getFuel) >= 100) then {
|
||||
_getFuel = _getFuel + 100;
|
||||
_i = _i + 1;
|
||||
};
|
||||
} else {
|
||||
if ((_maxGetFuel - _getFuel) <= (_fuelValue - _getFuel)) then {
|
||||
_getFuel = _maxGetFuel;
|
||||
_i = _i + 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
_j = _j + 1;
|
||||
};
|
||||
|
||||
if ((_j == _toProcess) && (_i != _toProcess)) exitWith {_x set [9,3];};
|
||||
|
||||
_x set [_locRes,[((_x select _locRes) select 0) - _getSupply,((_x select _locRes) select 1) - _getAmmo,((_x select _locRes) select 2) - _getFuel]];
|
||||
_x set [6,[((_x select 6) select 0) + _getSupply,((_x select 6) select 1) + _getAmmo,((_x select 6) select 2) + _getFuel]];
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
|
||||
{
|
||||
private _storage_positions = [];
|
||||
private _storedCrates = (attachedObjects _x);
|
||||
reverse _storedCrates;
|
||||
|
||||
{
|
||||
private _crateValue = _x getVariable ["KP_liberation_crate_value",0];
|
||||
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {
|
||||
if (_getSupply > 0) then {
|
||||
if (_crateValue > _getSupply) then {
|
||||
_crateValue = _crateValue - _getSupply;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_getSupply = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_getSupply = _getSupply - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_ammo_crate: {
|
||||
if (_getAmmo > 0) then {
|
||||
if (_crateValue > _getAmmo) then {
|
||||
_crateValue = _crateValue - _getAmmo;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_getAmmo = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_getAmmo = _getAmmo - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
case KP_liberation_fuel_crate: {
|
||||
if (_getFuel > 0) then {
|
||||
if (_crateValue > _getFuel) then {
|
||||
_crateValue = _crateValue - _getFuel;
|
||||
_x setVariable ["KP_liberation_crate_value", _crateValue, true];
|
||||
_getFuel = 0;
|
||||
} else {
|
||||
detach _x;
|
||||
deleteVehicle _x;
|
||||
_getFuel = _getFuel - _crateValue;
|
||||
};
|
||||
};
|
||||
};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach _storedCrates;
|
||||
|
||||
([_x] call KPLIB_fnc_getStoragePositions) params ["_storage_positions"];
|
||||
|
||||
private _area = _x;
|
||||
_i = 0;
|
||||
{
|
||||
_height = [typeOf _x] call KPLIB_fnc_getCrateHeight;
|
||||
detach _x;
|
||||
_x attachTo [_area, [(_storage_positions select _i) select 0, (_storage_positions select _i) select 1, _height]];
|
||||
_i = _i + 1;
|
||||
} forEach attachedObjects (_x);
|
||||
|
||||
if ((_getSupply == 0) && (_getAmmo == 0) && (_getFuel == 0)) exitWith {};
|
||||
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} else {
|
||||
private _nextState = 0;
|
||||
private _time = -1;
|
||||
if (((_x select 4) isEqualTo [0,0,0]) && ((_x select 5) isEqualTo [0,0,0]) && ((_x select 6) isEqualTo [0,0,0])) then {
|
||||
_x set [2, [0,0,0]];
|
||||
_x set [3, [0,0,0]];
|
||||
} else {
|
||||
_nextState = switch (_x select 7) do {case 1: {2}; case 3: {4};};
|
||||
_time = ceil (((_x select 2) distance2D (_x select 3)) / 400);
|
||||
};
|
||||
|
||||
_x set [7,_nextState];
|
||||
_x set [8,_time];
|
||||
_x set [9,0];
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
};
|
||||
case 2;
|
||||
case 4: {
|
||||
if ((_x select 8) > 1) then {
|
||||
|
||||
if (((_x select 8) <= ((ceil (((_x select 2) distance2D (_x select 3)) / 400)) - 3)) && ((_x select 8) >= 3) && !((_x select 6) isEqualTo [0,0,0]) && !KP_liberation_convoy_ambush_inProgress && (KP_liberation_civ_rep <= -25) && (((_x select 8) % 2) == 0)) then {
|
||||
private _dice = round (random 100);
|
||||
private _chance = KP_liberation_convoy_ambush_chance;
|
||||
if (chance > 0) then {
|
||||
_chance = _chance + ([] call KPLIB_fnc_crGetMulti);
|
||||
};
|
||||
if (KP_liberation_asymmetric_debug > 0) then {[format ["Logistic convoy %1: ambush possible - current ETA: %2 - Dice: %3 - Chance: %4", (_x select 0), (_x select 8), _dice, _chance], "ASYMMETRIC"] call KPLIB_fnc_log;};
|
||||
if (_dice <= _chance) then {
|
||||
private _convoy = +_x;
|
||||
sleep 0.1;
|
||||
[_convoy] spawn logistic_convoy_ambush;
|
||||
waitUntil {sleep 0.1; KP_liberation_convoy_ambush_check != 0};
|
||||
if (KP_liberation_convoy_ambush_check == 2) then {
|
||||
_x set [1,0];
|
||||
_x set [2,[0,0,0]];
|
||||
_x set [3,[0,0,0]];
|
||||
_x set [4,[0,0,0]];
|
||||
_x set [5,[0,0,0]];
|
||||
_x set [6,[0,0,0]];
|
||||
_x set [7,0];
|
||||
_x set [8,-1];
|
||||
} else {
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
KP_liberation_convoy_ambush_check = 0;
|
||||
};
|
||||
} else {
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
};
|
||||
} else {
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
};
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
|
||||
} else {
|
||||
private _nextState = -1;
|
||||
private _time = 0;
|
||||
switch (_x select 7) do {
|
||||
case 2: {
|
||||
_nextState = 3;
|
||||
_time = ceil (((ceil (((_x select 5) select 0) / 100)) + (ceil (((_x select 5) select 1) / 100)) + (ceil (((_x select 5) select 2) / 100))) / 3);
|
||||
};
|
||||
case 4: {
|
||||
_nextState = 1;
|
||||
_time = ceil (((ceil (((_x select 4) select 0) / 100)) + (ceil (((_x select 4) select 1) / 100)) + (ceil (((_x select 4) select 2) / 100))) / 3);
|
||||
};
|
||||
};
|
||||
if (_time > (_x select 1)) then {_time = (_x select 1);};
|
||||
|
||||
_time = _time + (ceil (((ceil (((_x select 6) select 0) / 100)) + (ceil (((_x select 6) select 1) / 100)) + (ceil (((_x select 6) select 2) / 100))) / 3));
|
||||
_time = _time + 1;
|
||||
|
||||
_x set [7,_nextState];
|
||||
_x set [8,_time];
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
};
|
||||
case 5;
|
||||
case 6: {
|
||||
if ((_x select 8) > 1) then {
|
||||
_locPos = switch (_x select 7) do {case 5: {2}; case 6: {3};};
|
||||
_x set [9,0];
|
||||
private _storage_areas = nearestObjects [(_x select _locPos), [KP_liberation_small_storage_building, KP_liberation_large_storage_building], 150];
|
||||
|
||||
if ((count (_storage_areas)) == 0) exitWith {_x set [9,2];};
|
||||
|
||||
private _toProcess = ceil ((ceil (((_x select 6) select 0) / 100)) + (ceil (((_x select 6) select 1) / 100)) + (ceil (((_x select 6) select 2) / 100)));
|
||||
if (_toProcess > 3) then {_toProcess = 3;};
|
||||
private _spaceSum = 0;
|
||||
{
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_spaceSum = _spaceSum + (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
} forEach _storage_areas;
|
||||
|
||||
if (_spaceSum < _toProcess) exitWith {_x set [9,2];};
|
||||
|
||||
_x set [8,((_x select 8) - 1)];
|
||||
private _currentIndex = _forEachIndex;
|
||||
private _processed = 0;
|
||||
while {_processed < _toProcess} do {
|
||||
{
|
||||
private _space = 0;
|
||||
if (typeOf _x == KP_liberation_large_storage_building) then {
|
||||
_space = (count KP_liberation_large_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
if (typeOf _x == KP_liberation_small_storage_building) then {
|
||||
_space = (count KP_liberation_small_storage_positions) - (count (attachedObjects _x));
|
||||
};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 0) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 0) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 0;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0) - _amount,
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2)]
|
||||
];
|
||||
private _crate = [KP_liberation_supply_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 1) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 1) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 1;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1) - _amount,
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2)]
|
||||
];
|
||||
private _crate = [KP_liberation_ammo_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
|
||||
if ((_space > 0) && ((((_tempLogistics select _currentIndex) select 6) select 2) > 0)) then {
|
||||
private _amount = 100;
|
||||
if (((((_tempLogistics select _currentIndex) select 6) select 2) / 100) < 1) then {
|
||||
_amount = ((_tempLogistics select _currentIndex) select 6) select 2;
|
||||
};
|
||||
(_tempLogistics select _currentIndex) set [6,
|
||||
[(((_tempLogistics select _currentIndex) select 6) select 0),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 1),
|
||||
(((_tempLogistics select _currentIndex) select 6) select 2) - _amount]
|
||||
];
|
||||
private _crate = [KP_liberation_fuel_crate, _amount, getPos _x] call KPLIB_fnc_createCrate;
|
||||
[_crate, _x] call KPLIB_fnc_crateToStorage;
|
||||
_processed = _processed + 1;
|
||||
_space = _space - 1;
|
||||
};
|
||||
if (_processed >= _toProcess) exitWith {};
|
||||
} forEach _storage_areas;
|
||||
};
|
||||
please_recalculate = true;
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
} else {
|
||||
_x set [2,[0,0,0]];
|
||||
_x set [3,[0,0,0]];
|
||||
_x set [4,[0,0,0]];
|
||||
_x set [5,[0,0,0]];
|
||||
_x set [6,[0,0,0]];
|
||||
_x set [7,0];
|
||||
_x set [8,-1];
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic Group Update: %1", _x], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
};
|
||||
default {};
|
||||
};
|
||||
} forEach _tempLogistics;
|
||||
|
||||
KP_liberation_logistics = +_tempLogistics;
|
||||
|
||||
if (KP_liberation_logistic_debug > 0) then {[format ["Logistic interval finished - Time needed: %1 seconds", diag_tickTime - _start], "LOGISTIC"] call KPLIB_fnc_log;};
|
||||
};
|
||||
uiSleep 60;
|
||||
};
|
||||
@@ -0,0 +1,93 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {!isNil "KP_liberation_production"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
sectors_recalculating = false;
|
||||
sectors_timer = false;
|
||||
|
||||
["Production management started", "PRODUCTION"] call KPLIB_fnc_log;
|
||||
private _start = 0;
|
||||
while {GRLIB_endgame == 0} do {
|
||||
|
||||
recalculate_sectors = false;
|
||||
|
||||
if (((count (allPlayers - entities "HeadlessClient_F")) > 0) && ((count KP_liberation_production) > 0)) then {
|
||||
waitUntil {sleep 0.5; !sectors_recalculating};
|
||||
sectors_recalculating = true;
|
||||
|
||||
private _time_update = false;
|
||||
if (sectors_timer) then {_time_update = true; sectors_timer = false;};
|
||||
|
||||
_start = diag_tickTime;
|
||||
if (KP_liberation_production_debug > 0) then {[format ["Production interval started: %1 - _time_update: %2", diag_tickTime, _time_update], "PRODUCTION"] call KPLIB_fnc_log;};
|
||||
|
||||
private _tempProduction = [];
|
||||
{
|
||||
private _storageArray = [];
|
||||
private _supplyValue = 0;
|
||||
private _ammoValue = 0;
|
||||
private _fuelValue = 0;
|
||||
private _time = _x select 8;
|
||||
|
||||
private _storage = nearestObjects [(markerPos (_x select 1)), [KP_liberation_small_storage_building], 100];
|
||||
_storage = _storage select {(_x getVariable ["KP_liberation_storage_type",-1]) == 1};
|
||||
if ((count _storage) > 0) then {
|
||||
_storage = (_storage select 0);
|
||||
_storageArray = [(getPosATL _storage),(getDir _storage),(vectorUpVisual _storage)];
|
||||
|
||||
if (_time_update) then {
|
||||
|
||||
if ((_time - 1) < 1) then {
|
||||
_time = KP_liberation_production_interval;
|
||||
|
||||
if (((count (attachedObjects _storage)) < 12) && !((_x select 7) == 3)) then {
|
||||
private _crateType = KP_liberation_supply_crate;
|
||||
switch (_x select 7) do {
|
||||
case 1: {_crateType = KP_liberation_ammo_crate; stats_ammo_produced = stats_ammo_produced + 100;};
|
||||
case 2: {_crateType = KP_liberation_fuel_crate; stats_fuel_produced = stats_fuel_produced + 100;};
|
||||
default {_crateType = KP_liberation_supply_crate; stats_supplies_produced = stats_supplies_produced + 100;};
|
||||
};
|
||||
|
||||
private _crate = [_crateType, 100, getPosATL _storage] call KPLIB_fnc_createCrate;
|
||||
[_crate, _storage] call KPLIB_fnc_crateToStorage;
|
||||
};
|
||||
} else {
|
||||
_time = _time - 1;
|
||||
};
|
||||
};
|
||||
|
||||
{
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {_supplyValue = _supplyValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_ammo_crate: {_ammoValue = _ammoValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_fuel_crate: {_fuelValue = _fuelValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach (attachedObjects _storage);
|
||||
};
|
||||
|
||||
_tempProduction pushBack [
|
||||
(markerText (_x select 1)),
|
||||
(_x select 1),
|
||||
(_x select 2),
|
||||
_storageArray,
|
||||
(_x select 4),
|
||||
(_x select 5),
|
||||
(_x select 6),
|
||||
(_x select 7),
|
||||
_time,
|
||||
_supplyValue,
|
||||
_ammoValue,
|
||||
_fuelValue
|
||||
];
|
||||
if (KP_liberation_production_debug > 0) then {[format ["Production Update: %1", _tempProduction select _forEachIndex], "PRODUCTION"] call KPLIB_fnc_log;};
|
||||
} forEach KP_liberation_production;
|
||||
|
||||
_tempProduction sort true;
|
||||
|
||||
KP_liberation_production = +_tempProduction;
|
||||
sectors_recalculating = false;
|
||||
};
|
||||
if (KP_liberation_production_debug > 0) then {[format ["Production interval finished - Time needed: %1 seconds", diag_tickTime - _start], "PRODUCTION"] call KPLIB_fnc_log;};
|
||||
waitUntil {sleep 1; recalculate_sectors};
|
||||
};
|
||||
@@ -0,0 +1,75 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
KP_liberation_fob_resources = [];
|
||||
KP_liberation_supplies_global = 0;
|
||||
KP_liberation_ammo_global = 0;
|
||||
KP_liberation_fuel_global = 0;
|
||||
KP_liberation_heli_slots = 0;
|
||||
KP_liberation_plane_slots = 0;
|
||||
infantry_cap = 50 * GRLIB_resources_multiplier;
|
||||
|
||||
please_recalculate = true;
|
||||
|
||||
waitUntil {time > 1};
|
||||
|
||||
while {true} do {
|
||||
waitUntil {sleep 0.5; please_recalculate};
|
||||
please_recalculate = false;
|
||||
|
||||
private _local_fob_resources = [];
|
||||
private _local_supplies_global = 0;
|
||||
private _local_ammo_global = 0;
|
||||
private _local_fuel_global = 0;
|
||||
private _local_heli_slots = 0;
|
||||
private _local_plane_slots = 0;
|
||||
private _local_infantry_cap = 50 * GRLIB_resources_multiplier;
|
||||
|
||||
{
|
||||
private _fob_buildings = _x nearobjects GRLIB_fob_range;
|
||||
private _storage_areas = _fob_buildings select {(_x getVariable ["KP_liberation_storage_type",-1]) == 0};
|
||||
private _heliSlots = {(typeOf _x) == KP_liberation_heli_slot_building;} count _fob_buildings;
|
||||
private _planeSlots = {(typeOf _x) == KP_liberation_plane_slot_building;} count _fob_buildings;
|
||||
private _hasAirBuilding = {(typeOf _x) == KP_liberation_air_vehicle_building;} count _fob_buildings;
|
||||
if (_hasAirBuilding > 0) then {_hasAirBuilding = true;} else {_hasAirBuilding = false;};
|
||||
private _hasRecBuilding = {(typeOf _x) == KP_liberation_recycle_building;} count _fob_buildings;
|
||||
if (_hasRecBuilding > 0) then {_hasRecBuilding = true;} else {_hasRecBuilding = false;};
|
||||
|
||||
private _supplyValue = 0;
|
||||
private _ammoValue = 0;
|
||||
private _fuelValue = 0;
|
||||
|
||||
{
|
||||
{
|
||||
switch ((typeOf _x)) do {
|
||||
case KP_liberation_supply_crate: {_supplyValue = _supplyValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_ammo_crate: {_ammoValue = _ammoValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
case KP_liberation_fuel_crate: {_fuelValue = _fuelValue + (_x getVariable ["KP_liberation_crate_value",0]);};
|
||||
default {[format ["Invalid object (%1) at storage area", (typeOf _x)], "ERROR"] call KPLIB_fnc_log;};
|
||||
};
|
||||
} forEach (attachedObjects _x);
|
||||
} forEach _storage_areas;
|
||||
|
||||
_local_fob_resources pushBack [_x, _supplyValue, _ammoValue, _fuelValue, _hasAirBuilding, _hasRecBuilding];
|
||||
_local_supplies_global = _local_supplies_global + _supplyValue;
|
||||
_local_ammo_global = _local_ammo_global + _ammoValue;
|
||||
_local_fuel_global = _local_fuel_global + _fuelValue;
|
||||
_local_heli_slots = _local_heli_slots + _heliSlots;
|
||||
_local_plane_slots = _local_plane_slots + _planeSlots;
|
||||
} forEach GRLIB_all_fobs;
|
||||
|
||||
{
|
||||
if ( _x in sectors_capture ) then {
|
||||
_local_infantry_cap = _local_infantry_cap + (10 * GRLIB_resources_multiplier);
|
||||
};
|
||||
} foreach blufor_sectors;
|
||||
|
||||
KP_liberation_fob_resources = _local_fob_resources;
|
||||
KP_liberation_supplies_global = _local_supplies_global;
|
||||
KP_liberation_ammo_global = _local_ammo_global;
|
||||
KP_liberation_fuel_global = _local_fuel_global;
|
||||
KP_liberation_heli_slots = _local_heli_slots;
|
||||
KP_liberation_plane_slots = _local_plane_slots;
|
||||
infantry_cap = _local_infantry_cap;
|
||||
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
waitUntil { !isNil "save_is_loaded" };
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
sleep 3;
|
||||
please_recalculate = true;
|
||||
};
|
||||
@@ -0,0 +1,8 @@
|
||||
waitUntil {!isNil "save_is_loaded"};
|
||||
waitUntil {save_is_loaded};
|
||||
|
||||
while {true} do {
|
||||
uiSleep 60;
|
||||
recalculate_sectors = true;
|
||||
sectors_timer = true;
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
unitcap = 0;
|
||||
KP_liberation_heli_count = 0;
|
||||
KP_liberation_plane_count = 0;
|
||||
|
||||
while {true} do {
|
||||
private _local_unitcap = 0;
|
||||
private _local_heli_count = 0;
|
||||
private _local_plane_count = 0;
|
||||
{
|
||||
if ((side group _x == GRLIB_side_friendly) && (alive _x) && ((_x distance startbase) > 250 || (isPlayer _x))) then {
|
||||
_local_unitcap = _local_unitcap + 1;
|
||||
};
|
||||
} forEach allUnits;
|
||||
{
|
||||
if ((toLower (typeOf _x)) in KPLIB_b_air_classes && !([typeOf _x] call KPLIB_fnc_isClassUAV) && alive _x && !(_x getVariable ["KP_liberation_preplaced", false])) then {
|
||||
if (_x isKindOf "Helicopter") then {
|
||||
_local_heli_count = _local_heli_count + 1;
|
||||
};
|
||||
if (_x isKindOf "Plane") then {
|
||||
_local_plane_count = _local_plane_count + 1;
|
||||
};
|
||||
};
|
||||
} forEach vehicles;
|
||||
unitcap = _local_unitcap;
|
||||
KP_liberation_heli_count = _local_heli_count;
|
||||
KP_liberation_plane_count = _local_plane_count;
|
||||
sleep 1;
|
||||
};
|
||||
@@ -0,0 +1,164 @@
|
||||
private _convoy_destinations_markers = [];
|
||||
private _load_box_fnc = compileFinal preprocessFileLineNumbers "scripts\client\ammoboxes\do_load_box.sqf";
|
||||
|
||||
while { count _convoy_destinations_markers < 3 } do { _convoy_destinations_markers pushback ([2000,999999,false] call KPLIB_fnc_getOpforSpawnPoint); };
|
||||
|
||||
private _couldnt_spawn = false;
|
||||
{ if ( _x == "" ) exitWith { _couldnt_spawn = true; }; } foreach _convoy_destinations_markers;
|
||||
if ( _couldnt_spawn ) exitWith {["Could not find enough map positions for convoy hijack mission", "ERROR"] call KPLIB_fnc_log;};
|
||||
|
||||
private _convoy_destinations = [];
|
||||
{ _convoy_destinations pushback (markerPos _x); } foreach _convoy_destinations_markers;
|
||||
|
||||
private _spawnpos = _convoy_destinations select 0;
|
||||
[4, _spawnpos] remoteExec ["remote_call_intel"];
|
||||
|
||||
private _scout_vehicle = [_spawnpos getPos [30, 0], opfor_mrap, true, false] call KPLIB_fnc_spawnVehicle;
|
||||
private _escort_vehicle = [_spawnpos getPos [10, 0], selectRandom opfor_vehicles_low_intensity, true, false] call KPLIB_fnc_spawnVehicle;
|
||||
private _transport_vehicle = [_spawnpos getPos [10, 180], opfor_ammobox_transport, true, false] call KPLIB_fnc_spawnVehicle;
|
||||
|
||||
private _boxes_amount = 0;
|
||||
{
|
||||
if ( _x select 0 == opfor_ammobox_transport ) exitWith { _boxes_amount = (count _x) - 2 };
|
||||
} foreach KPLIB_transportConfigs;
|
||||
|
||||
if ( _boxes_amount == 0 ) exitWith {["Opfor ammobox truck classname doesn't allow for ammobox transport, correct your preset and/or transport config", "ERROR"] call KPLIB_fnc_log;};
|
||||
|
||||
GRLIB_secondary_in_progress = 1; publicVariable "GRLIB_secondary_in_progress";
|
||||
|
||||
private _boxes_loaded = 0;
|
||||
|
||||
while { _boxes_loaded < _boxes_amount } do {
|
||||
_boxes_loaded = _boxes_loaded + 1;
|
||||
sleep 0.5;
|
||||
private _next_box = [KP_liberation_ammo_crate, 100, _spawnpos getPos [15, 135]] call KPLIB_fnc_createCrate;
|
||||
sleep 0.5;
|
||||
[_next_box, 50] call _load_box_fnc;
|
||||
};
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
private _troop_vehicle = [_spawnpos getPos [30, 180], opfor_transport_truck, true, true, false ] call KPLIB_fnc_spawnVehicle;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
private _convoy_group = group driver _scout_vehicle;
|
||||
( crew _escort_vehicle + crew _transport_vehicle + crew _troop_vehicle ) joinSilent _convoy_group;
|
||||
|
||||
sleep 0.5;
|
||||
|
||||
{
|
||||
_x addEventHandler ["HandleDamage", { private [ "_damage" ]; if ( side (_this select 3) != GRLIB_side_friendly ) then { _damage = 0 } else { _damage = _this select 2 }; _damage } ];
|
||||
} foreach [ _scout_vehicle, _escort_vehicle, _transport_vehicle, _troop_vehicle ];
|
||||
|
||||
_convoy_group setFormation "FILE";
|
||||
_convoy_group setBehaviour "SAFE";
|
||||
_convoy_group setCombatMode "GREEN";
|
||||
_convoy_group setSpeedMode "LIMITED";
|
||||
|
||||
while {(count (waypoints _convoy_group)) != 0} do {deleteWaypoint ((waypoints _convoy_group) select 0);};
|
||||
{_x doFollow leader _convoy_group} foreach units _convoy_group;
|
||||
|
||||
_waypoint = _convoy_group addWaypoint [_convoy_destinations select 1, 0];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
|
||||
_waypoint = _convoy_group addWaypoint [_convoy_destinations select 2, 0];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
|
||||
_waypoint = _convoy_group addWaypoint [_convoy_destinations select 0, 0];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
|
||||
_waypoint = _convoy_group addWaypoint [_convoy_destinations select 0, 0];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
_waypoint setWaypointCompletionRadius 50;
|
||||
|
||||
private _troops_group = createGroup [GRLIB_side_enemy, true];
|
||||
{
|
||||
[_x, _spawnpos, _troops_group, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
} foreach ([] call KPLIB_fnc_getSquadComp);
|
||||
{_x moveInCargo _troop_vehicle} foreach (units _troops_group);
|
||||
|
||||
private _convoy_marker = createMarkerLocal [ format [ "convoymarker%1", round time], getpos _transport_vehicle ];
|
||||
_convoy_marker setMarkerText (localize "STR_SECONDARY_CSAT_CONVOY");
|
||||
_convoy_marker setMarkerType "o_armor";
|
||||
_convoy_marker setMarkerColor GRLIB_color_enemy_bright;
|
||||
|
||||
private _convoy_marker_wp1 = createMarkerLocal [ format [ "convoymarkerwp1%1", round time], _convoy_destinations select 0];
|
||||
private _convoy_marker_wp2 = createMarkerLocal [ format [ "convoymarkerwp2%1", round time], _convoy_destinations select 1];
|
||||
private _convoy_marker_wp3 = createMarkerLocal [ format [ "convoymarkerwp3%1", round time], _convoy_destinations select 2];
|
||||
|
||||
{
|
||||
_x setMarkerText (localize "STR_SECONDARY_CSAT_CONVOY_WP");
|
||||
_x setMarkerType "o_armor";
|
||||
_x setMarkerColor GRLIB_color_enemy_bright;
|
||||
_x setMarkerSize [0.6, 0.6];
|
||||
} foreach [_convoy_marker_wp1, _convoy_marker_wp2, _convoy_marker_wp3];
|
||||
|
||||
private _mission_in_progress = true;
|
||||
private _convoy_attacked = false;
|
||||
private _convoy_flee = false;
|
||||
private _disembark_troops = false;
|
||||
|
||||
while { _mission_in_progress } do {
|
||||
|
||||
if ( !(alive _transport_vehicle) || !(alive driver _transport_vehicle) ) then {
|
||||
_mission_in_progress = false;
|
||||
};
|
||||
|
||||
_convoy_marker setMarkerPos (getpos _transport_vehicle);
|
||||
|
||||
if ( !_convoy_attacked ) then {
|
||||
{
|
||||
if ( !(alive _x) || (damage _x > 0.3) || !(alive driver _x)) exitWith { _convoy_attacked = true; };
|
||||
} foreach [_scout_vehicle, _escort_vehicle, _transport_vehicle, _troop_vehicle];
|
||||
};
|
||||
|
||||
if ( _convoy_attacked && !_disembark_troops) then {
|
||||
|
||||
_disembark_troops = true;
|
||||
|
||||
if (alive (driver _troop_vehicle)) then {
|
||||
private _troop_driver_group = createGroup [GRLIB_side_enemy, true];
|
||||
[ driver _troop_vehicle ] joinSilent _troop_driver_group;
|
||||
sleep 1;
|
||||
while {(count (waypoints _troop_driver_group)) != 0} do {deleteWaypoint ((waypoints _troop_driver_group) select 0);};
|
||||
_waypoint = _troop_driver_group addWaypoint [getpos _troop_vehicle, 0];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
sleep 3;
|
||||
};
|
||||
|
||||
{
|
||||
unAssignVehicle _x;
|
||||
_x action ["eject", vehicle _x];
|
||||
_x action ["getout", vehicle _x];
|
||||
unAssignVehicle _x;
|
||||
sleep 0.7;
|
||||
} foreach (units _troops_group);
|
||||
|
||||
_troops_group setBehaviour "COMBAT";
|
||||
_troops_group setCombatMode "RED";
|
||||
};
|
||||
|
||||
if ( _convoy_attacked && !_convoy_flee) then {
|
||||
_convoy_flee = true;
|
||||
_convoy_group setBehaviour "COMBAT";
|
||||
_convoy_group setSpeedMode "FULL";
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
};
|
||||
|
||||
sleep 20;
|
||||
|
||||
deleteMarker _convoy_marker;
|
||||
{ deleteMarker _x } foreach [_convoy_marker_wp1, _convoy_marker_wp2, _convoy_marker_wp3 ];
|
||||
|
||||
combat_readiness = round (combat_readiness * 0.85);
|
||||
stats_secondary_objectives = stats_secondary_objectives + 1;
|
||||
[5] remoteExec ["remote_call_intel"];
|
||||
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
|
||||
sleep 1;
|
||||
[] spawn KPLIB_fnc_doSave;
|
||||
@@ -0,0 +1,138 @@
|
||||
|
||||
_defenders_amount = (15 * (sqrt (GRLIB_unitcap))) min 15;
|
||||
|
||||
_spawn_marker = [2000,999999,false] call KPLIB_fnc_getOpforSpawnPoint;
|
||||
if (_spawn_marker == "") exitWith {["Could not find position for fob hunting mission", "ERROR"] call KPLIB_fnc_log;};
|
||||
|
||||
used_positions pushBack _spawn_marker;
|
||||
_base_position = markerpos _spawn_marker;
|
||||
_base_objects = [];
|
||||
_base_objectives = [];
|
||||
_base_defenders = [];
|
||||
|
||||
([] call (compile preprocessFileLineNumbers (selectRandom KPLIB_fob_templates))) params [
|
||||
"_objects_to_build",
|
||||
"_objectives_to_build",
|
||||
"_defenders_to_build",
|
||||
"_base_corners"
|
||||
];
|
||||
|
||||
[_base_position, 50] call KPLIB_fnc_createClearance;
|
||||
|
||||
private _nextobject = objNull;
|
||||
|
||||
{
|
||||
_x params [
|
||||
"_nextclass",
|
||||
"_nextpos",
|
||||
"_nextdir"
|
||||
];
|
||||
|
||||
_nextpos = [((_base_position select 0) + (_nextpos select 0)), ((_base_position select 1) + (_nextpos select 1)), 0];
|
||||
|
||||
_nextobject = _nextclass createVehicle _nextpos;
|
||||
_nextobject allowDamage false;
|
||||
_nextobject setVectorUp [0, 0, 1];
|
||||
_nextobject setdir _nextdir;
|
||||
_nextobject setpos _nextpos;
|
||||
_nextobject setVectorUp [0, 0, 1];
|
||||
_nextobject setdir _nextdir;
|
||||
_nextobject setpos _nextpos;
|
||||
|
||||
_base_objects pushBack _nextobject;
|
||||
} forEach _objects_to_build;
|
||||
|
||||
sleep 1;
|
||||
|
||||
{
|
||||
_x params [
|
||||
"_nextclass",
|
||||
"_nextpos",
|
||||
"_nextdir"
|
||||
];
|
||||
|
||||
_nextpos = [((_base_position select 0) + (_nextpos select 0)), ((_base_position select 1) + (_nextpos select 1)), 0];
|
||||
|
||||
_nextobject = _nextclass createVehicle _nextpos;
|
||||
_nextobject allowDamage false;
|
||||
_nextobject setVectorUp [0, 0, 1];
|
||||
_nextobject setpos _nextpos;
|
||||
_nextobject setdir _nextdir;
|
||||
_nextobject setVectorUp [0, 0, 1];
|
||||
_nextobject setpos _nextpos;
|
||||
_nextobject setdir _nextdir;
|
||||
_nextobject lock 2;
|
||||
|
||||
_base_objectives pushBack _nextobject;
|
||||
} forEach _objectives_to_build;
|
||||
|
||||
sleep 1;
|
||||
|
||||
{_x setDamage 0; _x allowDamage true;} foreach (_base_objectives + _base_objects);
|
||||
|
||||
_grpdefenders = createGroup [GRLIB_side_enemy, true];
|
||||
_idxselected = [];
|
||||
|
||||
while {(count _idxselected) < _defenders_amount && (count _idxselected) < (count _defenders_to_build)} do {
|
||||
_idxselected pushBackUnique (floor (random (count _defenders_to_build)));
|
||||
};
|
||||
|
||||
{
|
||||
(_defenders_to_build select _x) params [
|
||||
"_nextclass",
|
||||
"_nextpos",
|
||||
"_nextdir"
|
||||
];
|
||||
|
||||
_nextpos = [((_base_position select 0) + (_nextpos select 0)), ((_base_position select 1) + (_nextpos select 1)), (_nextpos select 2)];
|
||||
private _nextDefender = [_nextclass, _nextpos, _grpdefenders, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
_nextDefender setdir _nextdir;
|
||||
_nextDefender setpos _nextpos;
|
||||
[_nextDefender] spawn building_defence_ai;
|
||||
} forEach _idxselected;
|
||||
|
||||
private _sentryMax = ceil ((3 + (floor (random 4))) * (sqrt (GRLIB_unitcap)));
|
||||
|
||||
_grpsentry = createGroup [GRLIB_side_enemy, true];
|
||||
_base_sentry_pos = [(_base_position select 0) + ((_base_corners select 0) select 0), (_base_position select 1) + ((_base_corners select 0) select 1), 0];
|
||||
for [{_idx=0}, {_idx < _sentryMax}, {_idx=_idx+1}] do {
|
||||
[opfor_sentry, _base_sentry_pos, _grpsentry, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
};
|
||||
|
||||
while {(count (waypoints _grpsentry)) != 0} do {deleteWaypoint ((waypoints _grpsentry) select 0);};
|
||||
private _waypoint = [];
|
||||
{
|
||||
_waypoint = _grpsentry addWaypoint [[((_base_position select 0) + (_x select 0)), ((_base_position select 1) + (_x select 1)), 0], -1];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
} forEach _base_corners;
|
||||
|
||||
_waypoint = _grpsentry addWaypoint [[(_base_position select 0) + ((_base_corners select 0) select 0), (_base_position select 1) + ((_base_corners select 0) select 1), 0], -1];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
|
||||
_objectives_alive = true;
|
||||
|
||||
secondary_objective_position = _base_position;
|
||||
secondary_objective_position_marker = [(((secondary_objective_position select 0) + 800) - random 1600), (((secondary_objective_position select 1) + 800) - random 1600), 0];
|
||||
publicVariable "secondary_objective_position_marker";
|
||||
sleep 1;
|
||||
|
||||
GRLIB_secondary_in_progress = 0; publicVariable "GRLIB_secondary_in_progress";
|
||||
[2] remoteExec ["remote_call_intel"];
|
||||
|
||||
waitUntil {
|
||||
sleep 5;
|
||||
(_base_objectives select {alive _x}) isEqualTo []
|
||||
};
|
||||
|
||||
combat_readiness = round (combat_readiness * GRLIB_secondary_objective_impact);
|
||||
stats_secondary_objectives = stats_secondary_objectives + 1;
|
||||
sleep 1;
|
||||
[] spawn KPLIB_fnc_doSave;
|
||||
sleep 3;
|
||||
|
||||
[3] remoteExec ["remote_call_intel"];
|
||||
|
||||
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
|
||||
@@ -0,0 +1,112 @@
|
||||
|
||||
private _spawn_marker = [ 2000, 999999, false ] call KPLIB_fnc_getOpforSpawnPoint;
|
||||
if ( _spawn_marker == "" ) exitWith {["Could not find position for search and rescue mission", "ERROR"] call KPLIB_fnc_log;};
|
||||
used_positions pushbackUnique _spawn_marker;
|
||||
|
||||
private _helopos = (markerPos _spawn_marker) getPos [random 200, random 360];
|
||||
private _helowreck = KPLIB_sarWreck createVehicle _helopos;
|
||||
_helowreck allowDamage false;
|
||||
_helowreck setPos _helopos;
|
||||
_helowreck setPos _helopos;
|
||||
private _helowreckDir = (random 360);
|
||||
_helowreck setDir _helowreckDir;
|
||||
|
||||
private _helofire = KPLIB_sarFire createVehicle (getpos _helowreck);
|
||||
_helofire setpos (getpos _helowreck);
|
||||
_helofire setpos (getpos _helowreck);
|
||||
|
||||
private _pilotsGrp = createGroup [GRLIB_side_enemy, true];
|
||||
private _pilotsPos = (getpos _helowreck) getPos [25, random 360];
|
||||
|
||||
[pilot_classname, _pilotsPos, _pilotsGrp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
sleep 0.2;
|
||||
|
||||
[pilot_classname, _pilotsPos getPos [1, random 360], _pilotsGrp, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
sleep 2;
|
||||
|
||||
private _pilotUnits = units _pilotsGrp;
|
||||
{
|
||||
[ _x, true ] spawn prisonner_ai;
|
||||
_x setDir (random 360);
|
||||
sleep 0.5
|
||||
} foreach (_pilotUnits);
|
||||
|
||||
private _grppatrol = createGroup [GRLIB_side_enemy, true];
|
||||
private _patrolcorners = [
|
||||
[ (getpos _helowreck select 0) - 40, (getpos _helowreck select 1) - 40, 0 ],
|
||||
[ (getpos _helowreck select 0) + 40, (getpos _helowreck select 1) - 40, 0 ],
|
||||
[ (getpos _helowreck select 0) + 40, (getpos _helowreck select 1) + 40, 0 ],
|
||||
[ (getpos _helowreck select 0) - 40, (getpos _helowreck select 1) + 40, 0 ]
|
||||
];
|
||||
|
||||
{
|
||||
[_x, _patrolcorners select 0, _grppatrol, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
} foreach ([] call KPLIB_fnc_getSquadComp);
|
||||
|
||||
while {(count (waypoints _grppatrol)) != 0} do {deleteWaypoint ((waypoints _grppatrol) select 0);};
|
||||
{
|
||||
private _nextcorner = _x;
|
||||
_waypoint = _grppatrol addWaypoint [_nextcorner,0];
|
||||
_waypoint setWaypointType "MOVE";
|
||||
_waypoint setWaypointSpeed "LIMITED";
|
||||
_waypoint setWaypointBehaviour "SAFE";
|
||||
_waypoint setWaypointCompletionRadius 5;
|
||||
} foreach _patrolcorners;
|
||||
|
||||
_waypoint = _grppatrol addWaypoint [(_patrolcorners select 0), 0];
|
||||
_waypoint setWaypointType "CYCLE";
|
||||
{_x doFollow (leader _grppatrol)} foreach units _grppatrol;
|
||||
|
||||
private _grpsentry = createGroup [GRLIB_side_enemy, true];
|
||||
private _nbsentry = 2 + (floor (random 3));
|
||||
|
||||
for [ {_idx=0},{_idx < _nbsentry},{_idx=_idx+1} ] do {
|
||||
[opfor_sentry, _pilotsPos getPos [1, random 360], _grpsentry, "PRIVATE", 0.5] call KPLIB_fnc_createManagedUnit;
|
||||
};
|
||||
|
||||
(leader _grpsentry) setDir (random 360);
|
||||
|
||||
(opfor_transport_truck createVehicle ((getpos _helowreck) getPos [25, random 360])) setDir random 360;
|
||||
|
||||
private _vehicle_pool = opfor_vehicles;
|
||||
if ( combat_readiness < 50 ) then {
|
||||
_vehicle_pool = opfor_vehicles_low_intensity;
|
||||
};
|
||||
|
||||
private _vehtospawn = [];
|
||||
private _spawnchances = [75,50,15];
|
||||
{if (random 100 < _x) then {_vehtospawn pushBack (selectRandom _vehicle_pool);};} foreach _spawnchances;
|
||||
{([(getpos _helowreck) getPos [30 + (random 30), random 360], _x, true] call KPLIB_fnc_spawnVehicle) addMPEventHandler ['MPKilled', {_this spawn kill_manager}]; } foreach _vehtospawn;
|
||||
|
||||
secondary_objective_position = getpos _helowreck;
|
||||
secondary_objective_position_marker = secondary_objective_position getPos [800, random 360];
|
||||
publicVariable "secondary_objective_position_marker";
|
||||
sleep 1;
|
||||
GRLIB_secondary_in_progress = 2; publicVariable "GRLIB_secondary_in_progress";
|
||||
[6] remoteExec ["remote_call_intel"];
|
||||
|
||||
waitUntil {
|
||||
sleep 5;
|
||||
{ ( alive _x ) && ( _x distance ( [ getpos _x ] call KPLIB_fnc_getNearestFob ) > 50 ) } count _pilotUnits == 0
|
||||
};
|
||||
|
||||
sleep 5;
|
||||
|
||||
private _alive_crew_count = { alive _x } count _pilotUnits;
|
||||
if ( _alive_crew_count == 0 ) then {
|
||||
[7] remoteExec ["remote_call_intel"];
|
||||
} else {
|
||||
[8] remoteExec ["remote_call_intel"];
|
||||
private _grp = createGroup [GRLIB_side_friendly, true];
|
||||
{ [_x ] joinSilent _grp; } foreach _pilotUnits;
|
||||
while {(count (waypoints _grp)) != 0} do {deleteWaypoint ((waypoints _grp) select 0);};
|
||||
{_x doFollow (leader _grp)} foreach units _grp;
|
||||
{ [ _x ] spawn { sleep 600; deleteVehicle (_this select 0) } } foreach _pilotUnits;
|
||||
};
|
||||
|
||||
resources_intel = resources_intel + (10 * _alive_crew_count);
|
||||
stats_secondary_objectives = stats_secondary_objectives + 1;
|
||||
|
||||
GRLIB_secondary_in_progress = -1; publicVariable "GRLIB_secondary_in_progress";
|
||||
sleep 1;
|
||||
doSaveTrigger = true;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user