mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Storage Lock / Unlock Tweaks
This commit is contained in:
@ -88,6 +88,7 @@ forceRestartTime = 14400; // 4 hour restarts
|
|||||||
// BaseBuilding
|
// BaseBuilding
|
||||||
StorageSlotsLimit = 1500; // Max storage slots allowed. Warning! Higher the number lower performance.
|
StorageSlotsLimit = 1500; // Max storage slots allowed. Warning! Higher the number lower performance.
|
||||||
BuildingSlotsLimit = 1500; // Max building slots allowed. Warning! Higher the number lower performance.
|
BuildingSlotsLimit = 1500; // Max building slots allowed. Warning! Higher the number lower performance.
|
||||||
|
AutoLockStorages = "false"; // Auto Lock Lockable Storages on Server Start / Restart (if true, unlocked storages will get locked after restarts)
|
||||||
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
|
UseIndestructible = "false"; // Enable / Disable Indestructible BaseObjects
|
||||||
IndestructibleBaseObjects[] = { // Can be Names or Classes
|
IndestructibleBaseObjects[] = { // Can be Names or Classes
|
||||||
"Constructions_static_F",
|
"Constructions_static_F",
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf
|
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf
|
||||||
*/
|
*/
|
||||||
//[[[cog import generate_private_arrays ]]]
|
//[[[cog import generate_private_arrays ]]]
|
||||||
private ["_ExceptedBaseObjects","_IndestructibleBaseObjects","_UseIndestructible","_arr","_attachments","_availableColorsConfig","_cfgBaseBuilding","_class","_class_raw","_color","_colors","_count","_damage","_diag","_dir","_inventory","_location","_magazineName","_magazineSize","_magazineSizeMax","_marker","_objQty","_objType","_objTypes","_qty","_response","_selections","_serverSettingsConfig","_storageSlotIndex","_textureSelectionIndex","_textures","_vehHiveKey","_vehicle","_wMags","_wMagsArray","_worldspace","_wsCount"];
|
private ["_ExceptedBaseObjects","_AutoLockStorages","_IndestructibleBaseObjects","_UseIndestructible","_arr","_attachments","_availableColorsConfig","_cfgBaseBuilding","_class","_class_raw","_color","_colors","_count","_damage","_diag","_dir","_inventory","_location","_magazineName","_magazineSize","_magazineSizeMax","_marker","_objQty","_objType","_objTypes","_qty","_response","_selections","_serverSettingsConfig","_storageSlotIndex","_textureSelectionIndex","_textures","_vehHiveKey","_vehicle","_wMags","_wMagsArray","_worldspace","_wsCount"];
|
||||||
//[[[end]]]
|
//[[[end]]]
|
||||||
params [["_maxStorageLimit",0]];
|
params [["_maxStorageLimit",0]];
|
||||||
|
|
||||||
@ -21,6 +21,7 @@ _serverSettingsConfig = configFile >> "CfgEpochServer";
|
|||||||
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;
|
_UseIndestructible = [_serverSettingsConfig, "UseIndestructible", false] call EPOCH_fnc_returnConfigEntry;
|
||||||
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
|
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
|
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
_AutoLockStorages = [_serverSettingsConfig, "AutoLockStorages", false] call EPOCH_fnc_returnConfigEntry;
|
||||||
|
|
||||||
_diag = diag_tickTime;
|
_diag = diag_tickTime;
|
||||||
EPOCH_StorageSlots = [];
|
EPOCH_StorageSlots = [];
|
||||||
@ -136,8 +137,16 @@ for "_i" from 1 to _maxStorageLimit do {
|
|||||||
if (count _arr >= 6) then {
|
if (count _arr >= 6) then {
|
||||||
if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||||
// set locked state of secure storage
|
// set locked state of secure storage
|
||||||
if ((_arr select 6) != -1) then {
|
if (((_arr select 6) != -1) || _AutoLockStorages) then {
|
||||||
_vehicle setVariable["EPOCH_Locked", true, true];
|
_vehicle setVariable["EPOCH_Locked", true, true];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_vehicle setVariable["EPOCH_Locked", false, true];
|
||||||
|
if (_vehicle iskindof "GunSafe_EPOCH") then {
|
||||||
|
{
|
||||||
|
_vehicle animate _x;
|
||||||
|
} foreach [['handle1',1],['handle2',1],['door1',1],['door2',1]];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
_vehicle setVariable ["STORAGE_OWNERS", _arr select 5];
|
_vehicle setVariable ["STORAGE_OWNERS", _arr select 5];
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user