mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Merge pull request #940 from morgoth0/patch-9
Add code to handle enable/disable vehicle TIE
This commit is contained in:
commit
d3acc2683b
@ -61,6 +61,7 @@ removevehmagazinesturret[] = { // Remove these Magazines from the given Turret f
|
|||||||
{"24Rnd_missiles",{-1}},
|
{"24Rnd_missiles",{-1}},
|
||||||
{"200Rnd_40mm_G_belt",{0}}
|
{"200Rnd_40mm_G_belt",{0}}
|
||||||
};
|
};
|
||||||
|
disableVehicleTIE = "true";
|
||||||
|
|
||||||
// BaseBuilding
|
// BaseBuilding
|
||||||
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
|
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
|
||||||
|
@ -32,6 +32,7 @@ _immuneIfStartInBase = [_serverSettingsConfig, "immuneIfStartInBase", true] call
|
|||||||
|
|
||||||
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_disableVehicleTIE = [_serverSettingsConfig, "disableVehicleTIE", true] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
|
||||||
for "_i" from 1 to _maxVehicleLimit do {
|
for "_i" from 1 to _maxVehicleLimit do {
|
||||||
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
|
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
|
||||||
@ -141,7 +142,9 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
_vehicle setvariable ["VEHICLE_BASECLASS",_baseClass];
|
_vehicle setvariable ["VEHICLE_BASECLASS",_baseClass];
|
||||||
};
|
};
|
||||||
// disable thermal imaging equipment
|
// disable thermal imaging equipment
|
||||||
_vehicle disableTIEquipment true;
|
if (_disableVehicleTIE) then {
|
||||||
|
_vehicle disableTIEquipment true;
|
||||||
|
};
|
||||||
// lock all vehicles
|
// lock all vehicles
|
||||||
_vehicle lock true;
|
_vehicle lock true;
|
||||||
// load vehicle inventory
|
// load vehicle inventory
|
||||||
|
@ -28,6 +28,7 @@ _simulationHandler = [_serverSettingsConfig, "simulationHandlerOld", false] call
|
|||||||
_immuneVehicleSpawn = [_serverSettingsConfig, "immuneVehicleSpawn", false] call EPOCH_fnc_returnConfigEntry;
|
_immuneVehicleSpawn = [_serverSettingsConfig, "immuneVehicleSpawn", false] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_disableVehicleTIE = [_serverSettingsConfig, "disableVehicleTIE", true] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
|
||||||
for "_i" from 1 to _maxVehicleLimit do {
|
for "_i" from 1 to _maxVehicleLimit do {
|
||||||
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
|
_vehicleSlotIndex = EPOCH_VehicleSlots pushBack str(_i);
|
||||||
@ -131,7 +132,9 @@ for "_i" from 1 to _maxVehicleLimit do {
|
|||||||
} foreach _removemagazinesturret;
|
} foreach _removemagazinesturret;
|
||||||
};
|
};
|
||||||
|
|
||||||
_vehicle disableTIEquipment true;
|
if (_disableVehicleTIE) then {
|
||||||
|
_vehicle disableTIEquipment true;
|
||||||
|
};
|
||||||
|
|
||||||
_vehicle lock true;
|
_vehicle lock true;
|
||||||
|
|
||||||
|
@ -116,6 +116,10 @@ clearItemCargoGlobal _newveh;
|
|||||||
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
||||||
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_disableVehicleTIE = [_serverSettingsConfig, "disableVehicleTIE", true] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
if (_disableVehicleTIE) then {
|
||||||
|
_newVeh disableTIEquipment true;
|
||||||
|
};
|
||||||
if !(_removeweapons isequalto []) then {
|
if !(_removeweapons isequalto []) then {
|
||||||
{
|
{
|
||||||
_newVeh removeWeaponGlobal _x;
|
_newVeh removeWeaponGlobal _x;
|
||||||
|
@ -20,6 +20,7 @@ if !(isClass (configFile >> "CfgVehicles" >> _vehClass)) exitWith {objNull};
|
|||||||
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
_serverSettingsConfig = configFile >> "CfgEpochServer";
|
||||||
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
_removeweapons = [_serverSettingsConfig, "removevehweapons", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
_removemagazinesturret = [_serverSettingsConfig, "removevehmagazinesturret", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_disableVehicleTIE = [_serverSettingsConfig, "disableVehicleTIE", true] call EPOCH_fnc_returnConfigEntry;
|
||||||
_vehObj = createVehicle[_vehClass, _position, [], 0, _can_collide];
|
_vehObj = createVehicle[_vehClass, _position, [], 0, _can_collide];
|
||||||
// turn off BIS randomization
|
// turn off BIS randomization
|
||||||
_vehObj setVariable ["BIS_enableRandomization", false];
|
_vehObj setVariable ["BIS_enableRandomization", false];
|
||||||
@ -62,7 +63,9 @@ if !(isNull _vehObj) then{
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Disable Termal Equipment
|
// Disable Termal Equipment
|
||||||
_vehObj disableTIEquipment true;
|
if (_disableVehicleTIE) then {
|
||||||
|
_vehObj disableTIEquipment true;
|
||||||
|
};
|
||||||
|
|
||||||
// Vehicle Lock
|
// Vehicle Lock
|
||||||
_vehObj lock _locked;
|
_vehObj lock _locked;
|
||||||
|
@ -1140,6 +1140,7 @@ call compile ("'"+_skn_doAdminRequest+"' addPublicVariableEventHandler {
|
|||||||
_serverSettingsConfig = configFile >> 'CfgEpochServer';
|
_serverSettingsConfig = configFile >> 'CfgEpochServer';
|
||||||
_removeweapons = [_serverSettingsConfig, 'removevehweapons', []] call EPOCH_fnc_returnConfigEntry;
|
_removeweapons = [_serverSettingsConfig, 'removevehweapons', []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_removemagazinesturret = [_serverSettingsConfig, 'removevehmagazinesturret', []] call EPOCH_fnc_returnConfigEntry;
|
_removemagazinesturret = [_serverSettingsConfig, 'removevehmagazinesturret', []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_disableVehicleTIE = [_serverSettingsConfig, 'disableVehicleTIE', true] call EPOCH_fnc_returnConfigEntry;
|
||||||
_position = getPosATL _target;
|
_position = getPosATL _target;
|
||||||
|
|
||||||
_slot = EPOCH_VehicleSlots select 0;
|
_slot = EPOCH_VehicleSlots select 0;
|
||||||
@ -1151,7 +1152,9 @@ call compile ("'"+_skn_doAdminRequest+"' addPublicVariableEventHandler {
|
|||||||
_vehObj call EPOCH_server_setVToken;
|
_vehObj call EPOCH_server_setVToken;
|
||||||
addToRemainsCollector[_vehObj];
|
addToRemainsCollector[_vehObj];
|
||||||
|
|
||||||
_vehObj disableTIEquipment true;
|
if (_disableVehicleTIE) then {
|
||||||
|
_vehObj disableTIEquipment true;
|
||||||
|
};
|
||||||
|
|
||||||
clearWeaponCargoGlobal _vehObj;
|
clearWeaponCargoGlobal _vehObj;
|
||||||
clearMagazineCargoGlobal _vehObj;
|
clearMagazineCargoGlobal _vehObj;
|
||||||
|
Loading…
Reference in New Issue
Block a user