mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge pull request #566 from Ignatz-HeMan/experimental
Changes from He-Man
This commit is contained in:
commit
7d3b44cd10
@ -108,11 +108,21 @@ _checkConfigs = {
|
||||
format ["%2 %1 call Epoch_dynamicMenu;",_arr + [(configName _x)],getText(_x >> "action")]
|
||||
};
|
||||
|
||||
_tooltip = "";
|
||||
_tooltipcode = getText(_x >> "tooltipcode"),;
|
||||
if (_tooltipcode != "") then {
|
||||
_tooltip = [] call compile _tooltipcode;
|
||||
}
|
||||
else {
|
||||
_tooltip = getText(_x >> "tooltip");
|
||||
};
|
||||
|
||||
_buttonSettings pushBack [
|
||||
getText(_x >> "icon"),
|
||||
getText(_x >> "tooltip"),
|
||||
_tooltip,
|
||||
_action
|
||||
];
|
||||
|
||||
};
|
||||
};
|
||||
} forEach _configs;
|
||||
|
@ -54,7 +54,7 @@ _crew = [];
|
||||
_logic = if !(_crew isEqualTo []) then {
|
||||
if (_player in _crew) then {
|
||||
// allow unlock if player is the driver or is inside the vehicle with out a driver.
|
||||
(_player isEqualTo _driver || isNull(_driver))
|
||||
(_player isEqualTo _driver || isNull(_driver) || _lockedOwner == _lockOwner || !alive _driver)
|
||||
} else {
|
||||
// allow only if player is already the owner as they are not inside the occupied vehicle.
|
||||
(_lockedOwner == _lockOwner)
|
||||
|
@ -35,6 +35,18 @@ if (!isNull _vehicle) then {
|
||||
if (isNil "_magsAmmoCargo") then {
|
||||
_magsAmmoCargo = [];
|
||||
};
|
||||
|
||||
{
|
||||
_cargo = _x select 1;
|
||||
_magsAmmoCargox = magazinesAmmoCargo _cargo;
|
||||
{
|
||||
_magsAmmoCargo pushback _x;
|
||||
} foreach _magsAmmoCargox;
|
||||
_wepsItemsCargox = weaponsItemsCargo _cargo;
|
||||
{
|
||||
_wepsItemsCargo pushback _x;
|
||||
} foreach _wepsItemsCargox;
|
||||
} foreach everycontainer _vehicle;
|
||||
|
||||
// minimize magazine ammo cargo
|
||||
_magsAmmoCargoMinimized = [[],[]];
|
||||
|
@ -34,6 +34,18 @@ if (!isNull _vehicle) then {
|
||||
if (isNil "_magsAmmoCargo") then {
|
||||
_magsAmmoCargo = [];
|
||||
};
|
||||
|
||||
{
|
||||
_cargo = _x select 1;
|
||||
_magsAmmoCargox = magazinesAmmoCargo _cargo;
|
||||
{
|
||||
_magsAmmoCargo pushback _x;
|
||||
} foreach _magsAmmoCargox;
|
||||
_wepsItemsCargox = weaponsItemsCargo _cargo;
|
||||
{
|
||||
_wepsItemsCargo pushback _x;
|
||||
} foreach _wepsItemsCargox;
|
||||
} foreach everycontainer _vehicle;
|
||||
|
||||
// minimize magazine ammo cargo
|
||||
_magsAmmoCargoMinimized = [[],[]];
|
||||
|
@ -140,6 +140,8 @@ _allowedVehicleListName = ["allowedVehiclesList","allowedVehiclesList_CUP"] sele
|
||||
_allowedVehiclesList = getArray(configFile >> "CfgEpoch" >> worldName >> _allowedVehicleListName);
|
||||
_vehicleSlotLimit = 0;
|
||||
{_vehicleSlotLimit = _vehicleSlotLimit + (_x select 1)} forEach _allowedVehiclesList;
|
||||
_ReservedSlots = 50;
|
||||
_vehicleSlotLimit = _vehicleSlotLimit + _ReservedSlots;
|
||||
_vehicleSlotLimit call EPOCH_load_vehicles;
|
||||
|
||||
diag_log "Epoch: Spawning vehicles";
|
||||
|
@ -294,7 +294,7 @@ class FSM
|
||||
" _deSim = false;" \n
|
||||
" if (crew _selectedVehicle isEqualTo []) then {" \n
|
||||
" if ((getPos _selectedVehicle) select 2 < 1) then {" \n
|
||||
" if ({isPlayer _selectedVehicle} count (_selectedVehicle nearEntities[[""CAManBase"", ""LandVehicle"", ""Ship"", ""Air"", ""Tank""], 300]) == 0) then {" \n
|
||||
" if ({isPlayer _x} count (_selectedVehicle nearEntities[[""CAManBase"", ""LandVehicle"", ""Ship"", ""Air"", ""Tank""], 300]) == 0) then {" \n
|
||||
" _selectedVehicle enableSimulationGlobal false;" \n
|
||||
" _deSim = true;" \n
|
||||
" };" \n
|
||||
@ -458,4 +458,4 @@ class FSM
|
||||
{
|
||||
};
|
||||
};
|
||||
/*%FSM</COMPILE>*/
|
||||
/*%FSM</COMPILE>*/
|
||||
|
Loading…
Reference in New Issue
Block a user