Resolve conflicts

This commit is contained in:
Filip Maciejewski 2019-09-06 13:20:20 +02:00
parent 290f8f5bc4
commit ed430ab606
No known key found for this signature in database
GPG Key ID: 53D1504CC3DBCD46
7 changed files with 699 additions and 16 deletions

View File

@ -40,13 +40,7 @@ while { true } do {
_zgm addCuratorEditableObjects [_zeusunits,true];
_zgm removeCuratorEditableObjects [_units_to_remove,true];
_zgm setCuratorCoef ["edit", -1e8];
_zgm setCuratorCoef ["place", -1e8];
_zgm setCuratorCoef ["synchronize", 0];
_zgm setCuratorCoef ["delete", 0];
_zgm setCuratorCoef ["destroy", -1e8];
} foreach allCurators;
sleep 10;
};
};

View File

@ -126,3 +126,26 @@ execVM "scripts\server\offloading\group_diag.sqf";
if (KP_liberation_restart > 0) then {
execVM "scripts\server\game\server_restart.sqf";
};
if (KP_liberation_limited_zeus) then {
zm1 setVariable ["Addons", 0, true];
removeAllCuratorAddons zm1;
zm1 setCuratorCoef ["edit", -1e8];
zm1 setCuratorCoef ["place", -1e8];
zm1 setCuratorCoef ["synchronize", 0];
zm1 setCuratorCoef ["delete", 0];
zm1 setCuratorCoef ["destroy", -1e8];
} else {
zm1 setVariable ["Addons", 3, true];
removeAllCuratorAddons zm1;
private _allAddons = ("true" configClasses (configFile >> "CfgPatches")) apply {configName _x};
zm1 addCuratorAddons _allAddons;
zm1 setCuratorCoef ["edit", 0];
zm1 setCuratorCoef ["place", 0];
zm1 setCuratorCoef ["synchronize", 0];
zm1 setCuratorCoef ["delete", 0];
zm1 setCuratorCoef ["destroy", 0];
};

View File

@ -1,3 +1,11 @@
// base amount of sector lifetime tickets
// if there are no enemies one ticket is removed every SECTOR_TICK_TIME seconds
// 12 * 5 = 60s by default
#define BASE_TICKETS 12
#define SECTOR_TICK_TIME 5
// delay in minutes from which addional time will be added
#define ADDITIONAL_TICKETS_DELAY 5
params ["_sector"];
waitUntil {!isNil "combat_readiness"};
@ -19,7 +27,8 @@ private _squad2 = [];
private _squad3 = [];
private _squad4 = [];
private _minimum_building_positions = 5;
private _sector_despawn_tickets = 12;
private _sector_despawn_tickets = BASE_TICKETS;
private _maximum_additional_tickets = (KP_liberation_delayDespawnMax * 60 / SECTOR_TICK_TIME);
private _popfactor = 1;
private _guerilla = false;
@ -162,7 +171,7 @@ if ((!(_sector in blufor_sectors)) && (([getmarkerpos _sector, [_opforcount] cal
_building_ai_max = 0;
};
_vehtospawn = _vehtospawn select {!(isNil "_x")};
_vehtospawn = _vehtospawn select {!(isNil "_x")};
if (KP_liberation_sectorspawn_debug > 0) then {private _text = format ["[KP LIBERATION] [SECTORSPAWN] Sector %1 (%2) - manage_one_sector calculated -> _infsquad: %3 - _squad1: %4 - _squad2: %5 - _squad3: %6 - _squad4: %7 - _vehtospawn: %8 - _building_ai_max: %9", (markerText _sector), _sector, _infsquad, (count _squad1), (count _squad2), (count _squad3), (count _squad4), (count _vehtospawn), _building_ai_max];_text remoteExec ["diag_log",2];};
@ -235,7 +244,10 @@ if ((!(_sector in blufor_sectors)) && (([getmarkerpos _sector, [_opforcount] cal
if (KP_liberation_sectorspawn_debug > 0) then {private _text = format ["[KP LIBERATION] [SECTORSPAWN] Sector %1 (%2) - populating done at %3", (markerText _sector), _sector, time];_text remoteExec ["diag_log",2];};
private _activationTime = time;
// sector lifetime loop
while {!_stopit} do {
// sector was captured
if (([_sectorpos, _local_capture_size] call F_sectorOwnership == GRLIB_side_friendly) && (GRLIB_endgame == 0)) then {
if (isServer) then {
[_sector] spawn sector_liberated_remote_call;
@ -266,7 +278,14 @@ if ((!(_sector in blufor_sectors)) && (([getmarkerpos _sector, [_opforcount] cal
if (([_sectorpos, (([_opforcount] call F_getCorrectedSectorRange) + 300), GRLIB_side_friendly] call F_getUnitsCount) == 0) then {
_sector_despawn_tickets = _sector_despawn_tickets - 1;
} else {
_sector_despawn_tickets = 12;
// start counting running minutes after ADDITIONAL_TICKETS_DELAY
private _runningMinutes = (floor ((time - _activationTime) / 60)) - ADDITIONAL_TICKETS_DELAY;
private _additionalTickets = (_runningMinutes * BASE_TICKETS);
// clamp from 0 to "_maximum_additional_tickets"
_additionalTickets = (_additionalTickets max 0) min _maximum_additional_tickets;
_sector_despawn_tickets = BASE_TICKETS + _additionalTickets;
};
if (_sector_despawn_tickets <= 0) then {
@ -282,7 +301,7 @@ if ((!(_sector in blufor_sectors)) && (([getmarkerpos _sector, [_opforcount] cal
active_sectors = active_sectors - [_sector]; publicVariable "active_sectors";
};
};
sleep 5;
sleep SECTOR_TICK_TIME;
};
} else {
sleep 40;

View File

@ -51,10 +51,12 @@ if(isServer) then {
GET_PARAM(KP_liberation_respawn_cooldown, "RespawnCooldown", 900);
GET_PARAM(KP_liberation_victoryCondition, "VictoryCondition", 0);
GET_PARAM(KP_liberation_allowEnemiesInImmobile, "AllowEnemiesInImmobile", 50);
GET_PARAM(KP_liberation_delayDespawnMax, "DelayDespawnMax", 5);
GET_PARAM_BOOL(KP_liberation_cr_param_buildings, "CR_Building", 0);
GET_PARAM_BOOL(KP_liberation_ailogistics, "AiLogistics", 1);
GET_PARAM_BOOL(KP_liberation_clear_cargo, "ClearCargo", 1);
GET_PARAM_BOOL(KP_liberation_limited_zeus, "LimitedZeus", 1);
GET_PARAM_BOOL(KP_liberation_arsenalUsePreset, "ArsenalUsePreset", 1);
GET_PARAM_BOOL(KP_liberation_mapmarkers, "MapMarkers", 1);
GET_PARAM_BOOL(KP_liberation_mobilerespawn, "MobileRespawn", 1);
@ -379,6 +381,10 @@ if (!isDedicated && hasInterface) then {
_value = if (KP_liberation_clear_cargo) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
_param = localize "STR_PARAM_LIMITEDZEUS";
_value = if (KP_liberation_limited_zeus) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];
_param = localize "STR_PERMISSIONS_PARAM";
_value = if (GRLIB_permissions_param) then {localize "STR_PARAMS_ENABLED";} else {localize "STR_PARAMS_DISABLED";};
_text = _text + format ["<font color='#ff8000'>%1</font><br />%2<br /><br />", _param, _value];

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ class Params
title = $STR_PARAMS_LOADSAVEPARAMS;
values[] = { 0, 1, 2 };
texts[] = { $STR_PARAMS_LOADSAVEPARAMS_SAVE, $STR_PARAMS_LOADSAVEPARAMS_LOAD, $STR_PARAMS_LOADSAVEPARAMS_SELECTED };
default = 1;
default = 1; // If you want to set mission parameters via server.cfg or this file, then set this value to 2
};
class Spacer0 {
title = "";
@ -270,6 +270,18 @@ class Params
text[] = { $STR_PARAMS_DISABLED, "25%", "50%", "75%", "100%"};
defualt = 50;
};
class DelayDespawnMax {
title = $STR_PARAM_DELAY_DESPAWN_MAX;
values[] = {0,5,10,15,20,25,30};
texts[] = {$STR_PARAMS_DISABLED, "5", "10", "15", "20", "25", "30"};
default = 5;
};
class LimitedZeus {
title = $STR_PARAM_LIMITEDZEUS;
values[] = {1,0};
texts[] = { $STR_PARAMS_ENABLED, $STR_PARAMS_DISABLED };
default = 1;
};
class Spacer3 {
title = "";
values[] = { "" };

View File

@ -190,8 +190,11 @@ class Missions
### 0.96.6 (tbd)
* Added: [Swedish Forces Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=826911897) transport configs. Thanks to [Dahlgren](https://github.com/Dahlgren)
* Added: Parameter to enable/disable the vanilla A3 dynamic fog behavior. Default enabled, so `fucking_set_fog.sqf` isn't running by default.
* Added: Parameter to enable/disable limitations on Zeus functionalities. Default enabled to keep old behaviour.
* Added: Parameter to decide to start the campaign with a FOB container (default, like before) or a FOB truck.
* Added: Parameter to allow enemies stay in immobile vehicles (default 50% chance).
* Added: Sector despawn scaling. The longer sector is activated the longer it de-activates. Configurable as parameter, 5min additional delay max by default.
* Added: Korean localization. Thanks to [PanzerKoLee](https://github.com/PanzerKoLee)
* Updated: Russian localization. Thanks to [DjHaski](https://github.com/DjHaski)
* Tweaked: Initial FOB box doesn't have equipment in the inventory anmore.
* Tweaked: Height check for mobile respawn now relies on `isTouchingGround` instead of z value of position.