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];
|
||||
lbSetData[21500, _index, netId _x];
|
||||
} forEach(playableUnits - [player]);
|
||||
} forEach(allPlayers - [player]);
|
||||
};
|
||||
_return = true;
|
||||
};
|
||||
|
@ -23,7 +23,7 @@
|
||||
NOTHING
|
||||
*/
|
||||
//[[[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]]]
|
||||
params ["_control","_index"];
|
||||
EPOCH_InteractedItem = [];
|
||||
@ -32,6 +32,7 @@ if (_index isEqualType []) then {
|
||||
_index = (_index select 0) select 1;
|
||||
};
|
||||
|
||||
_idc = ctrlIDC _control;
|
||||
_text = _control lbText _index;
|
||||
_data = _control lbData _index;
|
||||
_pic = _control lbPicture _index;
|
||||
@ -39,17 +40,17 @@ _pic = _control lbPicture _index;
|
||||
_craftingArray = [];
|
||||
_craftingArrayNames = [];
|
||||
|
||||
// This test is to over come an issue that causes the wrong class selected
|
||||
// when more than two classes share the same displayName
|
||||
// weapons and items do not return a class so a workaround is used to find the class
|
||||
if (_data == "") then {
|
||||
{
|
||||
_name = configName(_x);
|
||||
_exit = false;
|
||||
if !(isNull EPOCH_lastContainer) then {
|
||||
_arr = ((getItemCargo EPOCH_lastContainer) select 0) + [uniform player,vest player,headgear player];
|
||||
_exit = (_name in _arr);
|
||||
_container = switch (_idc) do {
|
||||
case 633: { uniformContainer player };
|
||||
case 638: { vestContainer player };
|
||||
case 632: { EPOCH_targetContainer };
|
||||
case 640: { EPOCH_secondaryContainer };
|
||||
default { backpackContainer player };
|
||||
};
|
||||
if (_exit) exitWith {_data = _name};
|
||||
} forEach ("getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons"));
|
||||
_weaponsAndItems = ((getWeaponCargo _container) select 0);
|
||||
_weaponsAndItems append ((getItemCargo _container) select 0);
|
||||
_data = _weaponsAndItems param [_val,""];
|
||||
};
|
||||
EPOCH_InteractedItem = [_text,_data,_pic];
|
||||
|
@ -28,7 +28,7 @@ class CfgEpochClient
|
||||
minJammerDistance = 650;
|
||||
maxBuildingHeight = 33;
|
||||
buildingCountLimit = 200; //overall building limit in range of jammer (overridden if "useGroupCountLimits=1")
|
||||
storageCountLimit = 100; //overall storage limit in range of jammer (triggers only if "splitCountLimits=1" & "useGroupCountLimits=0")
|
||||
storageCountLimit = 100; //overall storage limit in range of jammer (triggers only if "splitCountLimits=1" & "useGroupCountLimits=0")
|
||||
splitCountLimits = 0; //1 = distinguish buildingCountLimit from storageCountLimit (ex.: buildingCountLimit=100, storageCountLimit=100 >> you can build 100 baseparts AND additional 100 storage objects like safes, lockboxes...)
|
||||
useGroupCountLimits = 1; //1 = enable leader and member counts (doesn´t affect "splitCountLimits")
|
||||
buildingCountLeader = 125; //ignore if "useGroupCountLimits=0"
|
||||
@ -55,7 +55,7 @@ class CfgEpochClient
|
||||
Take = "(_this select 1) call EPOCH_interact;_this call EPOCH_UnisexCheck";
|
||||
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 = [];};";
|
||||
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;";
|
||||
HandleRating = "EPOCH_playerKarma = EPOCH_playerKarma + (_this select 1);0";
|
||||
HandleDamage = "";
|
||||
|
@ -49,7 +49,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
|
||||
if ((_x getVariable["GROUP",""]) == _groupID) exitWith {
|
||||
_group = group _x;
|
||||
};
|
||||
}count playableUnits;
|
||||
}count allPlayers;
|
||||
|
||||
if (isNull _group) then {
|
||||
_group = createGroup west;
|
||||
|
@ -128,7 +128,7 @@ if (_this isEqualType []) then {
|
||||
if ((_x getVariable["GROUP", ""]) == _playerGroup) exitWith{
|
||||
_group = group _x;
|
||||
};
|
||||
} forEach playableUnits;
|
||||
} forEach allPlayers;
|
||||
};
|
||||
|
||||
if (isNull _group) then {
|
||||
|
@ -123,7 +123,7 @@ if (!local _player) then {
|
||||
if ((_x getVariable["GROUP",""]) == _playerGroup) exitWith {
|
||||
_group = group _x;
|
||||
};
|
||||
}forEach playableUnits;
|
||||
}forEach allPlayers;
|
||||
|
||||
if (isNull _group) then {
|
||||
_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
|
||||
];
|
||||
};
|
||||
}forEach playableUnits;
|
||||
}forEach allPlayers;
|
||||
};
|
||||
if ("+_skn_tg_map_corpse+") then {
|
||||
_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] };
|
||||
if (getPlayerUID player in "+str _skn_blockedSpawnMenuUID+") then {ctrlEnable [21,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];
|
||||
(5 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_fnc_Spec+"'];
|
||||
(6 call "+_skn_getCtrl+") ctrlSetEventHandler ['LBDblClick', '_this call "+_skn_dbClickMainMenu+"'];
|
||||
@ -1980,7 +1980,7 @@ _skn_admincode = compileFinal ("
|
||||
lbclear _ctrl;
|
||||
|
||||
_sorted = [];
|
||||
_unsorted = playableUnits;
|
||||
_unsorted = allPlayers;
|
||||
|
||||
_buttonRange = 10 call "+_skn_getCtrl+";
|
||||
_buttonRange ctrlSetText 'Range';
|
||||
|
@ -351,7 +351,7 @@ class FSM
|
||||
" if (_pUID != """") then { _playersTemp pushBack _pUID; };" \n
|
||||
" };" \n
|
||||
" };" \n
|
||||
"}forEach playableUnits;" \n
|
||||
"}forEach allPlayers;" \n
|
||||
"_players = _playersTemp;"/*%FSM</ACTION""">*/;
|
||||
};
|
||||
/*%FSM</LINK>*/
|
||||
@ -460,4 +460,4 @@ class FSM
|
||||
{
|
||||
};
|
||||
};
|
||||
/*%FSM</COMPILE>*/
|
||||
/*%FSM</COMPILE>*/
|
||||
|
Loading…
Reference in New Issue
Block a user