Verify and fix cargo, nametags, rearm, reload, repair, ui, Convert infoDisplayChanged in common and mk6mortar Rsc's

This commit is contained in:
jonpas 2016-05-24 18:58:27 +02:00
parent 207d6612da
commit 331c3c70cb
20 changed files with 59 additions and 59 deletions

View File

@ -44,7 +44,7 @@
// TOOO maybe drag/carry the unloaded item?
}] call CBA_fnc_addEventHandler;
["ServerUnloadCargo", {
[QGVAR("serverUnload"), {
params ["_item", "_emptyPosAGL"];
_item hideObjectGlobal false;

View File

@ -23,7 +23,7 @@ class ACE_newEvents {
displayTextStructured = "ace_displayTextStructured";
cargoLoaded = "ace_cargoLoaded";
AddCargoByClass = "ace_addCargoByClass";
ServerUnloadCargo = "ace_serverUnloadCargo";
ServerUnloadCargo = QGVAR(serverUnload);
UnloadCargo = "ace_unloadCargo";
hideObjectGlobal = "ace_hideObjectGlobal";
cargoAddedByClass = "ace_cargoAddedByClass";

View File

@ -52,7 +52,7 @@ if (_item isEqualType objNull) then {
detach _item;
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
// do both on server to ensure they are executed in the correct order
["ace_serverUnloadCargo", [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
[QGVAR(serverUnload), [_item, _emptyPosAGL]] call CBA_fnc_serverEvent;
} else {
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
_newItem setPosASL (AGLtoASL _emptyPosAGL);

View File

@ -1,111 +1,111 @@
class RscInGameUI {
class RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoNoHUD {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSoldier: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSoldier', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Soldier')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoTank: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgVehicle', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Vehicle')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoAirNoWeapon: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoAir: RscUnitInfoAirNoWeapon {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfo_AH64D_gunner {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgAircraft', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Aircraft')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoUAV {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;);
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgUAV', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'UAV')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoSubmarine: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgSubmarine', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Submarine')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoShip: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgShip', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Ship')])] call CBA_fnc_localEvent;);
};
class RscWeaponEmpty {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinder {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtillery {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeArtilleryAuto {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_dlgArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Artillery')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderPAS13 {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderMAAWS {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsCom {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderAbramsGun {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscWeaponRangeFinderStrykerMGSGun {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_strider_commander {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_titan {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_punisher {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_SDV_periscope {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscUnitInfoParachute: RscUnitInfo {
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_4(""onLoad"",_this,""RscUnitInfo"",'IGUI')] call (uinamespace getvariable 'BIS_fnc_initDisplay'); uiNamespace setVariable [ARR_2('ACE_dlgParachute', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Parachute')])] call CBA_fnc_localEvent;);
};
class RscUnitVehicle {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscOptics_LaserDesignator_02 {
onLoad = QUOTE([ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
onLoad = QUOTE([ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Any')])] call CBA_fnc_localEvent;);
};
class RscStaminaBar {

View File

@ -3,7 +3,7 @@ class RscInGameUI {
class CA_IGUI_elements_group: RscControlsGroup {};
};
class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery {
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call CBA_fnc_localEvent;);
onLoad = QUOTE(uiNamespace setVariable [ARR_2('ACE_Mk6_RscWeaponRangeArtillery', _this select 0)]; [ARR_2('ace_infoDisplayChanged', [ARR_2(_this select 0, 'Mk6Mortar')])] call CBA_fnc_localEvent;);
controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"};
class ACE_ChargeDisplay: RscStructuredText {
idc = 80085;

View File

@ -29,7 +29,7 @@ GVAR(showNamesTime) = -10;
}] call CBA_fnc_addEventHandler;
// Change settings accordingly when they are changed
["SettingChanged", {
["ace_settingChanged", {
params ["_name"];
if (_name == QGVAR(showPlayerNames)) then {
call FUNC(updateSettings);

View File

@ -28,7 +28,7 @@ if (isServer) then {
if (!hasInterface) exitWith {};
["playerChanged", {
["ace_playerChanged", {
//When player changes, make sure to reset old unit's variable
params ["", "_oldUnit"];
if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then {

View File

@ -40,7 +40,7 @@ if (_maxMagazines == 1) then {
if (GVAR(level) == 1) then {
// Fill magazine completely
_target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
["displayTextStructured",
["ace_displayTextStructured",
[
[LSTRING(Hint_RearmedTriple), _rounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
@ -50,7 +50,7 @@ if (_maxMagazines == 1) then {
} else {
// Fill only at most _numRounds
_target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath];
["displayTextStructured",
["ace_displayTextStructured",
[
[LSTRING(Hint_RearmedTriple), _numRounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
@ -77,7 +77,7 @@ if (_maxMagazines == 1) then {
} else {
_target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath];
};
["displayTextStructured",
["ace_displayTextStructured",
[
[LSTRING(Hint_RearmedTriple), _numRounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
@ -91,7 +91,7 @@ if (_maxMagazines == 1) then {
_target addMagazineTurret [_magazineClass, _turretPath];
_target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath];
};
["displayTextStructured",
["ace_displayTextStructured",
[
[LSTRING(Hint_RearmedTriple), _rounds,
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),

View File

@ -18,16 +18,16 @@ if (!hasInterface) exitWith {};
{false},
[19, [false, true, false]], false] call CBA_fnc_addKeybind;
["ace_setAmmoSync", {
[QGVAR(syncAmmo), {
//To propagate the setAmmo change, do it on all clients
params ["_unit", "_weapon", "_ammo"];
TRACE_3("setAmmoSync EH",_unit,_weapon,_ammo);
TRACE_3("syncAmmo EH",_unit,_weapon,_ammo);
_unit setAmmo [_weapon, _ammo];
}] call CBA_fnc_addEventHandler;
// Listen for attempts to link ammo
["linkedAmmo", {
["ace_linkedAmmo", {
params ["_receiver", "_giver", "_magazine"];
private _magazineType = currentMagazine _receiver;
@ -48,7 +48,7 @@ if (!hasInterface) exitWith {};
// Add the ammo
private _ammoAdded = _ammoMissing min (_magazine select 1);
["ace_setAmmoSync", [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call CBA_fnc_globalEvent;
[QGVAR(syncAmmo), [_receiver, currentWeapon _receiver, _ammoCount + _ammoAdded]] call CBA_fnc_globalEvent;
if ((_magazine select 1) - _ammoAdded > 0) then {
["ace_returnedAmmo", [_giver, _receiver, [_magazineType, (_magazine select 1) - _ammoAdded]], [_giver]] call CBA_fnc_targetEvent;
@ -56,7 +56,7 @@ if (!hasInterface) exitWith {};
}] call CBA_fnc_addEventHandler;
// Listen for returned magazines
["returnedAmmo", {
["ace_returnedAmmo", {
params ["_receiver", "", "_magazine"];
TRACE_2("returnedAmmo EH",_receiver,_magazine);

View File

@ -23,7 +23,7 @@ class CfgPatches {
#include "ACE_Settings.hpp"
class ACE_newEvents {
setAmmoSync = "ace_setAmmoSync";
setAmmoSync = QGVAR(syncAmmo);
returnedAmmo = "ace_returnedAmmo";
linkedAmmo = "ace_linkedAmmo";
};

View File

@ -1,7 +1,7 @@
#include "script_component.hpp"
["ace_setVehicleDamage", {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
["ace_setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
// wheels
["ace_setWheelHitPointDamage", {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;
[QGVAR(setWheelHitPointDamage), {(_this select 0) setHitPointDamage [_this select 1, _this select 2]}] call CBA_fnc_addEventHandler;

View File

@ -20,9 +20,9 @@ class CfgPatches {
#include "CfgEden.hpp"
class ACE_newEvents {
setWheelHitPointDamage = "ace_setWheelHitPointDamage";
setVehicleHitPointDamage = "ace_setVehicleHitPointDamage";
setVehicleDamage = "ace_setVehicleDamage";
setWheelHitPointDamage = QGVAR(setWheelHitPointDamage);
setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage);
setVehicleDamage = QGVAR(setVehicleDamage);
fixPosition = "ace_fixPosition";
displayTextStructured = "ace_displayTextStructured";
engineOn = "ace_engineOn";

View File

@ -34,7 +34,7 @@ private _newTrack = ["ACE_Track", getPosASL _unit, _hitPointDamage] call FUNC(sp
TRACE_2("new track created",_newTrack,damage _newTrack);
// raise event to set the new hitpoint damage
["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {

View File

@ -34,7 +34,7 @@ private _newWheel = ["ACE_Wheel", getPosASL _unit, _hitPointDamage] call FUNC(sp
TRACE_2("new wheel created",_newWheel,damage _newWheel);
// raise event to set the new hitpoint damage
["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, 1], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {

View File

@ -34,7 +34,7 @@ private _hitPointNewDamage = (_hitPointCurDamage - 0.5) max _postRepairDamageMin
if (_hitPointNewDamage < _hitPointCurDamage) then {
// raise event to set the new hitpoint damage
TRACE_3("repairing main point", _vehicle, _hitPointIndex, _hitPointNewDamage);
["ace_setVehicleHitPointDamage", [_vehicle, _hitPointIndex, _hitPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setVehicleHitPointDamage), [_vehicle, _hitPointIndex, _hitPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
_hitPointCurDamage = _hitPointNewDamage;
};
@ -55,7 +55,7 @@ if (isArray _hitpointGroupConfig) then {
private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin;
if (_subPointNewDamage < _subPointCurDamage) then {
TRACE_3("repairing sub point", _vehicle, _subHitIndex, _subPointNewDamage);
["ace_setVehicleHitPointDamage", [_vehicle, _subHitIndex, _subPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setVehicleHitPointDamage), [_vehicle, _subHitIndex, _subPointNewDamage], _vehicle] call CBA_fnc_targetEvent;
};
};
} forEach _subHitArray;

View File

@ -41,7 +41,7 @@ _hitPointDamage = (_hitPointDamage - _damageRepaired) min 0;
deleteVehicle _track;
// raise event to set the new hitpoint damage
["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _hitPointDamage], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _hitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {

View File

@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
deleteVehicle _track;
// raise event to set the new hitpoint damage
["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {

View File

@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
deleteVehicle _wheel;
// raise event to set the new hitpoint damage
["ace_setWheelHitPointDamage", [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
[QGVAR(setWheelHitPointDamage), [_vehicle, _hitPoint, _newHitPointDamage], _vehicle] call CBA_fnc_targetEvent;
// display text message if enabled
if (GVAR(DisplayTextOnRepair)) then {

View File

@ -1,7 +1,7 @@
/*
* Author: commy2
* Set the hitpoint damage and change the structural damage acordingly, requires local vehicle.
* Handles the "setVehicleHitPointDamage" event
* Handles the "ace_repair_setVehicleHitPointDamage" event
*
* Arguments:
* 0: Local Vehicle to Damage <OBJECT>

View File

@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
[true] call FUNC(setElements);
// On load and entering/exiting a vehicle
["infoDisplayChanged", {
["ace_infoDisplayChanged", {
// Selective UI Advanced
// Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified
private _force = [true, false] select (GVAR(allowSelectiveUI));
@ -18,7 +18,7 @@ if (!hasInterface) exitWith {};
}] call CBA_fnc_addEventHandler;
// On changing settings
["SettingChanged", {
["ace_settingChanged", {
params ["_name"];
// Selective UI Basic