DisableDoors #2

This commit is contained in:
He-Man 2019-01-04 01:23:20 +01:00
parent 3613449f38
commit c9e9613f89
3 changed files with 24 additions and 13 deletions

View File

@ -118,11 +118,12 @@ forceRestartTime = 14400; // 4 hour restarts
};
ExceptedDeSymObjects[] = { // Not Desymulated, also if in a Class of DeSimulateObjects
};
DisableDoorsOnObj[] = { // Add speacial Vars to disable Doors (no effect in Epoch, but 3rd party addons like enhanced movement)
"WoodLargeWallDoorL_EPOCH",
"WoodWall4_EPOCH",
"WoodLargeWallDoorL_EPOCH",
"CinderWallDoorwHatch_EPOCH"
DisableDoorsOnObj[] = { // Add special Vars to disable Doors (no effect in Epoch, but 3rd party addons like enhanced movement)
// {"BuildingClass", {{"Variable1",Value1},{"Variable2",Value2}, ... } },
{"WoodLargeWallDoorL_EPOCH", {{"bis_disabled_door",1} } },
{"WoodWall4_EPOCH", {{"bis_disabled_door",1} } },
{"CinderWallDoorwHatch_EPOCH", {{"bis_disabled_door",1},{"bis_disabled_hatch",1} } },
{"WoodStairs3_EPOCH", {{"bis_disabled_bars_long",1} } }
};
// Dynamic Simulation System

View File

@ -89,10 +89,15 @@ for "_i" from 0 to _this do {
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
_baseObj = createVehicle [_class, [0,0,0], [], 0, "CAN_COLLIDE"];
if (_class in _DisableDoorsOnObj) then {
_baseObj setvariable ["bis_disabled_door",1,true];
_baseObj setvariable ["bis_disabled_hatch",1,true];
};
{
_x params ["_ClassX",["_VarsX",[]]];
if ((tolower _class) isequalto (tolower _ClassX)) exitwith {
{
_x params ["_VarNameX","_ValueX"];
_baseObj setvariable [_VarNameX,_ValueX,true];
} foreach _VarsX;
};
} foreach _DisableDoorsOnObj;
if (_UseIndestructible) then {
if ({_class iskindof _x} count _ExceptedBaseObjects == 0) then {
{

View File

@ -33,10 +33,15 @@ if (!isNull _object && !(_class isEqualTo "")) then {
_IndestructibleBaseObjects = [_serverSettingsConfig, "IndestructibleBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_ExceptedBaseObjects = [_serverSettingsConfig, "ExceptedBaseObjects", []] call EPOCH_fnc_returnConfigEntry;
_DisableDoorsOnObj = [_serverSettingsConfig, "DisableDoorsOnObj", []] call EPOCH_fnc_returnConfigEntry;
if (_class in _DisableDoorsOnObj) then {
_newObj setvariable ["bis_disabled_door",1,true];
_newObj setvariable ["bis_disabled_hatch",1,true];
};
{
_x params ["_ClassX",["_VarsX",[]]];
if ((tolower _class) isequalto (tolower _ClassX)) exitwith {
{
_x params ["_VarNameX","_ValueX"];
_newObj setvariable [_VarNameX,_ValueX,true];
} foreach _VarsX;
};
} foreach _DisableDoorsOnObj;
if (_UseIndestructible) then {
if ({_class iskindof _x} count _ExceptedBaseObjects == 0) then {
{