Debug Parameter for logistic

This commit is contained in:
Christian 2017-10-01 08:51:37 +02:00
parent ece1b0d795
commit 1e766d27e6
6 changed files with 25 additions and 16 deletions

View File

@ -1,3 +0,0 @@
params ["_sector", "_count"];

View File

@ -1,12 +1,12 @@
waitUntil {!isNil "save_is_loaded"};
waitUntil {!isNil "KP_liberation_logistics"};
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic management started on: %1", debug_source];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic management started on: %1", debug_source];_text remoteExec ["diag_log",2];};
while {GRLIB_endgame == 0} do {
if (((count allPlayers) > 0) && ((count KP_liberation_logistics) > 0)) then {
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic interval started: %1", time];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic interval started: %1", time];_text remoteExec ["diag_log",2];};
private ["_tempLogistics","_locPos","_locRes","_storage_areas","_toProcess","_currentIndex","_processed","_space","_crate","_supplyValue","_ammoValue","_fuelValue","_maxGetSupply","_maxGetAmmo","_maxGetFuel","_getSupply","_getAmmo","_getFuel","_i","_nextState","_time"];
@ -136,10 +136,10 @@ while {GRLIB_endgame == 0} do {
} forEach _storage_areas;
};
please_recalculate = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
} else {
_x set [9,1];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
};
if (((_x select 9) == 1) && !((_x select _locRes) isEqualTo [0,0,0])) then {
@ -303,7 +303,7 @@ while {GRLIB_endgame == 0} do {
} forEach _storage_areas;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
};
} else {
if (((_x select 4) isEqualTo [0,0,0]) && ((_x select 5) isEqualTo [0,0,0]) && ((_x select 6) isEqualTo [0,0,0])) then {
@ -320,7 +320,7 @@ while {GRLIB_endgame == 0} do {
_x set [8,_time];
_x set [9,0];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
};
};
case 2;
@ -328,7 +328,7 @@ while {GRLIB_endgame == 0} do {
if ((_x select 8) > 1) then {
_x set [8,((_x select 8) - 1)];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
} else {
switch (_x select 7) do {
@ -349,7 +349,7 @@ while {GRLIB_endgame == 0} do {
_x set [7,_nextState];
_x set [8,_time];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
};
};
case 5;
@ -472,7 +472,7 @@ while {GRLIB_endgame == 0} do {
};
please_recalculate = true;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
} else {
_x set [2,[0,0,0]];
_x set [3,[0,0,0]];
@ -482,7 +482,7 @@ while {GRLIB_endgame == 0} do {
_x set [7,0];
_x set [8,-1];
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic Group Update: %1", _x];_text remoteExec ["diag_log",2];};
};
};
default {};
@ -491,7 +491,7 @@ while {GRLIB_endgame == 0} do {
KP_liberation_logistics = +_tempLogistics;
if (KP_liberation_debug) then {private _text = format ["[KP LIBERATION] [DEBUG] Logistic interval finished: %1", time];_text remoteExec ["diag_log",2];};
if (KP_liberation_logistic_debug > 0) then {private _text = format ["[KP LIBERATION] [LOGISTIC] Logistic interval finished: %1", time];_text remoteExec ["diag_log",2];};
};
uiSleep 60;
};

View File

@ -37,6 +37,7 @@ if ( isMultiplayer ) then {
KP_liberation_civrep_debug = ["DebugCivRep",0] call bis_fnc_getParamValue;
KP_liberation_savegame_debug = ["DebugSave",0] call bis_fnc_getParamValue;
KP_liberation_asymmetric_debug = ["DebugAsymmetric",0] call bis_fnc_getParamValue;
KP_liberation_logistic_debug = ["DebugLogistic",0] call bis_fnc_getParamValue;
} else {
GRLIB_difficulty_modifier = 2;
GRLIB_time_factor = 12;
@ -77,6 +78,7 @@ if ( isMultiplayer ) then {
KP_liberation_civrep_debug = 0;
KP_liberation_savegame_debug = 0;
KP_liberation_asymmetric_debug = 0;
KP_liberation_logistic_debug = 0;
};
KP_liberation_debug = false;

View File

@ -4308,7 +4308,7 @@
<German>Der Zivilist gab uns wichtige Informationen.</German>
</Key>
<Key ID="STR_NOTIFICATION_CIV_INFORMANT_FAIL">
<Original>The civilian is disappeared.</Original>
<Original>The civilian has disappeared.</Original>
<German>Der Zivilist ist wieder untergetaucht.</German>
</Key>
<Key ID="STR_NOTIFICATION_CIV_INFORMANT_DEATH">
@ -4319,5 +4319,9 @@
<Original>Asymmetric Threat</Original>
<German>Asymmetrische Bedrohung</German>
</Key>
<Key ID="STR_PARAMS_DEBUG_LOGISTIC">
<Original>Logistic</Original>
<German>Logistik</German>
</Key>
</Package>
</Project>

View File

@ -335,6 +335,12 @@ class Params
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
class DebugLogistic {
title = $STR_PARAMS_DEBUG_LOGISTIC;
values[] = {0, 1};
texts[] = {$STR_PARAMS_DISABLED, $STR_PARAMS_ENABLED};
default = 0;
};
class DebugSave {
title = $STR_PARAMS_DEBUG_SAVE;
values[] = {0, 1};

View File

@ -181,7 +181,7 @@ class Missions
* Added: Possibility of IEDs in blufor sectors, if you have a bad civil reputation.
* Removed: Liberation skill handling of AI units, as BI do this good enough now concerning wounds, etc.
* Removed: Vehicle explosion chance script for convoy ambush.
* Tweaked: Terrain aligment will be persistent during repeat building of objects (like walls). Thanks to [veteran29](https://github.com/veteran29)
* Tweaked: Terrain alignment will be persistent during repeat building of objects (like walls). Thanks to [veteran29](https://github.com/veteran29)
* Tweaked: Some reordering of UI elements.
* Tweaked: Localization support for the extended options menu. Thanks to [nercon](https://github.com/nercon)
* Tweaked: Highlight color in production list changed to blue instead of misleading green.