mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Allow modular buildables to refund defined parts
This commit is contained in:
@@ -71,7 +71,7 @@ _nameVehicle = getText(configFile >> "CfgVehicles" >> _objType >> "displayName")
|
|||||||
|
|
||||||
format[localize "str_epoch_player_162",_nameVehicle] call dayz_rollingMessages;
|
format[localize "str_epoch_player_162",_nameVehicle] call dayz_rollingMessages;
|
||||||
|
|
||||||
if (_isModular) then {
|
if (_isModular && {_objType in _x} count DZE_modularConfig == 0) then {
|
||||||
localize "STR_EPOCH_ACTIONS_21" call dayz_rollingMessages;
|
localize "STR_EPOCH_ACTIONS_21" call dayz_rollingMessages;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -190,14 +190,27 @@ if (_proceed && _success) then {
|
|||||||
default {_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput")};
|
default {_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput")};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
if ({_objType in _x} count DZE_modularConfig > 0) then {
|
||||||
|
{
|
||||||
|
private ["_class", "_refund"];
|
||||||
|
|
||||||
|
_class = _x select 0;
|
||||||
|
_refund = _x select 1;
|
||||||
|
|
||||||
|
if (_objType == _class) then {
|
||||||
|
{_selectedRemoveOutput set [count _selectedRemoveOutput,_x];} forEach _refund;
|
||||||
|
};
|
||||||
|
} count DZE_modularConfig;
|
||||||
|
} else {
|
||||||
|
_selectedRemoveOutput = getArray (configFile >> "CfgVehicles" >> _objType >> "removeoutput");
|
||||||
|
};
|
||||||
_preventRefund = (_objectID == "0" && _objectUID == "0");
|
_preventRefund = (_objectID == "0" && _objectUID == "0");
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((count _selectedRemoveOutput) <= 0) then {
|
if ((count _selectedRemoveOutput) <= 0) then {
|
||||||
localize "str_epoch_player_90" call dayz_rollingMessages;
|
[localize "str_epoch_player_90",1] call dayz_rollingMessages;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (_ipos select 2 < 0) then {
|
if (_ipos select 2 < 0) then {
|
||||||
|
|||||||
Reference in New Issue
Block a user