mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Add Ability to Change Repair Times of Vehicles (#5205)
* Add ability to change repair time based on vehicle * Much better * Unary command not function * Allow changing of track or wheel object per vehicle * Lot more complicated than I thought
This commit is contained in:
parent
55df8bca53
commit
225d15dcca
@ -177,23 +177,31 @@ if (vehicle _caller == _caller && {_callerAnim != ""}) then {
|
||||
[_caller, _callerAnim] call EFUNC(common,doAnimation);
|
||||
};
|
||||
|
||||
//Get repair time
|
||||
_repairTime = if (isNumber (_config >> "repairingTime")) then {
|
||||
getNumber (_config >> "repairingTime");
|
||||
} else {
|
||||
if (isText (_config >> "repairingTime")) exitWith {
|
||||
_repairTimeConfig = getText(_config >> "repairingTime");
|
||||
if (isNil _repairTimeConfig) then {
|
||||
_repairTimeConfig = compile _repairTimeConfig;
|
||||
} else {
|
||||
_repairTimeConfig = missionNamespace getVariable _repairTimeConfig;
|
||||
// Get repair time
|
||||
_repairTime = [
|
||||
configFile >> "CfgVehicles" >> typeOf _target >> QGVAR(repairTimes) >> configName _config,
|
||||
"number",
|
||||
-1
|
||||
] call CBA_fnc_getConfigEntry;
|
||||
|
||||
if (_repairTime < 0) then {
|
||||
_repairTime = if (isNumber (_config >> "repairingTime")) then {
|
||||
getNumber (_config >> "repairingTime");
|
||||
} else {
|
||||
if (isText (_config >> "repairingTime")) exitWith {
|
||||
_repairTimeConfig = getText (_config >> "repairingTime");
|
||||
if (isNil _repairTimeConfig) then {
|
||||
_repairTimeConfig = compile _repairTimeConfig;
|
||||
} else {
|
||||
_repairTimeConfig = missionNamespace getVariable _repairTimeConfig;
|
||||
};
|
||||
if (_repairTimeConfig isEqualType 0) exitWith {
|
||||
_repairTimeConfig;
|
||||
};
|
||||
[_caller, _target, _hitPoint, _className] call _repairTimeConfig;
|
||||
};
|
||||
if (_repairTimeConfig isEqualType 0) exitWith {
|
||||
_repairTimeConfig;
|
||||
};
|
||||
[_caller, _target, _hitPoint, _className] call _repairTimeConfig;
|
||||
0;
|
||||
};
|
||||
0;
|
||||
};
|
||||
|
||||
// Find localized string
|
||||
|
Loading…
Reference in New Issue
Block a user