mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
0.3.4 part 8
This commit is contained in:
parent
2d4c0eac61
commit
4d00321000
@ -1,5 +1,5 @@
|
||||
Client:
|
||||
[Added] Workbench storage device also added as a nearby crafting requirement for most Kit based crafting options.
|
||||
[Added] Workbench storage device added and used as a nearby crafting requirement for most Kit based crafting options.
|
||||
[Added] New secure storage device: The Epoch Safe.
|
||||
[Added] Totally new crafting system and UI by Raymix.
|
||||
[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH)
|
||||
@ -9,9 +9,9 @@ Client:
|
||||
[Fixed] Shadow artifact at top of Jammer.
|
||||
[Fixed] Reduce client fps lag when first joining the server by preloading objects before exiting loading screen.
|
||||
[Fixed] Being unable to remove a solar generator.
|
||||
[Fixed] Angry Pumpkin mask was incorrectly visible in first person.
|
||||
[Changed] Removed debug hint text for 3d rotation of objects as it was not needed.
|
||||
[Changed] Re-enable Move button, this system will stay and be refined in the next few patches.
|
||||
|
||||
**Improved Dog AI Dog Brain by Axeman**
|
||||
[FIXED] Dog not taming due to var reset in wrong place / BIS animal update.
|
||||
[UPDATED] Dog text format updated.
|
||||
|
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
5 "" !="I_UAV_01_F" !="(I|B|O)_UAV_AI" !"_EPOCH" !="B_65x39_Minigun_Caseless_Red_splash" !="B_762x51_Minigun_Tracer_Yellow_splash" !="B_(Swing|Stick)" !"^SmokeShell" !"^G_40mm_" !"^F_40mm_" !"Sub_F_" !"^F_Signal_" !="mini_Grenade" !="GrenadeHand" !="LaserTarget(C|W|E)" !"^Chemlight_" !="(ClaymoreDirectionalMine|DemoCharge|SatchelCharge)_Remote_Ammo" !="SLAMDirectionalMine_Wire_Ammo" !="(CMflare_Chaff|Sapper_Charge|SapperB_Charge|ATMine_Range)_Ammo" !="APERS(TripMine_Wire|BoundingMine_Range|Mine_Range)_Ammo" !="Epoch_(Sapper|SapperB|Cloak)_F" !="GreatWhite_F" !="groundWeaponHolder" !="WeaponHolderSimulated" !="Epoch_(Male|Female)_F" !"Supply[0-9]" !"Steerable_Parachute_F" !="Epoch_Female_CamoRed_F" !="Land_Cages_F" !="(O|I|B)_UAV_01_backpack_F" !="I_(helipilot|helicrew)_F"
|
||||
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
|
||||
5 "_EPOCH" !="(SapperHead|Jack|SolarGen)_SIM_EPOCH" !="Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower)_EPOCH" !="(Tipi|Workbench|StorageShelf|CinderWallHalf|Foundation|Wood(Floor|LargeWall|Stairs|Ramp|Foundation|Ladder|Tower))_Ghost_EPOCH" !="(Tipi|StorageShelf|Safe|LockBox|FirePlace|FirePlaceOn|PlotPole|SolarGen|Jack|Freezer|Tarp|CinderWallHalf|Bobber)_EPOCH" !="I_(Soldier[1-3]|Soldier)_EPOCH" !="(Bed|locker|Filing|Chair|ChairRed|wardrobe|cooker|Couch|Table|Pelican|Fridge|Shelf|ToolRack|Shoebox|Bunk|Rabbit|Cabinet)_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock|Fin|Alsatian)_random_EPOCH" !="(Safe|Workbench|LockBox|CinderWall|CinderWallGarage|CinderWallHalf|PlotPole|Tipi|StorageShelf|Fireplace)_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorL|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_SIM_EPOCH" !="(WoodFoundation|Foundation)_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
|
||||
5 SeaGull
|
||||
|
@ -1 +1 @@
|
||||
1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="(Safe|LockBox)_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
|
||||
1 "" !="Land_MPS_EPOCH" !="SapperHead_SIM_EPOCH" !="Epoch_Sapper_F" !="Epoch_Cloak_F" !="(Safe|LockBox|Bobber)_EPOCH" !="Rabbit_EPOCH" !="(Sheep|Goat|Snake|Snake2|Hen|Cock)_random_EPOCH" !="LockBox_(Ghost|SIM)_EPOCH" !="CinderWallHalf_(Ghost|SIM)_EPOCH" !="CinderWall_SIM_EPOCH" !="Wood(Floor|LargeWall|LargeWallCor|LargeWallDoor|LargeWallDoorway|Stairs|Stairs2|Ramp|Ladder|Tower)_(Ghost|SIM)_EPOCH" !="Foundation_Ghost_EPOCH" !="Foundation_EPOCH" !="WoodWall[1-4](_SIM|_Ghost|)_EPOCH"
|
||||
|
@ -14,7 +14,7 @@
|
||||
7 attachTo !="EP_light attachTo [player];" !="_bomb attachTo [_unit, [0,0,0],\"Pelvis\"];" !="_dogHolder attachTo [_dog, [-0.2,1.2,0.7]];" !="EPOCH_target attachTo[player];" !="_sapperSmoke attachTo [_sapper,[0,0,-0.4]];"" !="_cage attachTo [_cage2,[0,1.3,0]];"
|
||||
7 enableCollisionWith
|
||||
7 hideObject !="_dogHolder hideobject true;" !="_dogHolder hideobject false;"
|
||||
7 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];"
|
||||
7 setvelocity !="setVelocityTarget" !="_bolt setPosATL _pos;\n_bolt setVelocity [0, 0, -10];" !="EPOCH_target setvelocitytransformation" !="_currentTarget setVelocity [0,0,-0.01];" !="_head setVelocity [\n(sin _dir * _speed), \n(cos _dir * _speed)" !="_vel = velocity this; _dir = getDir player; this setVelocity[(_vel select 0)+(sin _dir * 2),(_vel select 1)+(cos _dir * 2),(_vel select 2)];" !="_head setVelocity [random 2,random 2,10];" !="_bobber setVelocity [0,-1,-1];" !="_bobber setVelocity [0,-1,-10];"
|
||||
7 assignAs !="assignAsCargo" !="_unit assignAsGunner _axeCopter;" !="_driver assignAsDriver _axeCopter;" !="axeVIP assignAsDriver vehicle axeVIP;"
|
||||
7 assignAsCargo !="_x assignAsCargo axeGeneralsBoat;" !="axeVIP assignAsCargo vehicle player;" !="axeVIP assignAsCargo vehicle axeVIP;"
|
||||
7 allowDamage !="_unit allowDamage false;" !="_unit allowDamage true;" !="player allowDamage true;" !="vehicle player allowDamage true;" !="player allowDamage false;"
|
||||
@ -22,7 +22,7 @@
|
||||
7 onMapSingleClick !="onMapSingleClick '';"
|
||||
7 addMagazine !"addMagazineCargo" !="player addMagazine _craftItem;" !="player addMagazine \"jerrycanE_epoch\";" !="player addMagazine \"emptyjar_epoch\";" !="player addMagazine \"jerrycan_epoch\";" !="player addMagazine \"Hatchet_swing\";" !="player addMagazine [(_x select 0),(_x select 1)]" !="player addMagazine _x;" !="if !(player canAdd (_x select 0)) exitWith {};\nplayer addMagazine[_x select 0, _x select 1];"
|
||||
7 addMagazineCargo !"_dogHolder addMagazineCargo [\"RabbitCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Pelt_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"Venom_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"SnakeCarcass_EPOCH\", 1]" !"_dogHolder addMagazineCargo [\"ChickenCarcass_EPOCH\", 1]" !="_acceptHolder addMagazineCargo [_wAmmo, 1] ;"
|
||||
7 addItem !="player addItem _item;" !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;"
|
||||
7 addItem !="player addItem _item;" !="player addItem _craftItem;" !="player addItem _x;" !="_plyr addItemToVest _missionItem;" !="axeVIP addItemToVest _item;" !="_plyr addItemToVest _missionItem;" !="EPOCH_fnc_addItemOverflow"
|
||||
7 addBackPack
|
||||
7 removeAllWeapons !="removeAllWeapons axeGeneral;"
|
||||
7 removeAllItems
|
||||
@ -59,8 +59,8 @@
|
||||
7 remoteControl !"fn_moduleRemoteControl.sqf" !="\"BIS_fnc_moduleRemoteControl"\"
|
||||
7 drawIcon3D !="drawIcon3D[\"\x\addons\a3_epoch_code\Data\Member.paa\",_color,_pos,1,1,0,_text,1,0.025,\"PuristaMedium\"];\n}forEach EPOCH_ESP_TARGETS;" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_stability],_color,(getPosATL EPOCH_stabilityTarget),5,5,0,\"\",1,0.05,\"PuristaMedium\"];" !"drawIcon3D[format[\"\x\addons\a3_epoch_code\Data\UI\loading_bar_%1.paa\",_num],_color,_pos,4,4,0,\"\",1,0.05,\"PuristaMedium\"];" !"EPOCH_drawIcon3dStability" !"EPOCH_drawIcon3d" !"if (_condition) then {\ndrawIcon3D [_icon, _color, _position, _sizeX, _sizeY, _angle, _text," !="drawIcon3D [\"\A3\UI_F_MP_Mark\Data\Tasks\Misc\background.paa\""
|
||||
7 drawLine3D !"{\nfor [{_i = 1}, {_i < count _x}, {_i = _i + 1}] do {\ndrawLine3D [_x select (_i - 1), _x select _i, ((BIS_tracedShooter getVari"
|
||||
7 ctrlCreate !="_ctrl = _display ctrlCreate [\"RscProgress\",_idc + 1];" !="_display ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="_ctrl = _display ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];"
|
||||
7 ctrlDelete !="ctrlDelete _ListGroup;" !="ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);" !="ctrlDelete _mainGrp;"
|
||||
7 ctrlCreate !="_ctrl = _display ctrlCreate [\"RscProgress\",_idc + 1];" !="_display ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\"" !="_ctrl = _display ctrlCreate [_x,call _getIDC];" !="_mainGrp = _display ctrlCreate [\"Epoch_main_config_group\",_value];" !="_ctrlGrp = _display ctrlCreate [\"RscControlsGroupNoScrollbars\",call epoch_getIDC];"
|
||||
7 ctrlDelete !="ctrlDelete _ListGroup;" !="ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);" !="ctrlDelete _mainGrp;" !="_x call epoch_getIDC;\nctrlDelete _x;"
|
||||
7 ctrlClassName
|
||||
7 ctrlModel
|
||||
7 ctrlModelDirection
|
||||
|
@ -13,7 +13,7 @@ requiredBuild = 131696;
|
||||
// WHITELIST FILE TYPES
|
||||
allowedLoadFileExtensions[] = {:};
|
||||
allowedPreprocessFileExtensions[] = {"sqf"};
|
||||
allowedHTMLLoadExtensions[] = {:};
|
||||
allowedHTMLLoadExtensions[] = {"html"};
|
||||
|
||||
// WELCOME MESSAGE ("message of the day")
|
||||
// It can be several lines, separated by comma
|
||||
@ -31,7 +31,7 @@ maxPlayers = 50; // Maximum amount of players. Civilians and watchers, beholder
|
||||
// VOTING
|
||||
voteMissionPlayers = 200; // Prevents Votes.
|
||||
voteThreshold = 2; // Prevents Votes.
|
||||
// DISALLOW VOTING since 1.39
|
||||
// DISALLOW VOTING since 1.39
|
||||
allowedVoteCmds[] = {};
|
||||
allowedVotedAdminCmds[] = {};
|
||||
|
||||
@ -64,4 +64,3 @@ doubleIdDetected = "";
|
||||
onUnsignedData = "kick (_this select 0)"; // unsigned data detected
|
||||
onHackedData = "kick (_this select 0)"; //"ban (_this select 0)"; // tampering of the signature detected
|
||||
onDifferentData = "kick (_this select 0)";
|
||||
|
||||
|
BIN
Sources/epoch_code/Data/UI/cooldown/0.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/0.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/1.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/1.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/2.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/2.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/3.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/3.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/4.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/4.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/5.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/5.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/6.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/6.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/7.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/7.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/8.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/8.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/cooldown/9.paa
Normal file
BIN
Sources/epoch_code/Data/UI/cooldown/9.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/craftqty_arr_left.paa
Normal file
BIN
Sources/epoch_code/Data/UI/craftqty_arr_left.paa
Normal file
Binary file not shown.
BIN
Sources/epoch_code/Data/UI/craftqty_arr_right.paa
Normal file
BIN
Sources/epoch_code/Data/UI/craftqty_arr_right.paa
Normal file
Binary file not shown.
72
Sources/epoch_code/compile/EPOCH_fish.sqf
Normal file
72
Sources/epoch_code/compile/EPOCH_fish.sqf
Normal file
@ -0,0 +1,72 @@
|
||||
// EPOCH fishing
|
||||
private ["_bob","_fishes","_fish","_randomChance","_bobber","_nearByBobbers","_objects","_currentPos"];
|
||||
|
||||
_currentPos = player modelToWorld[0, 5, 0];
|
||||
if (surfaceIsWater _currentPos) then {
|
||||
|
||||
_objects = lineIntersectsObjs[eyePos player, _currentPos, player, objNull, true, 2];
|
||||
|
||||
if (_objects isEqualTo []) then{
|
||||
|
||||
_nearByBobbers = nearestObjects [position player,["Bobber_EPOCH"],12];
|
||||
if (_nearByBobbers isEqualTo []) then {
|
||||
|
||||
// Cast
|
||||
_bobber = createVehicle ["Bobber_EPOCH",_currentPos, [], 0, "CAN_COLLIDE"];
|
||||
_bobber setPosASL _currentPos;
|
||||
_bobber setVariable ["EPOCH_bobberTime", diag_tickTime];
|
||||
|
||||
} else {
|
||||
|
||||
_bobber = _nearByBobbers select 0;
|
||||
// Reel in and delete Bobber
|
||||
if !(isNull _bobber) then {
|
||||
|
||||
_castTime = _bobber getVariable ["EPOCH_bobberTime", diag_tickTime];
|
||||
_diffTime = (diag_tickTime - _castTime) / 10;
|
||||
|
||||
|
||||
// setTimer again to work with others bobbers and to prevent globalizing var
|
||||
if (_diffTime == 0) then {
|
||||
_bobber setVariable ["EPOCH_bobberTime", diag_tickTime];
|
||||
} else {
|
||||
|
||||
// max out chance when fish on line within last 10 seconds
|
||||
if ((diag_tickTime - (_bobber getVariable ["EPOCH_fishOnLine" , 0])) <= 10) then {
|
||||
_diffTime = 100;
|
||||
};
|
||||
|
||||
_bobber setVelocity [0,-1,-10];
|
||||
|
||||
// reel in bobber
|
||||
deleteVehicle _bobber;
|
||||
|
||||
|
||||
_randomChanceMax = (100 - _diffTime) max 1 min 99;
|
||||
|
||||
// RNG
|
||||
_randomChance = random 100;
|
||||
// PAY
|
||||
if (_randomChance > _randomChanceMax) then {
|
||||
|
||||
// TEMP payout
|
||||
_fishes = ["ItemTuna","ItemSeaBass","ItemSeaBass","ItemSeaBass","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout","ItemTrout"];
|
||||
_fish = _fishes param [floor(random(count _fishes)),""];
|
||||
|
||||
if (_fish != "") then {
|
||||
_fish call EPOCH_fnc_addItemOverflow;
|
||||
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Fish Caught</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
||||
|
||||
} else {
|
||||
_dt = ["<t size='0.8' shadow='0' color='#99ffffff'>Fish Got Away</t>", 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
@ -184,7 +184,7 @@ if (EPOCH_ESP_PLAYER || EPOCH_ESP_VEHICLES) then {
|
||||
}
|
||||
else {
|
||||
_name = [];
|
||||
{if (alive _x && isPlayer _x) then { _name pushBack(name _x) }} count crew vehicle _x;
|
||||
{if (alive _x && isPlayer _x) then { _id = _name pushBack(name _x) }} count crew vehicle _x;
|
||||
_text = format['%1 (%2m) - %3', _name, _distance, getText(configFile >> "CfgVehicles" >> typeOf vehicle _x >> "displayName")];
|
||||
};
|
||||
drawIcon3D['', [1, 0, 0, abs((_distance) / _viewDistance - 1)], _pos, 0.2, 0.2, 0, _text, 1, 0.03, "PuristaMedium"];
|
||||
|
@ -3,7 +3,7 @@ if (EPOCH_playerCrypto > 0) then {
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
if (_buildingJammerRange == 0) then { _buildingJammerRange = 75; };
|
||||
|
||||
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Constructions_lockedstatic_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
_maintainCount = {(damage _x) > 0} count nearestObjects[_this, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
|
||||
if (EPOCH_playerCrypto < _maintainCount) then {
|
||||
_maintainCount = EPOCH_playerCrypto;
|
||||
|
@ -0,0 +1,19 @@
|
||||
// Epoch add item with overflow
|
||||
private ["_wHPos","_wH","_nearByHolder","_item"];
|
||||
_item = _this;
|
||||
if (player canAdd _item) then {
|
||||
player addItem _item;
|
||||
} else {
|
||||
_wH = objNull;
|
||||
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3];
|
||||
if (_nearByHolder isEqualTo []) then {
|
||||
_wHPos = player modelToWorld [0,1,0];
|
||||
if (surfaceIsWater _wHPos) then {
|
||||
_wHPos = ASLToATL _wHPos;
|
||||
};
|
||||
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
|
||||
} else {
|
||||
_wH = _nearByHolder select 0;
|
||||
};
|
||||
_wh addItemCargoGlobal [_item,1];
|
||||
};
|
@ -8,7 +8,7 @@ _magazine = _this select 5;
|
||||
_projectile = _this select 6;
|
||||
|
||||
switch true do {
|
||||
case (_ammo isKindOf "B_Test_45ACP_Ball"): {
|
||||
case (_ammo isKindOf "B_EnergyPack"): {
|
||||
// diag_log format["DEBUG AMMO: %1", _ammo];
|
||||
if (!isNull cursorTarget) then {
|
||||
_cursorTarget = cursorTarget;
|
||||
@ -69,7 +69,7 @@ switch true do {
|
||||
};
|
||||
};
|
||||
|
||||
case (_ammo isKindOf "B_Hatchet"): {
|
||||
case (_ammo isKindOf "B_Hatchet"): {
|
||||
_gesture = ["GestureSwing0", "GestureSwing1", "GestureSwing2"] select (floor(random 3));
|
||||
player playActionNow _gesture;
|
||||
call EPOCH_chopWood;
|
||||
@ -78,13 +78,19 @@ switch true do {
|
||||
case (_ammo isKindOf "B_Swing" || _ammo isKindOf "B_Stick") : {
|
||||
player playActionNow "SledgeSwing";
|
||||
call EPOCH_mineRocks;
|
||||
if (_weapon isEqualTo "MeleeSword") then {
|
||||
call EPOCH_chopWood;
|
||||
};
|
||||
if (_weapon isEqualTo "MeleeRod") then {
|
||||
call EPOCH_fish;
|
||||
};
|
||||
};
|
||||
|
||||
case (_ammo isKindOf "ChainSaw_Bullet"): {
|
||||
call EPOCH_chopWood;
|
||||
};
|
||||
|
||||
default {
|
||||
default {
|
||||
_droneChance = 2;
|
||||
if !(EPOCH_nearestLocations isEqualTo[]) then{
|
||||
_droneChance = _droneChance * 2;
|
||||
@ -98,4 +104,4 @@ switch true do {
|
||||
"I_UAV_01_F" call EPOCH_unitSpawnIncrease;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -47,9 +47,11 @@ _config = 'CfgCrafting' call EPOCH_returnConfig;
|
||||
_craftingConfig = _config >> _data;
|
||||
|
||||
if (isClass (_craftingConfig)) then {
|
||||
_useBtn ctrlSetTextColor [0,1,0,1];
|
||||
EPOCH_CraftingItem = EPOCH_InteractedItem select 0;
|
||||
_useBtn ctrlSetTextColor [0,1,0,1];
|
||||
EPOCH_CraftingItem = EPOCH_InteractedItem select 0;
|
||||
} else {
|
||||
_useBtn ctrlSetTextColor [1,0,0,1];
|
||||
EPOCH_CraftingItem = "";
|
||||
_useBtn ctrlSetTextColor [1,0,0,1];
|
||||
EPOCH_CraftingItem = "";
|
||||
};
|
||||
|
||||
true
|
@ -0,0 +1,25 @@
|
||||
EPOCH_InteractedItem = [];
|
||||
_control = _this select 0;
|
||||
_index = _this select 1;
|
||||
|
||||
_text = _control lbText _index;
|
||||
_data = _control lbData _index;
|
||||
_pic = _control lbPicture _index;
|
||||
|
||||
if (_data == "") then {
|
||||
_confData = "getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons");
|
||||
if !(_confData isEqualTo[]) then {
|
||||
_data = configName(_confData select 0);
|
||||
};
|
||||
};
|
||||
|
||||
EPOCH_InteractedItem = [_text,_data,_pic];
|
||||
|
||||
_config = 'CfgCrafting' call EPOCH_returnConfig;
|
||||
_craftingConfig = _config >> _data;
|
||||
|
||||
if (isClass (_craftingConfig)) then {
|
||||
(EPOCH_InteractedItem select 0) call EPOCH_crafting_load;
|
||||
} else {
|
||||
//TODO: eat, drink, build ... etc
|
||||
};
|
@ -3,6 +3,7 @@ disableSerialization;
|
||||
_EPOCH_1 = diag_tickTime;
|
||||
_EPOCH_10 = diag_tickTime;
|
||||
_EPOCH_15 = diag_tickTime;
|
||||
_EPOCH_30 = diag_tickTime;
|
||||
_EPOCH_60 = diag_tickTime;
|
||||
_EPOCH_300 = diag_tickTime;
|
||||
_EPOCH_600 = diag_tickTime;
|
||||
@ -447,6 +448,23 @@ while {alive player} do {
|
||||
};
|
||||
};
|
||||
|
||||
if ((_tickTime - _EPOCH_30) > 30) then {
|
||||
_EPOCH_30 = _tickTime;
|
||||
|
||||
_nearByBobbers = player nearEntities[["Bobber_EPOCH"], 12];
|
||||
if !(_nearByBobbers isEqualTo []) then {
|
||||
if ((random 100) < 50) then {
|
||||
_bobber = _nearByBobbers select floor(random(count _nearByBobbers));
|
||||
_bobber setVelocity [0,-1,-1];
|
||||
_bobber setVariable ["EPOCH_fishOnLine" , diag_tickTime];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
if ((_tickTime - _EPOCH_60) > 60) then {
|
||||
|
||||
_EPOCH_60 = _tickTime;
|
||||
|
@ -128,6 +128,7 @@ class CfgClientFunctions
|
||||
class debugMonitor {};
|
||||
class interact {};
|
||||
class chopWood {};
|
||||
class fish {};
|
||||
class mineRocks {};
|
||||
class UnisexCheck {};
|
||||
class PutHandler {};
|
||||
@ -207,6 +208,7 @@ class CfgClientFunctions
|
||||
class fnc_isInsideBuilding {};
|
||||
class fnc_Weather {};
|
||||
class fnc_findSafePos {};
|
||||
class fnc_addItemOverflow {};
|
||||
|
||||
class pushCustomVar {};
|
||||
class itemData {};
|
||||
@ -244,7 +246,8 @@ class CfgClientFunctions
|
||||
|
||||
class inventory {
|
||||
class selectInventoryItem {};
|
||||
class itemInteractV2 {};
|
||||
class itemInteractClick {};
|
||||
class itemInteractDblClick {};
|
||||
class uniformArmorCalc {};
|
||||
class gearArmorCalc {};
|
||||
class factorArmor {};
|
||||
@ -258,13 +261,17 @@ class CfgClientFunctions
|
||||
class onPause {};
|
||||
class interactVehicle {};
|
||||
class showStats {};
|
||||
class dynamicMenu {};
|
||||
class dynamicMenuCleanup {};
|
||||
//class dynamicMenu {};
|
||||
//class dynamicMenuCleanup {};
|
||||
class 3DctrlPitchYaw {};
|
||||
class 3DctrlSpin {};
|
||||
class 3DctrlYaw {};
|
||||
class InterruptConfig {};
|
||||
class InterruptConfigActions {};
|
||||
class gui3DCooldown {};
|
||||
class gui3DWorldPos {};
|
||||
class gui3DModelPos {};
|
||||
class getIDC {};
|
||||
};
|
||||
|
||||
class config {
|
||||
@ -327,4 +334,5 @@ class CfgClientFunctions
|
||||
};
|
||||
};
|
||||
};
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
#include "\x\addons\a3_epoch_code\gui\Epoch_GUI_Config.hpp"
|
||||
|
@ -34,14 +34,17 @@ class Epoch_main_config_template: RscControlsGroup
|
||||
idc = -1;
|
||||
x = 0; //keep x and y absolute
|
||||
y = 0;
|
||||
w = 0.4135 * safezoneW;
|
||||
h = 0.4202 * safezoneH;
|
||||
w = 40 * GUI_GRID_W;
|
||||
h = 19.5 * GUI_GRID_H;
|
||||
class controls {};
|
||||
};
|
||||
|
||||
class Epoch_main_config_changelog: Epoch_main_config_template
|
||||
{
|
||||
onLoad = "((findDisplay 49) displayCtrl 71000) htmlLoad 'x\addons\a3_epoch_code\gui\changelog.html';";
|
||||
w = 0.425 * safezoneW;
|
||||
|
||||
//onLoad = "((findDisplay 49) displayCtrl 71000) htmlLoad 'x\addons\a3_epoch_code\gui\changelog.html';";
|
||||
onLoad = "((findDisplay 49) displayCtrl 71000) htmlLoad 'https://raw.githubusercontent.com/epochmodteam/epoch/test/changelog.html';";
|
||||
class controls
|
||||
{
|
||||
class Epoch_main_config_html: RscHtml //https://community.bistudio.com/wiki/DialogControls-Text#CT_HTML.3D9
|
||||
@ -51,8 +54,8 @@ class Epoch_main_config_changelog: Epoch_main_config_template
|
||||
style = 0x00;
|
||||
x = 0; //keep x and y absolute
|
||||
y = 0;
|
||||
w = 0.4135 * safezoneW;
|
||||
h = 0.4202 * safezoneH;
|
||||
w = 0.425 * safezoneW;
|
||||
h = 1.4 * safezoneH;
|
||||
filename = "changelog.html";
|
||||
text="test";
|
||||
|
||||
|
@ -3099,8 +3099,8 @@ class RscDisplayInventory
|
||||
|
||||
class UniformContainer : GroundContainer
|
||||
{
|
||||
//onLBDblClick = "_this call EPOCH_itemInteract";
|
||||
onLBSelChanged = "_this call EPOCH_itemInteractV2";
|
||||
onLBSelChanged = "_this call EPOCH_itemInteractClick";
|
||||
onLBDblClick = "_this call EPOCH_itemInteractDblClick";
|
||||
|
||||
idc = 633;
|
||||
x = "15.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
|
||||
|
@ -357,8 +357,8 @@ class rmx_craftingUI {
|
||||
h = 0.08;
|
||||
|
||||
onLoad = "[(_this select 0),[0.6,0.92,0,0.08],[0.6,0.92,0.3,0.08]] call EPOCH_crafting_animate; (_this select 0) ctrlEnable true;";
|
||||
onMouseMoving = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {(_this select 0) progressSetPosition (((_this select 1)-0.6)*3.3 );};";
|
||||
onMouseHolding = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {(_this select 0) progressSetPosition (((_this select 1)-0.6)*3.3 );};";
|
||||
onMouseMoving = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {_c = _this select 0; _p = ctrlPosition _c; _c progressSetPosition (linearConversion [_p select 0, (_p select 0)+ (_p select 2), (_this select 1), 0, 1, false]);};";
|
||||
onMouseHolding = "if (rmx_var_crafting_progressClicked && rmx_var_craftQTY != 0) then {_c = _this select 0; _p = ctrlPosition _c; _c progressSetPosition (linearConversion [_p select 0, (_p select 0)+ (_p select 2), (_this select 1), 0, 1, false]);};";
|
||||
onMouseButtonDown = "rmx_var_crafting_progressClicked = true;";
|
||||
onMouseButtonUp = "rmx_var_crafting_progressClicked = false;";
|
||||
};
|
||||
@ -377,6 +377,27 @@ class rmx_craftingUI {
|
||||
onLoad = "[(_this select 0),[0.6,0.92,0,0.08],[0.6,0.92,0.3,0.08]] call EPOCH_crafting_animate;";
|
||||
};
|
||||
|
||||
//Progressbar + / -
|
||||
class rmx_cUI_img_plus: RscPicture
|
||||
{
|
||||
idc = 77805;
|
||||
text = "x\addons\a3_epoch_code\Data\UI\craftqty_arr_right.paa";
|
||||
x = 0.84;
|
||||
y = 0.92;
|
||||
w = 0.06;
|
||||
h = 0.08;
|
||||
onLoad = "_c = _this select 0; _c ctrlSetFade 1; _c ctrlCommit 0; _c ctrlSetFade 0; _c ctrlCommit 1;";
|
||||
};
|
||||
class rmx_cUI_img_minus: RscPicture
|
||||
{
|
||||
idc = 77806;
|
||||
text = "x\addons\a3_epoch_code\Data\UI\craftqty_arr_left.paa";
|
||||
x = 0.6;
|
||||
y = 0.92;
|
||||
w = 0.06;
|
||||
h = 0.08;
|
||||
onLoad = "_c = _this select 0; _c ctrlSetFade 1; _c ctrlCommit 0; _c ctrlSetFade 0; _c ctrlCommit 1;";
|
||||
};
|
||||
|
||||
//edit
|
||||
class rmx_cUI_edit_searchField: RscEdit
|
||||
@ -545,20 +566,19 @@ class rmx_craftingUI {
|
||||
class Epoch_main_config_group: RscControlsGroupNoScrollbars
|
||||
{
|
||||
idc = -1;
|
||||
x = 0.208156 * safezoneW + safezoneX;
|
||||
y = 0.511 * safezoneH + safezoneY;
|
||||
w = 0.4135 * safezoneW;
|
||||
h = 0.4246 * safezoneH;
|
||||
|
||||
x = 17 * GUI_GRID_W + GUI_GRID_X;
|
||||
y = 2.5 * GUI_GRID_H + GUI_GRID_Y;
|
||||
w = 40 * GUI_GRID_W;
|
||||
h = 19.5 * GUI_GRID_H;
|
||||
class controls{};
|
||||
};
|
||||
class Epoch_main_config_title: RscText
|
||||
{
|
||||
idc = -1;
|
||||
x = 0.208156 * safezoneW + safezoneX;
|
||||
y = 0.4604 * safezoneH + safezoneY; //4582 0.4604
|
||||
w = 0.4135 * safezoneW;
|
||||
h = 0.0242 * safezoneH;
|
||||
x = 17 * GUI_GRID_W + GUI_GRID_X;
|
||||
y = 0.5 * GUI_GRID_H + GUI_GRID_Y;
|
||||
w = 40 * GUI_GRID_W;
|
||||
h = 1 * GUI_GRID_H;
|
||||
text = "Epoch Configuration";
|
||||
colorBackground[] = {0.76,0.5,0.07,0.8};
|
||||
colorText[] = {1,1,1,1};
|
||||
@ -568,10 +588,10 @@ class Epoch_main_config_title: RscText
|
||||
class Epoch_main_config_combo: RscCombo
|
||||
{
|
||||
idc = -1;
|
||||
x = 0.208156 * safezoneW + safezoneX;
|
||||
y = 0.4868 * safezoneH + safezoneY;
|
||||
w = 0.4135 * safezoneW;
|
||||
h = 0.0242 * safezoneH;
|
||||
x = 17 * GUI_GRID_W + GUI_GRID_X;
|
||||
y = 1.5 * GUI_GRID_H + GUI_GRID_Y;
|
||||
w = 40 * GUI_GRID_W;
|
||||
h = 1 * GUI_GRID_H;
|
||||
colorSelect[] = {0.1,0.1,0.1,1};
|
||||
colorText[] = {1,1,1,1.0};
|
||||
colorBackground[] = {0.1,0.1,0.1,1};
|
||||
|
@ -11,11 +11,50 @@ content="text/html; charset=windows-1250">
|
||||
<br>
|
||||
<p align="center"><img src="\x\addons\a3_epoch_code\Data\EpochLogo.paa" width="256" height="64"></p>
|
||||
|
||||
<p>Client:<br>[Added] New secure storage device: The Epoch Safe.<br>[Added] Totally new crafting system and UI by Raymix.<br>[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH)<br>[Added] Melee weapons: a Broad Sword and Fishing Pole.<br>[Added] Halloween Clown mask and re-added to loot tables: Wolf/Pumpkin masks as well as Meeps Candy.<br>[Fixed] Group members unable to lock a Lockbox or Safe that was placed by the group leader.<br>[Fixed] Shadow artifact at top of Jammer.<br>[Fixed] Reduce client fps lag when first joining the server by preloading objects before exiting loading screen.<br>[Fixed] Being unable to remove a solar generator.<br>[Changed] Removed debug hint text for 3d rotation of objects as it was not needed.<br>[Changed] Re-enable Move button, this system will stay and be refined in the next few patches.</p>
|
||||
<h1>Epoch Mod 0.3.4</h1>
|
||||
|
||||
<p>**Improved Dog AI Dog Brain by Axeman**<br>[FIXED] Dog not taming due to var reset in wrong place / BIS animal update.<br>[UPDATED] Dog text format updated.<br>[UPDATED] Dog whine, instead of bark, when alerting of other nearby players (When player crouched).<br>[UPDATED] Dog prey kills now use animal looting system. i.e. Dog will loot dead animals, and other objects, then will fetch loot.<br>[UPDATED] Attached weapon (loot) holder is now dropped if dog finds a new one. Needs update.<br>[ADDED] New Quiet dog bark and whine.<br>[UPDATED] Make dog sounds global and use quieter sounds to alert player once dog is tamed. Untamed dog or when attacking is still loud.<br>[UPDATED] Add occasional quiet dog whine when other players in the area.<br>[UPDATED] General Dog timeout tweaks to compensate for Arma Animals 'doing their own thing'</p>
|
||||
<p>Client:
|
||||
|
||||
<p>Server:<br>[Added] Example "Epoch Event" Code to provide an example on how to broadcast a message to all players using BE.<br>[Added] 'CfgTraderLimits' config can control stock limit per trader per item. Default is 100 per item class per trader.<br>[Added] storedVehicleLimit variable in CfgEpochServer can now control the total max allowed vehicles on traders. Default limit is 20.<br>[Fixed] Issue with trading vehicles that caused the trader data not to save or to save to the wrong slot.<br>[Fixed] Added missing prices for female vests.<br>[Fixed] Error Generic error in expression in EPOCH_server_repairVehicle.<br>[Changed] Use new sort command instead of BIS_fncSortBy.<br>[Changed] Use new worldSize command as default if maps worldSize setting in CfgEpoch does not exist.<br>[Info] Removed old .bikey and added new one for 0340.<br>[Info] The source code for the a3_epoch_server.pbo is now on the GitHub.</p>
|
||||
[Added] Workbench storage device also added as a nearby crafting requirement for most Kit based crafting options.<br>
|
||||
[Added] New secure storage device: The Epoch Safe.<br>
|
||||
[Added] Totally new crafting system and UI by Raymix.<br>
|
||||
[Added] Epoch variant of the unarmed Strider vehicle. (I_MRAP_03_EPOCH)<br>
|
||||
[Added] Melee weapons: a Broad Sword and Fishing Pole.<br>
|
||||
[Added] Halloween Clown mask and re-added to loot tables: Wolf/Pumpkin masks as well as Meeps Candy.<br>
|
||||
[Fixed] Group members unable to lock a Lockbox or Safe that was placed by the group leader.<br>
|
||||
[Fixed] Shadow artifact at top of Jammer.<br>
|
||||
[Fixed] Reduce client fps lag when first joining the server by preloading objects before exiting loading screen.<br>
|
||||
[Fixed] Being unable to remove a solar generator.<br>
|
||||
[Changed] Removed debug hint text for 3d rotation of objects as it was not needed.<br>
|
||||
[Changed] Re-enable Move button, this system will stay and be refined in the next few patches.<br>
|
||||
**Improved Dog AI Dog Brain by Axeman**<br>
|
||||
[FIXED] Dog not taming due to var reset in wrong place / BIS animal update.<br>
|
||||
[UPDATED] Dog text format updated.<br>
|
||||
[UPDATED] Dog whine, instead of bark, when alerting of other nearby players (When player crouched).<br>
|
||||
[UPDATED] Dog prey kills now use animal looting system. i.e. Dog will loot dead animals, and other objects, then will fetch loot.<br>
|
||||
[UPDATED] Attached weapon (loot) holder is now dropped if dog finds a new one. Needs update.<br>
|
||||
[ADDED] New Quiet dog bark and whine.<br>
|
||||
[UPDATED] Make dog sounds global and use quieter sounds to alert player once dog is tamed. Untamed dog or when attacking is still loud.<br>
|
||||
[UPDATED] Add occasional quiet dog whine when other players in the area.<br>
|
||||
[UPDATED] General Dog timeout tweaks to compensate for Arma Animals 'doing their own thing'<br>
|
||||
|
||||
</p>
|
||||
|
||||
<p>Server:
|
||||
[Added] Example "Epoch Event" Code to provide an example on how to broadcast a message to all players using BE.<br>
|
||||
[Added] 'CfgTraderLimits' config can control stock limit per trader per item. Default is 100 per item class per trader.<br>
|
||||
[Added] storedVehicleLimit variable in CfgEpochServer can now control the total max allowed vehicles on traders. Default limit is 20.<br>
|
||||
[Fixed] Issue with trading vehicles that caused the trader data not to save or to save to the wrong slot.<br>
|
||||
[Fixed] Added missing prices for female vests.<br>
|
||||
[Fixed] Error Generic error in expression in EPOCH_server_repairVehicle.<br>
|
||||
[Changed] Base building maintain option now also maintains storage devices.<br>
|
||||
[Changed] Moved vehicle spawn config that controls how many vehicles can spawn at different location types to settings pbo. See new vehicleSpawnTypes array in the (WorldName).hpp config.<br>
|
||||
[Changed] Use new sort command instead of BIS_fncSortBy.<br>
|
||||
[Changed] Use new worldSize command as default if maps worldSize setting in CfgEpoch does not exist.<br>
|
||||
[Info] Removed old .bikey and added new one for 0340.<br>
|
||||
[Info] The source code for the a3_epoch_server.pbo is now on the GitHub.<br>
|
||||
|
||||
</p>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -1,15 +1,17 @@
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
|
||||
disableSerialization;
|
||||
_display = param [0,displayNull];
|
||||
|
||||
if (isNull _display) exitWith {false};
|
||||
//if (isNull _display) exitWith {false};
|
||||
|
||||
private ["_offset","_cfg","_configs","_idc","_getIDC","_mainCTRLS"];
|
||||
|
||||
_offset = if (isServer) then { 0.496012 * safezoneW + safezoneX } else {
|
||||
_offset = if (isServer) then {40 * GUI_GRID_W + GUI_GRID_X;} else {
|
||||
if (getNumber (missionConfigFile >> "enableDebugConsole") > 0) then {
|
||||
0.496012 * safezoneW + safezoneX
|
||||
40 * GUI_GRID_W + GUI_GRID_X;
|
||||
} else {
|
||||
0.208156 * safezoneW + safezoneX
|
||||
17 * GUI_GRID_W + GUI_GRID_X;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -1,3 +1,5 @@
|
||||
#include <\x\Addons\rmx_init\defines.inc>
|
||||
|
||||
//TODO: read key press from global var (profileNamespace config)
|
||||
//TODO: admin choice to use missionConfigFile
|
||||
//TODO: (Ask team) suffix code to close dialog when button pressed
|
||||
@ -9,10 +11,8 @@
|
||||
//TODO: prevent from opening and instantly close if known display is on
|
||||
|
||||
if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
|
||||
if (isNil "rmx_var_dynamicMenuCat") then {rmx_var_dynamicMenuCat = "";};
|
||||
|
||||
|
||||
if (rmx_var_dynamicMenuCat isEqualTo "" && !isNil "rmx_var_dynamicMenuHOLD") exitWith {};
|
||||
if !(isNil "rmx_var_dynamicMenuHOLD") exitWith {};
|
||||
|
||||
private ["_display","_cfg","_cat","_buttonSettings","_configs","_subclasses","_action","_entries","_img","_img2","_center","_defaultScaleX","_defaultScaleY","_distance","_scaleLargeX","_scaleLargeY","_scaleSmallX","_scaleSmallY","_scaleSelectedX","_scaleSelectedY","_points","_positions","_positions2","_positions3","_x","_y"];
|
||||
disableSerialization;
|
||||
@ -23,17 +23,17 @@ _display = (findDisplay 46) createDisplay "rmx_dynamenu";
|
||||
_display displaySetEventHandler ["keyUp", "[false,_this select 1] call Epoch_dynamicMenuCleanup;"];
|
||||
|
||||
//TODO: config choice based on global variable or dynamic config update (slower)
|
||||
_cfg = configFile;
|
||||
_cfg = param [0,"cfgDynamicMenu" call EPOCH_returnConfig,[configFile]];
|
||||
|
||||
/** Variable Defines **/
|
||||
{
|
||||
call compile (format ["%1 = %2;",configName _x,getText _x]);
|
||||
} count (configProperties [(_cfg >> "cfgDynamicMenu" >> "variableDefines"),"true",false]);
|
||||
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
|
||||
|
||||
_cat = if (rmx_var_dynamicMenuCat isEqualTo "") then {
|
||||
(_cfg >> "cfgDynamicMenu" >> "dynaButtons")
|
||||
_cat = if (isClass _cfg >> "dynaButtons") then {
|
||||
(_cfg >> "dynaButtons")
|
||||
} else {
|
||||
(_cfg >> "cfgDynamicMenu" >> "dynaButtons" >> rmx_var_dynamicMenuCat)
|
||||
_cfg
|
||||
};
|
||||
|
||||
/** Button configs **/
|
||||
@ -48,7 +48,7 @@ _configs = "true" configClasses (_cat);
|
||||
_action = if (_subclasses isEqualTo []) then {
|
||||
compile (format ["%1",getText(_x >> "action")])
|
||||
} else {
|
||||
compile (format ["[true,57] call Epoch_dynamicMenuCleanup; rmx_var_dynamicMenuCat = '%1'; %2",(configName _x),getText(_x >> "action")])
|
||||
compile (format ["[true,57] call Epoch_dynamicMenuCleanup; %2",getText(_x >> "action")])
|
||||
};
|
||||
//diag_log _action;
|
||||
_buttonSettings pushBack [
|
||||
@ -132,7 +132,6 @@ for "_e" from 0 to (_entries - 1) do {
|
||||
/** Variable Cleanup **/
|
||||
{
|
||||
call compile (format ["%1 = nil;",configName _x]);
|
||||
} count (configProperties [(_cfg >> "cfgDynamicMenu" >> "variableDefines"),"true",false]);
|
||||
} count (configProperties [(_cfg >> "variableDefines"),"true",false]);
|
||||
rmx_var_dynamicMenuInProgress = nil;
|
||||
rmx_var_dynamicMenuCat = "";
|
||||
true
|
||||
|
19
Sources/epoch_code/gui/scripts/Epoch_getIDC.sqf
Normal file
19
Sources/epoch_code/gui/scripts/Epoch_getIDC.sqf
Normal file
@ -0,0 +1,19 @@
|
||||
/*
|
||||
Used to register and unregister IDC used in dynamic menus.
|
||||
Pass the control to unregister or just call fnc to get a unique IDC
|
||||
*/
|
||||
private ["_in","_list","_out","_find"];
|
||||
_in = param [0,controlNull,[controlNull]];
|
||||
_list = uiNamespace getVariable ["rmx_var_uniqueIDC",[]];
|
||||
|
||||
if (ctrlIDC _in isEqualTo -1) then {
|
||||
_out = -90000 - (count _list);
|
||||
_list pushBack _out;
|
||||
} else {
|
||||
_find = _list find (ctrlIDC _in);
|
||||
_list deleteAt _find;
|
||||
_out = true;
|
||||
};
|
||||
uiNamespace setVariable ["rmx_var_uniqueIDC",_list];
|
||||
|
||||
_out
|
104
Sources/epoch_code/gui/scripts/Epoch_gui3DCooldown.sqf
Normal file
104
Sources/epoch_code/gui/scripts/Epoch_gui3DCooldown.sqf
Normal file
@ -0,0 +1,104 @@
|
||||
/*
|
||||
Attach a cooldown to a 3D world space that will be visible on a UI
|
||||
[_pos, _time, _distance, "myVariable"] call Epoch_gui3DCooldown;
|
||||
|
||||
Position is a world position
|
||||
Time is time it takes for cooldown to do full animation
|
||||
Distance (optional) is used to exit cooldown if distance from player is greater than this value, default 10m
|
||||
|
||||
Variable name is optional, but it allows you to remove cooldown externally:
|
||||
should be a global boolean
|
||||
must exist
|
||||
must be true
|
||||
*/
|
||||
|
||||
_this spawn {
|
||||
private ["_error","_pos","_time","_distance","_bool","_display","_ctrlPos","_ctrlGrp","_ctrl","_partTime","_ct","_cl"];
|
||||
disableSerialization;
|
||||
params
|
||||
[
|
||||
["_pos", false, [[]], 3],
|
||||
["_time", false, [0]],
|
||||
["_distance", 10, [0]],
|
||||
["_bool", "", [""]]
|
||||
];
|
||||
|
||||
_error = "Wrong params, requires [position, time, distance (optional), variable name (bool, optional)]";
|
||||
|
||||
if (typeName _pos isEqualTo "BOOL") exitWith {hint _error};
|
||||
if (typeName _time isEqualTo "BOOL") exitWith {hint _error};
|
||||
|
||||
_display = findDisplay 46;
|
||||
_ctrlPos = [0.469062 * safezoneW + safezoneX, 0.445 * safezoneH + safezoneY, 0.061875 * safezoneW, 0.11 * safezoneH];
|
||||
|
||||
_ctrlGrp = _display ctrlCreate ["RscControlsGroupNoScrollbars",call epoch_getIDC];
|
||||
_ctrlGrp ctrlSetPosition _ctrlPos;
|
||||
_ctrlGrp ctrlCommit 0;
|
||||
|
||||
_id = call compile format
|
||||
[
|
||||
"
|
||||
missionNamespace setVariable ['rmx_var_3DCD_temp%1',[_ctrlGrp, _distance, _pos]];
|
||||
_id = addMissionEventHandler ['Draw3D',{
|
||||
_arr = missionNamespace getVariable 'rmx_var_3DCD_temp%1';
|
||||
_scale = linearConversion [0, (_arr select 1), player distance (_arr select 2), 0, 1, false];
|
||||
(_arr select 0) ctrlSetPosition (worldToScreen (_arr select 2));
|
||||
(_arr select 0) ctrlSetFade _scale;
|
||||
(_arr select 0) ctrlCommit 0;
|
||||
}];
|
||||
[_id,'rmx_var_3DCD_temp%1']
|
||||
"
|
||||
,floor random 10000
|
||||
];
|
||||
|
||||
_ctrl = [];
|
||||
for "_i" from 0 to 9 do {
|
||||
_ct = _display ctrlCreate ["RscPicture",call epoch_getIDC,_ctrlGrp];
|
||||
_ct ctrlSetText format ["x\addons\a3_epoch_code\Data\UI\cooldown\%1.paa",_i];
|
||||
_ct ctrlSetPosition [0.0375,0.05,(_ctrlPos select 2) / 2,(_ctrlPos select 3) / 2];
|
||||
_ct ctrlSetFade 1;
|
||||
_ct ctrlCommit 0;
|
||||
_ctrl set [_i,_ct];
|
||||
};
|
||||
|
||||
_ctrl2 = _display ctrlCreate ["RscText",call epoch_getIDC,_ctrlGrp];
|
||||
_ctrl2 ctrlSetPosition [0.0375,0,_ctrlPos select 2,_ctrlPos select 3];
|
||||
_ctrl2 ctrlCommit 0;
|
||||
|
||||
_partTime = _time / 10;
|
||||
_continue = true;
|
||||
_tock = diag_tickTime;
|
||||
|
||||
for "_i" from 0 to 9 do {
|
||||
_cl = _ctrl select _i;
|
||||
_cl ctrlSetFade 0;
|
||||
_cl ctrlSetPosition [0,0,_ctrlPos select 2,_ctrlPos select 3];
|
||||
_cl ctrlCommit _partTime;
|
||||
|
||||
_ctrl2 ctrlSetTextColor [1-(_i / 10),_i / 10,0,1];
|
||||
|
||||
_tick = diag_tickTime;
|
||||
|
||||
while {(diag_tickTime - _tick) < _partTime} do {
|
||||
if !(missionNamespace getVariable [_bool, true]) exitWith {_continue = false};
|
||||
if ((player distance _pos) > _distance) exitWith {_continue = false};
|
||||
_ctrl2 ctrlSetText ([1 + _time - (diag_tickTime - _tock),"MM:SS"] call BIS_fnc_secondsToString);
|
||||
};
|
||||
|
||||
if !(_continue) exitWith {};
|
||||
};
|
||||
removeMissionEventHandler ["Draw3D", _id select 0];
|
||||
missionNamespace setVariable [_id select 1, nil];
|
||||
{
|
||||
_x call epoch_getIDC;
|
||||
ctrlDelete _x;
|
||||
} forEach _ctrl;
|
||||
|
||||
_ctrl2 call epoch_getIDC;
|
||||
_ctrlGrp call epoch_getIDC;
|
||||
|
||||
ctrlDelete _ctrl2;
|
||||
ctrlDelete _ctrlGrp;
|
||||
};
|
||||
|
||||
true
|
62
Sources/epoch_code/gui/scripts/Epoch_gui3DModelPos.sqf
Normal file
62
Sources/epoch_code/gui/scripts/Epoch_gui3DModelPos.sqf
Normal file
@ -0,0 +1,62 @@
|
||||
/*
|
||||
Attaches picture and text to model's local space and projects on UI.
|
||||
[_object, _time, _image, _text, _objectSpace, _distance, _externalBool] call epoch_gui3dModelPos;
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
_this spawn {
|
||||
private ["_obj","_loc","_time","_pic","_txt","_dst","_bool","_display","_ctrl","_imgParsed","_txtParsed","_id","_tick"];
|
||||
disableSerialization;
|
||||
params
|
||||
[
|
||||
["_obj", objNull, [objNull]],
|
||||
["_time", 10, [0]],
|
||||
["_pic", "#(argb,8,8,3)color(0,0,0,0)", [""]],
|
||||
["_txt", "", [""]],
|
||||
["_loc", [0,0,0], [[]]],
|
||||
["_dst", 10, [0]],
|
||||
["_bool", "", [""]]
|
||||
];
|
||||
|
||||
if (_obj isEqualTo objNull) exitWith {hint "Wrong params, missing object"};
|
||||
|
||||
_display = findDisplay 46;
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscStructuredText",call epoch_getIDC];
|
||||
_ctrl ctrlSetPosition [10 * GUI_GRID_W + GUI_GRID_X,10 * GUI_GRID_H + GUI_GRID_Y,10 * GUI_GRID_W,10 * GUI_GRID_H];
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_imgParsed = parseText format ["<t size='4' align = 'center'><img image='%1' /></t>",_pic];
|
||||
_txtParsed = parseText format ["<t size='1.5' align = 'center' color='#FFFFFF'>%1</t>",_txt];
|
||||
|
||||
_ctrl ctrlSetStructuredText (composeText [_imgParsed, parseText "<br>", _txtParsed]);
|
||||
|
||||
_id = call compile format
|
||||
[
|
||||
"
|
||||
missionNamespace setVariable ['rmx_var_3DMP_temp%1',[_ctrl, _dst, _obj, _loc]];
|
||||
_id = addMissionEventHandler ['Draw3D',{
|
||||
_arr = missionNamespace getVariable 'rmx_var_3DMP_temp%1';
|
||||
_pos = worldToScreen ((_arr select 2) modelToWorld (_arr select 3));
|
||||
(_arr select 0) ctrlSetPosition _pos;
|
||||
(_arr select 0) ctrlCommit 0;
|
||||
_scale = linearConversion [0, (_arr select 1), player distance ((_arr select 2) modelToWorld (_arr select 3)), 1, 0, false];
|
||||
[(_arr select 0), _scale, 0] call BIS_fnc_ctrlSetScale;
|
||||
}];
|
||||
[_id,'rmx_var_3DMP_temp%1']
|
||||
"
|
||||
,floor random 10000
|
||||
];
|
||||
|
||||
_tick = diag_tickTime;
|
||||
while {(diag_tickTime - _tick) < _time} do {
|
||||
if !(missionNamespace getVariable [_bool, true]) exitWith {};
|
||||
if ((player distance (_obj modelToWorld _loc)) > _dst) exitWith {};
|
||||
};
|
||||
|
||||
removeMissionEventHandler ["Draw3D", _id select 0];
|
||||
missionNamespace setVariable [_id select 1, nil];
|
||||
_ctrl call epoch_getIDC;
|
||||
ctrlDelete _ctrl;
|
||||
};
|
||||
|
||||
true
|
59
Sources/epoch_code/gui/scripts/Epoch_gui3DWorldPos.sqf
Normal file
59
Sources/epoch_code/gui/scripts/Epoch_gui3DWorldPos.sqf
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
Attaches picture and text to World location and projects on UI.
|
||||
[_location, _time, _image, _text, _distance, _externalBool] call epoch_gui3dWorldPos;
|
||||
*/
|
||||
#include "\A3\ui_f\hpp\defineCommonGrids.inc"
|
||||
_this spawn {
|
||||
private ["_loc","_time","_pic","_txt","_dst","_bool","_display","_ctrl","_imgParsed","_txtParsed","_id","_tick"];
|
||||
disableSerialization;
|
||||
params
|
||||
[
|
||||
["_loc", [0,0,0], [[]]],
|
||||
["_time", 10, [0]],
|
||||
["_pic", "#(argb,8,8,3)color(0,0,0,0)", [""]],
|
||||
["_txt", "", [""]],
|
||||
["_dst", 10, [0]],
|
||||
["_bool", "", [""]]
|
||||
];
|
||||
|
||||
_display = findDisplay 46;
|
||||
|
||||
_ctrl = _display ctrlCreate ["RscStructuredText",call epoch_getIDC];
|
||||
_ctrl ctrlSetPosition [10 * GUI_GRID_W + GUI_GRID_X,10 * GUI_GRID_H + GUI_GRID_Y,10 * GUI_GRID_W,10 * GUI_GRID_H];
|
||||
_ctrl ctrlCommit 0;
|
||||
|
||||
_imgParsed = parseText format ["<t size='4' align = 'center'><img image='%1' /></t>",_pic];
|
||||
_txtParsed = parseText format ["<t size='1.5' align = 'center' color='#FFFFFF'>%1</t>",_txt];
|
||||
|
||||
_ctrl ctrlSetStructuredText (composeText [_imgParsed, parseText "<br>", _txtParsed]);
|
||||
|
||||
_id = call compile format
|
||||
[
|
||||
"
|
||||
missionNamespace setVariable ['rmx_var_3DWP_temp%1',[_ctrl, _dst, _loc]];
|
||||
_id = addMissionEventHandler ['Draw3D',{
|
||||
_arr = missionNamespace getVariable 'rmx_var_3DWP_temp%1';
|
||||
_pos = worldToScreen (_arr select 2);
|
||||
(_arr select 0) ctrlSetPosition _pos;
|
||||
(_arr select 0) ctrlCommit 0;
|
||||
_scale = linearConversion [0, (_arr select 1), player distance (_arr select 2), 1, 0, false];
|
||||
[(_arr select 0), _scale, 0] call BIS_fnc_ctrlSetScale;
|
||||
}];
|
||||
[_id,'rmx_var_3DWP_temp%1']
|
||||
"
|
||||
,floor random 10000
|
||||
];
|
||||
|
||||
_tick = diag_tickTime;
|
||||
while {(diag_tickTime - _tick) < _time} do {
|
||||
if !(missionNamespace getVariable [_bool, true]) exitWith {};
|
||||
if ((player distance _loc) > _dst) exitWith {};
|
||||
};
|
||||
|
||||
removeMissionEventHandler ["Draw3D", _id select 0];
|
||||
missionNamespace setVariable [_id select 1, nil];
|
||||
_ctrl call epoch_getIDC;
|
||||
ctrlDelete _ctrl;
|
||||
};
|
||||
|
||||
true
|
@ -7,10 +7,13 @@ if (rmx_var_craftInProgress) exitWith {rmx_var_craftInProgress = false;};
|
||||
//close button
|
||||
if (rmx_var_craftQTYOut isEqualTo 0) exitWith {closeDialog 0;};
|
||||
|
||||
//exit early if missing nearby
|
||||
if !(false call EPOCH_crafting_checkResources) exitWith {};
|
||||
|
||||
//craft button
|
||||
[] spawn {
|
||||
|
||||
private ["_fnc_UILock","_itemCraftTime","_selection","_craftItem","_item","_itemName","_itemCraftTime","_itemRecipeItems","_itemType","_hasNearby","_canCraft","_wH","_nearByHolder","_wHPos"];
|
||||
private ["_fnc_UILock","_itemCraftTime","_selection","_craftItem","_item","_itemName","_itemCraftTime","_itemRecipeItems","_itemType","_nearbyReq","_hasNearby","_canCraft","_wH","_nearByHolder","_wHPos"];
|
||||
disableSerialization;
|
||||
|
||||
_fnc_UILock = {
|
||||
@ -31,14 +34,18 @@ if (rmx_var_craftQTYOut isEqualTo 0) exitWith {closeDialog 0;};
|
||||
_itemCraftTime = _craftItem select 6;
|
||||
_itemRecipeItems = _craftItem select 7;
|
||||
_itemType = _craftItem select 13;
|
||||
_nearbyReq = _craftItem select 8;
|
||||
_needBench = {"WorkBench_EPOCH" in (_x select 3 select 1)} count (_craftItem select 8);
|
||||
|
||||
for "_c" from 1 to rmx_var_craftQTYOut do {
|
||||
false call _fnc_UILock;
|
||||
_hasNearby = false call EPOCH_crafting_checkResources;
|
||||
|
||||
|
||||
if !(_hasNearby) exitWith {};
|
||||
|
||||
_canCraft = [format ["Crafting: %1, %2 seconds",_itemName,_itemCraftTime],_itemCraftTime] call EPOCH_crafting_progress;
|
||||
|
||||
if !(_canCraft && _hasNearby && rmx_var_craftingLOOPS) exitWith {}; //{hint "Crafting canceled";};
|
||||
if !(_canCraft && rmx_var_craftingLOOPS) exitWith {};
|
||||
|
||||
{
|
||||
if !(typeName _x isEqualTo typeName []) then {_x = [_x,1]};
|
||||
@ -47,24 +54,41 @@ if (rmx_var_craftQTYOut isEqualTo 0) exitWith {closeDialog 0;};
|
||||
};
|
||||
} forEach _itemRecipeItems;
|
||||
|
||||
if (player canAdd _item) then { //Puts in a weaponholder nearby if can't add to inventory
|
||||
_nearByBench = nearestObjects [position player,["WorkBench_EPOCH"],3];
|
||||
|
||||
player addItem _item; //adds any type of item, but does not assign
|
||||
|
||||
if (!(_nearByBench isEqualTo []) && (_needBench > 0)) then { //adds item on top of bench if bench was required
|
||||
|
||||
(_nearByBench select 0) addItemCargoGlobal [_item,1];
|
||||
|
||||
} else {
|
||||
_wH = objNull;
|
||||
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3]; //TODO: adjust best range to reuse existing holders
|
||||
if (_nearByHolder isEqualTo []) then {
|
||||
_wHPos = player modelToWorld [0,1,0];
|
||||
if (surfaceIsWater _wHPos) then { //should work anywhere, even on water
|
||||
_wHPos = ASLToATL _wHPos;
|
||||
};
|
||||
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
|
||||
if (player canAdd _item) then { //Puts in a weaponholder nearby if can't add to inventory
|
||||
|
||||
player addItem _item; //adds any type of item, but does not assign
|
||||
|
||||
} else {
|
||||
_wH = _nearByHolder select 0;
|
||||
|
||||
_wH = objNull;
|
||||
_nearByHolder = nearestObjects [position player,["groundWeaponHolder"],3]; //TODO: adjust best range to reuse existing holders
|
||||
|
||||
if (_nearByHolder isEqualTo []) then {
|
||||
|
||||
_wHPos = player modelToWorld [0,1,0];
|
||||
|
||||
if (surfaceIsWater _wHPos) then { //should work anywhere, even on water
|
||||
|
||||
_wHPos = ASLToATL _wHPos;
|
||||
|
||||
};
|
||||
|
||||
_wH = createVehicle ["groundWeaponHolder",_wHPos, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
} else {
|
||||
|
||||
_wH = _nearByHolder select 0;
|
||||
};
|
||||
|
||||
_wh addItemCargoGlobal [_item,1];
|
||||
};
|
||||
_wh addItemCargoGlobal [_item,1];
|
||||
};
|
||||
call EPOCH_crafting_LB_click;
|
||||
};
|
||||
|
@ -125,4 +125,11 @@ rmx_var_crafting_PP_DB = ["dynamicBlur",11] call epoch_postProcessCreate;
|
||||
};
|
||||
};
|
||||
|
||||
[] spawn {
|
||||
private "_pos";
|
||||
_pos = position player;
|
||||
while {rmx_var_craftingLOOPS} do {
|
||||
if ((_pos distance (position player)) > 0) exitWith {closeDialog 0;};
|
||||
};
|
||||
};
|
||||
true
|
@ -1,7 +1,7 @@
|
||||
class CfgAmmo
|
||||
{
|
||||
class BulletBase;
|
||||
class B_Test_45ACP_Ball: BulletBase
|
||||
class B_EnergyPack: BulletBase
|
||||
{
|
||||
hit = 0;
|
||||
indirectHit = 0;
|
||||
|
@ -2,10 +2,11 @@
|
||||
|
||||
class cfgDynamicMenu
|
||||
{
|
||||
dyna_displayWhitelist[] = {};
|
||||
|
||||
/** GLOBAL VARIABLES ONLY - removed automatically **/
|
||||
class variableDefines //must be global, nil when menu closes
|
||||
{
|
||||
dyna_displayWhitelist[] = {};
|
||||
dyna_cursorTarget = "cursorTarget";
|
||||
dyna_typeOfCursorTarget = "typeOf cursorTarget";
|
||||
|
||||
|
@ -1,13 +1,6 @@
|
||||
class CfgEpochConfiguration
|
||||
{
|
||||
/** class order here decides order of buttons on gui **/
|
||||
class html
|
||||
{
|
||||
name = "Changelog";
|
||||
color[] = {1,1,1,1};
|
||||
icon = "\x\addons\a3_epoch_code\Data\owner.paa";
|
||||
controlGroup = "Epoch_main_config_changelog";
|
||||
};
|
||||
class remap
|
||||
{
|
||||
name = "Controls";
|
||||
@ -15,4 +8,11 @@ class CfgEpochConfiguration
|
||||
icon = "\x\addons\a3_epoch_code\Data\owner.paa";
|
||||
controlGroup = "EpochConfigKeyMap";
|
||||
};
|
||||
class html
|
||||
{
|
||||
name = "Changelog";
|
||||
color[] = {1,1,1,1};
|
||||
icon = "\x\addons\a3_epoch_code\Data\owner.paa";
|
||||
controlGroup = "Epoch_main_config_changelog";
|
||||
};
|
||||
};
|
@ -784,7 +784,7 @@ class CfgMagazines
|
||||
picture = "\A3\Weapons_F\Data\UI\M_battery_CA.paa";
|
||||
displayName = "Small energy pack";
|
||||
scope = 2;
|
||||
ammo = "B_Test_45ACP_Ball";
|
||||
ammo = "B_EnergyPack";
|
||||
sound[] = {"A3\sounds_f\dummysound",31.622776,1,1600};
|
||||
reloadMagazineSound[] = {"A3\sounds_f\dummysound",0.01,1,10};
|
||||
descriptionShort = "Two part container filled with enough energy and matter for one use";
|
||||
@ -801,7 +801,7 @@ class CfgMagazines
|
||||
picture = "\A3\Weapons_F\Data\UI\M_battery_CA.paa";
|
||||
displayName = "Large energy pack";
|
||||
scope = 2;
|
||||
ammo = "B_Test_45ACP_Ball";
|
||||
ammo = "B_EnergyPack";
|
||||
sound[] = { "A3\sounds_f\dummysound", 31.622776, 1, 1600 };
|
||||
reloadMagazineSound[] = { "A3\sounds_f\dummysound", 0.01, 1, 10 };
|
||||
descriptionShort = "Large two part container filled with enough energy and matter 10 uses";
|
||||
|
@ -2345,6 +2345,25 @@ class CfgVehicles
|
||||
};
|
||||
|
||||
class ThingX;
|
||||
class FloatingStructure_F;
|
||||
class Bobber_EPOCH : FloatingStructure_F
|
||||
{
|
||||
author = "Axle - EpochMod";
|
||||
_generalMacro = "Bobber_EPOCH";
|
||||
scope = 2;
|
||||
displayName = "Bobber";
|
||||
model = "\x\addons\a3_epoch_assets_3\fishing\bobber.p3d";
|
||||
|
||||
canFloat = 1;
|
||||
waterLeakiness = 0;
|
||||
waterResistanceCoef = 0.8;
|
||||
waterAngularDampingCoef = 10;
|
||||
destrType = "DestructNo";
|
||||
|
||||
mapSize = 0.14;
|
||||
icon = "iconObject_2x3";
|
||||
cost = 1000;
|
||||
};
|
||||
|
||||
class Land_MPS_EPOCH : ThingX
|
||||
{
|
||||
@ -2354,7 +2373,7 @@ class CfgVehicles
|
||||
scope = 2;
|
||||
displayName = "$STR_A3_cfgVehicles_Land_MobilePhone_smart_F0";
|
||||
model = "\A3\Structures_F\Items\Electronics\MobilePhone_smart_F.p3d";
|
||||
|
||||
destrType = "DestructNo";
|
||||
icon = "iconObject_2x3";
|
||||
cost = 1000;
|
||||
hiddenSelections[] = { "camo" };
|
||||
@ -3659,11 +3678,12 @@ class CfgVehicles
|
||||
class Unlock
|
||||
{
|
||||
displayName = "Unlock";
|
||||
displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
|
||||
onlyforplayer = 1;
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,false,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,false,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
class Pack
|
||||
{
|
||||
@ -3672,7 +3692,7 @@ class CfgVehicles
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_packStorage_PVS = [this,player,Epoch_personalToken]; publicVariableServer ""EPOCH_packStorage_PVS"";";
|
||||
statement = "EPOCH_packStorage_PVS = [this,player,Epoch_personalToken]; publicVariableServer ""EPOCH_packStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -3697,11 +3717,12 @@ class CfgVehicles
|
||||
class Unlock
|
||||
{
|
||||
displayName = "Unlock";
|
||||
displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
|
||||
onlyforplayer = 1;
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,false,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";";
|
||||
condition = "(this getVariable[""EPOCH_secStorParent"", objNull]) getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,false,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
class Pack
|
||||
{
|
||||
@ -3709,8 +3730,8 @@ class CfgVehicles
|
||||
onlyforplayer = 1;
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_packStorage_PVS = [this,player,Epoch_personalToken]; publicVariableServer ""EPOCH_packStorage_PVS"";";
|
||||
condition = "(this getVariable[""EPOCH_secStorParent"", objNull]) getVariable [""EPOCH_Locked"",true]";
|
||||
statement = "EPOCH_packStorage_PVS = [this,player,Epoch_personalToken]; publicVariableServer ""EPOCH_packStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -5028,17 +5049,19 @@ class CfgVehicles
|
||||
forceSupply = 0;
|
||||
maximumLoad = 600;
|
||||
isSecureStorage = 1;
|
||||
parentClass = "LockBox_EPOCH";
|
||||
|
||||
class UserActions
|
||||
{
|
||||
class Lock
|
||||
{
|
||||
displayName = "Lock";
|
||||
displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
|
||||
onlyforplayer = 1;
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this == this";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,true,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,true,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
};
|
||||
};
|
||||
@ -5053,17 +5076,19 @@ class CfgVehicles
|
||||
forceSupply = 0;
|
||||
maximumLoad = 3600;
|
||||
isSecureStorage = 1;
|
||||
parentClass = "Safe_EPOCH";
|
||||
|
||||
class UserActions
|
||||
{
|
||||
class Lock
|
||||
{
|
||||
displayName = "Lock";
|
||||
displayNameDefault = "<img image='\A3\Ui_f\data\IGUI\Cfg\Actions\open_door_ca.paa' size='2.5' />";
|
||||
onlyforplayer = 1;
|
||||
position = "Door_knopf";
|
||||
radius = 3;
|
||||
condition = "this == this";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,true,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS"";";
|
||||
statement = "EPOCH_lockStorage_PVS = [this,true,player,Epoch_personalToken]; publicVariableServer ""EPOCH_lockStorage_PVS""; [getpos this, 5, 5] call Epoch_gui3DCooldown;";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -2227,10 +2227,10 @@ class CfgWeapons
|
||||
magazineReloadTime = 0;
|
||||
model = "\x\addons\a3_epoch_assets_3\CfgWeapons\sword_weaponized.p3d";
|
||||
picture = "\x\addons\a3_epoch_assets\textures\sword\equip_sword_ca.paa";
|
||||
displayName = "Sword";
|
||||
displayName = "Kruhm";
|
||||
magazines[] = { "sledge_swing" };
|
||||
handAnim[] = { "OFP2_ManSkeleton", "\x\addons\a3_epoch_assets_3\CfgVehicles\Characters\Sledge_hold.rtm" };
|
||||
descriptionShort = "Sword";
|
||||
descriptionShort = "Powerful Atlantean Sword";
|
||||
|
||||
};
|
||||
|
||||
|
@ -589,7 +589,7 @@ class CfgCrafting
|
||||
{
|
||||
usedIn[] = { "VehicleRepairLg", "KitPlotPole" };
|
||||
recipe[] = { { "ItemCorrugated", 3 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
previewPosition[] = {0.797491,1,0.32899};
|
||||
previewScale = 0.25;
|
||||
previewVector = 0.5;
|
||||
@ -615,7 +615,7 @@ class CfgCrafting
|
||||
{
|
||||
recipe[] = {{"PartPlankPack",4}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Wooden_Wall_SIM.p3d";
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
previewPosition[] = {0.797675,1,0.398882};
|
||||
previewScale = 0.07;
|
||||
previewVector = 0;
|
||||
@ -624,7 +624,7 @@ class CfgCrafting
|
||||
{
|
||||
usedIn[] = { "KitWoodTower" };
|
||||
recipe[] = {{"PartPlankPack",4}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Wooden_Floor.p3d";
|
||||
previewPosition[] = {0.800198,1,0.262418};
|
||||
previewScale = 0.055;
|
||||
@ -633,7 +633,7 @@ class CfgCrafting
|
||||
class KitWoodLadder : Kit
|
||||
{
|
||||
recipe[] = { { "PartPlankPack", 4 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Ladder\wood_ladder.p3d";
|
||||
previewPosition[] = {0.798736,1,0.441696};
|
||||
previewScale = 0.08;
|
||||
@ -642,7 +642,7 @@ class CfgCrafting
|
||||
class KitWoodRamp : Kit
|
||||
{
|
||||
recipe[] = { { "PartPlankPack", 6 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Wood_Ramp.p3d";
|
||||
previewPosition[] = {0.799137,1,0.350575};
|
||||
previewScale = 0.05;
|
||||
@ -651,7 +651,7 @@ class CfgCrafting
|
||||
class KitWoodStairs : Kit
|
||||
{
|
||||
recipe[] = {{"PartPlankPack",4}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Wood_stairs.p3d";
|
||||
previewPosition[] = {0.795037,1,0.377922};
|
||||
previewScale = 0.054;
|
||||
@ -660,7 +660,7 @@ class CfgCrafting
|
||||
class KitWoodTower : Kit
|
||||
{
|
||||
recipe[] = { {"KitWoodFloor", 1}, { "PartPlankPack", 4 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Tower\Tower\Base_Tower_Frame.p3d";
|
||||
previewPosition[] = {0.800653,1,0.378749};
|
||||
previewScale = 0.05;
|
||||
@ -669,7 +669,7 @@ class CfgCrafting
|
||||
class KitTiPi : Kit
|
||||
{
|
||||
recipe[] = { { "Pelt_EPOCH", 4 }, { "PartPlankPack", 2 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\tp.p3d";
|
||||
previewPosition[] = {0.801503,1,0.433758};
|
||||
previewScale = 0.06;
|
||||
@ -678,7 +678,7 @@ class CfgCrafting
|
||||
class KitShelf : Kit
|
||||
{
|
||||
recipe[] = {{"ItemCorrugated",3}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\shelf.p3d";
|
||||
previewPosition[] = {0.803749,1,0.448515};
|
||||
previewScale = 0.17;
|
||||
@ -695,7 +695,7 @@ class CfgCrafting
|
||||
class KitFoundation : Kit
|
||||
{
|
||||
recipe[] = {{"MortarBucket",4}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Concrete_Col.p3d";
|
||||
previewPosition[] = {0.796787,1,0.211457};
|
||||
previewScale = 0.047;
|
||||
@ -704,7 +704,7 @@ class CfgCrafting
|
||||
class KitWoodFoundation : Kit
|
||||
{
|
||||
recipe[] = {{"PartPlankPack",8}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\Wood_Col.p3d";
|
||||
previewPosition[] = {0.796787,1,0.211457};
|
||||
previewScale = 0.047;
|
||||
@ -714,7 +714,7 @@ class CfgCrafting
|
||||
class KitCinderWall : Kit
|
||||
{
|
||||
recipe[] = {{"CinderBlocks",2},{"MortarBucket",2}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\cinder_half.p3d";
|
||||
previewPosition[] = {0.797638,1,0.341915};
|
||||
previewScale = 0.07;
|
||||
@ -723,7 +723,7 @@ class CfgCrafting
|
||||
class KitPlotPole : Kit
|
||||
{
|
||||
recipe[] = {{"ItemCorrugatedLg",2}, {"CircuitParts",2} };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets\models\jammer.p3d";
|
||||
previewPosition[] = {0.801378,1,0.464834};
|
||||
previewScale = 0.055;
|
||||
@ -755,7 +755,7 @@ class CfgCrafting
|
||||
{
|
||||
// TODO recipe
|
||||
recipe[] = { { "ItemSolar", 1 }, { "ItemCables", 1 }, { "ItemBattery", 1 }, { "ItemCorrugatedLg", 2 }, { "CircuitParts", 2 } };
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"workbench_epoch"}}, 3, 1, 1, 0}};
|
||||
nearby[] = {{"Workbench", "", "workbench", {1,{"WorkBench_EPOCH"}}, 3, 1, 0, 1}};
|
||||
model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Solar_Generator_Complete\Solar_generator.p3d";
|
||||
previewPosition[] = {0.804979,1,0.39189};
|
||||
previewScale = 0.11;
|
||||
|
@ -17,7 +17,7 @@ class CfgPatches
|
||||
requiredVersion = 0.1;
|
||||
requiredAddons[] = { "a3_map_altis", "a3_map_stratis", "A3_epoch_assets_3", "a3_epoch_weapons", "epoch_objects", "A3_epoch_vehicles", "A3_epoch_assets_1", "A3_epoch_assets", "A3_Soft_F", "A3_Characters_F", "A3_Characters_F_Beta", "A3_Characters_F_EPA", "A3_Characters_F_EPB", "A3_Structures_F", "A3_Armor_F_Beta", "A3_Data_F", "A3_Weapons_F", "A3_Characters_F_Kart", "A3_Soft_F_Kart_Kart_01", "a2_epoch_weapons", "A3_Air_F_Gamma_UAV_01", "A3_Soft_F_Car", "A3_Soft_F_Heli_Car", "A3_Soft_F_Offroad_01", "A3_Soft_F_Quadbike", "A3_Soft_F_Heli_Quadbike", "A3_Soft_F_SUV", "A3_Soft_F_Heli_SUV", "A3_Boat_F_Boat_Transport_01", "A3_Soft_F_Truck", "A3_Soft_F_Heli_Truck", "A3_Soft_F_Bootcamp_Truck", "A3_Boat_F_Civilian_Boat", "A3_Air_F_Heli_Light_01", "A3_Air_F_Heli_Heli_Light_01", "A3_Air_F_Beta_Heli_Transport_01", "A3_Boat_F_SDV_01", "A3_Boat_F_Heli_SDV_01", "A3_Soft_F_MRAP_01", "A3_Soft_F_Heli_MRAP_01", "A3_Soft_F_HEMTT", "A3_Soft_F_Gamma_HEMTT", "A3_Soft_F_TruckHeavy", "A3_Soft_F_Gamma_TruckHeavy", "A3_Soft_F_EPC_Truck_03", "A3_Air_F_Heli_Light_02", "A3_Air_F_Beta_Heli_Transport_02", "A3_Air_F_EPB_Heli_Light_03", "A3_Air_F_Heli_Heli_Transport_04", "A3_Air_F_Heli_Heli_Transport_03", "A3_Animals_F_Dog", "A3_Animals_F_Rabbit", "A3_Animals_F_Chicken", "A3_Characters_F_Common", "A3_Structures_F_Ind_Transmitter_Tower", "a3_epoch_structures" };
|
||||
magazines[] = { "30Rnd_test_mag", "5Rnd_rollins_mag", "CSGAS", "sledge_swing", "30Rnd_test_mag_Tracer", "EnergyPack", "1Rnd_Soda", "1Rnd_Food", "WoodLog_EPOCH", "PaintCanBlk", "PaintCanBlu", "PaintCanBrn", "PaintCanGrn", "PaintCanOra", "PaintCanPur", "PaintCanRed", "PaintCanTeal", "PaintCanYel" };
|
||||
ammo[] = { "B_Test_45ACP_Ball", "B_Swing", "Sapper_Charge_Ammo", "SapperB_Charge_Ammo", "B_Soda", "B_Food", "B_Test_Caseless", "ChainSaw_Bullet", "SmokeShellCustom" };
|
||||
ammo[] = { "B_EnergyPack", "B_Swing", "Sapper_Charge_Ammo", "SapperB_Charge_Ammo", "B_Soda", "B_Food", "B_Test_Caseless", "ChainSaw_Bullet", "SmokeShellCustom" };
|
||||
epochVersion = "0.3.4.0";
|
||||
};
|
||||
};
|
||||
@ -101,3 +101,12 @@ class CfgAnimationSourceSounds
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
class CfgCommands
|
||||
{
|
||||
// allowedHTMLLoadURIs[] += // think this adds to an existing array
|
||||
allowedHTMLLoadURIs[] =
|
||||
{
|
||||
"https://raw.githubusercontent.com/epochmodteam/epoch/test/changelog.html" //there are some issues with capitalization used in github links
|
||||
};
|
||||
};
|
@ -9,6 +9,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/master/Sources/epoch_server/compile/epoch_bases/EPOCH_server_loadBuildings.sqf
|
||||
*/
|
||||
|
||||
|
||||
_maxTTL = parseNumber EPOCH_expiresBuilding;
|
||||
_config = 'CfgEpochClient' call EPOCH_returnConfig;
|
||||
_buildingJammerRange = getNumber(_config >> "buildingJammerRange");
|
||||
@ -62,7 +63,8 @@ for "_i" from 0 to _this do {
|
||||
_location = (_location select 0) vectorAdd (_location select 1);
|
||||
};
|
||||
|
||||
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1)) then {
|
||||
// remove old safes on && !(_class isKindOf 'Constructions_lockedstatic_F')
|
||||
if (isClass (configFile >> "CfgVehicles" >> _class) && (_damage < 1) && !(_class isKindOf 'Constructions_lockedstatic_F')) then {
|
||||
_baseObj = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
_baseObj setVectorDirAndUp _worldspace;
|
||||
@ -87,18 +89,6 @@ for "_i" from 0 to _this do {
|
||||
};
|
||||
};
|
||||
|
||||
if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||
if ((_location select 2) < 0) then {
|
||||
_location set [2, 0];
|
||||
_baseObj setposATL _location;
|
||||
};
|
||||
|
||||
if (_storageSlot != "-1") then {
|
||||
_baseObj setVariable ["EPOCH_secureStorage", _storageSlot];
|
||||
_baseObj setVariable ["EPOCH_Locked", true, true];
|
||||
};
|
||||
};
|
||||
|
||||
_baseObj setDamage _damage;
|
||||
_baseObj call EPOCH_server_buildingInit;
|
||||
_baseObj setVariable ["BUILD_SLOT", _i, true];
|
||||
@ -116,8 +106,6 @@ for "_i" from 0 to _this do {
|
||||
};
|
||||
};
|
||||
|
||||
missionNamespace setVariable [format ["EPOCH_BUILD_%1",_i], _baseObj];
|
||||
|
||||
EPOCH_BuildingSlots set [_i,1];
|
||||
if (EPOCH_DEBUG_VEH) then {
|
||||
_marker = createMarker [str(_location) , _location];
|
||||
|
@ -60,7 +60,7 @@ if (typeOf _object == "PlotPole_EPOCH") then {
|
||||
};
|
||||
};
|
||||
if (_counter > _maintCount) exitWith{};
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F","Constructions_lockedstatic_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
} forEach nearestObjects[_object, ["Constructions_static_F","Constructions_foundation_F","Buildable_Storage","Secure_Storage_Proxy"], _buildingJammerRange];
|
||||
|
||||
// effect crypto
|
||||
_playerCryptoLimit = [(configFile >> "CfgSecConf" >> "limits"), "playerCrypto", 25000] call EPOCH_fnc_returnConfigEntry;
|
||||
|
@ -80,8 +80,6 @@ if (isText _config) then {
|
||||
|
||||
_newVehicle = [_vehicle, false] call EPOCH_server_simulSwap;
|
||||
|
||||
missionNamespace setVariable[format["EPOCH_BUILD_%1", _objSlot], _newVehicle];
|
||||
|
||||
_newVehicle setVariable["BUILD_OWNER", _plyrUID, true];
|
||||
|
||||
_slot = "-1";
|
||||
@ -108,13 +106,15 @@ if (isText _config) then {
|
||||
|
||||
//diag_log format["building lockbox found slot %1", _slot];
|
||||
|
||||
missionNamespace setVariable[format["EPOCH_STORAGE_%1", _slot], _storageObj];
|
||||
// missionNamespace setVariable[format["EPOCH_STORAGE_%1", _slot], _storageObj];
|
||||
|
||||
_newVehicle setVariable["EPOCH_secureStorage", _slot];
|
||||
|
||||
_newVehicle setVariable["EPOCH_Locked", false, true];
|
||||
|
||||
_storageObj setVariable["STORAGE_OWNERS", [_plyrUID]];
|
||||
_storageObj setVariable["EPOCH_secStorParent", _objSlot];
|
||||
|
||||
// _storageObj setVariable["EPOCH_secStorParent", _objSlot];
|
||||
_storageObj setVariable["STORAGE_SLOT", _slot, true];
|
||||
|
||||
_storageObj call EPOCH_server_save_storage;
|
||||
@ -128,13 +128,10 @@ if (isText _config) then {
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
_newVehicle call EPOCH_fnc_saveBuilding;
|
||||
};
|
||||
|
||||
_newVehicle call EPOCH_fnc_saveBuilding;
|
||||
|
||||
// _VAL = [_staticClass, _worldspace, _slot, _plyrUID, _textureSlot, _animPhases];
|
||||
// ["Building", _objHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX;
|
||||
//_return = ["Building", _objHiveKey, _VAL] call EPOCH_fnc_server_hiveSET;
|
||||
};
|
||||
|
||||
} else {
|
||||
|
@ -29,31 +29,72 @@ for "_i" from 1 to _this do {
|
||||
|
||||
if (typeName(_inventory) != "ARRAY") then { _inventory = []; };
|
||||
|
||||
_dir = _arr select 1 select 0;
|
||||
_location = _arr select 1 select 1;
|
||||
_worldspace = _arr select 1;
|
||||
_wsCount = count _worldspace;
|
||||
diag_log format ["DEBUG: _wsCount %1 _worldspace %2", _wsCount, _worldspace];
|
||||
|
||||
// new worldspace format
|
||||
if (_wsCount == 3) then {
|
||||
_location = _worldspace deleteAt 0;
|
||||
_dir = _worldspace;
|
||||
} else {
|
||||
_dir = _worldspace select 0;
|
||||
_location = _worldspace select 1;
|
||||
};
|
||||
|
||||
// increased position precision
|
||||
if (count _location == 2) then{
|
||||
_location = (_location select 0) vectorAdd(_location select 1);
|
||||
};
|
||||
|
||||
_vehicle = createVehicle [_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// temp set damage to mark for maint
|
||||
_vehicle setDamage 0.99;
|
||||
_vehicle setDir _dir;
|
||||
|
||||
diag_log format ["STORAGE: created storage %1 at %2", _class, _location];
|
||||
|
||||
// set to ground if only x,y
|
||||
if (count _location == 2) then {
|
||||
_location set [2, 0];
|
||||
};
|
||||
|
||||
// try to recover from negitive z
|
||||
if ((_location select 2) < 0) then {
|
||||
_location set [2, 0];
|
||||
};
|
||||
|
||||
_vehicle = createVehicle[_class, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
// if proxy create visable safe
|
||||
if (_class isKindOf "Secure_Storage_Proxy") then {
|
||||
_dummyClass = getText(configFile >> "CfgVehicles" >> _class >> "parentClass");
|
||||
_dummyVehicle = createVehicle [_dummyClass, _location, [], 0, "CAN_COLLIDE"];
|
||||
|
||||
if (typeName _dir == "ARRAY") then {
|
||||
_dummyVehicle setVectorDirAndUp _dir;
|
||||
} else {
|
||||
_dummyVehicle setDir _dir;
|
||||
};
|
||||
|
||||
_dummyVehicle setposATL _location;
|
||||
|
||||
// used on save to get ref to storage object
|
||||
_dummyVehicle setVariable ["EPOCH_secStorParent", _vehicle];
|
||||
// used on save to get loction of dummy object
|
||||
_vehicle setVariable["EPOCH_secStorChild",_dummyVehicle];
|
||||
};
|
||||
|
||||
if (typeName _dir == "ARRAY") then {
|
||||
_vehicle setVectorDirAndUp _dir;
|
||||
} else {
|
||||
_vehicle setDir _dir;
|
||||
};
|
||||
|
||||
// temp set damage to mark for maint
|
||||
_vehicle setDamage 0.99;
|
||||
|
||||
_vehicle setposATL _location;
|
||||
|
||||
_vehicle setVariable ["STORAGE_SLOT", str(_i), true];
|
||||
|
||||
missionNamespace setVariable [format ["EPOCH_STORAGE_%1", _i], _vehicle];
|
||||
// missionNamespace setVariable [format ["EPOCH_STORAGE_%1", _i], _vehicle];
|
||||
|
||||
diag_log format ["STORAGE: created storage %1 at %2", _class, _location];
|
||||
|
||||
_vehicle call EPOCH_server_storageInit;
|
||||
|
||||
@ -79,10 +120,12 @@ for "_i" from 1 to _this do {
|
||||
if (count _arr >= 6) then {
|
||||
_vehicle setVariable ["STORAGE_OWNERS", _arr select 5];
|
||||
if (_class isKindOf 'Secure_Storage_Proxy') then{
|
||||
|
||||
// TODO: could be used to unlock safe?
|
||||
if ((_arr select 6) != -1) then {
|
||||
_vehicle setVariable ["EPOCH_secStorParent", _arr select 6];
|
||||
_location set [2, -10];
|
||||
_vehicle setPosATL _location;
|
||||
_vehicle setVariable["EPOCH_Locked", true, true];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -14,9 +14,8 @@ if (!isNull _this) then {
|
||||
// set damage to 0
|
||||
_vehicle setDamage 0;
|
||||
|
||||
_pos = getposATL _vehicle call EPOCH_precisionPos;
|
||||
_dir = getDir _vehicle;
|
||||
_worldspace = [_dir,_pos];
|
||||
// get current location
|
||||
_vehiclePos = getposATL _vehicle;
|
||||
|
||||
// may not be needed but should prevent <null> in DB.
|
||||
_wepsItemsCargo = weaponsItemsCargo _vehicle;
|
||||
@ -52,31 +51,23 @@ if (!isNull _this) then {
|
||||
_colorSlot = _vehicle getVariable ["STORAGE_TEXTURE",0];
|
||||
|
||||
_storageOwners = _vehicle getVariable["STORAGE_OWNERS",[]];
|
||||
_storageParent = _vehicle getVariable["EPOCH_secStorParent",-1];
|
||||
|
||||
_parentID = _vehicle getVariable["EPOCH_secStorParent", -1];
|
||||
_parent = missionNamespace getVariable[format["EPOCH_BUILD_%1", _parentID], objNull];
|
||||
_locked = if (_vehicle getVariable["EPOCH_Locked", true]) then {1} else {-1};
|
||||
|
||||
/*
|
||||
if (!isNull _parent) then {
|
||||
_objSlot = _parent getVariable["BUILD_SLOT", -1];
|
||||
if (_objSlot != -1) then {
|
||||
_objHiveKey = format["%1:%2", (call EPOCH_fn_InstanceID), _objSlot];
|
||||
_VAL2 = [typeOf _parent, [(getposATL _parent call EPOCH_precisionPos), vectordir _parent, vectorup _parent], _vehSlot, _parent getVariable["BUILD_OWNER", "-1"], _parent getVariable["TEXTURE_SLOT", 0]];
|
||||
|
||||
_parent call EPOCH_fnc_saveBuilding;
|
||||
|
||||
["Building", _objHiveKey, EPOCH_expiresBuilding, _VAL2] call EPOCH_fnc_server_hiveSETEX;
|
||||
};
|
||||
// get position of dummy safe instead of proxy position
|
||||
_storageChild = _vehicle getVariable["EPOCH_secStorChild",objNull];
|
||||
if !(isNull _storageChild) then {
|
||||
_vehiclePos = getposATL _storageChild;
|
||||
_vehicle = _storageChild;
|
||||
};
|
||||
*/
|
||||
|
||||
_worldspace = [(_vehiclePos call EPOCH_precisionPos), vectordir _vehicle, vectorup _vehicle];
|
||||
|
||||
_VAL = [_class, _worldspace, _damage, _inventory, _colorSlot, _storageOwners, _storageParent];
|
||||
_VAL = [_class, _worldspace, _damage, _inventory, _colorSlot, _storageOwners, _locked];
|
||||
["Storage", _vehHiveKey, EPOCH_expiresBuilding, _VAL] call EPOCH_fnc_server_hiveSETEX;
|
||||
//["Storage", _vehHiveKey, _VAL] call EPOCH_fnc_server_hiveSET;
|
||||
|
||||
diag_log format["STORAGE: saved to hive %1 Pos %2 Owners %3 Parent %4", _class, _worldspace, _storageOwners, _storageParent];
|
||||
diag_log format["STORAGE: saved to hive %1 Pos %2 Owners %3 Parent %4 Locked %5", _class, _worldspace, _storageOwners, _storageParent, _locked];
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -7,87 +7,99 @@ if (isNull _unit) exitWith{};
|
||||
if (_plyr distance _unit > 20) exitWith{};
|
||||
|
||||
_type = typeOf _unit;
|
||||
|
||||
_plyrUID = getPlayerUID _plyr;
|
||||
_plyrGroup = _plyr getVariable ["GROUP",""];
|
||||
|
||||
// functions
|
||||
_fnc_lock = {
|
||||
_this setVariable ["EPOCH_Locked", true, true];
|
||||
_currentPos = getPosATL _this;
|
||||
_currentPos set[2, -10];
|
||||
_this setPosATL _currentPos;
|
||||
// force save on lock
|
||||
if !(_this in EPOCH_saveStorQueue) then { EPOCH_saveStorQueue pushBack _this };
|
||||
};
|
||||
_fnc_unlock = {
|
||||
_weaponHolder = _this getVariable["EPOCH_secStorParent", objNull];
|
||||
diag_log format["DEBUG: Unlock _weaponHolder %1", _weaponHolder];
|
||||
if (!isNull _weaponHolder) then {
|
||||
_weaponHolder setVariable ["EPOCH_Locked", false, true];
|
||||
_weaponHolder setPosATL (getPosATL _this);
|
||||
};
|
||||
};
|
||||
// functions
|
||||
|
||||
if (getNumber(configFile >> "CfgVehicles" >> _type >> "isSecureStorage") == 1) then{
|
||||
|
||||
_parentID = _unit getVariable ["EPOCH_secureStorage", "-1"];
|
||||
_weaponHolder = missionNamespace getVariable [format ["EPOCH_STORAGE_%1",_parentID], objNull];
|
||||
// direct ref to proxy
|
||||
if (_type isKindOf "Secure_Storage_Proxy") then {
|
||||
|
||||
diag_log format["_parentID %1", _parentID];
|
||||
if (!isNull _weaponHolder) then {
|
||||
_owners = _weaponHolder getVariable["STORAGE_OWNERS", []];
|
||||
diag_log format["_owners %1", _owners];
|
||||
|
||||
// allow group members and owner access
|
||||
_plyrUID = getPlayerUID _plyr;
|
||||
_plyrGroup = _plyr getVariable ["GROUP",""];
|
||||
|
||||
if (_plyrGroup != "") then {
|
||||
if (_plyrGroup in _owners) then {
|
||||
_unit setVariable["EPOCH_Locked", _lockStatus, true];
|
||||
_weaponHolder setPosATL(getPosATL _unit);
|
||||
} else {
|
||||
_response = ["Group", _plyrGroup] call EPOCH_fnc_server_hiveGETRANGE;
|
||||
if ((_response select 0) == 1 && typeName(_response select 1) == "ARRAY") then {
|
||||
_gArray = _response select 1;
|
||||
diag_log format["_gArray %1 _plyrUID %2 _plyrGroup %3", _gArray, _plyrUID, _plyrGroup];
|
||||
if (
|
||||
{(_x select 0) in _owners }count(_gArray select 3) > 0 ||
|
||||
{(_x select 0) in _owners}count(_gArray select 4) > 0 ||
|
||||
_plyrUID in _owners
|
||||
) then {
|
||||
_unit setVariable["EPOCH_Locked", _lockStatus, true];
|
||||
_weaponHolder setPosATL(getPosATL _unit);
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (_plyrUID in _owners) then {
|
||||
_unit setVariable ["EPOCH_Locked", _lockStatus, true];
|
||||
_weaponHolder setPosATL (getPosATL _unit);
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
_parentID = _unit getVariable ["EPOCH_secStorParent", -1];
|
||||
_parent = missionNamespace getVariable [format ["EPOCH_BUILD_%1", _parentID], objNull];
|
||||
diag_log format["_parentID2 %1", _parentID];
|
||||
if (!isNull _parent) then {
|
||||
_owners = _unit getVariable["STORAGE_OWNERS", []];
|
||||
diag_log format["_owners2 %1", _owners];
|
||||
|
||||
// allow group members and owner access
|
||||
_plyrUID = getPlayerUID _plyr;
|
||||
_plyrGroup = _plyr getVariable ["GROUP",""];
|
||||
if (_plyrGroup != "") then {
|
||||
if (_plyrGroup in _owners) then {
|
||||
_parent setVariable ["EPOCH_Locked", _lockStatus, true];
|
||||
_currentPos = getPosATL _unit;
|
||||
_currentPos set[2, -10];
|
||||
_unit setPosATL _currentPos;
|
||||
_unit call _fnc_lock;
|
||||
} else {
|
||||
|
||||
_response = ["Group", _plyrGroup] call EPOCH_fnc_server_hiveGETRANGE;
|
||||
if ((_response select 0) == 1 && typeName (_response select 1) == "ARRAY") then {
|
||||
_gArray = _response select 1;
|
||||
diag_log format["_gArray2 %1 _plyrUID %2 _plyrGroup %3", _gArray, _plyrUID, _plyrGroup];
|
||||
if (
|
||||
{(_x select 0) in _owners}count(_gArray select 3) > 0 ||
|
||||
{(_x select 0) in _owners}count(_gArray select 4) > 0 ||
|
||||
_plyrUID in _owners
|
||||
) then {
|
||||
_parent setVariable ["EPOCH_Locked", _lockStatus, true];
|
||||
_currentPos = getPosATL _unit;
|
||||
_currentPos set[2, -10];
|
||||
_unit setPosATL _currentPos;
|
||||
_unit call _fnc_lock;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
} else {
|
||||
if (_plyrUID in _owners) then {
|
||||
_parent setVariable ["EPOCH_Locked", _lockStatus, true];
|
||||
_currentPos = getPosATL _unit;
|
||||
_currentPos set [2, -10];
|
||||
_unit setPosATL _currentPos;
|
||||
_unit call _fnc_lock;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
// ref Dummy obj
|
||||
} else {
|
||||
|
||||
_weaponHolder = _unit getVariable["EPOCH_secStorParent", objNull];
|
||||
diag_log format["DEBUG: SecStor _weaponHolder %1", _weaponHolder];
|
||||
|
||||
if (!isNull _weaponHolder) then {
|
||||
_owners = _weaponHolder getVariable["STORAGE_OWNERS", []];
|
||||
diag_log format["_owners %1", _owners];
|
||||
|
||||
// allow group members and owner access
|
||||
if (_plyrGroup != "") then {
|
||||
if (_plyrGroup in _owners) then {
|
||||
_unit call _fnc_unlock;
|
||||
} else {
|
||||
_response = ["Group", _plyrGroup] call EPOCH_fnc_server_hiveGETRANGE;
|
||||
if ((_response select 0) == 1 && typeName(_response select 1) == "ARRAY") then {
|
||||
_gArray = _response select 1;
|
||||
if (
|
||||
{(_x select 0) in _owners }count(_gArray select 3) > 0 ||
|
||||
{(_x select 0) in _owners}count(_gArray select 4) > 0 ||
|
||||
_plyrUID in _owners
|
||||
) then {
|
||||
_unit call _fnc_unlock;
|
||||
};
|
||||
};
|
||||
};
|
||||
} else {
|
||||
if (_plyrUID in _owners) then {
|
||||
_unit call _fnc_unlock;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
@ -7,8 +7,10 @@ if (_plyr distance _unit > 20) exitWith{};
|
||||
|
||||
_class = typeOf _unit;
|
||||
if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||
_parentID = _unit getVariable["EPOCH_secureStorage", "-1"];
|
||||
_weaponHolder = missionNamespace getVariable[format["EPOCH_STORAGE_%1", _parentID], objNull];
|
||||
|
||||
_weaponHolder = _unit getVariable["EPOCH_secStorParent", objNull];
|
||||
diag_log format["DEBUG: Pack _weaponHolder %1", _weaponHolder];
|
||||
|
||||
if (!isNull _weaponHolder) then {
|
||||
_owners = _weaponHolder getVariable["STORAGE_OWNERS", []];
|
||||
if ((getPlayerUID _plyr) in _owners) then {
|
||||
@ -27,7 +29,7 @@ if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||
_magsAmmoCargo = [];
|
||||
};
|
||||
|
||||
// dump items on ground
|
||||
// dump items on ground
|
||||
_inventory = [
|
||||
_wepsItemsCargo,
|
||||
_magsAmmoCargo,
|
||||
@ -35,10 +37,10 @@ if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||
getItemCargo _weaponHolder
|
||||
];
|
||||
|
||||
|
||||
|
||||
[_weaponHolder, _plyr] call EPOCH_server_save_killedStorage;
|
||||
deleteVehicle _weaponHolder;
|
||||
|
||||
|
||||
_gwh = createVehicle["groundWeaponHolder", _posWH, [], 0, "CAN_COLLIDE"];
|
||||
_gwh setPosATL _posWH;
|
||||
|
||||
@ -84,8 +86,8 @@ if (_class isKindOf 'Constructions_lockedstatic_F') then{
|
||||
};
|
||||
};
|
||||
} forEach _x;
|
||||
|
||||
// add all attachments to vehicle
|
||||
|
||||
// add all attachments to vehicle
|
||||
// TODO replace with adding attachments directly to gun (Arma feature dependant)
|
||||
{
|
||||
_gwh addItemCargoGlobal[_x, 1];
|
||||
|
Loading…
Reference in New Issue
Block a user