mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Arma 3 1.66 fixes part1
playableUnits changed to allPlayers improved Epoch_selectInventoryItem function mproved inventory locked check
This commit is contained in:
parent
3d1f958839
commit
8e614b0b78
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -109,7 +109,7 @@ if (diag_tickTime - EPOCH_lastTrash > 2) then {
|
|||||||
{
|
{
|
||||||
_index = lbAdd[21500, name _x];
|
_index = lbAdd[21500, name _x];
|
||||||
lbSetData[21500, _index, netId _x];
|
lbSetData[21500, _index, netId _x];
|
||||||
} forEach(playableUnits - [player]);
|
} forEach(allPlayers - [player]);
|
||||||
};
|
};
|
||||||
_return = true;
|
_return = true;
|
||||||
};
|
};
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
NOTHING
|
NOTHING
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_arr","_craftingArray","_craftingArrayNames","_data","_exit","_index","_name","_pic","_text"];
|
private ["_container","_craftingArray","_craftingArrayNames","_data","_idc","_index","_pic","_text","_weaponsAndItems"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params ["_control","_index"];
|
params ["_control","_index"];
|
||||||
EPOCH_InteractedItem = [];
|
EPOCH_InteractedItem = [];
|
||||||
@ -32,6 +32,7 @@ if (_index isEqualType []) then {
|
|||||||
_index = (_index select 0) select 1;
|
_index = (_index select 0) select 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_idc = ctrlIDC _control;
|
||||||
_text = _control lbText _index;
|
_text = _control lbText _index;
|
||||||
_data = _control lbData _index;
|
_data = _control lbData _index;
|
||||||
_pic = _control lbPicture _index;
|
_pic = _control lbPicture _index;
|
||||||
@ -39,17 +40,17 @@ _pic = _control lbPicture _index;
|
|||||||
_craftingArray = [];
|
_craftingArray = [];
|
||||||
_craftingArrayNames = [];
|
_craftingArrayNames = [];
|
||||||
|
|
||||||
// This test is to over come an issue that causes the wrong class selected
|
// weapons and items do not return a class so a workaround is used to find the class
|
||||||
// when more than two classes share the same displayName
|
|
||||||
if (_data == "") then {
|
if (_data == "") then {
|
||||||
{
|
_container = switch (_idc) do {
|
||||||
_name = configName(_x);
|
case 633: { uniformContainer player };
|
||||||
_exit = false;
|
case 638: { vestContainer player };
|
||||||
if !(isNull EPOCH_lastContainer) then {
|
case 632: { EPOCH_targetContainer };
|
||||||
_arr = ((getItemCargo EPOCH_lastContainer) select 0) + [uniform player,vest player,headgear player];
|
case 640: { EPOCH_secondaryContainer };
|
||||||
_exit = (_name in _arr);
|
default { backpackContainer player };
|
||||||
};
|
};
|
||||||
if (_exit) exitWith {_data = _name};
|
_weaponsAndItems = ((getWeaponCargo _container) select 0);
|
||||||
} forEach ("getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons"));
|
_weaponsAndItems append ((getItemCargo _container) select 0);
|
||||||
|
_data = _weaponsAndItems param [_val,""];
|
||||||
};
|
};
|
||||||
EPOCH_InteractedItem = [_text,_data,_pic];
|
EPOCH_InteractedItem = [_text,_data,_pic];
|
||||||
|
@ -55,7 +55,7 @@ class CfgEpochClient
|
|||||||
Take = "(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck";
|
Take = "(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck";
|
||||||
Fired = "_this call EPOCH_fnc_playerFired;";
|
Fired = "_this call EPOCH_fnc_playerFired;";
|
||||||
InventoryClosed = "if !(EPOCH_arr_interactedObjs isEqualTo[]) then {[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2]; EPOCH_arr_interactedObjs = [];};";
|
InventoryClosed = "if !(EPOCH_arr_interactedObjs isEqualTo[]) then {[EPOCH_arr_interactedObjs] remoteExec['EPOCH_server_save_vehicles', 2]; EPOCH_arr_interactedObjs = [];};";
|
||||||
InventoryOpened = "setMousePosition[0.5, 0.5]; call EPOCH_showStats;_this spawn EPOCH_initUI;_container = _this select 1;_lockedNear = false;if (_container isKindOf 'GroundWeaponHolder' || _container isKindOf 'WeaponHolderSimulated') then {{if (locked _x in [2, 3] ||_x getVariable['EPOCH_Locked', false]) exitWith {_lockedNear = true}} forEach (player nearSupplies 10);};if (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false] || _lockedNear) then {[] spawn {disableSerialization;waitUntil {!isNull findDisplay 602};_display = findDisplay 602;_ctrl_cargo = _display displayCtrl 6401;_ctrl_ground = _display displayCtrl 6321;_ctrl_cargo ctrlEnable false;ctrlSetFocus _ctrl_ground;ctrlActivate _ctrl_ground;};};";
|
InventoryOpened = "setMousePosition[0.5, 0.5];call EPOCH_showStats;_this spawn EPOCH_initUI;params ['_unit','_container','_sec'];_containerlocked = (locked _container in [2, 3] || _container getVariable['EPOCH_Locked', false]);_seclocked = false;if !(isNull _sec) then {_seclocked = (locked _sec in [2, 3] || _sec getVariable['EPOCH_Locked', false]);};if (_containerlocked || _seclocked) then {[] spawn {disableSerialization;waitUntil {!isNull findDisplay 602};_d = findDisplay 602;_cargo = _d displayCtrl 6401;_ground = _d displayCtrl 6321;_cargo ctrlEnable false;ctrlSetFocus _ground;ctrlActivate _ground;};};";
|
||||||
Killed = "_this call EPOCH_fnc_playerDeath;";
|
Killed = "_this call EPOCH_fnc_playerDeath;";
|
||||||
HandleRating = "EPOCH_playerKarma = EPOCH_playerKarma + (_this select 1);0";
|
HandleRating = "EPOCH_playerKarma = EPOCH_playerKarma + (_this select 1);0";
|
||||||
HandleDamage = "";
|
HandleDamage = "";
|
||||||
|
@ -49,7 +49,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
|||||||
if ((_x getVariable["GROUP",""]) == _groupID) exitWith {
|
if ((_x getVariable["GROUP",""]) == _groupID) exitWith {
|
||||||
_group = group _x;
|
_group = group _x;
|
||||||
};
|
};
|
||||||
}count playableUnits;
|
}count allPlayers;
|
||||||
|
|
||||||
if (isNull _group) then {
|
if (isNull _group) then {
|
||||||
_group = createGroup west;
|
_group = createGroup west;
|
||||||
|
@ -128,7 +128,7 @@ if (_this isEqualType []) then {
|
|||||||
if ((_x getVariable["GROUP", ""]) == _playerGroup) exitWith{
|
if ((_x getVariable["GROUP", ""]) == _playerGroup) exitWith{
|
||||||
_group = group _x;
|
_group = group _x;
|
||||||
};
|
};
|
||||||
} forEach playableUnits;
|
} forEach allPlayers;
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isNull _group) then {
|
if (isNull _group) then {
|
||||||
|
@ -123,7 +123,7 @@ if (!local _player) then {
|
|||||||
if ((_x getVariable["GROUP",""]) == _playerGroup) exitWith {
|
if ((_x getVariable["GROUP",""]) == _playerGroup) exitWith {
|
||||||
_group = group _x;
|
_group = group _x;
|
||||||
};
|
};
|
||||||
}forEach playableUnits;
|
}forEach allPlayers;
|
||||||
|
|
||||||
if (isNull _group) then {
|
if (isNull _group) then {
|
||||||
_group = createGroup west;
|
_group = createGroup west;
|
||||||
|
@ -1273,7 +1273,7 @@ _skn_admincode = compileFinal ("
|
|||||||
getText (configFile >> 'CfgVehicles' >> typeOf _x >> 'Icon'), _x call _getDmgColor, visiblePosition _x, _size, _size, getDir _x, name _x
|
getText (configFile >> 'CfgVehicles' >> typeOf _x >> 'Icon'), _x call _getDmgColor, visiblePosition _x, _size, _size, getDir _x, name _x
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}forEach playableUnits;
|
}forEach allPlayers;
|
||||||
};
|
};
|
||||||
if ("+_skn_tg_map_corpse+") then {
|
if ("+_skn_tg_map_corpse+") then {
|
||||||
_size = (1/ctrlMapScale _display) max 20;
|
_size = (1/ctrlMapScale _display) max 20;
|
||||||
@ -1382,7 +1382,7 @@ _skn_admincode = compileFinal ("
|
|||||||
{(_x call "+_skn_getCtrl+") ctrlShow false}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71] };
|
{(_x call "+_skn_getCtrl+") ctrlShow false}forEach[40,41,42,43,50,51,52,60,61,62,63,64,65,66,67,68,69,70,71] };
|
||||||
if (getPlayerUID player in "+str _skn_blockedSpawnMenuUID+") then {ctrlEnable [21,false]};
|
if (getPlayerUID player in "+str _skn_blockedSpawnMenuUID+") then {ctrlEnable [21,false]};
|
||||||
ctrlEnable [22,false];
|
ctrlEnable [22,false];
|
||||||
(1 call "+_skn_getCtrl+") ctrlSetText format['Players %1 of %2',count playableUnits,playersNumber civilian];
|
(1 call "+_skn_getCtrl+") ctrlSetText format['Players %1 of %2',count allPlayers,playersNumber civilian];
|
||||||
(2 call "+_skn_getCtrl+") ctrlSetText format['Epoch Mod Admin Menu by Skaronator.com - Server Uptime: %1h %2min', _hours, _minutes];
|
(2 call "+_skn_getCtrl+") ctrlSetText format['Epoch Mod Admin Menu by Skaronator.com - Server Uptime: %1h %2min', _hours, _minutes];
|
||||||
(5 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_fnc_Spec+"'];
|
(5 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_fnc_Spec+"'];
|
||||||
(6 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_dbClickMainMenu+"'];
|
(6 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_dbClickMainMenu+"'];
|
||||||
@ -1980,7 +1980,7 @@ _skn_admincode = compileFinal ("
|
|||||||
lbclear _ctrl;
|
lbclear _ctrl;
|
||||||
|
|
||||||
_sorted = [];
|
_sorted = [];
|
||||||
_unsorted = playableUnits;
|
_unsorted = allPlayers;
|
||||||
|
|
||||||
_buttonRange = 10 call "+_skn_getCtrl+";
|
_buttonRange = 10 call "+_skn_getCtrl+";
|
||||||
_buttonRange ctrlSetText 'Range';
|
_buttonRange ctrlSetText 'Range';
|
||||||
|
@ -351,7 +351,7 @@ class FSM
|
|||||||
" if (_pUID != """") then { _playersTemp pushBack _pUID; };" \n
|
" if (_pUID != """") then { _playersTemp pushBack _pUID; };" \n
|
||||||
" };" \n
|
" };" \n
|
||||||
" };" \n
|
" };" \n
|
||||||
"}forEach playableUnits;" \n
|
"}forEach allPlayers;" \n
|
||||||
"_players = _playersTemp;"/*%FSM</ACTION""">*/;
|
"_players = _playersTemp;"/*%FSM</ACTION""">*/;
|
||||||
};
|
};
|
||||||
/*%FSM</LINK>*/
|
/*%FSM</LINK>*/
|
||||||
|
Loading…
Reference in New Issue
Block a user