use event system, polish translation

This commit is contained in:
SzwedzikPL 2016-02-05 04:26:54 +01:00
parent 374b015ee4
commit 5f0a2b1945
4 changed files with 18 additions and 9 deletions

View File

@ -124,7 +124,4 @@ class CfgVehicles {
GVAR(dragPosition[]) = {0,1.2,0};
GVAR(dragDirection) = 180;
};
class Land_PortableLight_single_off_F: Land_PortableLight_single_F {};
class Land_PortableLight_double_F: Land_PortableLight_single_F {};
class Land_PortableLight_double_off_F: Land_PortableLight_double_F {};
};

View File

@ -18,6 +18,16 @@ ACE_Modifier = 0;
_unit doMove _position;
}] call EFUNC(common,addEventHandler);
["lampTurnOn", {
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
{if((_x select 1) == _disabledLampDMG) then {_lamp setHit [_x select 0, 0];};nil} count _hitPointsDamage;
}] call EFUNC(common,addEventHandler);
["lampTurnOff", {
params ["_lamp", "_hitPointsDamage", "_disabledLampDMG"];
{_lamp setHit [_x select 0, (_x select 1) max _disabledLampDMG];nil} count _hitPointsDamage;
}] call EFUNC(common,addEventHandler);
if (!hasInterface) exitWith {};
GVAR(isOpeningDoor) = false;
@ -61,7 +71,7 @@ GVAR(isOpeningDoor) = false;
//Tap whichever shoulder is closest
private _shoulderNum = [0, 1] select (([cursorTarget, ACE_player] call BIS_fnc_relativeDirTo) > 180);
// Statement
[ACE_player, cursorTarget, _shoulderNum] call FUNC(tapShoulder);
true

View File

@ -28,11 +28,11 @@ private _hitPointsDamage = [];
nil
} count _reflectors;
if(_isOn) then {
//turn off this lamp
{_lamp sethit [_x select 0, (_x select 1) max DISABLED_LAMP_DMG];nil} count _hitPointsDamage;
//if lamp is on turn it off
private _eventName = if(_isOn) then {"lampTurnOff"} else {"lampTurnOn"};
if(local _lamp) then {
[_eventName, [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call EFUNC(common,localEvent);
} else {
//turn on this lamp
{if((_x select 1) == DISABLED_LAMP_DMG) then {_lamp sethit [_x select 0, 0];};nil} count _hitPointsDamage;
[_eventName, [_lamp], [_lamp, _hitPointsDamage, DISABLED_LAMP_DMG]] call EFUNC(common,targetEvent);
};
_lamp setVariable ["ACE_lampOn", !_isOn, true];

View File

@ -693,9 +693,11 @@
</Key>
<Key ID="STR_ACE_Interaction_TurnOn">
<English>Turn on</English>
<Polish>Włącz</Polish>
</Key>
<Key ID="STR_ACE_Interaction_TurnOff">
<English>Turn off</English>
<Polish>Wyłącz</Polish>
</Key>
<Key ID="STR_ACE_Interaction_PassMagazine">
<English>Pass magazine</English>