mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
22 lines
831 B
Plaintext
22 lines
831 B
Plaintext
#include "script_component.hpp"
|
|
|
|
["setVehicleDamage", {_this call FUNC(setDamage)}] call EFUNC(common,addEventHandler);
|
|
["setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call EFUNC(common,addEventHandler);
|
|
|
|
// wheels
|
|
["setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call EFUNC(common,addEventHandler);
|
|
|
|
if (isServer) then {
|
|
["SettingsInitialized", {
|
|
GVAR(settingInitted) = true; // Stop collecting in FUNC(addSpareParts)
|
|
|
|
// Exit if adding spare parts disabled
|
|
if (!GVAR(addSpareParts)) exitWith {GVAR(addSparePartsCollection) = nil};
|
|
|
|
// Add spare parts to vehicles in collection
|
|
{
|
|
[_x] call FUNC(addSpareParts);
|
|
} forEach GVAR(addSparePartsCollection);
|
|
}] call EFUNC(common,addEventHandler);
|
|
};
|