mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Code Cleanup WeaponSelect
This commit is contained in:
parent
f77242fce3
commit
a078d73230
@ -375,8 +375,8 @@ if (!isNil QGVAR(PreInit_playerChanged_PFHID)) then {
|
||||
// @todo still needed?
|
||||
[QGVAR(StateArrested), false, true, QUOTE(ADDON)] call FUNC(defineVariable);
|
||||
|
||||
["displayTextStructured", FUNC(displayTextStructured)] call FUNC(addEventhandler);
|
||||
["displayTextPicture", FUNC(displayTextPicture)] call FUNC(addEventhandler);
|
||||
["displayTextStructured", {_this call FUNC(displayTextStructured)}] call FUNC(addEventhandler);
|
||||
["displayTextPicture", {_this call FUNC(displayTextPicture)}] call FUNC(addEventhandler);
|
||||
|
||||
["medical_onUnconscious", {
|
||||
params ["_unit", "_isUnconscious"];
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
class ACE_Settings {
|
||||
class GVAR(DisplayText) {
|
||||
typeName = "BOOL";
|
||||
|
@ -13,8 +13,8 @@ class Extended_PostInit_EventHandlers {
|
||||
|
||||
class Extended_FiredBIS_EventHandlers {
|
||||
class CAManBase {
|
||||
class GVAR(ThrowGrenade) {
|
||||
clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(throwGrenade)};);
|
||||
class GVAR(throwGrenade) {
|
||||
clientFiredBIS = QUOTE(if (_this select 0 == ACE_player) then {_this call FUNC(throwGrenade)});
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -3,7 +3,7 @@
|
||||
|
||||
if (!hasInterface) exitWith {};
|
||||
|
||||
// Add keybinds
|
||||
// add keybinds
|
||||
["ACE3 Weapons", QGVAR(SelectPistolNew), localize LSTRING(SelectPistol),
|
||||
{
|
||||
// Conditions: canInteract
|
||||
|
@ -1,10 +1,10 @@
|
||||
/*
|
||||
* Author: esteldunedain
|
||||
* Author: esteldunedain, commy2
|
||||
* Display a grenade type and quantity.
|
||||
*
|
||||
* Arguments:
|
||||
* 0: magazine class <STRING>
|
||||
* 1: number of magazines <NUMBER>
|
||||
* 0: grenade magazine class <STRING>
|
||||
* 1: number of grenades <NUMBER>
|
||||
*
|
||||
* Return Value:
|
||||
* None
|
||||
@ -18,14 +18,14 @@
|
||||
|
||||
if !(GVAR(DisplayText)) exitwith {};
|
||||
|
||||
params ["_magazine", "_numberofGrenades"];
|
||||
|
||||
private ["_color", "_name", "_text", "_picture"];
|
||||
|
||||
params ["_magazine", "_numberofMagazines"];
|
||||
|
||||
_color = [[1, 0, 0], [1, 1, 1]] select (_numberofMagazines > 0);
|
||||
_color = [[1, 0, 0], [1, 1, 1]] select (_numberofGrenades > 0);
|
||||
_name = getText (configFile >> "CfgMagazines" >> _magazine >> "displayNameShort");
|
||||
|
||||
_text = [format["%1 x%2", _name, _numberofMagazines], _color] call EFUNC(common,stringToColoredText);
|
||||
_text = [format ["%1 x%2", _name, _numberofGrenades], _color] call EFUNC(common,stringToColoredText);
|
||||
_picture = getText (configFile >> "CfgMagazines" >> _magazine >> "picture");
|
||||
|
||||
[_text, _picture] call EFUNC(common,displayTextPicture);
|
||||
["displayTextPicture", [_text, _picture]] call EFUNC(common,localEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user