mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Verify and fix cargo, nametags, rearm, reload, repair, ui, Convert infoDisplayChanged in common and mk6mortar Rsc's
This commit is contained in:
parent
207d6612da
commit
331c3c70cb
@ -44,7 +44,7 @@
|
|||||||
// TOOO maybe drag/carry the unloaded item?
|
// TOOO maybe drag/carry the unloaded item?
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
["ServerUnloadCargo", {
|
[QGVAR("serverUnload"), {
|
||||||
params ["_item", "_emptyPosAGL"];
|
params ["_item", "_emptyPosAGL"];
|
||||||
|
|
||||||
_item hideObjectGlobal false;
|
_item hideObjectGlobal false;
|
||||||
|
@ -23,7 +23,7 @@ class ACE_newEvents {
|
|||||||
displayTextStructured = "ace_displayTextStructured";
|
displayTextStructured = "ace_displayTextStructured";
|
||||||
cargoLoaded = "ace_cargoLoaded";
|
cargoLoaded = "ace_cargoLoaded";
|
||||||
AddCargoByClass = "ace_addCargoByClass";
|
AddCargoByClass = "ace_addCargoByClass";
|
||||||
ServerUnloadCargo = "ace_serverUnloadCargo";
|
ServerUnloadCargo = QGVAR(serverUnload);
|
||||||
UnloadCargo = "ace_unloadCargo";
|
UnloadCargo = "ace_unloadCargo";
|
||||||
hideObjectGlobal = "ace_hideObjectGlobal";
|
hideObjectGlobal = "ace_hideObjectGlobal";
|
||||||
cargoAddedByClass = "ace_cargoAddedByClass";
|
cargoAddedByClass = "ace_cargoAddedByClass";
|
||||||
|
@ -52,7 +52,7 @@ if (_item isEqualType objNull) then {
|
|||||||
detach _item;
|
detach _item;
|
||||||
// hideObjectGlobal must be executed before setPos to ensure light objects are rendered correctly
|
// 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
|
// 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 {
|
} else {
|
||||||
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
|
private _newItem = createVehicle [_item, _emptyPosAGL, [], 0, ""];
|
||||||
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
_newItem setPosASL (AGLtoASL _emptyPosAGL);
|
||||||
|
@ -1,111 +1,111 @@
|
|||||||
|
|
||||||
class RscInGameUI {
|
class RscInGameUI {
|
||||||
class RscUnitInfo {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
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 {
|
class RscStaminaBar {
|
||||||
|
@ -3,7 +3,7 @@ class RscInGameUI {
|
|||||||
class CA_IGUI_elements_group: RscControlsGroup {};
|
class CA_IGUI_elements_group: RscControlsGroup {};
|
||||||
};
|
};
|
||||||
class ACE_Mk6_RscWeaponRangeArtillery: RscWeaponRangeArtillery {
|
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"};
|
controls[] = {"ACE_ChargeDisplay", "ACE_MILS_GROUP", "CA_IGUI_elements_group","CA_RangeElements_group"};
|
||||||
class ACE_ChargeDisplay: RscStructuredText {
|
class ACE_ChargeDisplay: RscStructuredText {
|
||||||
idc = 80085;
|
idc = 80085;
|
||||||
|
@ -29,7 +29,7 @@ GVAR(showNamesTime) = -10;
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Change settings accordingly when they are changed
|
// Change settings accordingly when they are changed
|
||||||
["SettingChanged", {
|
["ace_settingChanged", {
|
||||||
params ["_name"];
|
params ["_name"];
|
||||||
if (_name == QGVAR(showPlayerNames)) then {
|
if (_name == QGVAR(showPlayerNames)) then {
|
||||||
call FUNC(updateSettings);
|
call FUNC(updateSettings);
|
||||||
|
@ -28,7 +28,7 @@ if (isServer) then {
|
|||||||
|
|
||||||
if (!hasInterface) exitWith {};
|
if (!hasInterface) exitWith {};
|
||||||
|
|
||||||
["playerChanged", {
|
["ace_playerChanged", {
|
||||||
//When player changes, make sure to reset old unit's variable
|
//When player changes, make sure to reset old unit's variable
|
||||||
params ["", "_oldUnit"];
|
params ["", "_oldUnit"];
|
||||||
if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then {
|
if ((!isNull _oldUnit) && {_oldUnit getVariable [QGVAR(isSpeakingInGame), false]}) then {
|
||||||
|
@ -40,7 +40,7 @@ if (_maxMagazines == 1) then {
|
|||||||
if (GVAR(level) == 1) then {
|
if (GVAR(level) == 1) then {
|
||||||
// Fill magazine completely
|
// Fill magazine completely
|
||||||
_target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
|
_target setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
|
||||||
["displayTextStructured",
|
["ace_displayTextStructured",
|
||||||
[
|
[
|
||||||
[LSTRING(Hint_RearmedTriple), _rounds,
|
[LSTRING(Hint_RearmedTriple), _rounds,
|
||||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||||
@ -50,7 +50,7 @@ if (_maxMagazines == 1) then {
|
|||||||
} else {
|
} else {
|
||||||
// Fill only at most _numRounds
|
// Fill only at most _numRounds
|
||||||
_target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath];
|
_target setMagazineTurretAmmo [_magazineClass, ((_target magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath];
|
||||||
["displayTextStructured",
|
["ace_displayTextStructured",
|
||||||
[
|
[
|
||||||
[LSTRING(Hint_RearmedTriple), _numRounds,
|
[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||||
@ -77,7 +77,7 @@ if (_maxMagazines == 1) then {
|
|||||||
} else {
|
} else {
|
||||||
_target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath];
|
_target setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath];
|
||||||
};
|
};
|
||||||
["displayTextStructured",
|
["ace_displayTextStructured",
|
||||||
[
|
[
|
||||||
[LSTRING(Hint_RearmedTriple), _numRounds,
|
[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||||
@ -91,7 +91,7 @@ if (_maxMagazines == 1) then {
|
|||||||
_target addMagazineTurret [_magazineClass, _turretPath];
|
_target addMagazineTurret [_magazineClass, _turretPath];
|
||||||
_target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath];
|
_target setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath];
|
||||||
};
|
};
|
||||||
["displayTextStructured",
|
["ace_displayTextStructured",
|
||||||
[
|
[
|
||||||
[LSTRING(Hint_RearmedTriple), _rounds,
|
[LSTRING(Hint_RearmedTriple), _rounds,
|
||||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||||
|
@ -18,16 +18,16 @@ if (!hasInterface) exitWith {};
|
|||||||
{false},
|
{false},
|
||||||
[19, [false, true, false]], false] call CBA_fnc_addKeybind;
|
[19, [false, true, false]], false] call CBA_fnc_addKeybind;
|
||||||
|
|
||||||
["ace_setAmmoSync", {
|
[QGVAR(syncAmmo), {
|
||||||
//To propagate the setAmmo change, do it on all clients
|
//To propagate the setAmmo change, do it on all clients
|
||||||
params ["_unit", "_weapon", "_ammo"];
|
params ["_unit", "_weapon", "_ammo"];
|
||||||
TRACE_3("setAmmoSync EH",_unit,_weapon,_ammo);
|
TRACE_3("syncAmmo EH",_unit,_weapon,_ammo);
|
||||||
|
|
||||||
_unit setAmmo [_weapon, _ammo];
|
_unit setAmmo [_weapon, _ammo];
|
||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Listen for attempts to link ammo
|
// Listen for attempts to link ammo
|
||||||
["linkedAmmo", {
|
["ace_linkedAmmo", {
|
||||||
params ["_receiver", "_giver", "_magazine"];
|
params ["_receiver", "_giver", "_magazine"];
|
||||||
|
|
||||||
private _magazineType = currentMagazine _receiver;
|
private _magazineType = currentMagazine _receiver;
|
||||||
@ -48,7 +48,7 @@ if (!hasInterface) exitWith {};
|
|||||||
|
|
||||||
// Add the ammo
|
// Add the ammo
|
||||||
private _ammoAdded = _ammoMissing min (_magazine select 1);
|
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 {
|
if ((_magazine select 1) - _ammoAdded > 0) then {
|
||||||
["ace_returnedAmmo", [_giver, _receiver, [_magazineType, (_magazine select 1) - _ammoAdded]], [_giver]] call CBA_fnc_targetEvent;
|
["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;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// Listen for returned magazines
|
// Listen for returned magazines
|
||||||
["returnedAmmo", {
|
["ace_returnedAmmo", {
|
||||||
params ["_receiver", "", "_magazine"];
|
params ["_receiver", "", "_magazine"];
|
||||||
TRACE_2("returnedAmmo EH",_receiver,_magazine);
|
TRACE_2("returnedAmmo EH",_receiver,_magazine);
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ class CfgPatches {
|
|||||||
#include "ACE_Settings.hpp"
|
#include "ACE_Settings.hpp"
|
||||||
|
|
||||||
class ACE_newEvents {
|
class ACE_newEvents {
|
||||||
setAmmoSync = "ace_setAmmoSync";
|
setAmmoSync = QGVAR(syncAmmo);
|
||||||
returnedAmmo = "ace_returnedAmmo";
|
returnedAmmo = "ace_returnedAmmo";
|
||||||
linkedAmmo = "ace_linkedAmmo";
|
linkedAmmo = "ace_linkedAmmo";
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#include "script_component.hpp"
|
#include "script_component.hpp"
|
||||||
|
|
||||||
["ace_setVehicleDamage", {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
|
[QGVAR(setVehicleDamage), {_this call FUNC(setDamage)}] call CBA_fnc_addEventHandler;
|
||||||
["ace_setVehicleHitPointDamage", {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
|
[QGVAR(setVehicleHitPointDamage), {_this call FUNC(setHitPointDamage)}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// wheels
|
// 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;
|
||||||
|
@ -20,9 +20,9 @@ class CfgPatches {
|
|||||||
#include "CfgEden.hpp"
|
#include "CfgEden.hpp"
|
||||||
|
|
||||||
class ACE_newEvents {
|
class ACE_newEvents {
|
||||||
setWheelHitPointDamage = "ace_setWheelHitPointDamage";
|
setWheelHitPointDamage = QGVAR(setWheelHitPointDamage);
|
||||||
setVehicleHitPointDamage = "ace_setVehicleHitPointDamage";
|
setVehicleHitPointDamage = QGVAR(setVehicleHitPointDamage);
|
||||||
setVehicleDamage = "ace_setVehicleDamage";
|
setVehicleDamage = QGVAR(setVehicleDamage);
|
||||||
fixPosition = "ace_fixPosition";
|
fixPosition = "ace_fixPosition";
|
||||||
displayTextStructured = "ace_displayTextStructured";
|
displayTextStructured = "ace_displayTextStructured";
|
||||||
engineOn = "ace_engineOn";
|
engineOn = "ace_engineOn";
|
||||||
|
@ -34,7 +34,7 @@ private _newTrack = ["ACE_Track", getPosASL _unit, _hitPointDamage] call FUNC(sp
|
|||||||
TRACE_2("new track created",_newTrack,damage _newTrack);
|
TRACE_2("new track created",_newTrack,damage _newTrack);
|
||||||
|
|
||||||
// raise event to set the new hitpoint damage
|
// 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
|
// display text message if enabled
|
||||||
if (GVAR(DisplayTextOnRepair)) then {
|
if (GVAR(DisplayTextOnRepair)) then {
|
||||||
|
@ -34,7 +34,7 @@ private _newWheel = ["ACE_Wheel", getPosASL _unit, _hitPointDamage] call FUNC(sp
|
|||||||
TRACE_2("new wheel created",_newWheel,damage _newWheel);
|
TRACE_2("new wheel created",_newWheel,damage _newWheel);
|
||||||
|
|
||||||
// raise event to set the new hitpoint damage
|
// 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
|
// display text message if enabled
|
||||||
if (GVAR(DisplayTextOnRepair)) then {
|
if (GVAR(DisplayTextOnRepair)) then {
|
||||||
|
@ -34,7 +34,7 @@ private _hitPointNewDamage = (_hitPointCurDamage - 0.5) max _postRepairDamageMin
|
|||||||
if (_hitPointNewDamage < _hitPointCurDamage) then {
|
if (_hitPointNewDamage < _hitPointCurDamage) then {
|
||||||
// raise event to set the new hitpoint damage
|
// raise event to set the new hitpoint damage
|
||||||
TRACE_3("repairing main point", _vehicle, _hitPointIndex, _hitPointNewDamage);
|
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;
|
_hitPointCurDamage = _hitPointNewDamage;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ if (isArray _hitpointGroupConfig) then {
|
|||||||
private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin;
|
private _subPointNewDamage = (_subPointCurDamage - 0.5) max _postRepairDamageMin;
|
||||||
if (_subPointNewDamage < _subPointCurDamage) then {
|
if (_subPointNewDamage < _subPointCurDamage) then {
|
||||||
TRACE_3("repairing sub point", _vehicle, _subHitIndex, _subPointNewDamage);
|
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;
|
} forEach _subHitArray;
|
||||||
|
@ -41,7 +41,7 @@ _hitPointDamage = (_hitPointDamage - _damageRepaired) min 0;
|
|||||||
deleteVehicle _track;
|
deleteVehicle _track;
|
||||||
|
|
||||||
// raise event to set the new hitpoint damage
|
// 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
|
// display text message if enabled
|
||||||
if (GVAR(DisplayTextOnRepair)) then {
|
if (GVAR(DisplayTextOnRepair)) then {
|
||||||
|
@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
|
|||||||
deleteVehicle _track;
|
deleteVehicle _track;
|
||||||
|
|
||||||
// raise event to set the new hitpoint damage
|
// 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
|
// display text message if enabled
|
||||||
if (GVAR(DisplayTextOnRepair)) then {
|
if (GVAR(DisplayTextOnRepair)) then {
|
||||||
|
@ -44,7 +44,7 @@ if (_newHitPointDamage >= 1) exitWith {};
|
|||||||
deleteVehicle _wheel;
|
deleteVehicle _wheel;
|
||||||
|
|
||||||
// raise event to set the new hitpoint damage
|
// 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
|
// display text message if enabled
|
||||||
if (GVAR(DisplayTextOnRepair)) then {
|
if (GVAR(DisplayTextOnRepair)) then {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Author: commy2
|
* Author: commy2
|
||||||
* Set the hitpoint damage and change the structural damage acordingly, requires local vehicle.
|
* Set the hitpoint damage and change the structural damage acordingly, requires local vehicle.
|
||||||
* Handles the "setVehicleHitPointDamage" event
|
* Handles the "ace_repair_setVehicleHitPointDamage" event
|
||||||
*
|
*
|
||||||
* Arguments:
|
* Arguments:
|
||||||
* 0: Local Vehicle to Damage <OBJECT>
|
* 0: Local Vehicle to Damage <OBJECT>
|
||||||
|
@ -8,7 +8,7 @@ if (!hasInterface) exitWith {};
|
|||||||
[true] call FUNC(setElements);
|
[true] call FUNC(setElements);
|
||||||
|
|
||||||
// On load and entering/exiting a vehicle
|
// On load and entering/exiting a vehicle
|
||||||
["infoDisplayChanged", {
|
["ace_infoDisplayChanged", {
|
||||||
// Selective UI Advanced
|
// Selective UI Advanced
|
||||||
// Defaults must be set in this EH to make sure controls are activated and advanced settings can be modified
|
// 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));
|
private _force = [true, false] select (GVAR(allowSelectiveUI));
|
||||||
@ -18,7 +18,7 @@ if (!hasInterface) exitWith {};
|
|||||||
}] call CBA_fnc_addEventHandler;
|
}] call CBA_fnc_addEventHandler;
|
||||||
|
|
||||||
// On changing settings
|
// On changing settings
|
||||||
["SettingChanged", {
|
["ace_settingChanged", {
|
||||||
params ["_name"];
|
params ["_name"];
|
||||||
|
|
||||||
// Selective UI Basic
|
// Selective UI Basic
|
||||||
|
Loading…
Reference in New Issue
Block a user