mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Loading config data to extension
This commit is contained in:
parent
f26cb0a666
commit
23a1bc86ca
@ -118,4 +118,62 @@ _selectionSpecific = getNumber(_damageTypesConfig >> "selectionSpecific");
|
||||
if (isNumber(_damageTypesConfig >> _x >> "selectionSpecific")) then { _selectionSpecificType = getNumber(_damageTypesConfig >> _x >> "selectionSpecific");};
|
||||
};
|
||||
missionNamespace setvariable [_varName, [_typeThresholds, _selectionSpecificType > 0, _woundTypes]];
|
||||
|
||||
private ["_minDamageThresholds", "_amountThresholds"];
|
||||
// extension loading
|
||||
_minDamageThresholds = "";
|
||||
_amountThresholds = "";
|
||||
{
|
||||
_minDamageThresholds = _minDamageThresholds + str(_x select 0);
|
||||
_amountThresholds = _amountThresholds + str(_x select 1);
|
||||
if (_forEachIndex < (count _typeThresholds) - 1) then {
|
||||
_minDamageThresholds = _minDamageThresholds + ":";
|
||||
_amountThresholds = _amountThresholds + ":";
|
||||
};
|
||||
}foreach _typeThresholds;
|
||||
|
||||
_extensionInput = format ["addDamageType,%1,%2,%3,%4,%5", _type, GVAR(minLethalDamages) select _foreachIndex, _minDamageThresholds, _amountThresholds, _selectionSpecificType];
|
||||
diag_log format["Calling extension with input: %1", _extensionInput];
|
||||
diag_log format ["Extension return: %1", "ace_medical" callExtension _extensionInput];
|
||||
|
||||
}foreach _allFoundDamageTypes;
|
||||
|
||||
|
||||
// Extension loading
|
||||
|
||||
{
|
||||
private ["_classID", "_className", "_allowedSelections", "_bloodLoss", "_pain", "_minDamage", "_maxDamage", "_causes", "_classDisplayName", "_extensionInput", "_selections", "_causesArray"];
|
||||
// add shit to addInjuryType
|
||||
_classID = _x select 0;
|
||||
_className = GVAR(woundClassNames) select _forEachIndex;
|
||||
_allowedSelections = "";
|
||||
|
||||
_selections = _x select 1;
|
||||
{
|
||||
_allowedSelections = _allowedSelections + _x;
|
||||
if (_forEachIndex < (count _selections) - 1) then {
|
||||
_allowedSelections = _allowedSelections + ":";
|
||||
};
|
||||
}foreach _selections;
|
||||
|
||||
_bloodLoss = _x select 2;
|
||||
_pain = _x select 3;
|
||||
_minDamage = (_x select 4) select 0;
|
||||
_maxDamage = (_x select 4) select 1;
|
||||
_causes = "";
|
||||
_causesArray = (_x select 5);
|
||||
{
|
||||
_causes = _causes + _x;
|
||||
if (_forEachIndex < (count _causesArray) - 1) then {
|
||||
_causes = _causes + ":";
|
||||
};
|
||||
}foreach _causesArray;
|
||||
_classDisplayName = _x select 6;
|
||||
_extensionInput = format["addInjuryType,%1,%2,%3,%4,%5,%6,%7,%8,%9", _classID, _className, _allowedSelections, _bloodLoss, _pain, _minDamage, _maxDamage, _causes, _classDisplayName];
|
||||
|
||||
diag_log format["Calling extension with input: %1", _extensionInput];
|
||||
diag_log format ["Extension return: %1", "ace_medical" callExtension _extensionInput];
|
||||
|
||||
}foreach _allWoundClasses;
|
||||
|
||||
diag_log format["Extension configComplete: %1", "ace_medical" callExtension "ConfigComplete"];
|
||||
|
Loading…
Reference in New Issue
Block a user