mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Object event
This commit is contained in:
parent
d0509830e3
commit
a2b9678b15
@ -31,9 +31,9 @@ if (GVAR(supply) == 1) then {
|
||||
params ["_args"];
|
||||
_args params [["_unit", objNull, [objNull]], ["_truck", objNull, [objNull]], ["_supplyCount", 0, [0]]];
|
||||
if (_supplyCount > 0 ) then {
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RemainingSupplyPoints), _supplyCount], 2, _unit]] call EFUNC(common,targetEvent);
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RemainingSupplyPoints), _supplyCount], 2, _unit]] call EFUNC(common,objectEvent);
|
||||
} else {
|
||||
["displayTextStructured", [_unit], [LSTRING(Hint_EmptySupplyPoints), 2, _unit]] call EFUNC(common,targetEvent);
|
||||
["displayTextStructured", _unit, [LSTRING(Hint_EmptySupplyPoints), 2, _unit]] call EFUNC(common,objectEvent);
|
||||
};
|
||||
true
|
||||
},
|
||||
@ -64,9 +64,9 @@ if (GVAR(supply) == 1) then {
|
||||
} count _magazines;
|
||||
};
|
||||
if (_supply > 1.5) then {
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)]] call EFUNC(common,targetEvent);
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RemainingAmmo), _text], _supply, _unit, (_numChars/2.9)]] call EFUNC(common,objectEvent);
|
||||
} else {
|
||||
["displayTextStructured", [_unit], [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,targetEvent);
|
||||
["displayTextStructured", _unit, [LSTRING(Hint_Empty), 2, _unit]] call EFUNC(common,objectEvent);
|
||||
};
|
||||
true
|
||||
},
|
||||
|
@ -40,15 +40,15 @@ if (_maxMagazines == 1) then {
|
||||
if (GVAR(level) == 1) then {
|
||||
// Fill magazine completely
|
||||
_vehicle setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _rounds,
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RearmedTriple), _rounds,
|
||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,objectEvent);
|
||||
} else {
|
||||
// Fill only at most _numRounds
|
||||
_vehicle setMagazineTurretAmmo [_magazineClass, ((_vehicle magazineTurretAmmo [_magazineClass, _turretPath]) + _numRounds) min _rounds, _turretPath];
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,objectEvent);
|
||||
};
|
||||
} else {
|
||||
for "_idx" from 1 to (_maxMagazines+1) do {
|
||||
@ -69,9 +69,9 @@ if (_maxMagazines == 1) then {
|
||||
} else {
|
||||
_vehicle setMagazineTurretAmmo [_magazineClass, _currentRounds + _numRounds, _turretPath];
|
||||
};
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RearmedTriple), _numRounds,
|
||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,objectEvent);
|
||||
} else {
|
||||
// Fill current magazine completely and fill next magazine partially
|
||||
_vehicle setMagazineTurretAmmo [_magazineClass, _rounds, _turretPath];
|
||||
@ -79,9 +79,9 @@ if (_maxMagazines == 1) then {
|
||||
_vehicle addMagazineTurret [_magazineClass, _turretPath];
|
||||
_vehicle setMagazineTurretAmmo [_magazineClass, _currentRounds, _turretPath];
|
||||
};
|
||||
["displayTextStructured", [_unit], [[LSTRING(Hint_RearmedTriple), _rounds,
|
||||
["displayTextStructured", _unit, [[LSTRING(Hint_RearmedTriple), _rounds,
|
||||
getText(configFile >> "CfgMagazines" >> _magazineClass >> "displayName"),
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,targetEvent);
|
||||
getText(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "displayName")], 3, _unit]] call EFUNC(common,objectEvent);
|
||||
};
|
||||
};
|
||||
_vehicle removeMagazineTurret [_magazineClass, _turretPath];
|
||||
|
Loading…
Reference in New Issue
Block a user