diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo index 62337610..539e6927 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo index 954375ce..1ce560ce 100644 Binary files a/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo and b/Server_Install_Pack/@epochhive/addons/a3_epoch_server_settings.pbo differ diff --git a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo index e2467a67..a94b478e 100644 Binary files a/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo and b/Server_Install_Pack/@epochhive/addons/epoch_server_core.pbo differ diff --git a/Server_Install_Pack/mpmissions/epoch.Altis.pbo b/Server_Install_Pack/mpmissions/epoch.Altis.pbo index e2f3d3ea..7b2b654e 100644 --- a/Server_Install_Pack/mpmissions/epoch.Altis.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Altis.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56d300ecafb54dd2929c6955f93248b8a66ac8bd7c684372bc4597108b0b36a2 -size 923790 +oid sha256:ac06c53bb8d8af0b2fbd28ae21cfd787fa47d57ec2b735d141d775c783451e5c +size 943476 diff --git a/Server_Install_Pack/mpmissions/epoch.Australia.pbo b/Server_Install_Pack/mpmissions/epoch.Australia.pbo index 807bcce0..f5c674b8 100644 --- a/Server_Install_Pack/mpmissions/epoch.Australia.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Australia.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:19b4ddec5986f99de89f12d6500058351756765d86276ca4415e38537427b117 -size 922018 +oid sha256:b2f354b5c30bc71aacefb6606c9f56665dd9f9c9c26c9ba8fa6d2d2bc620a277 +size 941704 diff --git a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo index 42abc837..4b123609 100644 --- a/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Bootcamp_ACR.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8eda28150ae9c257b6e0bdbfffa28161c6380495b12bb137213c82071830fda -size 923105 +oid sha256:1265a1cbc6c8e981e11037456b7a836aba4ed9ceb5d0c2ca9f389b1e4734389a +size 942791 diff --git a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo index 39c7f1c6..69d4724e 100644 --- a/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Bornholm.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1ca9329e1c4447d3bd49143f123345bd4dbce1b71eb94372eb73a0d867c4341d -size 922952 +oid sha256:1a7ff0b9e001608c3bdd4182e22c68620db2cdedf737d449a0b257f56e17a0a1 +size 942638 diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo index 4a782742..09dd0b80 100644 --- a/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Chernarus.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4027f7bb5f249170a9897f390415568a971d6cec88d3b7768a3bb7b2af020636 -size 922926 +oid sha256:b2aed82b1594e2e5f29071308fa59e9ca32da43a18b63370b9232fa5b433e17e +size 942612 diff --git a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo index d130a057..f01e7976 100644 --- a/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Chernarus_Summer.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38d69f83599d244561ba776b8713e5c1830186ce8e353aeabd1a41f78b8463b1 -size 922933 +oid sha256:8e46548f97bf05e12858298a9364670c3a8406e1568dedbf8274cf3160756db4 +size 942619 diff --git a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo index 7148af0d..9a9b545a 100644 --- a/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Desert_E.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:99b293d6d59de23bfbfffcf25913e471bb2507032edc5f343cff4c59574f0a7f -size 923078 +oid sha256:f9e26a29f1685d8e3416eefda4b6cf70b1f941f0f174b4320df5319365db6bb5 +size 942764 diff --git a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo index deb60e19..af3eebea 100644 --- a/Server_Install_Pack/mpmissions/epoch.Esseker.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Esseker.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0758d01ff9fd549f66ba83d254a1f0fe51bc7d6f5c5ab1fe809bbde9cb677d01 -size 922918 +oid sha256:8b9f10d853f11d068e2464c8df179255e69433a42bfc407594127e278f3452e3 +size 942604 diff --git a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo index 078c0c14..88e3d0be 100644 --- a/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Mountains_ACR.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b48e0118596b983eb43c2c980953a6a98e79f6b27bc0e9f73acf2a964040126d -size 923345 +oid sha256:33cba4206b9be4f92e8bda134aae93df8f7040d9f04baefd807ac6e7d4199182 +size 943031 diff --git a/Server_Install_Pack/mpmissions/epoch.Napf.pbo b/Server_Install_Pack/mpmissions/epoch.Napf.pbo index 75c7ff2d..838f1f5d 100644 --- a/Server_Install_Pack/mpmissions/epoch.Napf.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Napf.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e4660b326782dc4fa310e6325f5e67188b3d462f63086c6b610b543b32e2d309 -size 923757 +oid sha256:b7443667abd708c2785ac805ce6bd16d8e6b428e77661c1b82c738e37e84bb48 +size 943443 diff --git a/Server_Install_Pack/mpmissions/epoch.Porto.pbo b/Server_Install_Pack/mpmissions/epoch.Porto.pbo index f8fbc2af..8ba8ec5c 100644 --- a/Server_Install_Pack/mpmissions/epoch.Porto.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Porto.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:881b0b022c070bfc75ce8018ffc901577258db83f312b0a6c548d4d52039ad74 -size 923069 +oid sha256:c6d570a72a4e046ae0543bc478c15239af2e19e0f3dbc6a8c24d5031412b363f +size 942755 diff --git a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo index 301dccb4..223b3522 100644 --- a/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo +++ b/Server_Install_Pack/mpmissions/epoch.ProvingGrounds_PMC.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c304123c29f6ec4d2fdd96b222a069d98fc6fc0163ffbba0722b5ac3acb45df1 -size 923080 +oid sha256:f93009c0cc87b2d58ebf128918beea484cbe51ca5063b9d1b58a01308f665335 +size 942766 diff --git a/Server_Install_Pack/mpmissions/epoch.Sara.pbo b/Server_Install_Pack/mpmissions/epoch.Sara.pbo index 301b0c14..9db20669 100644 --- a/Server_Install_Pack/mpmissions/epoch.Sara.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Sara.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4cda3e00b46f0cc48e6db6d95dd3d142e6676dc49123b158572b99e342c0be99 -size 923342 +oid sha256:add43705877dcffd6e4904e5f50f9cf856335d2b9d585b0fef771fa1220a7ac0 +size 943028 diff --git a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo index 7f3a9524..22e7fa4f 100644 --- a/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo +++ b/Server_Install_Pack/mpmissions/epoch.SaraLite.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:97bcc7e636da26d1c088b02d5eac53e179638d282ceffac5a06d49a8c72e7980 -size 923344 +oid sha256:d5b69ca1eaa85f745a5add019f3fdb800b28a6bff76ef4a9e31552bfbb66d10d +size 943030 diff --git a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo index 040e739e..f5647020 100644 --- a/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Sara_dbe1.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8b3a25df5cb409406087cc88fded4e94c2db02264065f0876dd2a8a68c3693af -size 923347 +oid sha256:1c72331d78895a100fdd574c54cd0d3e6321d6855f2a81de4402de5728a88d07 +size 943033 diff --git a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo index 75d8e7e3..489c4b4a 100644 --- a/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Shapur_BAF.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b58038b04aad97152fd5b2b0e047a314fba6b4bfe9434bc177c50bb5630eb1bd -size 923072 +oid sha256:16c965effa7990149afdbcbbc55d29caa1b0e00de2a0290b66b78e4b0a873ea2 +size 942758 diff --git a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo index 637824d9..f78cfb0f 100644 --- a/Server_Install_Pack/mpmissions/epoch.Stratis.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Stratis.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d81f51ff4e9d076910c4c572df7dea07b81787526bf237c2a27783de14d8bcc2 -size 922926 +oid sha256:32656193514d58dbd9ea2545b0ea4bfc5291bff6ca63d2ed1e1b33658d8a687f +size 942612 diff --git a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo index c91a583f..62ea771c 100644 --- a/Server_Install_Pack/mpmissions/epoch.Takistan.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Takistan.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:599d5d7f91004dba0bfa5490c404b4458d2484e4786b22a017f0b21f0626d1c4 -size 923034 +oid sha256:5e45eeab87c669c02dbf69ac88d7558f0c8e7969c65e87f6e7e56381b10a7ad2 +size 942720 diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo index 2bb2a2d3..fac9446a 100644 --- a/Server_Install_Pack/mpmissions/epoch.VR.pbo +++ b/Server_Install_Pack/mpmissions/epoch.VR.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e7495427818db1e1949f89f4ac74449817f94ca70bdc41fdfcbd9520d1f9504a -size 922918 +oid sha256:be7069e1c5d005989959bb7204cff64f0adb1d43d6fc10cc6ed70b6a20db03a0 +size 942604 diff --git a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo index 15de5108..ad3471e5 100644 --- a/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Woodland_ACR.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e85d440c6ca17d64f110a9ac7cf593a82999728f14c6791ae3596a5d378a7ec2 -size 923345 +oid sha256:c6ca5a7d0230abafe551be0051e5ebf8b9f30792670c522c0396706420eb4796 +size 943031 diff --git a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo index 1a48b9f7..1feaeb73 100644 --- a/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo +++ b/Server_Install_Pack/mpmissions/epoch.Zargabad.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f670f956724dac3eb635a34e122ffc3df62339fa38d881c04bb00f0fee0375cd -size 923002 +oid sha256:7218a42fe3ef1df0388a7bbd296639b579c17473ba26ee8c8697c8824b33e058 +size 942688 diff --git a/Server_Install_Pack/mpmissions/epoch.utes.pbo b/Server_Install_Pack/mpmissions/epoch.utes.pbo index 9eb63d5b..a3a9e488 100644 --- a/Server_Install_Pack/mpmissions/epoch.utes.pbo +++ b/Server_Install_Pack/mpmissions/epoch.utes.pbo @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6fa42a8c2201722ad56afd044ebe276ad26a72a88a4360d79e7c9313fd5d013e -size 923065 +oid sha256:d55266670e272b70026d80bad012ba0675fc665a6afb993c354f899213f83cd1 +size 942751 diff --git a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf index 4c311b04..eedd2389 100644 --- a/Sources/epoch_code/compile/EPOCH_consumeItem.sqf +++ b/Sources/epoch_code/compile/EPOCH_consumeItem.sqf @@ -12,12 +12,14 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_code/compile/EPOCH_consumeItem.sqf */ -private ["_type","_magazineSize","_text","_item","_pic","_magazinesAmmoFull","_magazineSizeMax","_config","_pos","_object","_isStorage","_isOk","_buildClass","_interactReturnOnUse","_vehicle","_currentFuel","_canCapacity","_interactAttributes","_fuelCapacity","_newFuel","_removeItem","_vehicles","_transportFuel","_highestDMG","_currentHIT","_currentDMG","_newDMG","_paintCanIndex","_paintCanColor","_msg","_color","_unifiedInteract","_interactOption"]; +private ["_cfgBaseBuilding","_type","_magazineSize","_text","_item","_pic","_magazinesAmmoFull","_magazineSizeMax","_config","_pos","_object","_isStorage","_isOk","_buildClass","_interactReturnOnUse","_vehicle","_currentFuel","_canCapacity","_interactAttributes","_fuelCapacity","_newFuel","_removeItem","_vehicles","_transportFuel","_highestDMG","_currentHIT","_currentDMG","_newDMG","_paintCanIndex","_paintCanColor","_msg","_color","_unifiedInteract","_interactOption"]; _text = EPOCH_InteractedItem select 0; _item = EPOCH_InteractedItem select 1; _pic = EPOCH_InteractedItem select 2; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _type = "CfgMagazines"; if (isClass (configfile >> "CfgWeapons" >> _item)) then {_type = "CfgWeapons"}; @@ -283,7 +285,7 @@ switch _interactOption do { _vehicle = cursorTarget; if (_vehicle in _vehicles) then { if ("" call EPOCH_isBuildAllowed) then { - _color = getArray(configFile >> "CfgVehicles" >> (typeOf _vehicle) >> "availableTextures"); + _color = getArray(_cfgBaseBuilding >> (typeOf _vehicle) >> "availableTextures"); if !(_color isEqualTo[]) then { if (_item call _removeItem) then { diff --git a/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf b/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf index 56628d10..a0997c5e 100644 --- a/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf +++ b/Sources/epoch_code/compile/EPOCH_onEachFrame.sqf @@ -43,55 +43,55 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then { if (_distance < 9) then { _stability = 0; - _color = [1, 1, 1, 0.7]; + _color = [1, 1, 1, 1]; _text = format ["Hold (%1)",EPOCH_keysAction call BIS_fnc_keyCode]; _icon = "\x\addons\a3_epoch_code\Data\UI\ui_question_ca.paa"; - _interactOption = getNumber(configFile >> "cfgVehicles" >> typeOf _currentTarget >> "interactMode"); - switch _interactOption do { + switch EPOCH_currentTargetMode do { case 0: { _stability = 100 - round(damage _currentTarget * 100); _icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa"; - _text = ""; - _color = [100,0,_stability,0.7] call EPOCH_colorRange; + _color = [100,0,_stability,1] call EPOCH_colorRange; }; case 1: { - _text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }]; + _text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1) or %2",EPOCH_keysBuildMode1 call BIS_fnc_keyCode,_text] }]; _stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}]; _icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa"; - _color = [100,0,_stability,0.7] call EPOCH_colorRange; + _color = [100,0,_stability,1] call EPOCH_colorRange; }; case 2: { if (alive _currentTarget) then{ - _text = format["%1 - Press (Ctrl+%2)", if (isStreamFriendlyUIEnabled) then[{"Player"}, { name _currentTarget }],EPOCH_keysAcceptTrade call BIS_fnc_keyCode]; + // TODO move accept trade into dynamic menu + _text = format["%1 - %2", if (isStreamFriendlyUIEnabled && isPlayer _currentTarget) then[{"Player"}, { name _currentTarget }],_text]; _stability = 100 - round(damage _currentTarget * 100); _icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa"; - _color = [100,0,_stability,0.7] call EPOCH_colorRange; + _color = [100,0,_stability,1] call EPOCH_colorRange; } else { //_text = "Press (Inventory)"; _icon = "\x\addons\a3_epoch_code\Data\UI\ui_crossbones_ca.paa"; }; }; case 3: { + // Animals if (!alive _currentTarget && _distance < 2) then{ _text = format ["Gut Animal - %1",_text]; _icon = "\x\addons\a3_epoch_code\Data\UI\ui_crossbones_ca.paa"; - _color = [1,0,0,0.7]; + _color = [1,1,1,1]; }; }; case 4: { - _text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1) or (Inventory)",EPOCH_keysBuildMode1 call BIS_fnc_keyCode] }]; + // Base Objects With Storage + _text = if (EPOCH_buildMode > 0) then[{_text}, { format ["Press (%1) or (%2) or %3",EPOCH_keysBuildMode1 call BIS_fnc_keyCode, (actionKeys "Gear" select 0) call BIS_fnc_keyCode),_text] }]; _stability = if (EPOCH_buildMode > 0) then[{_currentTarget getVariable["stability", 100]}, {100 - round(damage _currentTarget * 100)}]; _icon = "\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa"; - _color = [100,0,_stability,0.7] call EPOCH_colorRange; + _color = [100,0,_stability,1] call EPOCH_colorRange; }; }; if (!isNull EPOCH_stabilityTarget) then { if (([10] call EPOCH_fnc_cursorTarget) != EPOCH_stabilityTarget) then { EPOCH_stabilityTarget = objNull; - } - else { + } else { _text = ""; if ((diag_tickTime - EPOCH_lastTargetTime) >= 0.05) then { _stability = (_stability - 1) max 0; @@ -104,25 +104,20 @@ if (!isNull EPOCH_currentTarget && vehicle player == player) then { case 1: {EPOCH_stabilityTarget call EPOCH_upgradeBUILD}; case 2: {EPOCH_stabilityTarget call EPOCH_fnc_SelectTargetBuild}; }; - EPOCH_stabilityTarget = objNull; }; - }; }; _pos = visiblePositionASL _currentTarget; _pos set[2, (_currentTarget modelToWorld[0, 0, 0]) select 2]; - _size = 2.5; drawIcon3D[format[_icon, _stability], _color, _pos, _size, _size, 0, _text, 0, _size / 60, "PuristaMedium"]; }; -} -else { +} else { EPOCH_stabilityTarget = objNull; }; - if (EPOCH_drawIcon3d) then { { if (!isPlayer _x) then { @@ -130,7 +125,7 @@ if (EPOCH_drawIcon3d) then { _pos set[2, (_x modelToWorld[0, 0, 0]) select 2]; _endTime = _x getVariable["EPOCH_endTime", 0]; _num = (round(_endTime - diag_tickTime)) max 0; - _color = [10,0,_num,0.7] call EPOCH_colorRange; + _color = [10,0,_num,1] call EPOCH_colorRange; drawIcon3D[format["\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa", _num], _color, _pos, 4, 4, 0, "", 1, 0.05, "PuristaMedium"]; }; }forEach EPOCH_arr_countdown; @@ -151,7 +146,7 @@ if (EPOCH_drawIcon3d) then { _pos = visiblePositionASL _x; _pos set[2, (_x modelToWorld[0, 0, 0]) select 2]; _dmg = damage _x; - _color = [0,1,_dmg,0.7] call EPOCH_colorRange; + _color = [0,1,_dmg,1] call EPOCH_colorRange; _text = ''; _text = format['%1 : %2m', [typeOf _x,name _x] select (isPlayer _x), round(player distance _x)]; drawIcon3D["\x\addons\a3_epoch_code\Data\Member.paa", _color, _pos, 1, 1, 0, _text, 1, 0.025, "PuristaMedium"]; diff --git a/Sources/epoch_code/compile/building/EPOCH_countdown.sqf b/Sources/epoch_code/compile/building/EPOCH_countdown.sqf index b8ea1691..e9aa1908 100644 --- a/Sources/epoch_code/compile/building/EPOCH_countdown.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_countdown.sqf @@ -21,7 +21,7 @@ Returns: NOTHING */ -private ["_config","_posObj","_savedBuildPos","_previousBuildPos","_saveCheck","_endTime","_worldspace","_class","_newObj","_startTime","_objClass"]; +private ["_cfgBaseBuilding","_posObj","_savedBuildPos","_previousBuildPos","_saveCheck","_endTime","_worldspace","_class","_newObj","_startTime","_objClass"]; if (!isNull _this) then { @@ -63,16 +63,16 @@ if (!isNull _this) then { _objClass = typeOf _this; // Spawn temporary static item insead of saving. - _config = 'CfgBaseBuilding' call EPOCH_returnConfig; - if (getNumber(_config >> _objClass >> "isTemporary") == 1) then { + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + if (getNumber(_cfgBaseBuilding >> _objClass >> "isTemporary") == 1) then { _worldspace = [getposATL _this, vectordir _this, vectorup _this]; deleteVehicle _this; - _class = getText(configfile >> "CfgVehicles" >> _objClass >> "staticClass"); - _newObj = createVehicle["Fireplace_EPOCH", (_worldspace select 0), [], 0, "CAN_COLLIDE"]; - - _newObj setposATL(_worldspace select 0); - _newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2]; - // proceed to send save to server + _class = getText(_cfgBaseBuilding >> _objClass >> "staticClass"); + if (_class != "") then { + _newObj = createVehicle[_class, (_worldspace select 0), [], 0, "CAN_COLLIDE"]; + _newObj setposATL(_worldspace select 0); + _newObj setVectorDirAndUp[_worldspace select 1, _worldspace select 2]; + }; } else { if (_saveCheck) then { [_this, player, Epoch_personalToken] remoteExec["EPOCH_server_saveBuilding", 2]; diff --git a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf index 1ea89712..9c1ae251 100644 --- a/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_isBuildAllowed.sqf @@ -22,7 +22,7 @@ Returns: BOOL */ -private ["_buildingJammerRange","_buildingCountLimit","_buildingAllowed","_nearestJammer","_ownedJammerExists","_objectCount","_limitNearby","_restricted","_range","_config","_staticClass","_objType","_simulClass","_bypassJammer","_jammer","_restrictedLocations","_myPosATL"]; +private ["_cfgBaseBuilding","_buildingJammerRange","_buildingCountLimit","_buildingAllowed","_nearestJammer","_ownedJammerExists","_objectCount","_limitNearby","_restricted","_range","_config","_staticClass","_objType","_simulClass","_bypassJammer","_jammer","_restrictedLocations","_myPosATL"]; _buildingAllowed = true; _ownedJammerExists = false; @@ -33,6 +33,7 @@ if (vehicle player != player)exitWith{["Buil // defaults _config = 'CfgEpochClient' call EPOCH_returnConfig; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; _buildingJammerRange = getNumber(_config >> "buildingJammerRange"); _buildingCountLimit = getNumber(_config >> "buildingCountLimit"); if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; @@ -46,9 +47,9 @@ if (_objType isEqualType objNull) then { _objType = typeOf _objType; }; -_staticClass = getText(configfile >> "CfgVehicles" >> _objType >> "staticClass"); -_simulClass = getText(configfile >> "CfgVehicles" >> _objType >> "simulClass"); -_bypassJammer = getNumber(configfile >> "CfgVehicles" >> _staticClass >> "bypassJammer"); +_staticClass = getText(_cfgBaseBuilding >> _objType >> "staticClass"); +_simulClass = getText(_cfgBaseBuilding >> _objType >> "simulClass"); +_bypassJammer = getNumber(_cfgBaseBuilding >> _staticClass >> "bypassJammer"); // Jammer _jammer = nearestObjects[player, ["PlotPole_EPOCH"], _buildingJammerRange*3]; @@ -87,7 +88,7 @@ if !(_buildingAllowed)exitWith{ false }; // Max object if (!_ownedJammerExists) then{ - _limitNearby = getNumber(configfile >> "CfgVehicles" >> _staticClass >> "limitNearby"); + _limitNearby = getNumber(_cfgBaseBuilding >> _staticClass >> "limitNearby"); if (_limitNearby > 0) then{ // remove current target from objects diff --git a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf index ad7c2177..13da89b9 100644 --- a/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_simulSwap.sqf @@ -21,7 +21,7 @@ Returns: NOTHING */ -private ["_energyCost","_allowedSnapObjects","_worldspace","_objSlot","_textureSlot","_newObj","_lastCheckTime","_rejectMove","_nearestObject","_nearestObjectRaw","_distanceNear","_previousDistanceNear","_pOffset","_snapPos","_isSnap","_snapPosition","_snapType","_snapDistance","_prevSnapDistance","_snapPointsPara","_snapPointsPerp","_snapArrayPara","_snapArrayPerp","_pos2","_direction","_vel2","_dir2","_up2","_distance","_playerdistance","_class","_create","_allowedSnapPoints","_snapObjects","_currentTarget","_onContactEH","_offset","_disallowed","_object","_objType","_return","_velocityTransformation","_distanceMod","_oemType","_config"]; +private ["_simulClassConfig","_energyCost","_allowedSnapObjects","_worldspace","_objSlot","_textureSlot","_newObj","_lastCheckTime","_rejectMove","_nearestObject","_nearestObjectRaw","_distanceNear","_previousDistanceNear","_pOffset","_snapPos","_isSnap","_snapPosition","_snapType","_snapDistance","_prevSnapDistance","_snapPointsPara","_snapPointsPerp","_snapArrayPara","_snapArrayPerp","_pos2","_direction","_vel2","_dir2","_up2","_distance","_playerdistance","_class","_create","_allowedSnapPoints","_snapObjects","_currentTarget","_onContactEH","_offset","_disallowed","_object","_objType","_return","_velocityTransformation","_distanceMod","_oemType","_cfgBaseBuilding"]; if !(isNil "EPOCH_simulSwap_Lock") exitWith{}; _object = param [0,objNull]; @@ -42,14 +42,17 @@ _velocityTransformation = []; _prevSnapDistance = 0; _distanceMod = 0; _oemType = (typeOf _object); -_config = (configFile >> "CfgVehicles" >> _oemType >> "simulClass"); -if (isText(_config)) then { - _class = getText(_config); + +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + +_simulClassConfig = (_cfgBaseBuilding >> _oemType >> "simulClass"); +if (isText(_simulClassConfig)) then { + _class = getText(_simulClassConfig); _create = true; - _allowedSnapPoints = getArray(configfile >> "cfgVehicles" >> _class >> "allowedSnapPoints"); + _allowedSnapPoints = getArray(_cfgBaseBuilding >> _class >> "allowedSnapPoints"); _allowedSnapObjects = ["Constructions_static_F"]; - _snapObjects = configfile >> "cfgVehicles" >> _class >> "allowedSnapObjects"; - _energyCost = getNumber(configfile >> "cfgVehicles" >> _class >> "energyCost"); + _snapObjects = _cfgBaseBuilding >> _class >> "allowedSnapObjects"; + _energyCost = getNumber(_cfgBaseBuilding >> _class >> "energyCost"); if (_energyCost == 0) then { _energyCost = 0.1; }; @@ -129,8 +132,8 @@ if (isText(_config)) then { } forEach _allowedSnapObjects; }; if (!isNull _nearestObject) then { - _snapPointsPara = getArray(configfile >> "cfgVehicles" >> (typeOf _nearestObject) >> "snapPointsPara"); - _snapPointsPerp = getArray(configfile >> "cfgVehicles" >> (typeOf _nearestObject) >> "snapPointsPerp"); + _snapPointsPara = getArray(_cfgBaseBuilding >> (typeOf _nearestObject) >> "snapPointsPara"); + _snapPointsPerp = getArray(_cfgBaseBuilding >> (typeOf _nearestObject) >> "snapPointsPerp"); _snapArrayPara = []; { if (_x in _allowedSnapPoints) then { diff --git a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf index 10ff602f..f6ccf388 100644 --- a/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf +++ b/Sources/epoch_code/compile/building/EPOCH_staticMove.sqf @@ -23,7 +23,7 @@ NOTHING */ if !(isNil "EPOCH_simulSwap_Lock") exitWith{}; -private ["_energyCost","_maxHeight","_stabilityCheck","_pos2ATL","_lastCheckTime","_rejectMove","_currentOffSet","_dir2","_up2","_nearestObject","_isSnap","_snapPosition","_snapType","_pOffset","_snapPos","_snapDistance","_snapPos1","_pos_snapObj","_direction","_pos1_snap","_pos2_snap","_ins","_EPOCH_2","_arr_snapPoints","_pos1","_offSet","_snapConfig","_snapPointsPara","_snapPointsPerp","_baselineSnapPos","_distance","_nearestObjects","_EPOCH_1","_pos2","_numberOfContacts","_worldspace","_currentTarget","_offsetZPos","_currentPos","_objSlot","_allowedSnapPoints","_allowedSnapObjects","_objType","_class","_simulClass","_snapChecks","_maxSnapDistance"]; +private ["_cfgBaseBuilding","_energyCost","_maxHeight","_stabilityCheck","_pos2ATL","_lastCheckTime","_rejectMove","_currentOffSet","_dir2","_up2","_nearestObject","_isSnap","_snapPosition","_snapType","_pOffset","_snapPos","_snapDistance","_snapPos1","_pos_snapObj","_direction","_pos1_snap","_pos2_snap","_ins","_EPOCH_2","_arr_snapPoints","_pos1","_offSet","_snapConfig","_snapPointsPara","_snapPointsPerp","_baselineSnapPos","_distance","_nearestObjects","_EPOCH_1","_pos2","_numberOfContacts","_worldspace","_currentTarget","_offsetZPos","_currentPos","_objSlot","_allowedSnapPoints","_allowedSnapObjects","_objType","_class","_simulClass","_snapChecks","_maxSnapDistance"]; params [ ["_object",objNull], ["_item",""] @@ -44,14 +44,16 @@ EPOCH_simulSwap_Lock = true; _objType = typeOf _object; -_energyCost = getNumber(configfile >> "cfgVehicles" >> _objType >> "energyCost"); +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + +_energyCost = getNumber(_cfgBaseBuilding >> _objType >> "energyCost"); if (_energyCost == 0) then { _energyCost = 0.1; }; -_class = getText(configfile >> "cfgVehicles" >> _objType >> "GhostPreview"); -_maxHeight = getNumber(configfile >> "cfgVehicles" >> _objType >> "maxHeight"); -_simulClass = getText(configFile >> "CfgVehicles" >> _objType >> "simulClass"); +_class = getText(_cfgBaseBuilding >> _objType >> "GhostPreview"); +_maxHeight = getNumber(_cfgBaseBuilding >> _objType >> "maxHeight"); +_simulClass = getText(_cfgBaseBuilding >> _objType >> "simulClass"); _snapChecks = getArray(("CfgSnapChecks" call EPOCH_returnConfig) >> _objType >> "nails"); _maxSnapDistance = 1; @@ -95,8 +97,8 @@ if (_class != "") then { _currentTarget setVariable["BUILD_SLOT", _objSlot, true]; }; - _allowedSnapPoints = getArray(configfile >> "cfgVehicles" >> _class >> "allowedSnapPoints"); - _allowedSnapObjects = getArray(configfile >> "cfgVehicles" >> _class >> "allowedSnapObjects"); + _allowedSnapPoints = getArray(_cfgBaseBuilding >> _class >> "allowedSnapPoints"); + _allowedSnapObjects = getArray(_cfgBaseBuilding >> _class >> "allowedSnapObjects"); _currentOffSet = []; EP_snap = objNull; @@ -162,7 +164,7 @@ if (_class != "") then { _isSnap = false; _snapPosition = [0, 0, 0]; - _snapConfig = configfile >> "cfgVehicles" >> (typeOf _nearestObject); + _snapConfig = _cfgBaseBuilding >> (typeOf _nearestObject); _snapPointsPara = getArray(_snapConfig >> "snapPointsPara"); _snapPointsPerp = getArray(_snapConfig >> "snapPointsPerp"); diff --git a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf index 5289026e..64c48a8a 100644 --- a/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf +++ b/Sources/epoch_code/compile/interface_event_handlers/EPOCH_KeyDown.sqf @@ -181,26 +181,6 @@ if (vehicle player == player) then { }; }; - if (_dikCode == EPOCH_keysAcceptTrade) then { - if (_ctrl) then { - if (!isNull cursorTarget) then { - if ((player distance cursorTarget) < 6) then { - if (cursorTarget != player && isPlayer cursorTarget && vehicle cursorTarget == cursorTarget) then { - [cursorTarget, player, Epoch_personalToken] call EPOCH_startTRADEREQ; - }; - }; - }; - } else { - if !(isNull EPOCH_pendingP2ptradeTarget && isPlayer EPOCH_pendingP2ptradeTarget) then { - if ((player distance EPOCH_pendingP2ptradeTarget) < 6) then { - EPOCH_p2ptradeTarget = EPOCH_pendingP2ptradeTarget; - call EPOCH_startTrade; - }; - }; - }; - _handled = true; - }; - if (_dikCode in(actionKeys "moveFastForward") || _dikCode in(actionKeys "moveForward")) then { if ((diag_tickTime - EPOCH_lastAGTime) > 1) then { EPOCH_lastAGTime = diag_tickTime; diff --git a/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf b/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf index 51377526..8282aa58 100644 --- a/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf +++ b/Sources/epoch_code/compile/looting/EPOCH_spawnLoot.sqf @@ -23,10 +23,12 @@ Returns: BOOL */ +private ["_class","_randomColor","_positions","_posName","_color","_colors","_randomIndex","_selectedLoot","_position","_pos","_m2WPos","_dir","_relDir","_item","_return","_possibleCount","_possibleLoots","_masterConfig","_config","_cfgBaseBuilding","_lootBias","_lootType","_loots","_lootLimit"]; params [["_building",objNull,[objNull]], ["_lootCheckBufferLimit",333], ["_lootObjectLimit",33]]; _masterConfig = 'CfgBuildingLootPos' call EPOCH_returnConfig; _config = _masterConfig >> (typeOf _building); +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; // exit with false if building is not lootable _return = false; @@ -88,7 +90,7 @@ if ((random 100) < _lootBias) then { }; if (_randomColor isEqualTo "true") then { - _colors = getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures"); + _colors = getArray(_cfgBaseBuilding >> _class >> "availableTextures"); if !(_colors isEqualTo[]) then { _color = selectRandom _colors; _item setObjectTextureGlobal[0, _color]; diff --git a/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf b/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf index d8d6fbba..aa1ad630 100644 --- a/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf +++ b/Sources/epoch_code/compile/setup/EPOCH_clientKeyMap.sqf @@ -31,7 +31,6 @@ _keyMap = ["Action","EPOCH_keysAction",0x39], ["Holster Weapon", "EPOCH_keysHolster", 35], ["Debug Monitor", "EPOCH_keysDebugMon", 41], - ["Trade", "EPOCH_keysAcceptTrade", 0x14], ["Volume + (ctrl)","EPOCH_keysVolumeUp",0x0D], ["Volume - (ctrl)","EPOCH_keysVolumeDown",0x0C], diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf index ff319027..95bada6c 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event1.sqf @@ -1,17 +1,51 @@ _currentTarget = objNull; +_currentTargetMode = 0; _cursorTarget = ([10] call EPOCH_fnc_cursorTarget); if (!isNull _cursorTarget && {!(EPOCH_target isEqualTo _cursorTarget)}) then { - if (_cursorTarget isKindOf "ThingX" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F" || _cursorTarget isKindOf "WeaponHolder" || _cursorTarget isKindOf "AllVehicles" || _cursorTarget isKindOf "PlotPole_EPOCH") then{ - if (_cursorTarget isKindOf "Animal_Base_F") then { - if !(alive _cursorTarget) then { + // Land_MPS_EPOCH = ThingX 0 + // container_epoch = ThingX 0 + // Parent - Constructions_modular_F = ThingX + // Epoch_Female_F , Epoch_Male_F = 2 + // Animal_Base_F = 3 + // Buildable_Storage = 4 + _interactType = typeOf _cursorTarget; + _interaction = (_cfgObjectInteractions >> _interactType); + if (isClass(_interaction)) then { + _currentTargetMode = getNumber (_interaction >> "interactMode"); + _currentTarget = _cursorTarget; + } else { + // AllVehicles = vehicles=0 players=2 animals=3 + if (_cursorTarget isKindOf "AllVehicles") then { + if (_cursorTarget isKindOf "Animal_Base_F") then { // 3 + if !(alive _cursorTarget) then { + _currentTargetMode = 3; + _currentTarget = _cursorTarget; + }; + } else { _currentTarget = _cursorTarget; }; } else { - _currentTarget = _cursorTarget; + if (_cursorTarget isKindOf "Constructions_modular_F" || _cursorTarget isKindOf "Constructions_static_F" || _cursorTarget isKindOf "Constructions_foundation_F") then { + _currentTargetMode = 1; + _currentTarget = _cursorTarget; + } else { + if (_cursorTarget isKindOf "Buildable_Storage") then { + _currentTargetMode = 4; + _currentTarget = _cursorTarget; + } else { + /* + if (_cursorTarget isKindOf "WeaponHolder") then { + _currentTargetMode = 0; + _currentTarget = _cursorTarget; + }; + */ + }; + }; }; }; }; EPOCH_currentTarget = _currentTarget; +EPOCH_currentTargetMode = _currentTargetMode; _increaseStamina = false; _vehicle = vehicle player; @@ -32,6 +66,7 @@ if (_vehicle == player) then { EPOCH_Target = objNull; }; _increaseStamina = true; + // TODO: move back to vehicle configs switch (typeOf _vehicle) do { case "jetski_epoch": { diff --git a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf index 50c2ac6a..5229837b 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/Event5.sqf @@ -31,8 +31,8 @@ if !(_powerSources isEqualTo[]) then { _totalCapacity = 0; { _powerClass = typeOf _x; - _powerCap = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerCapacity"); - _powerType = getNumber(configFile >> "CfgVehicles" >> _powerClass >> "powerType"); + _powerCap = getNumber(_cfgBaseBuilding >> _powerClass >> "powerCapacity"); + _powerType = getNumber(_cfgBaseBuilding >> _powerClass >> "powerType"); if (_powerCap == 0) then { _powerCap = 100; }; diff --git a/Sources/epoch_code/compile/setup/masterLoop/init.sqf b/Sources/epoch_code/compile/setup/masterLoop/init.sqf index 2aa77345..46aa83fb 100644 --- a/Sources/epoch_code/compile/setup/masterLoop/init.sqf +++ b/Sources/epoch_code/compile/setup/masterLoop/init.sqf @@ -97,3 +97,7 @@ _fadeUI = { }; _cursorTarget = objNull; + +// init cfgBaseBuilding config var +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; +_cfgObjectInteractions = 'CfgObjectInteractions' call EPOCH_returnConfig; diff --git a/Sources/epoch_code/compile/traders/EPOCH_startInteract.sqf b/Sources/epoch_code/compile/traders/EPOCH_startInteract.sqf index 00d263c2..c5b22cda 100644 --- a/Sources/epoch_code/compile/traders/EPOCH_startInteract.sqf +++ b/Sources/epoch_code/compile/traders/EPOCH_startInteract.sqf @@ -1,3 +1,4 @@ +// TODO remove unused file private ["_target","_forceGear","_targets","_handled","_dialog","_vehicle"]; closeDialog 0; _dialog = ""; diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf index 4ced50b4..a7fca266 100644 --- a/Sources/epoch_code/init/client_init.sqf +++ b/Sources/epoch_code/init/client_init.sqf @@ -47,6 +47,7 @@ EPOCH_drawIcon3d = false; EPOCH_velTransform = false; EPOCH_stabilityTarget = objNull; EPOCH_currentTarget = objNull; +EPOCH_currentTargetMode = 0; EPOCH_LootedBlds = []; EPOCH_lootObjects = []; EPOCH_soundLevel = 1; diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp index af19c83c..66145e5b 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_core.hpp @@ -27,6 +27,8 @@ class CfgActionMenu dyna_buildMode = "([10] call EPOCH_fnc_cursorTarget) call EPOCH_checkBuild;"; dyna_isVehicle = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'LandVehicle') || (dyna_cursorTarget isKindOf 'Air') || (dyna_cursorTarget isKindOf 'Ship') || (dyna_cursorTarget isKindOf 'Tank'))} else {false}"; dyna_isTrader = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (!isPlayer dyna_cursorTarget) && ((dyna_cursorTarget getVariable['AI_SLOT', -1]) != -1))} else {false}"; + dyna_isPlayer = "if (!(isNull dyna_cursorTarget) && alive dyna_cursorTarget) then {((dyna_cursorTarget isKindOf 'Man') && (dyna_cursorTarget != player) && (isPlayer dyna_cursorTarget))} else {false}"; + dyna_canAcceptTrade = "if (!(isNull EPOCH_pendingP2ptradeTarget) && alive EPOCH_pendingP2ptradeTarget) then {((EPOCH_pendingP2ptradeTarget isKindOf 'Man') && (dyna_cursorTarget isEqualTo EPOCH_pendingP2ptradeTarget))} else {false}"; dyna_locked = "locked dyna_cursorTarget in [2,3]"; dyna_lockedInVehicle = "locked vehicle player in [2,3]"; }; diff --git a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp index cca6f3aa..495ce7b9 100644 --- a/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp +++ b/Sources/epoch_config/Configs/CfgActionMenu/CfgActionMenu_target.hpp @@ -77,6 +77,21 @@ class tra_shop tooltip = "Shop"; }; +class player_trade +{ + condition = "dyna_isPlayer"; + action = "[dyna_cursorTarget, player, Epoch_personalToken] call EPOCH_startTRADEREQ;"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\krypto.paa"; + tooltip = "Make Trade Request"; +}; +class player_trade_accept +{ + condition = "dyna_isPlayer && dyna_canAcceptTrade"; + action = "EPOCH_p2ptradeTarget = EPOCH_pendingP2ptradeTarget;call EPOCH_startTrade;"; + icon = "x\addons\a3_epoch_code\Data\UI\buttons\krypto.paa"; + tooltip = "Accept Trade Request"; +}; + //User action replacement class maintain_jammer { diff --git a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp index 18cfcc69..883c5fa3 100644 --- a/Sources/epoch_config/Configs/CfgBaseBuilding.hpp +++ b/Sources/epoch_config/Configs/CfgBaseBuilding.hpp @@ -22,11 +22,9 @@ class CfgBaseBuilding { { upgradeBuilding[] = { { "FirePlaceOn_EPOCH", { { "WoodLog_EPOCH", 1 } } } }; removeParts[] = { { "ItemRock", 2 } }; - staticClass = "FirePlace_EPOCH"; simulClass = "Fireplace_SIM_EPOCH"; GhostPreview = "FirePlace_EPOCH"; - limitNearby = 2; bypassJammer = 1; isTemporary = 1; @@ -42,69 +40,284 @@ class CfgBaseBuilding { class Foundation_EPOCH : Default { removeParts[] = { { "ItemRock", 4 } }; + GhostPreview = "Foundation_Ghost_EPOCH"; + staticClass = "Foundation_EPOCH"; + snapPointsPara[] = {"N","S","E","W","C"}; + snapPointsPerp[] = {}; + //allowedSnapPoints[] = {"N","S","E","W"}; + //allowedSnapObjects[] = { "Constructions_foundation_F" }; + maxHeight = 2.5; + }; + class Foundation_Ghost_EPOCH : Foundation_EPOCH + { + allowedSnapPoints[] = { "N", "S", "E", "W"}; + allowedSnapObjects[] = { "Constructions_foundation_F" }; }; class WoodFoundation_EPOCH : Default { removeParts[] = { { "PartPlankPack", 4 } }; + GhostPreview = "WoodFoundation_Ghost_EPOCH"; + staticClass = "WoodFoundation_EPOCH"; + snapPointsPara[] = { "N", "S", "E", "W", "C" }; + snapPointsPerp[] = {}; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + allowedSnapObjects[] = { "Constructions_foundation_F" }; + maxHeight = 2.5; + }; + class WoodFoundation_Ghost_EPOCH : WoodFoundation_EPOCH + { + allowedSnapPoints[] = { "N", "S", "E", "W"}; + allowedSnapObjects[] = { "Constructions_foundation_F" }; }; class Hesco3_EPOCH : Default { removeParts[] = { { "KitHesco3", 1 } }; + simulClass = "Hesco3_SIM_EPOCH"; + staticClass = "Hesco3_EPOCH"; + GhostPreview = "Hesco3_Ghost_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = { "C", "E", "W" }; + energyCost = 0.4; + limitNearby = 4; + bypassJammer = 1; }; + class Hesco3_SIM_EPOCH : Hesco3_EPOCH + { + allowedSnapPoints[] = { "C", "E", "W" }; + allowedSnapObjects[] = { "Hesco3_EPOCH" }; + removeParts[] = {}; + }; + class Hesco3_Ghost_EPOCH : Hesco3_SIM_EPOCH {}; class TankTrap_EPOCH : Default { removeParts[] = { { "KitTankTrap", 1 } }; + simulClass = "TankTrap_SIM_EPOCH"; + staticClass = "TankTrap_EPOCH"; + GhostPreview = "TankTrap_EPOCH"; + energyCost = 0.2; + limitNearby = 4; + bypassJammer = 1; }; + class TankTrap_SIM_EPOCH: TankTrap_EPOCH + { + removeParts[] = {}; + }; + class Spike_TRAP_EPOCH: Default + { + simulClass = "Spike_TRAP_SIM_EPOCH"; + staticClass = "Spike_TRAP_EPOCH"; + GhostPreview = "Spike_TRAP_EPOCH"; + ammoClass = "Spike_TRAP_AMMO_EPOCH"; + energyCost = 0.2; + limitNearby = 2; + bypassJammer = 1; + }; + class Spike_TRAP_SIM_EPOCH: Spike_TRAP_EPOCH {}; + class Metal_TRAP_EPOCH: Default + { + simulClass = "Metal_TRAP_SIM_EPOCH"; + staticClass = "Metal_TRAP_EPOCH"; + GhostPreview = "Metal_TRAP_EPOCH"; + ammoClass = "Metal_TRAP_AMMO_EPOCH"; + energyCost = 0.4; + limitNearby = 2; + bypassJammer = 1; + }; + class Metal_TRAP_SIM_EPOCH: Metal_TRAP_EPOCH {}; class SolarGen_EPOCH : Default { removeParts[] = { { "KitSolarGen", 1 } }; + powerCapacity = 10; + powerType = 1; + GhostPreview = "SolarGen_EPOCH"; + staticClass = "SolarGen_EPOCH"; + simulClass = "SolarGen_SIM_EPOCH"; + interactMode = 1; + }; + class SolarGen_SIM_EPOCH : SolarGen_EPOCH { + removeParts[] = {}; }; class PlotPole_EPOCH : Default { removeParts[] = { { "KitPlotPole", 1 } }; + GhostPreview = "PlotPole_EPOCH"; + staticClass = "PlotPole_EPOCH"; + simulClass = "PlotPole_SIM_EPOCH"; + bypassJammer = 1; + interactMode = 1; + }; + class PlotPole_SIM_EPOCH : PlotPole_EPOCH + { + interactMode = 0; + removeParts[] = {}; }; class WoodRamp_EPOCH : Default { removeParts[] = { { "PartPlankPack", 3 } }; + simulClass = "WoodRamp_SIM_EPOCH"; + staticClass = "WoodRamp_EPOCH"; + GhostPreview = "WoodRamp_Ghost_EPOCH"; + snapPointsPara[] = {}; + snapPointsPerp[] = {}; + //allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "CB" }; + energyCost = 0.2; }; + class WoodRamp_SIM_EPOCH : WoodRamp_EPOCH + { + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "CB" }; + allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + removeParts[] = {}; + }; + class WoodRamp_Ghost_EPOCH : WoodRamp_SIM_EPOCH {}; class WoodFloor_EPOCH : Default { upgradeBuilding[] = { { "MetalFloor_EPOCH", { { "ItemCorrugatedLg", 2 } } } }; removeParts[] = { { "PartPlankPack", 2 } }; + simulClass = "WoodFloor_SIM_EPOCH"; + staticClass = "WoodFloor_EPOCH"; + GhostPreview = "WoodFloor_Ghost_EPOCH"; + snapPointsPara[] = {"NF","SF","EF","WF","C","CB"}; + snapPointsPerp[] = {"N","S","E","W","CinN","CinS","CinE","CinW"}; + energyCost = 0.2; }; + class WoodFloor_SIM_EPOCH: WoodFloor_EPOCH + { + allowedSnapPoints[] = {"NF","SF","EF","WF","C"}; + allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; + }; + class WoodFloor_Ghost_EPOCH: WoodFloor_SIM_EPOCH {}; class MetalFloor_EPOCH : Default { removeParts[] = { { "ItemCorrugatedLg", 2 } }; + simulClass = "MetalFloor_SIM_EPOCH"; + staticClass = "MetalFloor_EPOCH"; + GhostPreview = "MetalFloor_Ghost_EPOCH"; + snapPointsPara[] = { "NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + energyCost = 0.5; }; + class MetalFloor_SIM_EPOCH : Default + { + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "C" }; + allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + removeParts[] = {}; + }; + class MetalFloor_Ghost_EPOCH : MetalFloor_SIM_EPOCH {}; class CinderWallGarage_EPOCH : Default { removeParts[] = { { "CinderBlocks", 4 }, { "ItemCorrugatedLg", 1 }, { "CircuitParts", 1 } }; + simulClass = "CinderWallGarage_SIM_EPOCH"; + staticClass = "CinderWallGarage_EPOCH"; + GhostPreview = "CinderWallGarage_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.5; }; - class CinderWallHalf_EPOCH : Default{ + class CinderWallGarage_SIM_EPOCH : CinderWallGarage_EPOCH + { + allowedSnapObjects[] = { "Const_Cinder_static_F", "Const_floors_static_F" }; + removeParts[] = {}; + }; + class CinderWallHalf_EPOCH : Default + { upgradeBuilding[] = { { "CinderWall_EPOCH", { { "CinderBlocks", 2 }, { "MortarBucket", 1 } } } }; removeParts[] = { { "CinderBlocks", 2 }, { "ItemRock", 1 } }; + simulClass = "CinderWallHalf_SIM_EPOCH"; + staticClass = "CinderWallHalf_EPOCH"; + GhostPreview = "CinderWallHalf_Ghost_EPOCH"; + energyCost = 0.2; + snapType = "snapPointsPara"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; }; - class CinderWall_EPOCH : Default{ + class CinderWallHalf_SIM_EPOCH: CinderWallHalf_EPOCH + { + allowedSnapObjects[] = { "Const_Cinder_static_F", "Const_floors_static_F" }; + removeParts[] = {}; + upgradeBuilding[] = {}; + }; + class CinderWallHalf_Ghost_EPOCH : CinderWallHalf_SIM_EPOCH {}; + class CinderWall_EPOCH : Default + { upgradeBuilding[] = { { "CinderWallGarage_EPOCH", { { "ItemCorrugatedLg", 1 }, { "CircuitParts", 1 } } } }; removeParts[] = { { "CinderBlocks", 4 }, { "ItemRock", 2 } }; + simulClass = "CinderWall_SIM_EPOCH"; + staticClass = "CinderWall_EPOCH"; + GhostPreview = "CinderWall_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.4; }; - class WoodLargeWall_EPOCH : Default{ + class CinderWall_SIM_EPOCH: CinderWall_EPOCH + { + allowedSnapObjects[] = {"Const_Cinder_static_F","Const_floors_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; + }; + class WoodLargeWall_EPOCH : Default + { upgradeBuilding[] = { { "WoodWall1_EPOCH", { { "ItemPlywoodPack", 1 } } }, { "WoodLargeWallCor_EPOCH", { { "ItemCorrugated", 1 } } } }; removeParts[] = { { "PartPlankPack", 2 } }; + simulClass = "WoodLargeWall_SIM_EPOCH"; + staticClass = "WoodLargeWall_EPOCH"; + GhostPreview = "WoodLargeWall_Ghost_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; }; - class WoodWall1_EPOCH : Default{ + class WoodLargeWall_SIM_EPOCH: WoodLargeWall_EPOCH + { + upgradeBuilding[] = {}; + removeParts[] = {}; + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + }; + class WoodLargeWall_Ghost_EPOCH: WoodLargeWall_SIM_EPOCH {}; + class WoodWall1_EPOCH : Default + { upgradeBuilding[] = { { "WoodWall2_EPOCH", { { "PartPlankPack", 1 } } }, { "WoodLargeWallCor_EPOCH", { { "ItemCorrugated", 1 } } } }; removeParts[] = { { "PartPlankPack", 2 } }; + simulClass = "WoodWall1_SIM_EPOCH"; + staticClass = "WoodWall1_EPOCH"; + GhostPreview = "WoodWall1_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.2; + }; + class WoodWall1_SIM_EPOCH : WoodWall1_EPOCH + { + allowedSnapObjects[] = { "Const_floors_static_F", "Const_WoodWalls_static_F" }; + energyCost = 0.2; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodLargeWallCor_EPOCH : Default{ upgradeBuilding[] = { { "WoodLargeWallDoorway_EPOCH", { { "PartPlankPack", 1 } } } }; removeParts[] = { { "PartPlankPack", 2 }, { "ItemCorrugated", 1 } }; + simulClass = "WoodLargeWallCor_SIM_EPOCH"; + staticClass = "WoodLargeWallCor_EPOCH"; + GhostPreview = "WoodLargeWallCor_EPOCH"; + snapType = "snapPointsPara"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + energyCost = 0.2; + availableTextures[] = { "\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa" }; + }; + class WoodLargeWallCor_SIM_EPOCH: WoodLargeWallCor_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodWall2_EPOCH : Default{ upgradeBuilding[] = { @@ -112,10 +325,35 @@ class CfgBaseBuilding { { "WoodLargeWallDoor_EPOCH", { { "ItemCorrugated", 1 }, { "PartPlankPack", 1 } } }, }; removeParts[] = { { "ItemPlywoodPack", 1 }, { "PartPlankPack", 2 } }; + simulClass = "WoodWall2_SIM_EPOCH"; + staticClass = "WoodWall2_EPOCH"; + GhostPreview = "WoodWall2_EPOCH"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.2; + }; + class WoodWall2_SIM_EPOCH: WoodWall2_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodLargeWallDoorway_EPOCH : Default{ upgradeBuilding[] = { { "WoodLargeWallDoor_EPOCH", { { "ItemCorrugated", 1 }, { "PartPlankPack", 1 } } } }; removeParts[] = { { "PartPlankPack", 2 }, { "ItemCorrugated", 1 } }; + simulClass = "WoodLargeWallDoorway_SIM_EPOCH"; + staticClass = "WoodLargeWallDoorway_EPOCH"; + GhostPreview = "WoodLargeWallDoorway_EPOCH"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + energyCost = 0.2; + availableTextures[] = { "\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa" }; + }; + class WoodLargeWallDoorway_SIM_EPOCH: WoodLargeWallDoorway_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodWall3_EPOCH : Default{ upgradeBuilding[] = { @@ -123,55 +361,231 @@ class CfgBaseBuilding { { "WoodLargeWallDoorL_EPOCH", { { "ItemCorrugated", 1 }, { "CircuitParts", 1 } } }, }; removeParts[] = { { "ItemPlywoodPack", 1 }, { "PartPlankPack", 2 } }; + simulClass = "WoodWall3_SIM_EPOCH"; + staticClass = "WoodWall3_EPOCH"; + GhostPreview = "WoodWall3_EPOCH"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.2; + }; + class WoodWall3_SIM_EPOCH: WoodWall3_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodLargeWallDoor_EPOCH : Default{ upgradeBuilding[] = { { "WoodLargeWallDoorL_EPOCH", { { "ItemCorrugated", 1 }, { "CircuitParts", 1 } } } }; removeParts[] = { { "PartPlankPack", 2 }, { "ItemCorrugated", 1 } }; + simulClass = "WoodLargeWallDoor_SIM_EPOCH"; + staticClass = "WoodLargeWallDoor_EPOCH"; + GhostPreview = "WoodLargeWallDoor_EPOCH"; + snapPointsPara[] = {"N","E","W"}; + allowedSnapPoints[] = {"N","S","E","W"}; + availableTextures[] = { "\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa" }; + energyCost = 0.2; + }; + class WoodLargeWallDoor_SIM_EPOCH: WoodLargeWallDoor_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodWall4_EPOCH : Default { removeParts[] = { { "ItemPlywoodPack", 1 }, { "PartPlankPack", 2 }, { "CircuitParts", 1 } }; + simulClass = "WoodWall4_SIM_EPOCH"; + staticClass = "WoodWall4_EPOCH"; + GhostPreview = "WoodWall4_EPOCH"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + energyCost = 0.2; + }; + class WoodWall4_SIM_EPOCH: WoodWall4_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; }; class WoodLargeWallDoorL_EPOCH : Default { removeParts[] = { { "PartPlankPack", 2 }, { "ItemCorrugated", 1 }, { "CircuitParts", 1 } }; + simulClass = "WoodLargeWallDoorL_SIM_EPOCH"; + staticClass = "WoodLargeWallDoorL_EPOCH"; + GhostPreview = "WoodLargeWallDoorL_EPOCH"; + snapPointsPara[] = { "N", "E", "W" }; + allowedSnapPoints[] = { "N", "S", "E", "W" }; + availableTextures[] = { "\x\addons\a3_epoch_assets\textures\cor\corrugated_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_black_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_blue_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_brown_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_green_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_orange_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_purple_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_red_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_teal_co.paa", "\x\addons\a3_epoch_assets\textures\cor\corrugated_yellow_co.paa" }; + energyCost = 0.2; }; - class WoodStairs_EPOCH : Default{ + class WoodLargeWallDoorL_SIM_EPOCH: WoodLargeWallDoorL_EPOCH + { + allowedSnapObjects[] = {"Const_floors_static_F","Const_WoodWalls_static_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; + }; + class WoodStairs_EPOCH : Default + { upgradeBuilding[] = { { "WoodStairs2_EPOCH", { { "PartPlankPack", 4 } } } }; removeParts[] = { { "PartPlankPack", 4 } }; + simulClass = "WoodStairs_SIM_EPOCH"; + staticClass = "WoodStairs_EPOCH"; + GhostPreview = "WoodStairs_Ghost_EPOCH"; + snapPointsPara[] = {}; + snapPointsPerp[] = {}; + //allowedSnapPoints[] = { "NF2", "SF2", "EF2", "WF2", "NF", "SF", "EF", "WF", "CB" }; + //allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + energyCost = 0.2; }; + class WoodStairs_SIM_EPOCH: WoodStairs_EPOCH + { + allowedSnapPoints[] = {"NF","SF","EF","WF","CB"}; + allowedSnapObjects[] = {"Const_floors_static_F","Constructions_foundation_F"}; + upgradeBuilding[] = {}; + removeParts[] = {}; + }; + class WoodStairs_Ghost_EPOCH: WoodStairs_SIM_EPOCH {}; class WoodStairs2_EPOCH : Default { removeParts[] = { { "PartPlankPack", 4 } }; + simulClass = "WoodStairs2_SIM_EPOCH"; + staticClass = "WoodStairs2_EPOCH"; + GhostPreview = "WoodStairs2_EPOCH"; + snapPointsPara[] = { "NF2", "SF2", "EF2", "WF2", "NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + //allowedSnapPoints[] = { "NF2", "SF2", "EF2", "WF2", "NF", "SF", "EF", "WF", "CB" }; + energyCost = 0.3; + }; + class WoodStairs2_SIM_EPOCH : WoodStairs2_EPOCH + { + allowedSnapPoints[] = { "NF", "SF", "EF", "WF", "CB" }; + allowedSnapObjects[] = { "Const_floors_static_F", "Constructions_foundation_F" }; + removeParts[] = {}; }; class WoodTower_EPOCH : Default { removeParts[] = { { "PartPlankPack", 4 } }; upgradeBuildingPart[] = { { "ItemPlywoodPack", 1 }, { "PartPlankPack", 2 } }; removeBuildingPart[] = { { "ItemPlywoodPack", 1 }, { "PartPlankPack", 2 } }; + simulClass = "WoodTower_SIM_EPOCH"; + staticClass = "WoodTower_EPOCH"; + GhostPreview = "WoodTower_Ghost_EPOCH"; + snapPointsPara[] = { "NF2", "SF2", "EF2", "WF2","NF", "SF", "EF", "WF", "C", "CB" }; + snapPointsPerp[] = { "N", "S", "E", "W", "CinN", "CinS", "CinE", "CinW" }; + //allowedSnapPoints[] = { "NF2", "SF2", "EF2", "WF2", "CB" }; + //allowedSnapObjects[] = { "WoodTower_EPOCH", "Const_floors_static_F", "Constructions_foundation_F" }; + persistAnimations[] = { "NWall", "EWall", "SWall", "WWall" }; + energyCost = 0.3; }; + class WoodTower_SIM_EPOCH : WoodTower_EPOCH + { + allowedSnapPoints[] = { "NF2", "SF2", "EF2", "WF2", "CB" }; + allowedSnapObjects[] = { "WoodTower_EPOCH", "Const_floors_static_F", "Constructions_foundation_F" }; + energyCost = 0.3; + }; + class WoodTower_Ghost_EPOCH : WoodTower_SIM_EPOCH {}; class WoodLadder_EPOCH : Default { removeParts[] = { { "PartPlankPack", 2 } }; + simulClass = "WoodLadder_SIM_EPOCH"; + staticClass = "WoodLadder_EPOCH"; + GhostPreview = "WoodLadder_Ghost_EPOCH"; + energyCost = 0.1; }; + class WoodLadder_SIM_EPOCH: WoodLadder_EPOCH + { + removeParts[] = {}; + }; + class WoodLadder_Ghost_EPOCH : WoodLadder_SIM_EPOCH {}; class Tipi_EPOCH : Default { removeParts[] = { { "Pelt_EPOCH", 2 }, { "PartPlankPack", 1 } }; + GhostPreview = "Tipi_Ghost_EPOCH"; + staticClass = "Tipi_EPOCH"; + simulClass = "Tipi_SIM_EPOCH"; + limitNearby = 2; + bypassJammer = 1; + interactMode = 4; }; + class Tipi_SIM_EPOCH : Tipi_EPOCH + { + simulClass = "Tipi_SIM_EPOCH"; + staticClass = "Tipi_EPOCH"; + limitNearby = 2; + bypassJammer = 1; + interactMode = 1; + removeParts[] = {}; + }; + class Tipi_Ghost_EPOCH : Tipi_SIM_EPOCH {}; class StorageShelf_EPOCH : Default { removeParts[] = { { "ItemCorrugated", 2 } }; + GhostPreview = "StorageShelf_Ghost_EPOCH"; + staticClass = "StorageShelf_EPOCH"; + simulClass = "StorageShelf_SIM_EPOCH"; + limitNearby = 5; + bypassJammer = 1; + interactMode = 4; }; + class StorageShelf_SIM_EPOCH : StorageShelf_EPOCH + { + interactMode = 0; + removeParts[] = {}; + }; + class StorageShelf_Ghost_EPOCH : StorageShelf_SIM_EPOCH {}; class Workbench_EPOCH : Default { removeParts[] = { { "PartPlankPack", 2 } }; + GhostPreview = "WorkBench_Ghost_EPOCH"; + staticClass = "WorkBench_EPOCH"; + simulClass = "WorkBench_SIM_EPOCH"; + limitNearby = 5; + bypassJammer = 1; + interactMode = 4; }; - + class WorkBench_SIM_EPOCH : Workbench_EPOCH + { + interactMode = 0; + removeParts[] = {}; + }; + class WorkBench_Ghost_EPOCH : WorkBench_SIM_EPOCH {}; class LockBox_EPOCH : Default { returnOnPack[] = { { "ItemLockbox", 1 } }; - } + simulClass = "LockBox_SIM_EPOCH"; + staticClass = "LockBox_EPOCH"; + weaponHolderProxy = "LockBoxProxy_EPOCH"; + GhostPreview = "LockBox_EPOCH"; + bypassJammer = 1; + limitNearby = 2; + isSecureStorage = 1; + }; + class LockBox_SIM_EPOCH : LockBox_EPOCH + { + returnOnPack[] = {}; + }; class Safe_EPOCH : Default { returnOnPack[] = { { "ItemSafe", 1 } }; - } + simulClass = "Safe_SIM_EPOCH"; + staticClass = "Safe_EPOCH"; + weaponHolderProxy = "SafeProxy_EPOCH"; + GhostPreview = "Safe_EPOCH"; + bypassJammer = 1; + limitNearby = 2; + isSecureStorage = 1; + }; + class Safe_SIM_EPOCH : Safe_EPOCH + { + returnOnPack[] = {}; + }; + class Jack_EPOCH : Default + { + simulClass = "Jack_SIM_EPOCH"; + staticClass = "Jack_EPOCH"; + GhostPreview = "Jack_EPOCH"; + limitNearby = 2; + bypassJammer = 1; + energyCost = 0.1; + }; + class Jack_SIM_EPOCH : Jack_EPOCH {}; }; diff --git a/Sources/epoch_config/Configs/CfgInteractions.hpp b/Sources/epoch_config/Configs/CfgInteractions.hpp new file mode 100644 index 00000000..0ad3595a --- /dev/null +++ b/Sources/epoch_config/Configs/CfgInteractions.hpp @@ -0,0 +1,19 @@ +class CfgObjectInteractions { + class Default { + interactMode = 0; + }; + class Land_MPS_EPOCH : Default {}; + class container_epoch : Default {}; + class PlotPole_EPOCH : Default { + interactMode = 1; + }; + class Epoch_Female_F : Default { + interactMode = 2; + }; + class Epoch_Male_F : Default { + interactMode = 2; + }; + class C_man_1 : Default { + interactMode = 2; + }; +}; diff --git a/Sources/epoch_config/build.hpp b/Sources/epoch_config/build.hpp index af3c9f6b..ee4f402c 100644 --- a/Sources/epoch_config/build.hpp +++ b/Sources/epoch_config/build.hpp @@ -1 +1 @@ -build=445; +build=447; diff --git a/Sources/epoch_config/sandbox_config.hpp b/Sources/epoch_config/sandbox_config.hpp index f15da185..c7c42d79 100644 --- a/Sources/epoch_config/sandbox_config.hpp +++ b/Sources/epoch_config/sandbox_config.hpp @@ -63,6 +63,9 @@ disableRandomization[] = {"All"}; #include "Configs\CfgActionMenu\CfgActionMenu_core.hpp" #include "Configs\CfgEpochConfiguration.hpp" #include "Configs\CfgClientFunctions.hpp" +#include "Configs\CfgInteractions.hpp" + +// A3 specific configs #include "Configs\CfgFunctions.hpp" #include "Configs\CfgRemoteExec.hpp" diff --git a/Sources/epoch_server/build.hpp b/Sources/epoch_server/build.hpp index af3c9f6b..ee4f402c 100644 --- a/Sources/epoch_server/build.hpp +++ b/Sources/epoch_server/build.hpp @@ -1 +1 @@ -build=445; +build=447; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_saveBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_saveBuilding.sqf index 3382aca8..467a7b84 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_saveBuilding.sqf @@ -17,17 +17,18 @@ _return = false; if !(isNull _this) then { _objSlot = _this getVariable["BUILD_SLOT", -1]; if (_objSlot != -1) then{ - _this setDamage 0; - _class = typeOf _this; - _worldspace = [(getposATL _this call EPOCH_precisionPos), vectordir _this, vectorup _this]; + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _this setDamage 0; + _class = typeOf _this; + _worldspace = [(getposATL _this call EPOCH_precisionPos), vectordir _this, vectorup _this]; _objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _objSlot]; _animPhases = []; { _animPhases pushBack (_this animationPhase _x) - } foreach (getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations")); + } foreach (getArray(_cfgBaseBuilding >> _class >> "persistAnimations")); _VAL = [_class, _worldspace, _this getVariable["EPOCH_secureStorage", "-1"], _this getVariable["BUILD_OWNER", "-1"], _this getVariable["TEXTURE_SLOT", 0], _animPhases]; ["Building", _objHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX; - _return = true; + _return = true; }; }; _return diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf index 93f409d2..534a1ab4 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf @@ -14,8 +14,9 @@ */ _maxTTL = parseNumber EPOCH_expiresBuilding; -_config = 'CfgEpochClient' call EPOCH_returnConfig; -_buildingJammerRange = getNumber(_config >> "buildingJammerRange"); +_cfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; +_buildingJammerRange = getNumber(_cfgEpochClient >> "buildingJammerRange"); if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; _VAL = ["", [], "", "", 0, []]; @@ -77,7 +78,7 @@ for "_i" from 0 to _this do { _baseObj setVectorDirAndUp _worldspace; // spawn additional object for trap - _ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass"); + _ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass"); if(isText _ammoClass) then { _ammoClass = getText _ammoClass; _ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"]; @@ -97,7 +98,7 @@ for "_i" from 0 to _this do { { _baseObj animate [_x, _anims param [_forEachIndex,0], true] - } foreach(getArray(configFile >> "CfgVehicles" >> _class >> "persistAnimations")); + } foreach(getArray(_cfgBaseBuilding >> _class >> "persistAnimations")); }; // Handle Jammers and create marker if EPOCH_SHOW_JAMMERS set true. @@ -122,7 +123,7 @@ for "_i" from 0 to _this do { if (_textureSlot != 0) then { // get texture path from index - _color = getArray (configFile >> "CfgVehicles" >> _class >> "availableTextures"); + _color = getArray (_cfgBaseBuilding >> _class >> "availableTextures"); if !(_color isEqualTo []) then { _baseObj setObjectTextureGlobal [0, (_color select _textureSlot)]; _baseObj setVariable ["TEXTURE_SLOT", _textureSlot, true]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_maintBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_maintBUILD.sqf index c4192878..2d35bedd 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_maintBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_maintBUILD.sqf @@ -25,15 +25,15 @@ Returns: NOTHING */ -private ["_playerUID","_counter","_objSlot","_buildingJammerRange","_current_crypto","_cIndex","_vars","_storSlot","_playerCryptoLimit","_config"]; +private ["_playerUID","_counter","_objSlot","_buildingJammerRange","_current_crypto","_cIndex","_vars","_storSlot","_playerCryptoLimit","_cfgEpochClient"]; params [["_object",objNull],"_player","_maintCount",["_token","",[""]]]; if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; if (isNull _object) exitWith{}; if (_player distance _object > 20) exitWith{}; -_config = 'CfgEpochClient' call EPOCH_returnConfig; -_buildingJammerRange = getNumber(_config >> "buildingJammerRange"); +_cfgEpochClient = 'CfgEpochClient' call EPOCH_returnConfig; +_buildingJammerRange = getNumber(_cfgEpochClient >> "buildingJammerRange"); if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; }; _playerUID = getPlayerUID _player; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf index bcdfe3cc..8fae09b9 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_paintBUILD.sqf */ -private["_color", "_class", "_currentTextureSlot", "_slot", "_worldspace", "_objHiveKey", "_VAL", "_return", "_playerUID", "_objSlot"]; +private["_cfgBaseBuilding","_color", "_class", "_currentTextureSlot", "_slot", "_worldspace", "_objHiveKey", "_VAL", "_return", "_playerUID", "_objSlot"]; params [["_object",objNull],"_textureSlot","_player",["_token","",[""]]]; if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; @@ -28,7 +28,8 @@ if (_objSlot != -1) then { if (_textureSlot != _currentTextureSlot) then { _class = typeOf _object; - _color = getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures"); + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _color = getArray(_cfgBaseBuilding >> _class >> "availableTextures"); if !(_color isEqualTo[]) then { _object setObjectTextureGlobal[0, (_color select _textureSlot)]; _object setVariable["TEXTURE_SLOT", _textureSlot, true]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf index 003341f1..e3b08334 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_removeBUILD.sqf */ -private["_config","_vehSlot", "_gwh", "_wepsItemsCargo", "_magsAmmoCargo", "_objTypes", "_objQty", "_magazine", "_weapon", "_suppressor", "_laser", "_optics", "_arrCount", "_magazineName", "_magazineSize", "_qty", "_objType", "_inventory", "_posWH", "_nearbyWH", "_removeParts", "_isTemporary", "_storageSlot"]; +private["_cfgBaseBuilding","_vehSlot", "_gwh", "_wepsItemsCargo", "_magsAmmoCargo", "_objTypes", "_objQty", "_magazine", "_weapon", "_suppressor", "_laser", "_optics", "_arrCount", "_magazineName", "_magazineSize", "_qty", "_objType", "_inventory", "_posWH", "_nearbyWH", "_removeParts", "_isTemporary", "_storageSlot"]; params ["_building","_player",["_token","",[""]]]; if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; @@ -21,8 +21,8 @@ if (_player distance _building > 20) exitWith{}; // TODO add group check here since this should only be removed by group or owner of pole _objType = typeOf _building; -_config = 'CfgBaseBuilding' call EPOCH_returnConfig; -_isTemporary = getNumber(_config >> _objType >> "isTemporary"); +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; +_isTemporary = getNumber(_cfgBaseBuilding >> _objType >> "isTemporary"); // check that object has building or storage slot _vehSlot = _building getVariable["BUILD_SLOT", -1]; @@ -30,7 +30,7 @@ _storageSlot = _building getVariable["STORAGE_SLOT", "ABORT"]; if (_vehSlot != -1 || _storageSlot != "ABORT" || _isTemporary == 1) then{ - _removeParts = getArray(('CfgBaseBuilding' call EPOCH_returnConfig) >> _objType >> "removeParts"); + _removeParts = getArray(_cfgBaseBuilding >> _objType >> "removeParts"); if !(_removeParts isEqualTo []) then { _posWH = getPosATL _player; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf index 01053d6d..6e07d69c 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_saveBuilding.sqf */ -private["_objSlot", "_findnextslot", "_worldspace", "_objHiveKey", "_VAL", "_config", "_slot", "_storageObj", "_pos", "_buildClass", "_newVehicle", "_textureSlot", "_staticClass", "_playerUID", "_oemType"]; +private["_staticClassConfig","_objSlot", "_findnextslot", "_worldspace", "_objHiveKey", "_VAL", "_cfgBaseBuilding", "_slot", "_storageObj", "_pos", "_buildClass", "_newVehicle", "_textureSlot", "_staticClass", "_playerUID", "_oemType"]; params ["_vehicle", "_player", ["_token","",[""]]]; if (isNull _vehicle) exitWith{}; @@ -23,12 +23,11 @@ _playerUID = getPlayerUID _player; if (!isNull ropeAttachedTo _vehicle) exitWith{}; _oemType = typeOf _vehicle; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; +_staticClassConfig = (_cfgBaseBuilding >> _oemType >> "staticClass"); +if (isText _staticClassConfig) then { -_config = (configFile >> "CfgVehicles" >> _oemType >> "staticClass"); -if (isText _config) then { - - _staticClass = getText(_config); - + _staticClass = getText(_staticClassConfig); if (_staticClass isKindOf "Buildable_Storage" || _staticClass isKindOf "Constructions_lockedstatic_F") then{ if !(EPOCH_StorageSlots isEqualTo[]) then { @@ -45,7 +44,7 @@ if (isText _config) then { _storageObj setposATL _vehiclePos; _storageObj setVectorDirAndUp _vectorDirAndUp; - if (getNumber(configFile >> "CfgVehicles" >> _staticClass >> "isSecureStorage") == 1) then{ + if (getNumber(_cfgBaseBuilding >> _staticClass >> "isSecureStorage") == 1) then{ _storageObj setVariable["EPOCH_Locked", false, true]; }; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf index 76dd0e00..8f07456d 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf @@ -12,15 +12,16 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simToStatic.sqf */ -private ["_worldspace","_newObj","_class","_objSlot","_config","_lastPosition","_currentPosition","_entities"]; +private ["_worldspace","_newObj","_class","_objSlot","_cfgBaseBuilding","_lastPosition","_currentPosition","_entities"]; _entities = allMissionObjects "Constructions_modular_F"; { _lastPosition = _x getVariable["LAST_POS", []]; _currentPosition = getposATL _x; if (_lastPosition isEqualTo _currentPosition) then { - _config = (configFile >> "CfgVehicles" >> (typeOf _x) >> "staticClass"); - if (isText(_config)) then { - _class = getText(_config); + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _staticClassConfig = (_cfgBaseBuilding >> (typeOf _x) >> "staticClass"); + if (isText(_staticClassConfig)) then { + _class = getText(_staticClassConfig); _objSlot = _x getVariable["BUILD_SLOT", -1]; if (_objSlot != -1) then { _worldspace = [_currentPosition,(vectordir _x),(vectorup _x)]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf index 7aad4355..ca64079d 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_simulSwap.sqf */ -private["_cfgClass", "_worldspace", "_newObj", "_return", "_class", "_oemType", "_config", "_object", "_objSlot", "_damage", "_color", "_textureSlot"]; +private["_classConfig","_cfgClass", "_worldspace", "_newObj", "_return", "_class", "_oemType", "_cfgBaseBuilding", "_object", "_objSlot", "_damage", "_color", "_textureSlot"]; params [["_object",objNull,[objNull]],["_static",false,[false]]]; _return = _object; _objSlot = _object getVariable ["BUILD_SLOT", -1]; @@ -23,10 +23,10 @@ if (_objSlot != -1) then { _cfgClass = "simulClass"; }; _oemType = typeOf _object; - - _config = (configFile >> "CfgVehicles" >> _oemType >> _cfgClass); - if (isText _config) then { - _class = getText(_config); + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _classConfig = (_cfgBaseBuilding >> _oemType >> _cfgClass); + if (isText _classConfig) then { + _class = getText(_classConfig); if (_oemType != _class) then { @@ -42,7 +42,7 @@ if (_objSlot != -1) then { if (_textureSlot != 0) then { // get texture path from index - _color = getArray(configFile >> "CfgVehicles" >> _class >> "availableTextures"); + _color = getArray(_cfgBaseBuilding >> _class >> "availableTextures"); if !(_color isEqualTo[]) then { _newObj setObjectTextureGlobal[0, (_color select _textureSlot)]; _newObj setVariable["TEXTURE_SLOT", _textureSlot, true]; @@ -50,7 +50,7 @@ if (_objSlot != -1) then { }; // spawn additional object for trap - _ammoClass = (configFile >> "CfgVehicles" >> _class >> "ammoClass"); + _ammoClass = (_cfgBaseBuilding >> _class >> "ammoClass"); if (isText _ammoClass) then { _ammoClass = getText _ammoClass; _ammoObj = createVehicle [_ammoClass, [0,0,0], [], 0, "CAN_COLLIDE"]; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf index 46ea0a35..aadd330b 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf @@ -12,21 +12,21 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_unsuppported.sqf */ -private["_worldspace", "_newObj", "_class", "_objSlot", "_config", "_isSupported", "_lastPosition", "_currentPosition", "_objectPos"]; +private["_simulClassConfig","_worldspace", "_newObj", "_class", "_objSlot", "_cfgBaseBuilding", "_isSupported", "_lastPosition", "_currentPosition", "_objectPos"]; if !(isNil "EPOCH_unsupportedCheckRunning") exitWith{ diag_log "UnsupportedCheck: Already running aborted"}; EPOCH_unsupportedCheckRunning = true; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + // Check unsupported _start = diag_tickTime; _simulatedCount = 0; _stableCount = 0; { if (!isNull _x) then { - - _config = (configFile >> "CfgVehicles" >> (typeOf _x) >> "simulClass"); - if (isText(_config)) then { - + _simulClassConfig = (_cfgBaseBuilding >> (typeOf _x) >> "simulClass"); + if (isText(_simulClassConfig)) then { _objectPos = getPosASL _x; _isSupported = isTouchingGround _x; if (!_isSupported) then { @@ -35,7 +35,7 @@ _stableCount = 0; }; }; if (!_isSupported) then { - _class = getText(_config); + _class = getText(_simulClassConfig); _objSlot = _x getVariable["BUILD_SLOT", -1]; if (_objSlot != -1) then { _vDir = vectordir _x; diff --git a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf index 11a02ad8..4dea75dc 100644 --- a/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf +++ b/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf @@ -12,16 +12,16 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_upgradeBUILD.sqf */ -private["_config","_worldspace", "_class", "_newObj", "_objHiveKey", "_VAL", "_return", "_upgrade", "_objSlot", "_objType"]; +private["_cfgBaseBuilding","_worldspace", "_class", "_newObj", "_objHiveKey", "_VAL", "_return", "_upgrade", "_objSlot", "_objType"]; params ["_object","_player",["_index",0],["_token","",[""]]]; if (isNull _object) exitWith{}; if !([_player, _token] call EPOCH_server_getPToken) exitWith{}; _objSlot = _object getVariable["BUILD_SLOT", -1]; -_config = 'CfgBaseBuilding' call EPOCH_returnConfig; +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; if (_objSlot != -1) then { - _upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding"); + _upgrades = getArray(_cfgBaseBuilding >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { _upgrade = _upgrades param [_index,[]]; _objectPos = getposATL _object; @@ -37,8 +37,8 @@ if (_objSlot != -1) then { }; } else { _objType = typeOf _object; - if (getNumber(_config >> _objType >> "isTemporary") == 1) then{ - _upgrades = getArray(_config >> (typeOf _object) >> "upgradeBuilding"); + if (getNumber(_cfgBaseBuilding >> _objType >> "isTemporary") == 1) then{ + _upgrades = getArray(_cfgBaseBuilding >> (typeOf _object) >> "upgradeBuilding"); if !(_upgrades isEqualTo []) then { _upgrade = _upgrades param [_index,[]]; _worldspace = [getposATL _object, vectordir _object, vectorup _object]; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf index 556454b4..605d05ea 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_storage.sqf */ -private ["_inventory","_location","_dir","_textures","_colors","_textureSelectionIndex","_selections","_count","_color","_config","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_class_raw","_damage","_class","_worldspace","_wsCount","_vehicle","_arr","_storageSlotIndex","_vehHiveKey","_response","_diag"]; +private ["_inventory","_location","_dir","_textures","_colors","_textureSelectionIndex","_selections","_count","_color","_cfgBaseBuilding","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_class_raw","_damage","_class","_worldspace","_wsCount","_vehicle","_arr","_storageSlotIndex","_vehHiveKey","_response","_diag"]; params [["_maxStorageLimit",0]]; _diag = diag_tickTime; @@ -86,10 +86,11 @@ for "_i" from 1 to _maxStorageLimit do { if (count _arr >= 5) then { _color = _arr select 4; - _config = configFile >> "CfgVehicles" >> _class >> "availableColors"; - if (isArray _config) then { - _colors = getArray(_config); - _textureSelectionIndex = configFile >> "CfgVehicles" >> _class >> "textureSelectionIndex"; + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _availableColorsConfig = _cfgBaseBuilding >> _class >> "availableColors"; + if (isArray _availableColorsConfig) then { + _colors = getArray(_availableColorsConfig); + _textureSelectionIndex = _cfgBaseBuilding >> _class >> "textureSelectionIndex"; _selections = if (isArray(_textureSelectionIndex)) then { getArray(_textureSelectionIndex) } else { [0] }; _count = (count _colors)-1; { diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf index 4a61d320..abf5f737 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf @@ -12,7 +12,7 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_vehicle/EPOCH_load_vehicles.sqf */ -private ["_location","_class","_dmg","_actualHitpoints","_hitpoints","_textures","_color","_colors","_textureSelectionIndex","_selections","_count","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_found","_vehicle","_allHitpoints","_config","_worldspace","_damage","_arr","_arrNum","_vehicleSlotIndex","_vehHiveKey","_response","_immuneVehicleSpawnTime","_diag","_dataFormat","_dataFormatCount","_allVehicles","_serverSettingsConfig","_simulationHandler","_immuneVehicleSpawn"]; +private ["_availableColorsConfig","_location","_class","_dmg","_actualHitpoints","_hitpoints","_textures","_color","_colors","_textureSelectionIndex","_selections","_count","_objTypes","_objQty","_wMags","_wMagsArray","_attachments","_magazineSizeMax","_magazineName","_magazineSize","_qty","_objType","_marker","_found","_vehicle","_allHitpoints","_cfgBaseBuilding","_worldspace","_damage","_arr","_arrNum","_vehicleSlotIndex","_vehHiveKey","_response","_immuneVehicleSpawnTime","_diag","_dataFormat","_dataFormatCount","_allVehicles","_serverSettingsConfig","_simulationHandler","_immuneVehicleSpawn"]; params [["_maxVehicleLimit",0]]; _diag = diag_tickTime; @@ -94,11 +94,12 @@ for "_i" from 1 to _maxVehicleLimit do { _vehicle call EPOCH_server_vehicleInit; - _config = configFile >> "CfgVehicles" >> _class >> "availableColors"; - if (isArray(_config)) then { + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _availableColorsConfig = (_cfgBaseBuilding >> _class >> "availableColors"); + if (isArray(_availableColorsConfig)) then { _color = _arr select 7; - _colors = getArray(_config); - _textureSelectionIndex = configFile >> "CfgVehicles" >> _class >> "textureSelectionIndex"; + _colors = getArray(_availableColorsConfig); + _textureSelectionIndex = (_cfgBaseBuilding >> _class >> "textureSelectionIndex"); _selections = if (isArray(_textureSelectionIndex)) then { getArray(_textureSelectionIndex) } else { [0] }; _count = (count _colors) - 1; { diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf index e35f58d7..1ccc800d 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_server_lockStorage.sqf @@ -28,7 +28,8 @@ _fnc_unlock = { _this setVariable ["EPOCH_Locked", false, true]; }; -if (getNumber(configFile >> "CfgVehicles" >> _type >> "isSecureStorage") == 1) then{ +_cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; +if (getNumber(_cfgBaseBuilding >> _type >> "isSecureStorage") == 1) then{ _owners = _unit getVariable["STORAGE_OWNERS", []]; diff --git a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf index d8e04355..06f85310 100644 --- a/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf +++ b/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf @@ -12,13 +12,12 @@ Github: https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_vehicle/EPOCH_spawn_vehicle.sqf */ -private ["_maxDamage","_textures","_textureSelectionIndex","_selections","_colors","_color","_count","_vehLockHiveKey","_marker","_config","_vehObj"]; +private ["_maxDamage","_textures","_textureSelectionIndex","_selections","_colors","_color","_count","_vehLockHiveKey","_marker","_cfgBaseBuilding","_vehObj"]; params ["_vehClass","_position","_direction","_locked","_slot",["_lockOwner",""],["_can_collide","CAN_COLLIDE"],["_spawnLoot",false],["_spawnDamaged",true]]; if !(isClass (configFile >> "CfgVehicles" >> _vehClass)) exitWith {objNull}; _vehObj = createVehicle[_vehClass, _position, [], 0, _can_collide]; if !(isNull _vehObj) then{ _vehObj call EPOCH_server_setVToken; - // Set Direction and position if (_direction isEqualType []) then{ _vehObj setposATL _position; @@ -27,7 +26,6 @@ if !(isNull _vehObj) then{ _vehObj setdir _direction; _vehObj setposATL _position; }; - // Normalize vehicle inventory clearWeaponCargoGlobal _vehObj; clearMagazineCargoGlobal _vehObj; @@ -52,13 +50,13 @@ if !(isNull _vehObj) then{ }; // get colors from config - _config = (configFile >> "CfgVehicles" >> _vehClass >> "availableColors"); + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _availableColorsConfig = (_cfgBaseBuilding >> _vehClass >> "availableColors"); + if (isArray(_availableColorsConfig)) then{ - if (isArray(_config)) then{ - - _textureSelectionIndex = configFile >> "CfgVehicles" >> _vehClass >> "textureSelectionIndex"; + _textureSelectionIndex = (_cfgBaseBuilding >> _vehClass >> "textureSelectionIndex"); _selections = if (isArray(_textureSelectionIndex)) then{ getArray(_textureSelectionIndex) } else { [0] }; - _colors = getArray(_config); + _colors = getArray(_availableColorsConfig); _textures = _colors select 0; _color = floor(random(count _textures)); _count = (count _colors) - 1; diff --git a/Sources/epoch_server/init/server_securityfunctions.sqf b/Sources/epoch_server/init/server_securityfunctions.sqf index 35516563..3db1750e 100644 --- a/Sources/epoch_server/init/server_securityfunctions.sqf +++ b/Sources/epoch_server/init/server_securityfunctions.sqf @@ -1144,11 +1144,13 @@ call compile ("'"+_skn_doAdminRequest+"' addPublicVariableEventHandler { _vehLockHiveKey = format['%1:%2', (call EPOCH_fn_InstanceID), _slot]; ['VehicleLock', _vehLockHiveKey, EPOCH_vehicleLockTime, [_lockOwner]] call EPOCH_fnc_server_hiveSETEX; - _config = (configFile >> 'CfgVehicles' >> _item >> 'availableColors'); - if (isArray(_config)) then { - _textureSelectionIndex = configFile >> 'CfgVehicles' >> _item >> 'textureSelectionIndex'; + _cfgBaseBuilding = 'CfgBaseBuilding' call EPOCH_returnConfig; + _availableColorsConfig = (_cfgBaseBuilding >> _item >> 'availableColors'); + + if (isArray(_availableColorsConfig)) then { + _textureSelectionIndex = (_cfgBaseBuilding >> _item >> 'textureSelectionIndex'); _selections = if (isArray(_textureSelectionIndex)) then {getArray(_textureSelectionIndex)} else {[0]}; - _colors = getArray(_config); + _colors = getArray(_availableColorsConfig); _textures = _colors select 0; _color = floor(random(count _textures)); _count = (count _colors) - 1; diff --git a/Sources/epoch_server_core/build.hpp b/Sources/epoch_server_core/build.hpp index af3c9f6b..ee4f402c 100644 --- a/Sources/epoch_server_core/build.hpp +++ b/Sources/epoch_server_core/build.hpp @@ -1 +1 @@ -build=445; +build=447; diff --git a/Sources/epoch_server_settings/build.hpp b/Sources/epoch_server_settings/build.hpp index af3c9f6b..ee4f402c 100644 --- a/Sources/epoch_server_settings/build.hpp +++ b/Sources/epoch_server_settings/build.hpp @@ -1 +1 @@ -build=445; +build=447; diff --git a/build.txt b/build.txt index b279a80c..b2629412 100644 --- a/build.txt +++ b/build.txt @@ -1 +1 @@ -445 +447