mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
3543ce892d
- Added CinderWall Door to DoorCount in UpgradeBuild - Added Option to prevent repairing full damaged HitPoints in ServicePoint - Added Option to disable removing Parts in Advanced Vehicle Repair - Added CinderWallDoorwHatch_EPOCH to cfgBaseBuilding - Fix in cfgCrafting for KitVehicleUpgradeI_200_EPOCH - Added an "isdamageallowed" check in EPOCH_server_repairVehicle for repairing untouched Vehicles in Bases https://github.com/EpochModTeam/Epoch/blob/experimental/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf#L202-L203 - Some Cleanups of commented out lines
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
/*
|
|
Author: Aaron Clark - EpochMod.com
|
|
|
|
Contributors:
|
|
|
|
Description:
|
|
repair object via hit index
|
|
|
|
Licence:
|
|
Arma Public License Share Alike (APL-SA) - https://www.bistudio.com/community/licenses/arma-public-license-share-alike
|
|
|
|
Github:
|
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_code/compile/vehicles/EPOCH_client_repairVehicle.sqf
|
|
*/
|
|
//[[[cog import generate_private_arrays ]]]
|
|
private ["_currentDMG"];
|
|
//[[[end]]]
|
|
params ["_vehicle","_value"];
|
|
if (local _vehicle) then {
|
|
{
|
|
if ((_x select 0) isequaltype 0) then {
|
|
_vehicle setHitIndex [_x select 0, _x select 1];
|
|
}
|
|
else {
|
|
_vehicle setHitPointDamage [_x select 0, _x select 1];
|
|
};
|
|
} foreach _value;
|
|
|
|
if !({_x > 0} count ((getAllHitPointsDamage _vehicle) select 2) > 0) then {
|
|
[_vehicle,["ALL",0],player,Epoch_personalToken] remoteExec ["EPOCH_server_repairVehicle",2];
|
|
};
|
|
|
|
_vehicle call EPOCH_interact;
|
|
if !(EPOCH_arr_interactedObjs isEqualTo[]) then {
|
|
[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2];
|
|
EPOCH_arr_interactedObjs = [];
|
|
};
|
|
};
|