diff --git a/Server_Install_Pack/mpmissions/epoch.VR.pbo b/Server_Install_Pack/mpmissions/epoch.VR.pbo
index a368c9d9..b6c4f80c 100644
Binary files a/Server_Install_Pack/mpmissions/epoch.VR.pbo and b/Server_Install_Pack/mpmissions/epoch.VR.pbo differ
diff --git a/Server_Install_Pack/sc/battleye/scripts.txt b/Server_Install_Pack/sc/battleye/scripts.txt
index b8a685ab..1a929bf8 100644
--- a/Server_Install_Pack/sc/battleye/scripts.txt
+++ b/Server_Install_Pack/sc/battleye/scripts.txt
@@ -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 _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;"
7 addBackPack
7 removeAllWeapons !="removeAllWeapons axeGeneral;"
7 removeAllItems
@@ -34,7 +34,8 @@
7 createUnit !="_unit = _grp createUnit[(_arrUnits select _i), _pos, [], 0, \"FORM\"];" !="_driver = _grp createUnit[\"I_UAV_AI\", position _unit, [], 0, \"CAN_COLLIDE\"];" !="axeGeneral = grpVIPGeneral createUnit ["I_officer_F", axeGeneralPos, [], 1, "CAN_COLLIDE"];"
7 createAgent !="_unit = createAgent[_unitClass, _targetPos, [], 256, \"FORM\"];" !="_unit = createAgent [_unitClass, _targetPos, [], 120, \"FORM\"];" !="_animal = createAgent[_randomAIClass, _animalPos, [], 5, \"NONE\"];" !="_unit = createAgent [\"Epoch_Cloak_F\", _pos, [], 0, \"CAN_COLLIDE\"];" !="_unit = createAgent [\"Epoch_Sapper_F\", _targetPos, [], 180, \"FORM\"];" !="_sapper = createAgent ["Epoch_Sapper_F", getPos _cage2, [], 0, "FORM"];"
7 createTeam
-7 createDialog !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
+7 createDialog !="createDialog \"rmx_craftingUI\";" !="createDialog \"QuickUpgrade\";" !="createDialog \"QuickTake\";" !="createDialog \"InteractBank\";" !="createdialog \"SelectGender\";" !="_handled = createdialog _dialog;" !="if !(createdialog \"InteractItem\") exitWith {};" !="createDialog \"TapOut\";" !="if !(createdialog \"Trade\") exitWith {};" !="_ok = createdialog \"Interact\";" !="_ok = createdialog \"TradeNPCMenu\";" !="createDialog \"Epoch_myGroup\";" !="createDialog (if ((Epoch_my_GroupUID == \"\") && (Epoch_my_Group isEqualTo [])) then {\"EPOCH_createGrp\"} else {\"Epoch_myGroup\"});" !="createDialog \"GroupRequests\";" !="_ok = createdialog \"MissionSelect\";" !="createDialog 'Skaronator_AdminMenu';"
+7 createDisplay !="createDisplay \"rmx_dynamenu\";"
7 deleteMarker
7 setMarker
7 createMarker
@@ -48,7 +49,7 @@
7 addMPEventHandler
7 addEventHandler !"displayAddEventHandler" !"ctrlAddEventHandler" !"FiredNear" !"EpeContactStart" !"InventoryClosed" !"GetOut" !"InventoryOpened" !"local" !"Respawn" !"Put" !"Take" !"Fired" !"Killed" !" [\"PostReset\",{BIS_EnginePPReset = true;} ];" !"_logic addeventhandler [\n\"local\""
7 displayAddEventHandler !"[_display] call _fnc_animate;" !"tVersion select 4) == \"Development\") then" !"_display displayaddeventhandler\n[\n\"mousemoving\"," !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"true\"];" !"(findDisplay 46) displayAddEventHandler [\"KeyDown\",\"_this call EPOCH_KeyDown\"];" !="_addCase = _display46 displayAddEventHandler ['KeyDown',{_this call EPOCH_KeyDown;}];" !"_display displayaddeventhandler [\"unload\",\"uinamespace setvariable ['BIS_fnc_guiMess" !="findDisplay -1337 displayAddEventHandler ['Unload'" !="_display displayaddeventhandler [\"keydown\",\"with uinamespace do {['keyDown'"
-7 ctrlAddEventHandler !"rCfg >> \"refreshDelay\");" !" [\n\"draw\"," !" [\"buttonclick\"," !="(uiNamespace getVariable 'ESP_map') ctrlAddEventHandler['Draw', '_esp_targets = EPOCH_ESPMAP_TARGETS;" !="ctrlAddEventHandler ['MouseButtonDown'" !="(_display displayctrl _idc) ctrlAddEventHandler [\"LBSelChanged\","
+7 ctrlAddEventHandler !"rCfg >> \"refreshDelay\");" !" [\n\"draw\"," !" [\"buttonclick\"," !="(uiNamespace getVariable 'ESP_map') ctrlAddEventHandler['Draw', '_esp_targets = EPOCH_ESPMAP_TARGETS;" !="ctrlAddEventHandler ['MouseButtonDown'" !="(_display displayctrl _idc) ctrlAddEventHandler [\"LBSelChanged\"," !="_ctrl ctrlSetEventHandler [\"mouseEnter\", (format [\"_c = _this select 0;" !="_ctrl ctrlSetEventHandler [\"mouseExit\", (format [\"_c = _this select 0;" !="_ctrl ctrlSetEventHandler [\"mouseButtonDown\", (format [\"call %1;\",(_buttonSettings select _e select 2)])];"
7 removeAllEventHandlers !="ctrlRemoveAllEventHandlers" !="_vehicle removeAllEventHandlers \"GetOut\";" !="_sapper removeAllEventHandlers \"Hit\";\n_sapper removeAllEventHandlers \"FiredNear\";" !="_display46 displayRemoveAllEventHandlers 'KeyDown';"
7 removeAllMissionEventHandlers
7 ctrlRemoveAllEventHandlers !="(uiNamespace getVariable 'ESP_map') ctrlRemoveAllEventHandlers 'Draw';" !="ctrlAddEventHandler ['MouseButtonDown'"
@@ -58,15 +59,14 @@
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 !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\""
-7 ctrlDelete !="ctrlDelete _ListGroup;"
+7 ctrlCreate !="_ctrl = _display ctrlCreate [\"RscProgress\",_idc + 1];" !="_display ctrlCreate [\"rmx_rscControlsGroup\"" !="_ListGroup = _display ctrlCreate [\"RscControlsGroupNoHScrollbars\""
+7 ctrlDelete !="ctrlDelete _ListGroup;" !="ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);"
7 ctrlClassName
7 ctrlModel
7 ctrlModelDirection
7 ctrlModelSide
7 ctrlModelUp
7 ctrlSetDirection
-7 ctrlSetModel
7 deleteVehicleCrew !"fn_deleteVehicleCrew.sqf" !="\"BIS_fnc_deleteVehicleCrew"\"
7 loadFile
7 selectPlayer !="selectPlayer _playerObject;"
diff --git a/Sources/epoch_code/Data/UI/buttons/CAT_fuel.paa b/Sources/epoch_code/Data/UI/buttons/CAT_fuel.paa
new file mode 100644
index 00000000..7c93914d
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/CAT_fuel.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/build_maintain.paa b/Sources/epoch_code/Data/UI/buttons/build_maintain.paa
new file mode 100644
index 00000000..75d0bf8c
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/build_maintain.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/build_maintain2.paa b/Sources/epoch_code/Data/UI/buttons/build_maintain2.paa
new file mode 100644
index 00000000..48fb89de
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/build_maintain2.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/build_move.paa b/Sources/epoch_code/Data/UI/buttons/build_move.paa
new file mode 100644
index 00000000..89882070
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/build_move.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/build_remove.paa b/Sources/epoch_code/Data/UI/buttons/build_remove.paa
new file mode 100644
index 00000000..79ef7cad
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/build_remove.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/build_upgrade.paa b/Sources/epoch_code/Data/UI/buttons/build_upgrade.paa
new file mode 100644
index 00000000..062b9038
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/build_upgrade.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/dm_selection.paa b/Sources/epoch_code/Data/UI/buttons/dm_selection.paa
new file mode 100644
index 00000000..f8a686a4
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/dm_selection.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/fuel_add.paa b/Sources/epoch_code/Data/UI/buttons/fuel_add.paa
new file mode 100644
index 00000000..7de193a7
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/fuel_add.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/fuel_syphon.paa b/Sources/epoch_code/Data/UI/buttons/fuel_syphon.paa
new file mode 100644
index 00000000..a503ad81
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/fuel_syphon.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/pad_can_lock.paa b/Sources/epoch_code/Data/UI/buttons/pad_can_lock.paa
new file mode 100644
index 00000000..21f5245e
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/pad_can_lock.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/pad_can_unlock.paa b/Sources/epoch_code/Data/UI/buttons/pad_can_unlock.paa
new file mode 100644
index 00000000..b7e67409
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/pad_can_unlock.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/pad_cannot_lock.paa b/Sources/epoch_code/Data/UI/buttons/pad_cannot_lock.paa
new file mode 100644
index 00000000..75e46a5e
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/pad_cannot_lock.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/pad_cannot_unlock.paa b/Sources/epoch_code/Data/UI/buttons/pad_cannot_unlock.paa
new file mode 100644
index 00000000..5608cb52
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/pad_cannot_unlock.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/player_inspect.paa b/Sources/epoch_code/Data/UI/buttons/player_inspect.paa
new file mode 100644
index 00000000..ebcc8468
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/player_inspect.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/talk_blue.paa b/Sources/epoch_code/Data/UI/buttons/talk_blue.paa
new file mode 100644
index 00000000..038d2162
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/talk_blue.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/talk_green.paa b/Sources/epoch_code/Data/UI/buttons/talk_green.paa
new file mode 100644
index 00000000..2e639723
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/talk_green.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/talk_orange.paa b/Sources/epoch_code/Data/UI/buttons/talk_orange.paa
new file mode 100644
index 00000000..cbea378e
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/talk_orange.paa differ
diff --git a/Sources/epoch_code/Data/UI/buttons/talk_red.paa b/Sources/epoch_code/Data/UI/buttons/talk_red.paa
new file mode 100644
index 00000000..98b44378
Binary files /dev/null and b/Sources/epoch_code/Data/UI/buttons/talk_red.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/Craft.paa b/Sources/epoch_code/Data/UI/crafting/Craft.paa
new file mode 100644
index 00000000..37867f96
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/Craft.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/cancel.paa b/Sources/epoch_code/Data/UI/crafting/cancel.paa
new file mode 100644
index 00000000..c161ed71
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/cancel.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/close.paa b/Sources/epoch_code/Data/UI/crafting/close.paa
new file mode 100644
index 00000000..6a7e5b26
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/close.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/electricity_false.paa b/Sources/epoch_code/Data/UI/crafting/electricity_false.paa
new file mode 100644
index 00000000..f3937f92
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/electricity_false.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/electricity_true.paa b/Sources/epoch_code/Data/UI/crafting/electricity_true.paa
new file mode 100644
index 00000000..53542d8f
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/electricity_true.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/fire_false.paa b/Sources/epoch_code/Data/UI/crafting/fire_false.paa
new file mode 100644
index 00000000..7ec2b25f
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/fire_false.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/fire_true.paa b/Sources/epoch_code/Data/UI/crafting/fire_true.paa
new file mode 100644
index 00000000..d777cd1c
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/fire_true.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/fuel_false.paa b/Sources/epoch_code/Data/UI/crafting/fuel_false.paa
new file mode 100644
index 00000000..127acfd5
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/fuel_false.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/fuel_true.paa b/Sources/epoch_code/Data/UI/crafting/fuel_true.paa
new file mode 100644
index 00000000..754efade
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/fuel_true.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/water_false.paa b/Sources/epoch_code/Data/UI/crafting/water_false.paa
new file mode 100644
index 00000000..341ccb37
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/water_false.paa differ
diff --git a/Sources/epoch_code/Data/UI/crafting/water_true.paa b/Sources/epoch_code/Data/UI/crafting/water_true.paa
new file mode 100644
index 00000000..d3086b5b
Binary files /dev/null and b/Sources/epoch_code/Data/UI/crafting/water_true.paa differ
diff --git a/Sources/epoch_code/Data/UI/dev_mode_off.paa b/Sources/epoch_code/Data/UI/dev_mode_off.paa
new file mode 100644
index 00000000..f730cdda
Binary files /dev/null and b/Sources/epoch_code/Data/UI/dev_mode_off.paa differ
diff --git a/Sources/epoch_code/Data/UI/dev_mode_on.paa b/Sources/epoch_code/Data/UI/dev_mode_on.paa
new file mode 100644
index 00000000..9cf3a96e
Binary files /dev/null and b/Sources/epoch_code/Data/UI/dev_mode_on.paa differ
diff --git a/Sources/epoch_code/compile/EPOCH_craftItem.sqf b/Sources/epoch_code/compile/EPOCH_craftItem.sqf
deleted file mode 100644
index 99bf1d1a..00000000
--- a/Sources/epoch_code/compile/EPOCH_craftItem.sqf
+++ /dev/null
@@ -1,128 +0,0 @@
-_craftItem = EPOCH_CraftItemData;
-_abort = false;
-_msg = "";
-_craftedItemCount = 0;
-
-// _craftingConfig = configfile >> "CfgCrafting" >> _craftItem;
-_config = 'CfgCrafting' call EPOCH_returnConfig;
-_craftingConfig = _config >> _craftItem;
-if (isClass (_craftingConfig)) then {
- _recipe = [] + getArray(_craftingConfig >> "recipe");
- _nearby = [] + getArray(_craftingConfig >> "nearby");
-
- //diag_log format["DEBUG craftitem: _nearby %1", _nearby];
-
- _proceed = true;
- // check nearby
- {
- _needType = _x select 0; // fire. alive, noclass
- _needClasses = _x select 1; // ["ALL"]. ["filename.p3d"]
- _needRange = _x select 2; // 3
- _needCount = _x select 3; // 1
- _needReason = _x select 4; // "Fire", "Water Source"
-
- _nearObjects = nearestObjects[player, _needClasses, _needRange];
-
- _nearbyCount = 0;
- switch (_needType) do
- {
- case "fire": {_nearbyCount = {inflamed _x} count _nearObjects; };
- case "alive": {_nearbyCount = {alive _x} count _nearObjects; };
- case "noclass": {
- {
- _needName = _x;
- _nearbyCount = {((str(_x) find _needName) != -1)} count nearestObjects[player, [], _needRange];
-
- if (_nearbyCount > 0) exitWith{};
- } foreach _needClasses;
- };
- };
- if (_nearbyCount < _needCount)exitWith{
- _proceed = false;
- _msg = format["Need %1", _needReason];
- };
- } forEach _nearby;
-
- if (_proceed) then {
-
- _countIndex = lbCurSel 2100;
- _craftCount = lbValue[2100, _countIndex];
-
- //diag_log format["CRAFT COUNT: index %1 count %2", _countIndex, _craftCount];
-
- closeDialog 0;
-
- for "_r" from 1 to _craftCount do {
-
- if (player canAdd _craftItem) then {
- _recipeCount = 0;
- _numRemoved = 0;
- {
- _recipeItem = _x;
- _recipeQty = 1;
-
- if (typeName _x == "ARRAY") then {
- _recipeItem = _x select 0;
- _recipeQty = _x select 1;
- };
- _recipeCount = _recipeCount + _recipeQty;
-
- // TODO dry run before removing anything
- if ([_recipeItem, "CfgWeapons"] call EPOCH_fnc_isAny) then {
- _items = items player;
- _currentCount = { _x == _recipeItem } count _items;
- if (_currentCount >= _recipeQty) then {
- for "_i" from 1 to _recipeQty do {
- if (_recipeItem in _items) then {
- player removeItem _recipeItem;
- _numRemoved = _numRemoved + 1;
- };
- };
- };
- }
- else {
- _mags = magazines player;
- _currentCount = { _x == _recipeItem } count _mags;
- if (_currentCount >= _recipeQty) then {
- for "_i" from 1 to _recipeQty do {
- if (_recipeItem in _mags) then {
- player removeMagazine _recipeItem;
- _numRemoved = _numRemoved + 1;
- };
- };
- };
- };
- } forEach _recipe;
-
- if (_numRemoved == _recipeCount) then {
- if (player canAdd _craftItem) then {
- if ([_craftItem, "CfgWeapons"] call EPOCH_fnc_isAny) then {
- player addItem _craftItem;
- }
- else {
- player addMagazine _craftItem;
- };
- _craftedItemCount = _craftedItemCount + 1;
- }
- else {
- _abort = true;
- _msg = "Not enough space";
- };
- } else {
- _abort = true;
- _msg = "Incorrect item count";
- };
- } else {
- _abort = true;
- _msg = "Not enough space";
- };
- if (_abort) exitWith{};
- };
- };
-
- if (_craftedItemCount > 0) then {
- _dt = [format["Crafted %1 %2",_craftedItemCount,_craftItem call EPOCH_itemDisplayName], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
- } else {
- _dt = [format["%1", _msg], 0, 1, 5, 2, 0, 1] spawn bis_fnc_dynamictext;
- };
-};
\ No newline at end of file
diff --git a/Sources/epoch_code/compile/EPOCH_craftItemPreview.sqf b/Sources/epoch_code/compile/EPOCH_craftItemPreview.sqf
deleted file mode 100644
index 71b17dc4..00000000
--- a/Sources/epoch_code/compile/EPOCH_craftItemPreview.sqf
+++ /dev/null
@@ -1,162 +0,0 @@
-disableSerialization;
-
-ctrlShow[1600, false];
-ctrlShow[2100, false];
-ctrlShow[1000, false];
-ctrlShow[41008, true];
-ctrlShow[42000, true];
-
-
-_index = _this select 0;
-
-EPOCH_CraftItemData = "";
-
-_activeDisplay = findDisplay -15;
-
-_data = EPOCH_InteractedItem select 1;
-// _craftingConfig = configfile >> "CfgCrafting" >> (_data);
-_config = 'CfgCrafting' call EPOCH_returnConfig;
-_craftingConfig = _config >> _data;
-if (isClass (_craftingConfig)) then {
- _usedIn = getArray (_craftingConfig >> "usedIn");
-
- _selectedRecipe = _usedIn select _index;
-
- EPOCH_CraftItemData = _selectedRecipe;
-
- _craftingConfig = _config >> _selectedRecipe;
- if (isClass (_craftingConfig)) then {
- _recipe = getArray(_craftingConfig >> "recipe");
- _nearby = getArray(_craftingConfig >> "nearby");
-
- _recipeItems = [1200,1201,1202,1203,1204,1205];
- _recipeStatus = [42200,42201,42202,42203,42204,42205];
- _recipetooltip = [43200,43201,43202,43203,43204,43205];
- _recipeCounts = [41001,41002,41003,41004,41005,41006];
-
- _recipeResources = [45202,45203,45204,45205,45206,45207];
- _recipeResourcesbtn = [44202,44203,44204,44205,44206,44207];
-
-
- {
- ctrlShow[_x, false];
- } forEach _recipeItems;
-
- {
- ctrlShow[_x, false];
- } forEach _recipeStatus;
-
- {
- ctrlShow[_x, false];
- } forEach _recipeCounts;
-
-
-
- // check for nearby resources
- _proceed = true;
- // check nearby
- {
- _needType = _x select 0; // fire. alive, noclass
- _needClasses = _x select 1; // ["ALL"]. ["filename.p3d"]
- _needRange = _x select 2; // 3
- _needCount = _x select 3; // 1
- _needReason = _x select 4; // "Fire", "Water Source"
- _needImage = _x select 5; // fire, fuel, water, electricity
-
- _nearObjects = nearestObjects[player, _needClasses, _needRange];
-
- _nearbyCount = 0;
- switch (_needType) do
- {
- case "fire": {_nearbyCount = {inflamed _x} count _nearObjects; };
- case "alive": {_nearbyCount = {alive _x} count _nearObjects; };
- case "noclass": {
- {
- _needName = _x;
- _nearbyCount = {((str(_x) find _needName) != -1)} count nearestObjects[player, [], _needRange];
- if (_nearbyCount > 0) exitWith{};
- } foreach _needClasses;
- };
- };
-
- (_activeDisplay displayCtrl(_recipeResourcesbtn select _forEachIndex)) ctrlSetTooltip _needReason;
-
- if (_nearbyCount < _needCount) then {
- _proceed = false;
- // display needed icons
- _icon = format["\x\addons\a3_epoch_code\Data\UI\need_%1_ca.paa", _needImage];
- //diag_log format["%1", _icon];
- ctrlSetText[(_recipeResources select _forEachIndex), _icon];
-
- } else {
- // display needed icons
- _icon = format["\x\addons\a3_epoch_code\Data\UI\has_%1_ca.paa", _needImage];
- //diag_log format["%1", _icon];
- ctrlSetText[(_recipeResources select _forEachIndex), _icon];
- };
-
- } forEach _nearby;
-
-
-
- _recipeCount = 0;
- _itemCount = 0;
- _mags = magazines player;
- _items = items player;
- {
- _recipeItem = _x;
- _recipeQty = 1;
-
- if (typeName _x == "ARRAY") then {
- _recipeItem = _x select 0;
- _recipeQty = _x select 1;
- };
-
- _recipeCount = _recipeCount + _recipeQty;
-
- _index = _forEachIndex;
- _recipePic = _recipeItem call EPOCH_itemPicture;
- ctrlSetText [(_recipeItems select _index), _recipePic];
-
- _actualCount = 0;
- if (isClass(configfile >> "cfgweapons" >> _recipeItem)) then {
- _actualCount = { _x == _recipeItem } count _items;
- } else {
- _actualCount = { _x == _recipeItem } count _mags;
- };
-
-
- ctrlSetText[(_recipeCounts select _index), format["%1/%2", _actualCount, _recipeQty]];
-
- ctrlShow[(_recipeItems select _index), true];
- ctrlShow[(_recipeStatus select _index), true];
- ctrlShow[(_recipeCounts select _index), true];
-
- (_activeDisplay displayCtrl (_recipetooltip select _index)) ctrlSetTooltip format["%1",(_recipeItem call EPOCH_itemDisplayName)];
-
- if (_actualCount >= _recipeQty) then {
- ctrlSetText [(_recipeStatus select _index), ""];
- _itemCount = _itemCount + _recipeQty;
- (_activeDisplay displayCtrl (_recipeCounts select _index)) ctrlSetTextColor[1, 1, 1, 1];
- } else {
- ctrlSetText [(_recipeStatus select _index), "\x\addons\a3_epoch_assets\ui\xicon.paa"];
- (_activeDisplay displayCtrl (_recipeCounts select _index)) ctrlSetTextColor[1, 0, 0, 1];
- };
-
- } forEach _recipe;
-
- if (_itemCount == _recipeCount && _proceed) then {
- ctrlShow [1600, true];
- ctrlShow [2100, true];
- ctrlShow [1000, true];
- for "_i" from 0 to 9 do {
- _num = _i + 1;
- _index = lbAdd[2100, str(_num)]; lbSetValue[2100, _index, _num];
- };
- lbSetCurSel[2100, 0];
- };
- //diag_log format["DEBUG: EPOCH_craftItem %1 index: %2",_selectedRecipe,_index];
- };
- //diag_log format["DEBUG: EPOCH_craftItem %1 index: %2",_selectedRecipe,_index];
-};
-
diff --git a/Sources/epoch_code/compile/EPOCH_itemInteract.sqf b/Sources/epoch_code/compile/EPOCH_itemInteract.sqf
deleted file mode 100644
index 23076f31..00000000
--- a/Sources/epoch_code/compile/EPOCH_itemInteract.sqf
+++ /dev/null
@@ -1,93 +0,0 @@
-disableSerialization;
-
-_text = "";
-_data = "";
-_pic = "";
-
-if (typeName _this isEqualTo "BOOL" && count EPOCH_InteractedItem == 3) then {
- _text = EPOCH_InteractedItem select 0;
- _data = EPOCH_InteractedItem select 1;
- _pic = EPOCH_InteractedItem select 2;
- //diag_log "DEBUG: mode 1";
-
-} else {
- //diag_log "DEBUG: mode 2";
-
- 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];
-};
-
-_craftingArray = [];
-_craftingArrayNames = [];
-
-// _craftingConfig = configfile >> "CfgCrafting" >> _data;
-
-_config = 'CfgCrafting' call EPOCH_returnConfig;
-_craftingConfig = _config >> _data;
-
-if (isClass (_craftingConfig)) then {
- _usedIn = [] + getArray (_craftingConfig >> "usedIn");
- {
- //diag_log format["DEBUG: %1",_x,(_x call EPOCH_itemPicture),(_x call EPOCH_itemDisplayName)];
- _craftingArray pushBack (_x call EPOCH_itemPicture);
- _craftingArrayNames pushBack (_x call EPOCH_itemDisplayName);
- } forEach _usedIn;
-};
-
-//diag_log format["DEBUG: EPOCH_itemInteract %1 EPOCH_InteractedItem %2", _this, EPOCH_InteractedItem];
-// diag_log format["DEBUG: _craftingArrayNames %1 _craftingArray %2", _craftingArrayNames, _craftingArray];
-
-closeDialog 0;
-if !(createdialog "InteractItem") exitWith {};
-
-ctrlShow[1600, false];
-ctrlShow[2100, false];
-ctrlShow[1000, false];
-ctrlShow[41008, false];
-ctrlShow[42000, false];
-
-_interactOption = 0;
-_buttonTXT = "";
-if (isClass (configfile >> "cfgweapons" >> _data)) then {
- _type = getNumber (configfile >> "CfgWeapons" >> _data >> "type");
- _interactOption = getNumber (configfile >> "CfgWeapons" >> _data >> "interactAction");
- _buttonTXT = getText(configfile >> "CfgWeapons" >> _data >> "interactText");
-} else {
- _type = getNumber (configfile >> "CfgMagazines" >> _data >> "type");
- _interactOption = getNumber (configfile >> "CfgMagazines" >> _data >> "interactAction");
- _buttonTXT = getText(configfile >> "CfgMagazines" >> _data >> "interactText");
-};
-
-if (_buttonTXT == "") then {
- _buttonTXT = "EXAMINE";
-};
-
-ctrlSetText [41201, _buttonTXT];
-ctrlSetText [41200, _pic];
-_craftingArrayCount = count _craftingArray;
-_controls = [41202,41203,41204,41205,41206,41207];
-_buttons = [1602,1603,1604,1605,1606,1607];
-
-{
- if (_craftingArrayCount >= (_forEachIndex+1)) then {
- ctrlSetText [_x, (_craftingArray select _forEachIndex)];
- ((findDisplay -15) displayCtrl (_buttons select _forEachIndex)) ctrlSetTooltip (_craftingArrayNames select _forEachIndex);
- ctrlShow [_buttons select _forEachIndex, true];
- } else {
- ctrlShow [_buttons select _forEachIndex, false];
- };
-}forEach _controls;
\ No newline at end of file
diff --git a/Sources/epoch_code/compile/functions/EPOCH_itemData.sqf b/Sources/epoch_code/compile/functions/EPOCH_itemData.sqf
new file mode 100644
index 00000000..422b4049
--- /dev/null
+++ b/Sources/epoch_code/compile/functions/EPOCH_itemData.sqf
@@ -0,0 +1,33 @@
+/*
+Returns string if only one element in second param, otherwise returns array
+
+ _displayName = _item call epoch_itemData; // string
+ _pic = [_item,["Picture"]] call epoch_itemData; //string
+ _data = [_item,["picture","model","displayName"]] call epoch_itemData; //array
+*/
+
+private ["_item","_entries","_single","_arr","_return"];
+_item = param [0,""];
+_entries = param [1,["DisplayName"],[[]]];
+
+_single = (count _entries) == 1;
+
+_arr = [];
+{
+ if ([_item, "CfgMagazines"] call EPOCH_fnc_isAny) then {
+ _arr pushBack (getText(configfile >> "CfgMagazines" >> _item >> _x));
+ } else {
+ if ([_item, "CfgWeapons"] call EPOCH_fnc_isAny) then {
+ _arr pushBack (getText(configfile >> "CfgWeapons" >> _item >> _x));
+ } else {
+ if ([_item, "CfgVehicles"] call EPOCH_fnc_isAny) then {
+ _arr pushBack (getText(configfile >> "CfgVehicles" >> _item >> _x));
+ };
+ };
+ };
+} forEach _entries;
+
+if (_arr isEqualTo []) then {_arr = [""]};
+_return = if (_single) then {_arr select 0} else {_arr};
+
+_return
diff --git a/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf b/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf
index ff4f8c94..524d16d7 100644
--- a/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf
+++ b/Sources/epoch_code/compile/inventory/EPOCH_initUI.sqf
@@ -12,7 +12,7 @@ EPOCH_lastContainer = _this select 1;
waitUntil {!isNull findDisplay 602};
_display = (findDisplay 602);
-{(_display displayCtrl _x) ctrlEnable false} forEach [-13,-14];
+(_display displayCtrl -13) ctrlEnable false;
_totalArmor = 0;
_totalArmorMax = EPOCH_MAX_ARMOR select 3;
diff --git a/Sources/epoch_code/compile/inventory/EPOCH_itemInteractV2.sqf b/Sources/epoch_code/compile/inventory/EPOCH_itemInteractV2.sqf
index ba235823..aff16343 100644
--- a/Sources/epoch_code/compile/inventory/EPOCH_itemInteractV2.sqf
+++ b/Sources/epoch_code/compile/inventory/EPOCH_itemInteractV2.sqf
@@ -8,9 +8,6 @@ _text = _control lbText _index;
_data = _control lbData _index;
_pic = _control lbPicture _index;
-_craftingArray = [];
-_craftingArrayNames = [];
-
if (_data == "") then {
_confData = "getText (_x >> 'displayName') == _text" configClasses(configFile >> "CfgWeapons");
if !(_confData isEqualTo[]) then {
@@ -18,17 +15,6 @@ if (_data == "") then {
};
};
-_config = 'CfgCrafting' call EPOCH_returnConfig;
-_craftingConfig = _config >> _data;
-
-if (isClass (_craftingConfig)) then {
- _usedIn = [] + getArray (_craftingConfig >> "usedIn");
- {
- _craftingArray pushBack (_x call EPOCH_itemPicture);
- _craftingArrayNames pushBack (_x call EPOCH_itemDisplayName);
- } forEach _usedIn;
-};
-
EPOCH_InteractedItem = [_text,_data,_pic];
_interactOption = 0;
@@ -55,8 +41,15 @@ if (_buttonTXT != "") then {
};
_useBtn = _display displayCtrl -14;
-if !(_craftingArray isEqualTo []) then {
- _useBtn ctrlEnable true;
+_useBtn ctrlEnable true;
+
+_config = 'CfgCrafting' call EPOCH_returnConfig;
+_craftingConfig = _config >> _data;
+
+if (isClass (_craftingConfig)) then {
+ _useBtn ctrlSetTextColor [0,1,0,1];
+ EPOCH_CraftingItem = EPOCH_InteractedItem select 0;
} else {
- _useBtn ctrlEnable false;
+ _useBtn ctrlSetTextColor [1,0,0,1];
+ EPOCH_CraftingItem = "";
};
diff --git a/Sources/epoch_code/config.cpp b/Sources/epoch_code/config.cpp
index 16e05992..ae1fb23f 100644
--- a/Sources/epoch_code/config.cpp
+++ b/Sources/epoch_code/config.cpp
@@ -134,10 +134,7 @@ class CfgClientFunctions
class niteLight {};
class LootIT {};
class supportCopter {};
- class itemInteract {};
class consumeItem {};
- class craftItemPreview {};
- class craftItem {};
class unitSpawn {};
class antiWall {};
class onEachFrame {};
@@ -211,6 +208,7 @@ class CfgClientFunctions
class fnc_findSafePos {};
class pushCustomVar {};
+ class itemData {};
class itemPicture {};
class itemDisplayName {};
class SortArrayByDistance {};
@@ -255,12 +253,35 @@ class CfgClientFunctions
};
class gui {
- file = "\x\addons\a3_epoch_code\gui\scripts";
- class onPause {};
- class interactVehicle {};
- class showStats {};
+ file = "\x\addons\a3_epoch_code\gui\scripts";
+ class onPause {};
+ class interactVehicle {};
+ class showStats {};
+ class dynamicMenu {};
+ class dynamicMenuCleanup {};
+ class 3DctrlPitchYaw {};
+ class 3DctrlSpin {};
+ class 3DctrlYaw {};
};
+ class gui_craft {
+ file = "\x\addons\a3_epoch_code\gui\scripts\craftingv2";
+ class crafting_animate {};
+ class crafting_ctrl_collector {};
+ class crafting_dev_toggle {};
+ class crafting_getConfig {};
+ class crafting_checkGear {};
+ class crafting_checkNearby {};
+ class crafting_checkResources {};
+ class crafting_craft {};
+ class crafting_progress {};
+ class crafting_load {};
+ class crafting_unload {};
+ class crafting_LB_click {};
+ class crafting_LB_defaults {};
+ class crafting_LB_doubleClick {};
+ class crafting_colorScheme {};
+ };
class group {
file = "\x\addons\a3_epoch_code\gui\scripts\group";
class Group_invitePlayer {};
@@ -291,7 +312,12 @@ class CfgClientFunctions
class mission_refresh {};
class mission_description {};
};
-
+ class gui_postProcessing {
+ file = "\x\addons\a3_epoch_code\gui\scripts\post_process";
+ class postprocessCreate {};
+ class postprocessAdjust {};
+ class postprocessDestroy {};
+ };
};
};
#include "\x\addons\a3_epoch_code\gui\Epoch_GUI_Config.hpp"
diff --git a/Sources/epoch_code/gui/Epoch_GUI_Config.hpp b/Sources/epoch_code/gui/Epoch_GUI_Config.hpp
index 51f56e42..21b1039d 100644
--- a/Sources/epoch_code/gui/Epoch_GUI_Config.hpp
+++ b/Sources/epoch_code/gui/Epoch_GUI_Config.hpp
@@ -38,6 +38,550 @@ class IGUIBack;
class CA_Title;
class ScrollBar;
+class rmx_dynamenu {
+ idd = 66600;
+ enableSimulation = 1;
+ movingEnable = 1;
+ onLoad = "setMousePosition [0.5, 0.5];";
+ class controls {};
+};
+
+class rmx_rscPicture: RscPicture {
+ idc = -1;
+ x = 0.425; y = 0.4; w = 0.15; h = 0.2;
+ text = "";
+};
+
+class rmx_rscObject
+{
+
+ idd = 77770;
+ movingEnable = 0;
+ enableSimulation = 1;
+
+ class Objects
+ {
+ class randomItem //pref less polies for starting item
+ {
+
+ idc = 77771;
+ type = 82;
+ model = "\x\addons\a3_epoch_assets\models\logo.p3d";
+ scale = 1;
+
+ direction[] = {0, -0.35, -0.65};
+ up[] = {0, 0.65, -0.35};
+
+ x = 0.5;
+ y = 0.5;
+ z = 0.2;
+
+ xBack = 0.5;
+ yBack = 0.5;
+ zBack = 1.2;
+
+ inBack = 1;
+ enableZoom = 0;
+ zoomDuration = 0.001;
+ };
+ };
+};
+
+class rmx_rscControlsGroup: RscControlsGroup
+{
+ idc = -1;
+
+ x = 0; y = 0; w = 0; h = 0;
+ colorBackground[] = {0,0,0,0};
+
+ class VScrollbar: VScrollbar
+ {
+ width = 0;
+ };
+ class HScrollbar: VScrollbar
+ {
+ height = 0;
+ };
+ class controls {};
+};
+
+class rmx_craftingUI {
+ idd = 77700;
+ enableSimulation = 1;
+ movingEnable = 1;
+ onUnload = "call EPOCH_crafting_unload;";
+ onLoad = "setMousePosition [0.5, 0.5];";
+
+ class Objects
+ {
+ class randomItem2 //pref less polies for starting item
+ {
+
+ idc = 77701;
+ type = 82;
+ model = "\x\addons\a3_epoch_assets\models\logo.p3d";
+ scale = 1;
+
+ direction[] = {0, -0.35, -0.65};
+ up[] = {0, 0.65, -0.35};
+
+ x = 0.8125;
+ y = 0.287782;
+ z = 1;
+
+ xBack = 0.8125;
+ yBack = 0.287782;
+ zBack = 1.2;
+
+ inBack = 1;
+ enableZoom = 0;
+ zoomDuration = 0.001;
+ };
+ };
+
+ class controls
+ {
+ //Developer menu (DISABLE ON RELEASE)
+
+ //background
+ class dev_backgrnd: IGUIBack
+ {
+ idc = 77703;
+ x = 0.710375 * safezoneW + safezoneX;
+ y = 0.224906 * safezoneH + safezoneY;
+ w = 0.0845625 * safezoneW;
+ h = 0.22001 * safezoneH;
+ colorBackground[] = {0,0,0,0.5};
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+
+ //buttons
+ class dev_btn_pic: RscPicture
+ {
+ idc = 77702;
+
+ text = "x\addons\a3_epoch_code\Data\UI\dev_mode_off.paa";
+ x = 0.795;
+ y = -0.064;
+ w = 0.2;
+ h = 0.075;
+ onLoad = "(_this select 0) ctrlShow false";
+ onMouseButtonDown = "call EPOCH_crafting_dev_toggle;";
+ };
+ class dev_btn_set: RscButton
+ {
+ idc = 77704;
+ text = "Set"; //--- ToDo: Localize;
+ x = 0.770187 * safezoneW + safezoneX;
+ y = 0.2316 * safezoneH + safezoneY;
+ w = 0.020625 * safezoneW;
+ h = 0.022 * safezoneH;
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class dev_btn_rpt: RscButton
+ {
+ idc = 77705;
+ text = "Export"; //--- ToDo: Localize;
+ x = 0.712437 * safezoneW + safezoneX;
+ y = 0.414171 * safezoneH + safezoneY;
+ w = 0.0804375 * safezoneW;
+ h = 0.022 * safezoneH;
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class dev_btn_setPos: RscButton
+ {
+ idc = 77706;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "Set Position"; //--- ToDo: Localize;
+ x = 0.712575 * safezoneW + safezoneX;
+ y = 0.384407 * safezoneH + safezoneY;
+ w = 0.0804375 * safezoneW;
+ h = 0.022 * safezoneH;
+ };
+ class dev_btn_vectorPlus: RscButton
+ {
+ idc = 77707;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "+"; //--- ToDo: Localize;
+ x = 0.778437 * safezoneW + safezoneX;
+ y = 0.266721 * safezoneH + safezoneY;
+ w = 0.012375 * safezoneW;
+ h = 0.022 * safezoneH;
+ action = "rmx_var_3dCtrlSpin_Vector = rmx_var_3dCtrlSpin_Vector + 0.1; (rmx_var_crafting_ctrl_DEV select 10) ctrlSetText str rmx_var_3dCtrlSpin_Vector;";
+ };
+ class dev_btn_vectorMinus: RscButton
+ {
+ idc = 77708;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "-"; //--- ToDo: Localize;
+ x = 0.73925 * safezoneW + safezoneX;
+ y = 0.266721 * safezoneH + safezoneY;
+ w = 0.012375 * safezoneW;
+ h = 0.022 * safezoneH;
+ action = "rmx_var_3dCtrlSpin_Vector = rmx_var_3dCtrlSpin_Vector - 0.1; (rmx_var_crafting_ctrl_DEV select 10) ctrlSetText str rmx_var_3dCtrlSpin_Vector;";
+ };
+ //edit
+
+ class dev_edit_scale: RscEdit
+ {
+ idc = 77709;
+ text = "1"; //--- ToDo: Localize;
+ x = 0.743375 * safezoneW + safezoneX;
+ y = 0.2316 * safezoneH + safezoneY;
+ w = 0.02475 * safezoneW;
+ h = 0.022 * safezoneH;
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class dev_edit_x: RscEdit
+ {
+ idc = 77710;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "0.123456"; //--- ToDo: Localize;
+ x = 0.748524 * safezoneW + safezoneX;
+ y = 0.2998 * safezoneH + safezoneY;
+ w = 0.0443435 * safezoneW;
+ h = 0.022 * safezoneH;
+ };
+ class dev_edit_z: RscEdit
+ {
+ idc = 77711;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "0.123456"; //--- ToDo: Localize;
+ x = 0.748948 * safezoneW + safezoneX;
+ y = 0.325807 * safezoneH + safezoneY;
+ w = 0.0443435 * safezoneW;
+ h = 0.022 * safezoneH;
+ };
+ class dev_edit_y: RscEdit
+ {
+ idc = 77712;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "0.123456"; //--- ToDo: Localize;
+ x = 0.749458 * safezoneW + safezoneX;
+ y = 0.352082 * safezoneH + safezoneY;
+ w = 0.0443435 * safezoneW;
+ h = 0.022 * safezoneH;
+ };
+ class dev_edit_vector: RscEdit
+ {
+ idc = 77713;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "0"; //--- ToDo: Localize;
+ x = 0.755234 * safezoneW + safezoneX;
+ y = 0.267601 * safezoneH + safezoneY;
+ w = 0.0195937 * safezoneW;
+ h = 0.022 * safezoneH;
+ };
+ //text
+ class dev_txt_scale: RscText
+ {
+ idc = 77714;
+ text = "Scale:"; //--- ToDo: Localize;
+ x = 0.712437 * safezoneW + safezoneX;
+ y = 0.2338 * safezoneH + safezoneY;
+ w = 0.028875 * safezoneW;
+ h = 0.0154 * safezoneH;
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class dev_txt_X: RscText
+ {
+ idc = 77715;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "X:"; //--- ToDo: Localize;
+ x = 0.712703 * safezoneW + safezoneX;
+ y = 0.303578 * safezoneH + safezoneY;
+ w = 0.028875 * safezoneW;
+ h = 0.0154 * safezoneH;
+ };
+ class dev_txt_z: RscText
+ {
+ idc = 77716;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "Z:"; //--- ToDo: Localize;
+ x = 0.712543 * safezoneW + safezoneX;
+ y = 0.329511 * safezoneH + safezoneY;
+ w = 0.028875 * safezoneW;
+ h = 0.0154 * safezoneH;
+ };
+ class dev_txt_y: RscText
+ {
+ idc = 77717;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "Y:"; //--- ToDo: Localize;
+ x = 0.712564 * safezoneW + safezoneX;
+ y = 0.356482 * safezoneH + safezoneY;
+ w = 0.028875 * safezoneW;
+ h = 0.0154 * safezoneH;
+ };
+ class dev_txt_3D: RscText //3d preview red
+ {
+ idc = 77718;
+
+ text = "";
+ x = 0.6;
+ y = 0.04;
+ w = 0.4;
+ h = 0.44;
+ colorBackground[] = {1,0,0,0.3};
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class dev_txt_Vector: RscText
+ {
+ idc = 77719;
+ onLoad = "(_this select 0) ctrlShow false";
+
+ text = "vUP:"; //--- ToDo: Localize;
+ x = 0.712437 * safezoneW + safezoneX;
+ y = 0.268921 * safezoneH + safezoneY;
+ w = 0.0226875 * safezoneW;
+ h = 0.0154 * safezoneH;
+ };
+ // ----------- MAIN GUI PART ----------- //
+ //background
+ class rmx_cUI_back: IGUIBack
+ {
+ idc = 77800;
+
+ x = 0;
+ y = 0;
+ w = 1;
+ h = 1;
+ colorBackground[] = {0,0,0,0.1};
+ onLoad = "_cl = _this select 0; _cl ctrlSetFade 1; _cl ctrlCommit 0; _cl ctrlSetFade 0; _cl ctrlCommit 1;";
+ };
+ //Buttons
+ class rmx_cUI_btn_craft: RscPicture
+ {
+ idc = 77801;
+ text = "\x\addons\a3_epoch_code\Data\UI\crafting\close.paa";
+ x = 0.9;
+ y = 0.92;
+ w = 0.1;
+ h = 0.08;
+ onLoad = "[(_this select 0),[1,0.92,0,0.08],[0.9,0.92,0.1,0.08]] call EPOCH_crafting_animate;";
+ onMouseButtonUp = "call epoch_crafting_craft;";
+ };
+ class rmx_cUI_btn_clear: RscButton
+ {
+ idc = 77802;
+ text = "X"; //--- ToDo: Localize;
+ x = 0.26;
+ y = 0.04;
+ w = 0.04;
+ h = 0.052;
+ onLoad = "[(_this select 0),[0.26,0.04,0,0],[0.26,0.04,0.04,0.052]] call EPOCH_crafting_animate;";
+ action = "(rmx_var_crafting_ctrl_Interact select 4) ctrlSetText ''; lbClear (rmx_var_crafting_ctrl_main select 1);";
+ };
+ //Progressbar
+ class rmx_cUI_pb: RscProgress
+ {
+ idc = 77803;
+ texture = "#(argb,8,8,3)color(1,1,1,1)";
+ textureExt = "";
+ colorBar[] = {1, 1, 1, 0.1};
+ colorExtBar[] = {1, 1, 1, 1};
+ colorFrame[] = {1, 1, 1, 1};
+ x = 0.6;
+ y = 0.92;
+ w = 0.3;
+ 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 );};";
+ onMouseButtonDown = "rmx_var_crafting_progressClicked = true;";
+ onMouseButtonUp = "rmx_var_crafting_progressClicked = false;";
+ };
+ //progressbar QTY
+ class rmx_cUI_txt_QTY: RscText
+ {
+ idc = 77804;
+ style = 0x02; //vcenter = 0x0c
+ text = "";
+ x = 0.6;
+ y = 0.92;
+ w = 0.3;
+ h = 0.08;
+ colorBackground[] = {0,0,0,0.2};
+ colorText[] = {1,0.6,0.01,1};
+ onLoad = "[(_this select 0),[0.6,0.92,0,0.08],[0.6,0.92,0.3,0.08]] call EPOCH_crafting_animate;";
+ };
+
+
+ //edit
+ class rmx_cUI_edit_searchField: RscEdit
+ {
+ idc = 77810;
+ text = ""; //--- ToDo: Localize;
+ x = 0.0025;
+ y = 0.04;
+ w = 0.2575;
+ h = 0.052;
+ colorBackground[] = {0,0,0,0.5};
+ onLoad = "[(_this select 0),[0.0025,0.04,0,0.052],[0.0025,0.04,0.2575,0.052]] call EPOCH_crafting_animate;";
+ };
+
+ //listboxes
+ class rmx_cUI_LB_recipes: RscListbox
+ {
+ idc = 77811;
+ x = 0;
+ y = 0.092;
+ w = 0.3;
+ h = 0.908;
+ onLoad = "[(_this select 0),[0,0.092,0.3,0],[0,0.092,0.3,0.908]] call EPOCH_crafting_animate;";
+ onLBSelChanged = "call EPOCH_crafting_LB_click;";
+ };
+ class rmx_cUI_LB_ingredients: RscListbox
+ {
+ idc = 77812;
+ x = 0.3;
+ y = 0.04;
+ w = 0.3;
+ h = 0.96;
+ onLoad = "[(_this select 0),[0.3,0.04,0.3,0],[0.3,0.04,0.3,0.96]] call EPOCH_crafting_animate;";
+ onLBDblClick = "call EPOCH_crafting_LB_doubleClick;";
+ };
+
+ //Structured Text
+
+ class rmx_cUI_st_description: RscStructuredText
+ {
+ idc = 77820;
+ text = "..............................."; //--- ToDo: Localize;
+ x = 0.6;
+ y = 0.524;
+ w = 0.4;
+ h = 0.392;
+ colorBackground[] = {0,0,0,0};
+ };
+
+ //Text
+ class rmx_cUI_txt_recipes: RscText
+ {
+ idc = 77840;
+
+ text = "Recipes"; //--- ToDo: Localize;
+ x = 0;
+ y = 0;
+ w = 0.3;
+ h = 0.04;
+ colorBackground[] = {0,0,0,0.8};
+ onLoad = "[(_this select 0),[0,0,0,0.04],[0,0,0.3,0.04]] call EPOCH_crafting_animate;";
+ };
+
+ class rmx_cUI_txt_ingredients: RscText
+ {
+ idc = 77841;
+
+ text = "Ingredients"; //--- ToDo: Localize;
+ x = 0.3;
+ y = 0;
+ w = 0.2975;
+ h = 0.04;
+ colorBackground[] = {0,0,0,0.8};
+ onLoad = "[(_this select 0),[0.3,0,0,0.04],[0.3,0,0.2975,0.04]] call EPOCH_crafting_animate;";
+ };
+ class rmx_cUI_txt_preview: RscText
+ {
+ idc = 77842;
+
+ text = "Preview"; //--- ToDo: Localize;
+ x = 0.6;
+ y = 0;
+ w = 0.3975;
+ h = 0.04;
+ colorBackground[] = {1,0.6,0.01,0.8};
+ onLoad = "[(_this select 0),[0.6,0,0,0.04],[0.6,0,0.3975,0.04]] call EPOCH_crafting_animate;";
+ };
+ class rmx_cUI_txt_resources: RscText
+ {
+ idc = 77843;
+
+ text = "Resources"; //--- ToDo: Localize;
+ x = 0.3;
+ y = 0.96;
+ w = 0.2975;
+ h = 0.04;
+ colorBackground[] = {0,0,0,0.8};
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class rmx_cUI_txt_description: RscText
+ {
+ idc = 77844;
+
+ text = "Description"; //--- ToDo: Localize;
+ x = 0.6;
+ y = 0.48;
+ w = 0.3975;
+ h = 0.04;
+ colorBackground[] = {0,0,0,0.8};
+ onLoad = "[(_this select 0),[0.6,0.48,0,0.04],[0.6,0.48,0.3975,0.04]] call EPOCH_crafting_animate;";
+ };
+ //frames
+ class rmx_cUI_frame_recipes: RscFrame
+ {
+ idc = 77830;
+ x = 0;
+ y = 0;
+ w = 0.3;
+ h = 1;
+ };
+ class rmx_cUI_frame_craft: RscFrame
+ {
+ idc = 77831;
+ x = 0.3;
+ y = 0;
+ w = 0.3;
+ h = 1;
+ };
+
+ class rmx_cUI_frame_preview: RscFrame
+ {
+ idc = 77832;
+ x = 0.6;
+ y = 0;
+ w = 0.4;
+ h = 0.48;
+ };
+ class rmx_cUI_frame_resources: RscFrame
+ {
+ idc = 77833;
+ x = 0.3;
+ y = 0.92;
+ w = 0.3;
+ h = 0.08;
+ onLoad = "(_this select 0) ctrlShow false";
+ };
+ class rmx_cUI_frame_description: RscFrame
+ {
+ idc = 77834;
+ x = 0.6;
+ y = 0.48;
+ w = 0.4;
+ h = 0.44;
+ };
+ class rmx_cUI_frame_qty: RscFrame
+ {
+ idc = 77835;
+ x = 0.6;
+ y = 0.92;
+ w = 0.4;
+ h = 0.08;
+ };
+ };
+};
+
class RscCustomProgress : RscProgress
{
texture = "";
@@ -231,7 +775,33 @@ class RscTitles
};
};
};
-
+ class rmx_progressTest
+ {
+ idd = 10200;
+ duration = 999999;
+ fadein = 0.5;
+ fadeout = 0.5;
+ onLoad = "uiNamespace setVariable ['rmx_var_progressTestDisplay',_this select 0]";
+
+ class controls {};
+ };
+ class rmx_CraftingProgress
+ {
+ idd = 10100;
+ duration = 999999;
+ fadein = 0.2;
+ fadeout = 0.2;
+ onLoad = "uiNamespace setVariable ['rmx_var_CraftingProgressDisplay',_this select 0]";
+
+ class controls {};
+ };
+ class Default //use to delete title resources
+ {
+ idd = -1;
+ fadein = 0;
+ fadeout = 0;
+ duration = 0;
+ };
};
/*
@@ -1693,7 +2263,7 @@ class InteractBaseBuilding
*/
};
};
-
+/*
class InteractItem
{
idd = -15;
@@ -2256,7 +2826,7 @@ class InteractItem
};
};
-
+*/
class Trade
{
idd = -1900;
@@ -2546,6 +3116,7 @@ class RscDisplayInventory_DLCTemplate
};
};
};
+
class RscDisplayInventory
{
@@ -3246,10 +3817,8 @@ class RscDisplayInventory
class UniformContainer : GroundContainer
{
- onLBDblClick = "_this call EPOCH_itemInteract";
+ //onLBDblClick = "_this call EPOCH_itemInteract";
onLBSelChanged = "_this call EPOCH_itemInteractV2";
- onLBDrag = "";
- onLBSelChanged = "";
idc = 633;
x = "15.1 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
@@ -3384,13 +3953,13 @@ class RscDisplayInventory
class EpochBtnBG : IGUIBack
{
idc = -10;
- /*
+
- x = 0.433468 * safezoneW + safezoneX;
- y = 0.75872 * safezoneH + safezoneY;
- w = 0.30231 * safezoneW;
- h = 0.0337482 * safezoneH;
- */
+ //x = 0.433468 * safezoneW + safezoneX;
+ //y = 0.75872 * safezoneH + safezoneY;
+ //w = 0.30231 * safezoneW;
+ //h = 0.0337482 * safezoneH;
+
x = "14.5 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "23.9 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "24.5 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@@ -3403,12 +3972,12 @@ class RscDisplayInventory
idc = -11;
text = "Group Menu";
onMouseButtonDown = "_this call EPOCH_Inventory_Group";
- /*
- x = 0.437079 * safezoneW + safezoneX;
- y = 0.764 * safezoneH + safezoneY;
- w = 0.0711741 * safezoneW;
- h = 0.022 * safezoneH;
- */
+
+ //x = 0.437079 * safezoneW + safezoneX;
+ //y = 0.764 * safezoneH + safezoneY;
+ //w = 0.0711741 * safezoneW;
+ //h = 0.022 * safezoneH;
+
x = "33.2 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@@ -3419,12 +3988,12 @@ class RscDisplayInventory
idc = -12;
text = "Requests";
onMouseButtonDown = "_this call EPOCH_Inventory_iGroup";
- /*
- x = 0.511347 * safezoneW + safezoneX;
- y = 0.764 * safezoneH + safezoneY;
- w = 0.0711741 * safezoneW;
- h = 0.022 * safezoneH;
- */
+
+ //x = 0.511347 * safezoneW + safezoneX;
+ //y = 0.764 * safezoneH + safezoneY;
+ //w = 0.0711741 * safezoneW;
+ //h = 0.022 * safezoneH;
+
x = "27.0 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@@ -3435,12 +4004,12 @@ class RscDisplayInventory
idc = -13;
text = "EXAMINE";
onMouseButtonDown = "call EPOCH_consumeItem";
- /*
- x = 0.585617 * safezoneW + safezoneX;
- y = 0.764 * safezoneH + safezoneY;
- w = 0.0711741 * safezoneW;
- h = 0.022 * safezoneH;
- */
+
+ //x = 0.585617 * safezoneW + safezoneX;
+ //y = 0.764 * safezoneH + safezoneY;
+ //w = 0.0711741 * safezoneW;
+ //h = 0.022 * safezoneH;
+
x = "14.62 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
@@ -3450,13 +4019,13 @@ class RscDisplayInventory
{
idc = -14;
text = "CRAFT";
- onMouseButtonDown = "true call EPOCH_itemInteract";
- /*
- x = 0.659883 * safezoneW + safezoneX;
- y = 0.764 * safezoneH + safezoneY;
- w = 0.0711741 * safezoneW;
- h = 0.022 * safezoneH;
- */
+ onMouseButtonDown = "EPOCH_CraftingItem call EPOCH_crafting_load;";
+
+ //x = 0.659883 * safezoneW + safezoneX;
+ //y = 0.764 * safezoneH + safezoneY;
+ //w = 0.0711741 * safezoneW;
+ //h = 0.022 * safezoneH;
+
x = "20.8 * ( ((safezoneW / safezoneH) min 1.2) / 40) + (safezoneX + (safezoneW - ((safezoneW / safezoneH) min 1.2))/2)";
y = "24 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) + (safezoneY + (safezoneH - ( ((safezoneW / safezoneH) min 1.2) / 1.2))/2)";
w = "6 * ( ((safezoneW / safezoneH) min 1.2) / 40)";
diff --git a/Sources/epoch_code/gui/scripts/Epoch_3DctrlPitchYaw.sqf b/Sources/epoch_code/gui/scripts/Epoch_3DctrlPitchYaw.sqf
new file mode 100644
index 00000000..4101b66f
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/Epoch_3DctrlPitchYaw.sqf
@@ -0,0 +1,25 @@
+/*
+ Spins 3D dialog along X and Z axis following mouse input
+ Requires source control to read coords from and destination 3D control
+ Can be applied to 3D control itself, but not recommended, pref use transparent rscPicture (enable it).
+ _ctrl ctrlSetEventHandler ["MouseMoving", "[_this,control3D] call Epoch_3DctrlPitchYaw"];
+*/
+params ["_arr","_ctrl3D"];
+
+disableSerialization;
+
+_inX = (_arr select 2) * 720;
+_inY = (_arr select 1) * 720;
+
+_dirY = cos _inX;
+_upY = -sin _inX;
+
+_dirX = -(_dirY * sin _inY);
+_dirY = _dirY * cos _inY;
+
+_upX = -(_upY * sin _inY);
+_upY = _upY * cos _inY;
+
+_ctrl3D ctrlSetModelDirAndUp [[_dirX,_dirY,sin _inX],[_upX,_upY,cos _inX]];
+
+true
diff --git a/Sources/epoch_code/gui/scripts/Epoch_3DctrlSpin.sqf b/Sources/epoch_code/gui/scripts/Epoch_3DctrlSpin.sqf
new file mode 100644
index 00000000..210a5b79
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/Epoch_3DctrlSpin.sqf
@@ -0,0 +1,25 @@
+/*
+ Spins a 3D dialog
+ [control] call epoch_3DctrlSpin;
+*/
+
+_this spawn {
+ disableSerialization;
+ params ["_ctrl3D"];
+ rmx_var_3dCtrlSpin = true;
+
+ _ctrlPos = ctrlPosition _ctrl3D;
+
+ if (isNil "rmx_var_3dCtrlSpin_Vector") then {rmx_var_3dCtrlSpin_Vector = 0;};
+
+ while {rmx_var_3dCtrlSpin} do {
+ for "_i" from 0 to 360 do {
+
+ _vector = (360 - _i) - 360;
+ _ctrl3D ctrlSetModelDirAndUp [[-(sin _vector),cos _vector,0],[cos _vector * rmx_var_3dCtrlSpin_Vector,sin _vector * rmx_var_3dCtrlSpin_Vector,1]];
+ if !(rmx_var_3dCtrlSpin) exitWith{};
+ uiSleep 0.01;
+ };
+ };
+};
+true
diff --git a/Sources/epoch_code/gui/scripts/Epoch_3DctrlYaw.sqf b/Sources/epoch_code/gui/scripts/Epoch_3DctrlYaw.sqf
new file mode 100644
index 00000000..9464ce59
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/Epoch_3DctrlYaw.sqf
@@ -0,0 +1,17 @@
+/*
+ Spins 3D dialog along Z axis following mouse input
+
+ Requires source control to read coords from and destination 3D control
+ Can be applied to 3D control itself, but not recommended, pref use transparent rscPicture (enable it).
+ _ctrl ctrlSetEventHandler ["MouseMoving", "[_this,control3D] call Epoch_3DctrlPitchYaw"];
+*/
+params ["_arr","_ctrl3D"];
+
+disableSerialization;
+
+_inX = (_arr select 2) * 180;
+_inY = (_arr select 1) * 180;
+
+_ctrl3D ctrlSetModelDirAndUp [[-(cos _inX * sin _inY),cos _inX * cos _inY,0],[0,0,1]];
+
+true
diff --git a/Sources/epoch_code/gui/scripts/Epoch_dynamicMenu.sqf b/Sources/epoch_code/gui/scripts/Epoch_dynamicMenu.sqf
new file mode 100644
index 00000000..4c5d0105
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/Epoch_dynamicMenu.sqf
@@ -0,0 +1,138 @@
+//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
+//TODO: unlimited categories
+//TODO: functionize var Defines, do check before button action
+//TODO: nil before closing display
+//TODO: add commented out dialog version to display
+//TODO: add cooldown
+//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 {};
+
+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;
+
+rmx_var_dynamicMenuInProgress = true; //needed to suspend button spam, removed later
+
+_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;
+
+/** Variable Defines **/
+{
+ call compile (format ["%1 = %2;",configName _x,getText _x]);
+} count (configProperties [(_cfg >> "cfgDynamicMenu" >> "variableDefines"),"true",false]);
+
+_cat = if (rmx_var_dynamicMenuCat isEqualTo "") then {
+ (_cfg >> "cfgDynamicMenu" >> "dynaButtons")
+ } else {
+ (_cfg >> "cfgDynamicMenu" >> "dynaButtons" >> rmx_var_dynamicMenuCat)
+ };
+
+/** Button configs **/
+_buttonSettings = [];
+
+_configs = "true" configClasses (_cat);
+{
+ if (call compile (getText(_x >> "condition"))) then {
+
+ _subclasses = configProperties [_x, "isClass _x",true];
+
+ _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")])
+ };
+ //diag_log _action;
+ _buttonSettings pushBack [
+ getText(_x >> "icon"),
+ getText(_x >> "tooltip"),
+ _action
+ ];
+ };
+} forEach _configs;
+
+_entries = count _buttonSettings;
+if (_entries <= 0) exitWith {rmx_var_tabmenu = true; rmx_var_dynamicMenuInProgress = nil;};
+
+//Post processing
+if (isNil "rmx_var_dynamenuPPHandle") then {
+ rmx_var_dynamenuPPHandle = ["dynamicBlur",10] call epoch_postProcessCreate;
+ [rmx_var_dynamenuPPHandle, 1, [1]] call epoch_postprocessAdjust;
+};
+
+_img = "#(rgb,8,8,3)color(0,0,0,0)";
+_img2 = "x\addons\a3_epoch_code\Data\UI\buttons\dm_selection.paa";
+
+//defaults don't edit
+_center = 0.5;
+_defaultScaleX = 0.4;
+_defaultScaleY = 0.5;
+_distance = 0.7 + _entries / 100;
+
+//edit scaling here (divisor only, larger values produce smaller image)
+_scaleLargeX = _defaultScaleX / (1.5 + _entries / 10); //anim invisible
+_scaleLargeY = _defaultScaleY / (1.5 + _entries / 10);
+_scaleSmallX = _defaultScaleX / (2.5 + _entries / 10); //icons
+_scaleSmallY = _defaultScaleY / (2.5 + _entries / 10);
+_scaleSelectedX = _defaultScaleX / (1.75 + _entries / 10); //anim selected
+_scaleSelectedY = _defaultScaleY / (1.75 + _entries / 10);
+
+_points = 360 / _entries;
+
+_positions = [];
+_positions2 = [];
+_positions3 = [];
+for "_p" from 0 to 360 step _points do {
+
+ _x = cos _p * (0.3 * _distance);
+ _y = sin _p * (0.4 * _distance);
+
+ _positions pushBack [_x + (_center - (_scaleLargeX / 2)),_y + (_center - (_scaleLargeY / 2)),_scaleLargeX,_scaleLargeY];
+ _positions2 pushBack [_x + (_center - (_scaleSmallX / 2)),_y + (_center - (_scaleSmallY / 2)),_scaleSmallX,_scaleSmallY];
+ _positions3 pushBack [_x + (_center - (_scaleSelectedX / 2)),_y + (_center - (_scaleSelectedY / 2)),_scaleSelectedX,_scaleSelectedY];
+};
+
+rmx_var_controls = [];
+//_buttonSettings [icon,tooltip,action]
+for "_e" from 0 to (_entries - 1) do {
+ private ["_ctrl","_ctrl2"];
+ _ctrl = _display ctrlCreate ["rmx_rscPicture",(66600 + _e)];
+ _ctrl ctrlSetText _img;
+ _ctrl ctrlSetPosition (_positions select _e);
+ _ctrl ctrlCommit 0.1;
+ _ctrl ctrlSetTooltip (_buttonSettings select _e select 1);
+
+ _ctrl ctrlSetTooltipColorBox [0, 0, 0, 0];
+ _ctrl ctrlSetTooltipColorShade [0, 0, 0, 0];
+ _ctrl ctrlSetEventHandler ["mouseEnter", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img2,(_positions3 select _e)])];
+ _ctrl ctrlSetEventHandler ["mouseExit", (format ["_c = _this select 0; _c ctrlSetText '%1'; _c ctrlSetPosition %2; _c ctrlCommit 0.3;",_img,(_positions select _e)])];
+ _ctrl ctrlSetEventHandler ["mouseButtonDown", (format ["call %1;",(_buttonSettings select _e select 2)])];
+ _ctrl ctrlEnable true;
+
+ _ctrl2 = _display ctrlCreate ["rmx_rscPicture",-(66600 + _e)];
+ _ctrl2 ctrlSetTooltip (_buttonSettings select _e select 1);
+ _ctrl2 ctrlSetTooltipColorBox [0, 0, 0, 0];
+ _ctrl2 ctrlSetTooltipColorShade [0, 0, 0, 0];
+ _ctrl2 ctrlSetText (_buttonSettings select _e select 0);
+ _ctrl2 ctrlSetPosition (_positions2 select _e);
+ _ctrl2 ctrlCommit 0.1;
+
+ rmx_var_controls pushBack _ctrl;
+ rmx_var_controls pushBack _ctrl2;
+};
+
+/** Variable Cleanup **/
+{
+ call compile (format ["%1 = nil;",configName _x]);
+} count (configProperties [(_cfg >> "cfgDynamicMenu" >> "variableDefines"),"true",false]);
+rmx_var_dynamicMenuInProgress = nil;
+rmx_var_dynamicMenuCat = "";
+true
diff --git a/Sources/epoch_code/gui/scripts/Epoch_dynamicMenuCleanup.sqf b/Sources/epoch_code/gui/scripts/Epoch_dynamicMenuCleanup.sqf
new file mode 100644
index 00000000..3c17afe5
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/Epoch_dynamicMenuCleanup.sqf
@@ -0,0 +1,31 @@
+_test = param [1,0];
+if (_test != 57) exitWith {true}; //dirty fix, TODO: read values from epoch startup vars for key
+
+_this spawn {
+ if !(isNil "rmx_var_dynamicMenuInProgress") exitWith {};
+ _args = param [0,false,[false]]; //true if redirected with category, false for full cleanup
+
+ if (_args) then {rmx_var_dynamicMenuHOLD = true;} else {rmx_var_dynamicMenuHOLD = nil; rmx_var_dynamicMenuCat = nil;};
+
+ disableSerialization;
+ private "_animSpeed";
+ _animSpeed = 0.1;
+ {
+ _x ctrlSetPosition [0.4625,0.45,0.075,0.1];
+ _x ctrlSetFade 1;
+ _x ctrlCommit _animSpeed;
+ } forEach rmx_var_controls;
+
+ [rmx_var_dynamenuPPHandle, _animSpeed, [0]] call epoch_postprocessAdjust;
+
+ uiSleep _animSpeed;
+
+ findDisplay 66600 closeDisplay 1;
+
+ rmx_var_controls = nil;
+
+ rmx_var_dynamenuPPHandle call epoch_postprocessDestroy;
+ rmx_var_dynamenuPPHandle = nil;
+};
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_click.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_click.sqf
new file mode 100644
index 00000000..c5c46592
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_click.sqf
@@ -0,0 +1,94 @@
+if (rmx_var_crafting_SearchConfigData isEqualTo []) exitWith {false};
+
+private ["_cfg","_ingredientCTRL","_STdesc","_3DCTRL","_selection","_ingredientData","_recipes","_usedIn","_nearbyCount","_idx","_data","_countData","_itemsPlayer","_itemsNearby","_itemsRequired","_lbColor"];
+
+_cfg = 'CfgCrafting' call EPOCH_returnConfig;
+_ingredientCTRL = rmx_var_crafting_ctrl_main select 1;
+_STdesc = rmx_var_crafting_ctrl_main select 2;
+_3DCTRL = rmx_var_crafting_ctrl_DEVMisc select 0;
+_selection = lbCurSel (rmx_var_crafting_ctrl_main select 0);
+_ingredientData = rmx_var_crafting_SearchConfigData select _selection;
+_recipes = _ingredientData select 7;
+_usedIn = _ingredientData select 9;
+
+_nearbyCount = []; //required
+
+lbClear _ingredientCTRL;
+
+if !(_recipes isEqualTo []) then {
+ _nearbyCount = [_recipes] call EPOCH_crafting_checkGear;
+ _idx = _ingredientCTRL lbAdd (rmx_var_crafting_colorScheme select 8 select 0);
+ _ingredientCTRL lbSetColor [_idx,(rmx_var_crafting_colorScheme select 8 select 1)];
+ {
+ if !(typeName _x isEqualTo typeName []) then {_x = [_x,1]};
+ _data = ([(_cfg >> (_x select 0))] call EPOCH_crafting_getConfig) select 0;
+ _idx = _ingredientCTRL lbAdd format ["%2 x %1",(_data select 1),_x select 1];
+ _ingredientCTRL lbSetPictureRight [_idx,(_data select 2)];
+ _ingredientCTRL lbSetData [_idx, (_data select 1)];
+
+ _countData = _nearbyCount select _forEachIndex;
+ _itemsPlayer = _countData select 0;
+ _itemsNearby = _countData select 1;
+ _itemsRequired = _countData select 2;
+ _ingredientCTRL lbSetTooltip [_idx,format ["On player: [%1/%2], Nearby: [%3/%2], Crafting time: %4 second(s)",_itemsPlayer,_itemsRequired,_itemsNearby,_ingredientData select 6]];
+
+ _lbColor = if (_itemsPlayer >= _itemsRequired) then {
+ rmx_var_crafting_colorScheme select 11
+ } else {
+ if (_itemsNearby >= _itemsRequired) then {
+ rmx_var_crafting_colorScheme select 12
+ } else {
+ rmx_var_crafting_colorScheme select 13
+ };
+ };
+ _ingredientCTRL lbSetColor [_idx,_lbColor];
+
+ } forEach _recipes;
+};
+if !(_usedIn isEqualTo []) then {
+ _ingredientCTRL lbAdd "";
+ _idx = _ingredientCTRL lbAdd (rmx_var_crafting_colorScheme select 9 select 0);
+ _ingredientCTRL lbSetColor [_idx,(rmx_var_crafting_colorScheme select 9 select 1)];
+
+ {
+ if !(typeName _x isEqualTo typeName []) then {_x = [_x,1]};
+ _data = ([(_cfg >> (_x select 0))] call EPOCH_crafting_getConfig) select 0;
+ _idx = _ingredientCTRL lbAdd format ["%2 x %1",(_data select 1),_x select 1];
+ _ingredientCTRL lbSetPictureRight [_idx,(_data select 2)];
+ _ingredientCTRL lbSetData [_idx, (_data select 1)];
+ _ingredientCTRL lbSetColor [_idx,(rmx_var_crafting_colorScheme select 14)];
+ _ingredientCTRL lbSetTooltip [_idx,"Double click to search for this item"];
+ } forEach _usedIn;
+};
+_STdesc ctrlSetStructuredText (composeText [(_ingredientData select 3),parseText "
",parseText(_ingredientData select 14)]);
+
+_3DCTRL ctrlSetModel (_ingredientData select 4);
+_3DCTRL ctrlSetPosition (_ingredientData select 10);
+_3DCTRL ctrlSetModelScale (_ingredientData select 11);
+rmx_var_3dCtrlSpin_Vector = (_ingredientData select 12);
+
+ctrlSetFocus _ingredientCTRL;
+(rmx_var_crafting_ctrl_Interact select 2) progressSetPosition 0;
+
+//Crafting quantity math
+rmx_var_craftQTY = if !(_nearbyCount isEqualTo []) then {
+ private ["_c","_p","_r","_arr"];
+ _c = 1e39; //infinite
+ {
+ _p = _x select 0;
+ _r = _x select 2;
+ if (_p < _r) exitWith {_c = 0};
+ _c = _c min (_p / _r);
+ } forEach _nearbyCount;
+ floor _c
+} else { 0 };
+
+true call EPOCH_crafting_checkResources;
+
+if (ctrlShown (rmx_var_crafting_ctrl_DEV select 0)) then {
+ call rmx_fnc_crafting3DPosText;
+ (rmx_var_crafting_ctrl_DEV select 6) ctrlSetText str (_ingredientData select 11); //scale
+ (rmx_var_crafting_ctrl_DEV select 10) ctrlSetText str (_ingredientData select 12); //vector
+};
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_defaults.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_defaults.sqf
new file mode 100644
index 00000000..bca09b8c
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_defaults.sqf
@@ -0,0 +1,32 @@
+private ["_recipeCTRL","_STdesc","_lbColor","_playerGear"];
+
+_recipeCTRL = rmx_var_crafting_ctrl_main select 0;
+_STdesc = rmx_var_crafting_ctrl_main select 2;
+_lbColor = rmx_var_crafting_colorScheme select 10;
+
+lbClear _recipeCTRL;
+_playerGear = (magazines player) + (items player) + (weapons player);
+{
+ _idx = if (_x select 0 in _playerGear) then {
+ _y = _x select 0;
+ _idx = _recipeCTRL lbAdd format (["%1x %2",({_x == _y}count _playerGear),(_x select 1)]);
+ _recipeCTRL lbSetColor [_idx,_lbColor];
+ _idx
+ } else {
+ _recipeCTRL lbAdd (_x select 1)
+ };
+ _recipeCTRL lbSetPictureRight [_idx,(_x select 2)];
+ _recipeCTRL lbSetData [_idx,(_x select 0)];
+} forEach rmx_var_crafting_SearchConfigData;
+
+_STdesc ctrlSetStructuredText composeText
+[
+ parseText "Search: Find recipe, X to clear.
",
+ parseText "Recipes: Select an item to craft.
",
+ parseText "Ingredients: Items required to craft.
",
+ parseText "Quantity: Move slider to set amount.
",
+ parseText "
TIP: Double click an item inside ingredients list to find recipe for it.
",
+ parseText "
www: EpochMod.com"
+];
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_doubleClick.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_doubleClick.sqf
new file mode 100644
index 00000000..f0d4fd31
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_LB_doubleClick.sqf
@@ -0,0 +1,7 @@
+private ["_idx","_txt"];
+
+_idx = lbCurSel (rmx_var_crafting_ctrl_main select 1);
+_txt = (rmx_var_crafting_ctrl_main select 1) lbData _idx;
+(rmx_var_crafting_ctrl_Interact select 4) ctrlSetText _txt;
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_animate.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_animate.sqf
new file mode 100644
index 00000000..2e2ca914
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_animate.sqf
@@ -0,0 +1,9 @@
+
+params ["_ctrl","_first","_second",["_speed",0.5]];
+
+_ctrl ctrlSetPosition _first;
+_ctrl ctrlCommit 0;
+_ctrl ctrlSetPosition _second;
+_ctrl ctrlCommit _speed;
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkGear.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkGear.sqf
new file mode 100644
index 00000000..29f2d8b6
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkGear.sqf
@@ -0,0 +1,22 @@
+private ["_recipes","_nearObjects","_near","_out","_player","_recipe","_cP","_cN"];
+params ["_recipes"];
+
+_nearObjects = nearestObjects [position player,["WeaponHolder","LandVehicle","Air"],10];
+
+_near = []; _out = [];
+{
+ _near append magazineCargo _x;
+ _near append itemCargo _x;
+ _near append weaponCargo _x;
+} forEach _nearObjects;
+
+_player = (magazines player) + (items player) + (weapons player);
+
+{
+ _recipe = if (typeName _x isEqualTo "STRING") then {[_x,1]} else {_x};
+ _cP = {_x == (_recipe select 0)} count _player;
+ _cN = {_x == (_recipe select 0)} count _near;
+ _out pushBack [_cP, _cN, _recipe select 1];
+} forEach _recipes;
+
+_out
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkNearby.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkNearby.sqf
new file mode 100644
index 00000000..d3eab12a
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkNearby.sqf
@@ -0,0 +1,46 @@
+private ["_arr","_type","_check","_dist","_cnt","_inflamed","_alive","_nearObjects","_result"];
+_arr = param [3,[2,""]];
+_type = _arr select 0;
+_check = _arr select 1;
+_dist = param [4,0];
+_cnt = param [5,1];
+_inflamed = param [6,0];
+_alive = param [7,0];
+_result = true;
+
+switch (_type) do {
+ case 0:
+ {
+ private ["_test1","_test2","_find"];
+ _nearObjects = nearestObjects [player, [], _dist];
+ _test1 = 0;
+ {
+ _test2 = _x;
+ _find = {(str _x find _test2) != -1} count _nearObjects;
+ _test1 = _test1 + _find;
+ } forEach _check;
+
+ _result = (_cnt <= _test1);
+ };
+ case 1:
+ {
+ _nearObjects = nearestObjects [player, _check, _dist];
+ _result = (_cnt <= (count _nearObjects));
+ };
+};
+
+if !(_result) exitWith {false}; //not enough objects
+
+if (_inflamed > 0) then {
+ _countOnFire = 0;
+ _countOnFire = {inflamed _x} count _nearObjects;
+ _result = (_cnt <= _countOnFire);
+};
+if !(_result) exitWith {false};
+
+if (_alive > 0) then {
+ _countAlive = 0;
+ _countAlive = {alive _x} count _nearObjects;
+ _result = (_cnt <= _countAlive);
+};
+_result
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkResources.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkResources.sqf
new file mode 100644
index 00000000..5006d051
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_checkResources.sqf
@@ -0,0 +1,93 @@
+private ["_in","_out","_cfg","_selection","_nearbyArr"];
+params [["_in",false,[true]]];
+
+//Defines
+_out = true;
+_cfg = 'CfgCrafting' call EPOCH_returnConfig;
+_selection = lbCurSel (rmx_var_crafting_ctrl_main select 0);
+_nearbyArr = rmx_var_crafting_SearchConfigData select _selection select 8;
+
+//check nearby resources only, requires false args
+if !(_in) exitWith {
+ if !(_nearbyArr isEqualTo []) then { //just to be safe
+ {
+ _out = _x call EPOCH_crafting_checkNearby;
+ if !(_out) exitWith {};
+ } forEach _nearbyArr;
+ };
+ _out
+};
+
+disableSerialization;
+private ["_display","_ncGroup","_ncCFrame","_ncRFrame","_ncRText","_ncCLB"];
+_display = findDisplay 77700;
+
+if (isNil "rmx_var_crafting_ctrl_GROUP") then {
+ rmx_var_crafting_ctrl_GROUP = [_display ctrlCreate ["rmx_rscControlsGroup",77821]];
+} else {
+ ctrlDelete (rmx_var_crafting_ctrl_GROUP select 0);
+ rmx_var_crafting_ctrl_GROUP = [_display ctrlCreate ["rmx_rscControlsGroup",77821]];
+};
+
+_ncCFrame = rmx_var_crafting_ctrl_main select 3;
+_ncRFrame = rmx_var_crafting_ctrl_main select 4;
+_ncRText = rmx_var_crafting_ctrl_main select 5;
+_ncCLB = rmx_var_crafting_ctrl_main select 1;
+_ncGroup = rmx_var_crafting_ctrl_GROUP select 0;
+
+if !(_nearbyArr isEqualTo []) then {
+ _ncGroup ctrlShow true;
+ _ncRFrame ctrlShow true;
+ _ncRText ctrlShow true;
+
+ private ["_chck","_color","_img","_imgParsed","_cnt","_countTxt","_txt","_stText","_count","_h","_animSpeed"];
+ {
+ private "_ctrl";
+ _chck = _x call EPOCH_crafting_checkNearby;
+ if !(_chck) then {_out = false};
+
+ _color = if (_chck) then {"#00FF00"} else {"#FF0000"};
+
+ _img = if (_x select 1 isEqualTo "") then {
+ format ["\x\addons\a3_epoch_code\Data\UI\crafting\%1_%2.paa",(_x select 2),_chck]
+ } else {
+ format ["%1%2_%3",(_x select 1),(_x select 2),_chck]
+ };
+
+ _imgParsed = parseText format ["",_img];
+
+ _cnt = if ((_x select 5) < 1) then {1} else {_x select 5};
+ _countTxt = if (_cnt isEqualTo 1) then {""} else {format ["%1x",_cnt]};
+ _txt = parseText format [" %3 %2 %4m",_color,(_x select 0),_countTxt,(_x select 4)];
+
+ _stText = composeText [_imgParsed,_txt];
+
+ _ctrl = _display ctrlCreate ["RscStructuredText", -(77800 + _forEachIndex),_ncGroup];
+ _ctrl ctrlSetPosition [0,(0.08 * _forEachIndex),0.3,0.08];
+ _ctrl ctrlCommit 0;
+ _ctrl ctrlSetStructuredText _stText;
+ } forEach _nearbyArr;
+
+ _count = 8 min (count _nearbyArr); //maximum 8 of resources displayed
+ _h = 0.08 * _count;
+ _animSpeed = 0.2;
+
+ [_ncGroup, [0.3,1,0.3,0], [0.3,(1-_h),0.3,_h], _animSpeed] call EPOCH_crafting_animate;
+ [_ncCFrame, [0.3,0,0.3,1], [0.3,0,0.3,(1-_h)], _animSpeed] call EPOCH_crafting_animate;
+ [_ncRFrame, [0.3,1,0.3,0], [0.3,(0.96-_h),0.3,(_h + 0.04)],_animSpeed] call EPOCH_crafting_animate;
+ [_ncRText, [0.3,0.96,0.3,0.04], [0.3,(0.96-_h),0.3,0.04], _animSpeed] call EPOCH_crafting_animate;
+ [_ncCLB, [0.3,0.04,0.3,0.96], [0.3,0.04,0.3,(0.96-_h)], _animSpeed] call EPOCH_crafting_animate;
+
+} else {
+ _ncGroup ctrlShow false;
+ _ncRFrame ctrlShow false;
+ _ncRText ctrlShow false;
+
+ _ncCLB ctrlSetPosition [0.3,0.04,0.3,0.96];
+ _ncCLB ctrlCommit 0;
+
+ _ncCFrame ctrlSetPosition [0.3,0,0.3,1];
+ _ncCFrame ctrlCommit 0;
+};
+
+_out
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_colorScheme.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_colorScheme.sqf
new file mode 100644
index 00000000..9a8d2d98
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_colorScheme.sqf
@@ -0,0 +1,37 @@
+params ["_cfg"];
+
+rmx_var_crafting_colorScheme = getArray (_cfg >> "colorScheme");
+
+//frames
+for "_i" from 0 to 5 do {
+ (rmx_var_crafting_ctrl_colorScheme select _i) ctrlSetTextColor (rmx_var_crafting_colorScheme select 16);
+};
+
+//recipes
+(rmx_var_crafting_ctrl_colorScheme select 6) ctrlSetText (rmx_var_crafting_colorScheme select 3 select 0);
+(rmx_var_crafting_ctrl_colorScheme select 6) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 3 select 1);
+(rmx_var_crafting_ctrl_main select 0) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 18);
+
+//ingredients
+(rmx_var_crafting_ctrl_colorScheme select 7) ctrlSetText (rmx_var_crafting_colorScheme select 4 select 0);
+(rmx_var_crafting_ctrl_colorScheme select 7) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 4 select 1);
+(rmx_var_crafting_ctrl_main select 0) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 19);
+
+//preview
+(rmx_var_crafting_ctrl_colorScheme select 8) ctrlSetText (rmx_var_crafting_colorScheme select 5 select 0);
+(rmx_var_crafting_ctrl_colorScheme select 8) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 5 select 1);
+
+//resources
+(rmx_var_crafting_ctrl_colorScheme select 9) ctrlSetText (rmx_var_crafting_colorScheme select 6 select 0);
+(rmx_var_crafting_ctrl_colorScheme select 9) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 6 select 1);
+
+//description
+(rmx_var_crafting_ctrl_colorScheme select 10) ctrlSetText (rmx_var_crafting_colorScheme select 7 select 0);
+(rmx_var_crafting_ctrl_colorScheme select 10) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 7 select 1);
+(rmx_var_crafting_ctrl_main select 2) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 17);
+
+//background
+(rmx_var_crafting_ctrl_colorScheme select 11) ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 15);
+
+//QTY
+(rmx_var_crafting_ctrl_Interact select 3) ctrlSetTextColor (rmx_var_crafting_colorScheme select 23);
\ No newline at end of file
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf
new file mode 100644
index 00000000..e40194f0
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_craft.sqf
@@ -0,0 +1,73 @@
+//dialog closed
+if (!rmx_var_craftingENABLED || !rmx_var_craftingLOOPS) exitWith {rmx_var_craftInProgress = false;};
+
+//cancel craft button
+if (rmx_var_craftInProgress) exitWith {rmx_var_craftInProgress = false;};
+
+//close button
+if (rmx_var_craftQTYOut isEqualTo 0) exitWith {closeDialog 0;};
+
+//craft button
+[] spawn {
+
+ private ["_fnc_UILock","_itemCraftTime","_selection","_craftItem","_item","_itemName","_itemCraftTime","_itemRecipeItems","_itemType","_hasNearby","_canCraft","_wH","_nearByHolder","_wHPos"];
+ disableSerialization;
+
+ _fnc_UILock = {
+ private "_lock";
+ _lock = param [0,true];
+ (rmx_var_crafting_ctrl_main select 0) ctrlEnable _lock;
+ (rmx_var_crafting_ctrl_main select 1) ctrlEnable _lock;
+ (rmx_var_crafting_ctrl_Interact select 1) ctrlEnable _lock;
+ (rmx_var_crafting_ctrl_Interact select 4) ctrlEnable _lock;
+ };
+
+ rmx_var_craftInProgress = true;
+
+ _selection = lbCurSel (rmx_var_crafting_ctrl_main select 0);
+ _craftItem = rmx_var_crafting_SearchConfigData select _selection;
+ _item = _craftItem select 0;
+ _itemName = _craftItem select 1;
+ _itemCraftTime = _craftItem select 6;
+ _itemRecipeItems = _craftItem select 7;
+ _itemType = _craftItem select 13;
+
+ for "_c" from 1 to rmx_var_craftQTYOut do {
+ false call _fnc_UILock;
+ _hasNearby = false call EPOCH_crafting_checkResources;
+
+ _canCraft = [format ["Crafting: %1, %2 seconds",_itemName,_itemCraftTime],_itemCraftTime] call EPOCH_crafting_progress;
+
+ if !(_canCraft && _hasNearby && rmx_var_craftingLOOPS) exitWith {}; //{hint "Crafting canceled";};
+
+ if (player canAdd _item) then { //Puts in a weaponholder nearby if can't add to inventory
+ {
+ for "_r" from 1 to (_x select 1) do {
+ player removeItem (_x select 0); //removes any type of item, but only if not in special slots
+ };
+ } forEach _itemRecipeItems;
+
+ player addItem _item; //adds any type of item, but does not assign
+
+ } 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"];
+
+ } else {
+ _wH = _nearByHolder select 0;
+ };
+ _wh addItemCargoGlobal [_item,1];
+ };
+ call EPOCH_crafting_LB_defaults;
+ call EPOCH_crafting_LB_click;
+ };
+ true call _fnc_UILock;
+ rmx_var_craftInProgress = false;
+};
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_ctrl_collector.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_ctrl_collector.sqf
new file mode 100644
index 00000000..f725d1f6
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_ctrl_collector.sqf
@@ -0,0 +1,67 @@
+disableSerialization;
+private "_display";
+
+_display = findDisplay 77700;
+
+rmx_var_crafting_ctrl_DEVMisc = [_display displayCtrl 77701,_display displayCtrl 77702];
+
+rmx_var_crafting_ctrl_DEV = [];
+{rmx_var_crafting_ctrl_DEV set [count rmx_var_crafting_ctrl_DEV,_display displayCtrl _x];} count
+
+[
+ 77703, //bckgrnd
+ 77704, //btn setScale
+ 77705, //btn export
+ 77706, //btn setpos
+ 77707, //btn +
+ 77708, //btn - //5
+ 77709, //edit scale
+ 77710, //edit x
+ 77711, //edit z
+ 77712, //edit y
+ 77713, //edit vector //10
+ 77714,77715,77716,77717,77718,77719 //text
+
+];
+
+rmx_var_crafting_ctrl_Interact = [];
+{rmx_var_crafting_ctrl_Interact set [count rmx_var_crafting_ctrl_Interact,_display displayCtrl _x];} count
+
+[
+ 77801, //btn craft
+ 77802, //btn clear
+ 77803, //progress bar
+ 77804, //progress QTY
+ 77810 //Search field
+];
+
+rmx_var_crafting_ctrl_main = [];
+{rmx_var_crafting_ctrl_main set [count rmx_var_crafting_ctrl_main,_display displayCtrl _x];} count
+
+[
+ 77811, //LB recipes
+ 77812, //LB ingredients
+ 77820, //ST description
+ 77831, //craft frame
+ 77833, //resource frame
+ 77843 //resource text
+];
+
+rmx_var_crafting_ctrl_colorScheme = [];
+{rmx_var_crafting_ctrl_colorScheme set [count rmx_var_crafting_ctrl_colorScheme,_display displayCtrl _x];} count
+
+[
+ 77830,77831,77832,77833,77834,77835, //frames
+ 77840, //recipes
+ 77841, //ingredients
+ 77842, //preview
+ 77843, //resources
+ 77844, //description
+ 77800 //background
+];
+
+rmx_var_craftingENABLED = true;
+rmx_var_craftingLOOPS = true;
+
+
+true
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_dev_toggle.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_dev_toggle.sqf
new file mode 100644
index 00000000..78822b86
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_dev_toggle.sqf
@@ -0,0 +1,95 @@
+private ["_mainDevBtn","_3DCTRL"];
+_mainDevBtn = rmx_var_crafting_ctrl_DEVMisc select 1;
+_3DCTRL = rmx_var_crafting_ctrl_DEVMisc select 0;
+
+switch (ctrlShown (rmx_var_crafting_ctrl_DEV select 0)) do {
+ case true: //off
+ {
+ disableSerialization;
+ {
+ _x ctrlShow false;
+ } forEach rmx_var_crafting_ctrl_DEV;
+ _mainDevBtn ctrlSetText "x\addons\a3_epoch_code\Data\UI\dev_mode_off.paa";
+ _3DCTRL ctrlEnable false;
+ _3DCTRL ctrlRemoveAllEventHandlers "MouseButtonUp";
+ rmx_fnc_craftingExport = nil;
+ rmx_fnc_crafting3DPosText = nil;
+ rmx_fnc_crafting3DMove = nil;
+ };
+ case false: //on
+ {
+ disableSerialization;
+ {
+ _x ctrlShow true;
+ } forEach rmx_var_crafting_ctrl_DEV;
+ _mainDevBtn ctrlSetText "x\addons\a3_epoch_code\Data\UI\dev_mode_on.paa";
+
+ private ["_devBtnSetScale","_devBtnExport","_devBtnSetPos"];
+ _devBtnSetScale = rmx_var_crafting_ctrl_DEV select 1;
+ _devBtnExport = rmx_var_crafting_ctrl_DEV select 2;
+ _devBtnSetPos = rmx_var_crafting_ctrl_DEV select 3;
+
+ _3DCTRL ctrlEnable true;
+
+ rmx_fnc_craftingExport = {
+ private ["_ctrlPos","_curLB"];
+
+ _ctrlPos = ctrlPosition (rmx_var_crafting_ctrl_DEVMisc select 0);
+ _curLB = rmx_var_crafting_ctrl_main select 0;
+
+ //weird UI bug that outputs 1.49012e-008 if setting vector too fast
+ if (rmx_var_3dCtrlSpin_Vector < 0.1 && rmx_var_3dCtrlSpin_Vector > -0.1) then {rmx_var_3dCtrlSpin_Vector = 0;};
+
+ diag_log format [
+ "
+ << Exporting settings for [%1] >>
+
+ previewPosition[] = {%2,%3,%4};
+ previewScale = %5;
+ previewVector = %6;
+ ",
+ _curLB lbData (lbCurSel _curLB),
+ _ctrlPos select 0,
+ _ctrlPos select 1,
+ _ctrlPos select 2,
+ ctrlModelScale (rmx_var_crafting_ctrl_DEVMisc select 0),
+ rmx_var_3dCtrlSpin_Vector
+ ];
+ true
+ };
+ rmx_fnc_crafting3DPosText = {
+ private ["_3DPos","_devX","_devZ","_devY"];
+ disableSerialization;
+ _devX = rmx_var_crafting_ctrl_DEV select 7;
+ _devZ = rmx_var_crafting_ctrl_DEV select 8;
+ _devY = rmx_var_crafting_ctrl_DEV select 9;
+ _3DPos = ctrlPosition (rmx_var_crafting_ctrl_DEVMisc select 0);
+
+ _devX ctrlSetText str (_3DPos select 0);
+ _devZ ctrlSetText str (_3DPos select 1);
+ _devY ctrlSetText str (_3DPos select 2);
+ true
+ };
+ rmx_fnc_crafting3DMove = {
+ private ["_devX","_devZ","_devY"];
+ disableSerialization;
+ _devX = rmx_var_crafting_ctrl_DEV select 7;
+ _devZ = rmx_var_crafting_ctrl_DEV select 8;
+ _devY = rmx_var_crafting_ctrl_DEV select 9;
+ (rmx_var_crafting_ctrl_DEVMisc select 0) ctrlSetPosition [(call compile (ctrlText _devX)),(call compile (ctrlText _devZ)),(call compile (ctrlText _devY))];
+ true
+ };
+
+ _3DCTRL ctrlSetEventHandler ["MouseButtonUp","call rmx_fnc_crafting3DPosText;"];
+
+ _devBtnSetScale buttonSetAction
+ "
+ (rmx_var_crafting_ctrl_DEVMisc select 0) ctrlSetModelScale ( call compile ctrlText (rmx_var_crafting_ctrl_DEV select 6));
+ ";
+
+ _devBtnExport buttonSetAction "call rmx_fnc_craftingExport";
+
+ _devBtnSetPos buttonSetAction "call rmx_fnc_crafting3DMove;";
+
+ };
+};
\ No newline at end of file
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf
new file mode 100644
index 00000000..2e0c7081
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_getConfig.sqf
@@ -0,0 +1,53 @@
+/*
+ Receives array of CONFIGS
+ Returns array of items pulled
+*/
+
+private
+[
+ "_arrIn","_type0","_type1","_type2","_type3","_out","_cName","_arr","_cDisplayName","_cPicture","_cDescShort","_cModel","_cPriority",
+ "_cCTime","_cRecipeArr","_cNearbyArr","_cUsedInArr","_cPreviewArr","_cPreviewScale","_cPreviewVector","_cDescFull","_cType"
+];
+
+_arrIn = param [0,[0]];
+if !(typeName (_arrIn select 0) isEqualTo "CONFIG") exitWith {[]};
+
+_type0 = []; _type1 = []; _type2 = []; _type3 = []; _out = [];
+{
+ _cName = configName _x;
+
+ //overrides
+ _arr = [_cName,["displayName","picture","descriptionShort","model"]] call epoch_itemData;
+
+ _cDisplayName = if (isText (_x >> "displayName")) then {getText (_x >> "displayName")} else {_arr select 0};
+ _cPicture = if (isText (_x >> "picture")) then {getText (_x >> "picture")} else {_arr select 1};
+ _cDescShort = if (isText (_x >> "descriptionShort")) then {getText (_x >> "descriptionShort")} else {_arr select 2};
+ _cModel = if (isText (_x >> "model")) then {getText (_x >> "model")} else {_arr select 3};
+
+ //Basic cfg data
+ _cPriority = getNumber (_x >> "priority");
+ _cCTime = getNumber (_x >> "craftTime");
+ _cRecipeArr = getArray (_x >> "recipe");
+ _cNearbyArr = getArray (_x >> "nearby");
+ _cUsedInArr = getArray (_x >> "usedIn");
+ _cPreviewArr = getArray (_x >> "previewPosition");
+ _cPreviewScale = getNumber (_x >> "previewScale");
+ _cPreviewVector = getNumber (_x >> "previewVector");
+ _cDescFull = getText (_x >> "descriptionFull");
+ _cType = getNumber (_x >> "type");
+
+ switch (_cPriority) do {
+ case 0: {_type0 pushBack [_cName,_cDisplayName,_cPicture,_cDescShort,_cModel,_cPriority,_cCTime,_cRecipeArr,_cNearbyArr,_cUsedInArr,_cPreviewArr,_cPreviewScale,_cPreviewVector,_cType,_cDescFull]};
+ case 1: {_type1 pushBack [_cName,_cDisplayName,_cPicture,_cDescShort,_cModel,_cPriority,_cCTime,_cRecipeArr,_cNearbyArr,_cUsedInArr,_cPreviewArr,_cPreviewScale,_cPreviewVector,_cType,_cDescFull]};
+ case 2: {_type2 pushBack [_cName,_cDisplayName,_cPicture,_cDescShort,_cModel,_cPriority,_cCTime,_cRecipeArr,_cNearbyArr,_cUsedInArr,_cPreviewArr,_cPreviewScale,_cPreviewVector,_cType,_cDescFull]};
+ case 3: {_type3 pushBack [_cName,_cDisplayName,_cPicture,_cDescShort,_cModel,_cPriority,_cCTime,_cRecipeArr,_cNearbyArr,_cUsedInArr,_cPreviewArr,_cPreviewScale,_cPreviewVector,_cType,_cDescFull]};
+ };
+
+} forEach _this;
+
+_out append _type0;
+_out append _type1;
+_out append _type2;
+_out append _type3;
+
+_out
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_load.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_load.sqf
new file mode 100644
index 00000000..bb0bb279
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_load.sqf
@@ -0,0 +1,127 @@
+if (rmx_var_craftingENABLED) exitWith {false};
+disableSerialization;
+private ["_in","_cfg","_3DCTRL","_recipeCTRL","_recipeConfigs"];
+_in = param [0,""];
+
+createDialog "rmx_craftingUI";
+call EPOCH_crafting_ctrl_collector;
+
+//Var defs
+rmx_var_craftQTY = 0;
+rmx_var_craftQTYOut = 0;
+rmx_var_craftInProgress = false;
+
+//Defines
+_cfg = 'CfgCrafting' call EPOCH_returnConfig;
+
+_cfg call EPOCH_crafting_colorScheme;
+
+_3DCTRL = rmx_var_crafting_ctrl_DEVMisc select 0;
+_recipeCTRL = rmx_var_crafting_ctrl_main select 0;
+
+//First Launch
+_recipeConfigs = "true" configClasses _cfg;
+_recipeConfigs deleteRange [0,6]; //delete main templates as they are not real items
+
+rmx_var_crafting_FullConfigData = _recipeConfigs call EPOCH_crafting_getConfig;
+rmx_var_crafting_SearchConfigData = rmx_var_crafting_FullConfigData;
+
+[_3DCTRL] call Epoch_3DctrlSpin;
+_3DCTRL ctrlEnable false;
+
+call EPOCH_crafting_LB_defaults; //Default state
+
+//Basic EH setup
+if (getNumber (_cfg >> "DeveloperMode") > 0) then {
+ private "_ctrlDevMain";
+ _ctrlDevMain = rmx_var_crafting_ctrl_DEVMisc select 1;
+ _ctrlDevMain ctrlEnable true;
+ _ctrlDevMain ctrlShow true;
+};
+rmx_var_crafting_progressClicked = false;
+
+ctrlSetFocus _recipeCTRL;
+
+//puts arguments into search field
+if (typeName _in isEqualTo "STRING") then {
+ if (count _in > 0) then { //required, empty string crashes game for some reason
+ (rmx_var_crafting_ctrl_Interact select 4) ctrlSetText _in;
+ };
+};
+
+//Post Processing
+rmx_var_crafting_PP_CC = ["colorCorrections",11] call epoch_postProcessCreate;
+rmx_var_crafting_PP_DB = ["dynamicBlur",11] call epoch_postProcessCreate;
+
+[rmx_var_crafting_PP_CC, 0, [1,1,0,0,0,0,1,0,0,0,1,0,0,0,0,1,1,0,0,0,0.296494,1]] call epoch_postprocessAdjust;
+[rmx_var_crafting_PP_DB, 1, [1]] call epoch_postprocessAdjust;
+
+//Custom textures
+
+
+//Manages quantity slider
+[] spawn {
+ private ["_pos","_txt"];
+ while {rmx_var_craftingLOOPS} do {
+ _pos = progressPosition (rmx_var_crafting_ctrl_Interact select 2);
+ rmx_var_craftQTYOut = round (_pos * rmx_var_craftQTY);
+ _txt = format ["[%1/%2]",rmx_var_craftQTYOut,rmx_var_craftQTY];
+ (rmx_var_crafting_ctrl_Interact select 3) ctrlSetText _txt;
+ };
+};
+
+//Search box
+[] spawn {
+ disableSerialization;
+ private ["_searchCTRL","_searchTextTEMP"];
+ _searchCTRL = rmx_var_crafting_ctrl_Interact select 4;
+ _searchTextTEMP = "";
+
+
+ while {rmx_var_craftingLOOPS} do {
+
+ uiSleep 0.5; //speed of search, should be less or equal to unload delay
+
+ if !(_searchTextTEMP isEqualTo (ctrlText _searchCTRL)) then {
+ rmx_var_crafting_SearchConfigData = [];
+ {
+ _idx = toLower(_x select 1) find toLower (ctrlText _searchCTRL);
+ if !(_idx isEqualTo -1) then {
+ rmx_var_crafting_SearchConfigData pushBack _x;
+ };
+ } forEach rmx_var_crafting_FullConfigData;
+
+ _searchTextTEMP = ctrlText _searchCTRL;
+ call EPOCH_crafting_LB_defaults;
+ (rmx_var_crafting_ctrl_main select 0) lbSetCurSel 0;
+ };
+ };
+};
+
+//Craft button states
+[] spawn {
+ private ["_btn","_btn_cancel","_btn_craft","_btn_close"];
+ disableSerialization;
+ _btn = rmx_var_crafting_ctrl_Interact select 0;
+ _btn ctrlEnable true;
+
+ _btn_cancel = rmx_var_crafting_colorScheme select 0;
+ _btn_craft = rmx_var_crafting_colorScheme select 1;
+ _btn_close = rmx_var_crafting_colorScheme select 2;
+
+ while {rmx_var_craftingLOOPS} do {
+ uiSleep 0.1;
+
+ if (rmx_var_craftInProgress) then {
+ _btn ctrlSetText _btn_cancel;
+ } else {
+ if (rmx_var_craftQTYOut > 0) then {
+ _btn ctrlSetText _btn_craft;
+ } else {
+ _btn ctrlSetText _btn_close;
+ };
+ }
+ };
+};
+
+true
\ No newline at end of file
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_progress.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_progress.sqf
new file mode 100644
index 00000000..cace5b9f
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_progress.sqf
@@ -0,0 +1,49 @@
+if !(isNil "rmx_var_craftProgressInProgress") exitWith {false};
+rmx_var_craftProgressInProgress = true;
+
+private ["_txt","_time","_posY","_posX","_w","_h","_idc","_stColor","_out","_display","_ctrl","_ctrl2","_ctrl3","_tick"];
+disableSerialization;
+_txt = param [0,"No text"];
+_time = param [1,1];
+_posY = param [2,1.05];
+_posX = param [3,0.25];
+
+_w = 0.5;
+_h = 0.05;
+_idc = 10100;
+
+_stColor = rmx_var_crafting_colorScheme select 22;
+_out = true;
+
+_layer = str _idc call BIS_fnc_rscLayer;
+_layer cutRsc ["rmx_CraftingProgress","PLAIN",0,false];
+_display = uiNamespace getVariable "rmx_var_CraftingProgressDisplay";
+
+_ctrl = _display ctrlCreate ["RscProgress",_idc + 1];
+_ctrl ctrlSetPosition [_posX,_posY,_w,_h];
+_ctrl ctrlCommit 0;
+_ctrl ctrlSetTextColor (rmx_var_crafting_colorScheme select 20);
+
+_ctrl2 = _display ctrlCreate ["RscStructuredText",_idc + 2];
+_ctrl2 ctrlSetPosition [_posX + _w / 2 - (count _txt / 2) / 100,_posY + 0.005,_w,_h];
+_ctrl2 ctrlCommit 0;
+_ctrl2 ctrlSetStructuredText parseText format ["%1",_txt,_stColor];
+
+_ctrl3 = _display ctrlCreate ["RscText",_idc + 3];
+_ctrl3 ctrlSetPosition [_posX,_posY,_w,_h];
+_ctrl3 ctrlCommit 0;
+_ctrl3 ctrlSetBackgroundColor (rmx_var_crafting_colorScheme select 21);
+
+_tick = diag_tickTime;
+
+while {((diag_tickTime - _tick) < _time && rmx_var_craftingLOOPS) } do {
+ if !(rmx_var_craftInProgress) exitWith {_out = false;};
+ _ctrl progressSetPosition ((diag_tickTime - _tick)/_time);
+
+ uiSleep 0.01; //smoothness vs performance
+};
+
+_layer cutRsc ["Default","PLAIN"];
+rmx_var_craftProgressInProgress = nil;
+
+_out
diff --git a/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_unload.sqf b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_unload.sqf
new file mode 100644
index 00000000..3c71e01c
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/craftingv2/EPOCH_crafting_unload.sqf
@@ -0,0 +1,28 @@
+rmx_var_craftingLOOPS = false;
+rmx_var_3dCtrlSpin = false;
+//post processing fade to defaults
+[rmx_var_crafting_PP_CC, 1, [1,1,0,0,0,0,0,0,0,0,1,0,0,0,0]] call epoch_postprocessAdjust;
+[rmx_var_crafting_PP_DB, 1, [0]] call epoch_postprocessAdjust;
+
+[] spawn {
+ uiSleep 1; //delay required for loops to finish
+ rmx_var_crafting_PP_CC call epoch_postprocessDestroy;
+ rmx_var_crafting_PP_DB call epoch_postprocessDestroy;
+ rmx_var_crafting_PP_CC = nil;
+ rmx_var_crafting_PP_DB = nil;
+ rmx_var_crafting_ctrl_DEV = nil;
+ rmx_var_crafting_ctrl_Interact = nil;
+ rmx_var_crafting_ctrl_main = nil;
+ rmx_var_crafting_ctrl_colorScheme = nil;
+ rmx_var_crafting_ctrl_GROUP = nil;
+ rmx_var_crafting_progressClicked = nil;
+ rmx_var_crafting_SearchConfigData = nil;
+ rmx_var_craftQTY = nil;
+ rmx_var_craftQTYOut = nil;
+ rmx_var_craftInProgress = nil;
+ rmx_var_crafting_colorScheme = nil;
+
+ rmx_var_craftingENABLED = false;
+};
+
+true
diff --git a/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf
new file mode 100644
index 00000000..4a8e9c26
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessAdjust.sqf
@@ -0,0 +1,28 @@
+/*
+ Adjusts PP created elsewhere (or by epoch_postprocessCreate)
+
+ Params: [Handle, speed integer, Effect array]
+
+ Usage: [_handle, 2, [1]] call epoch_postprocessAdjust; //apply dynamic blur with animation of 2 seconds
+ [_handle, _speed, _effect] call epoch_postprocessAdjust;
+
+ Default Engine values:
+ colorCorrections >> [1,1,0,0,0,0,0,0,0,0,1,0,0,0,0]
+ chromAberration >> [0,0,false]
+ filmGrain >> [0,0,1,0,0,false]
+ radialBlur >> [0,0,0,0]
+ wetdistortion >> [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
+ dynamicBlur >> [0]
+ colorInversion >> [0,0,0]
+*/
+
+_handle = param [0,666];
+_animSpeed = param [1,666];
+_effect = param [2,[]];
+
+//needed because PPs have variable array sizes
+if ((_handle isEqualTo 666) || (_animSpeed isEqualTo 666) || (_effect isEqualTo [])) exitWith {hint "Wrong PPAdjust input"; false};
+
+_handle ppEffectEnable true;
+_handle ppEffectAdjust _effect;
+_handle ppEffectCommit _animSpeed;
\ No newline at end of file
diff --git a/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessCreate.sqf b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessCreate.sqf
new file mode 100644
index 00000000..f61bc6cc
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessCreate.sqf
@@ -0,0 +1,32 @@
+/*
+ Make sure to use handle to be able to delete effect later
+
+ Params: [Name of PP, Priority]
+
+ Usage: _handle = ["dynamicBlur",10] call epoch_postProcessCreate;
+ _handle = "dynamicBlur" call epoch_postProcessCreate; //not recommended, but ok for tests
+*/
+
+private ["_effect","_prioIn","_priority","_hndl"];
+
+_effect = param [0,""];
+_prioIn = param [1,0];
+
+if (_effect isEqualTo "") exitWith {hint "Wrong PPcreate input"; false};
+if !(_effect in ["colorCorrections","chromAberration","filmGrain","radialBlur","wetdistortion","dynamicBlur","colorInversion"]) exitWith {hint format ["Wrong effect - %1",_effect]; false};
+
+_priority = switch (_effect) do {
+ case "colorCorrections": {1501};
+ case "chromAberration": {201};
+ case "filmGrain": {2001};
+ case "radialBlur": {101};
+ case "wetdistortion": {301};
+ case "dynamicBlur": {401};
+ case "colorInversion": {2501};
+};
+
+_hndl = ppEffectCreate [_effect,(_priority + _prioIn)];
+_hndl ppEffectEnable false;
+
+_hndl
+
diff --git a/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessDestroy.sqf b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessDestroy.sqf
new file mode 100644
index 00000000..9bd045a4
--- /dev/null
+++ b/Sources/epoch_code/gui/scripts/post_process/EPOCH_postprocessDestroy.sqf
@@ -0,0 +1,13 @@
+/*
+ Destroys single or multiple post process effects
+
+ Params: single handle or array of handles
+
+ Usage: _handle call epoch_postprocessDestroy; //single
+ [_handle] call epoch_postprocessDestroy; //array of handles
+ [_hndl_1,_hndl_2,_hndl_3,_hndl_4] call epoch_postprocessDestroy; //array of singles
+*/
+
+if (typeName _this != typeName []) then {_this = [_this]};
+
+ppEffectDestroy _this;
\ No newline at end of file
diff --git a/Sources/epoch_code/init/client_init.sqf b/Sources/epoch_code/init/client_init.sqf
index e6193b46..4e97bd29 100644
--- a/Sources/epoch_code/init/client_init.sqf
+++ b/Sources/epoch_code/init/client_init.sqf
@@ -1,4 +1,5 @@
//Variables
+EPOCH_CraftingItem = "";
EPOCH_ESP_TARGETS = [];
EPOCH_ESPMAP_TARGETS = [];
EPOCH_ESPGROUPS = [];
diff --git a/Sources/epoch_config/Configs/CfgDynamicMenu-EXAMPLE.hpp b/Sources/epoch_config/Configs/CfgDynamicMenu-EXAMPLE.hpp
new file mode 100644
index 00000000..3a0035ed
--- /dev/null
+++ b/Sources/epoch_config/Configs/CfgDynamicMenu-EXAMPLE.hpp
@@ -0,0 +1,70 @@
+//IMPORTANT - do not add semicolons here, script takes care of it
+
+class cfgDynamicMenu
+{
+ /** GLOBAL VARIABLES ONLY - removed automatically **/
+ class variableDefines //must be global, nil when menu closes
+ {
+ dyna_cursorTarget = "cursorTarget";
+ dyna_typeOfCursorTarget = "typeOf cursorTarget";
+
+ dyna_player = "vehicle player";
+ dyna_itemsPlayer = "items player";
+ };
+
+ /** BUTTON DEFINES **/
+ class dynaButtons
+ {
+ class example /** Single button **/
+ {
+ condition = "true"; //must be value
+ action = "hint 'example button'";
+ icon = "#(rgb,8,8,3)color(1,1,1,0.5)";
+ tooltip = "example button";
+ };
+
+ class example2: example /** Single button from inherited values above **/
+ {
+ icon = "#(rgb,8,8,3)color(1,0,1,0.5)";
+ action = "systemchat 'example button 2'";
+ };
+
+ /** ------------------------------ **/
+ // Category works like a folder, when clicked, it replaces current buttons
+ // with fresh batch from it's own subclasses
+ /** ------------------------------ **/
+
+ class category_example /** Category button, add subclasses to enable this mode**/
+ {
+ condition = "true"; //must be value
+ action = "hint 'Category button 1'"; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(1,0,0,0.5)";
+ tooltip = "Category button 1";
+
+ class category_subclass_example /** Same config as the rest **/
+ {
+ condition = "true"; //must be value
+ action = "hint 'example category button 1'";
+ icon = "#(rgb,8,8,3)color(1,1,1,0.5)";
+ tooltip = "example button";
+ };
+
+ class category_subclass_example2: category_subclass_example /** Subclass inheritance **/
+ {
+ action = "hint 'example category button 2'";
+ };
+ };
+ class category_example2: category_example /** Category Inheritance, includes all buttons **/
+ {
+ action = "hint 'Category button 2'";
+ tooltip = "Category button 2";
+ class category_subclass_example2 /** REPLACE inherited button **/
+ {
+ condition = "true"; //must be value
+ action = "hint 'inherited category button replaced'";
+ icon = "#(rgb,8,8,3)color(1,1,1,0.5)";
+ tooltip = "replaced button";
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/Sources/epoch_config/Configs/CfgDynamicMenu.hpp b/Sources/epoch_config/Configs/CfgDynamicMenu.hpp
new file mode 100644
index 00000000..261c47aa
--- /dev/null
+++ b/Sources/epoch_config/Configs/CfgDynamicMenu.hpp
@@ -0,0 +1,84 @@
+//IMPORTANT - do not add semicolons here, script takes care of it
+
+class cfgDynamicMenu
+{
+ /** GLOBAL VARIABLES ONLY - removed automatically **/
+ class variableDefines //must be global, nil when menu closes
+ {
+ dyna_displayWhitelist[] = {};
+ dyna_cursorTarget = "cursorTarget";
+ dyna_typeOfCursorTarget = "typeOf cursorTarget";
+
+ dyna_player = "vehicle player";
+ dyna_itemsPlayer = "items player";
+ };
+
+ /** BUTTON DEFINES **/
+ class dynaButtons
+ {
+
+ /*
+ class close_Button_if_dialog_used_instead
+ {
+ condition = "true";
+ action = "findDisplay 66600 closeDisplay 1";
+ icon = "#(rgb,8,8,3)color(1,0,0,1)";
+ tooltip = "CLOSE";
+ };
+ */
+ class player_craftMenu
+ {
+ condition = "true";
+ action = "call EPOCH_crafting_load;";
+ icon = "x\addons\a3_epoch_code\Data\UI\buttons\build_maintain.paa";
+ tooltip = "Crafting V2";
+ };
+ class player_inspect
+ {
+ condition = "true";
+ action = "hint 'Detective is on the case'";
+ icon = "x\addons\a3_epoch_code\Data\UI\buttons\player_inspect.paa";
+ tooltip = "Examine";
+ };
+
+ class CAT_pad
+ {
+ condition = "true"; //must be value
+ action = ""; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(1,0,1,0.5)";
+ tooltip = "Main cat";
+
+ class SUB_CAT_test1
+ {
+ condition = "true"; //must be value
+ action = ""; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(1,1,1,0.5)";
+ tooltip = "Subcat1";
+
+ class SUB_CAT_test2
+ {
+ condition = "true"; //must be value
+ action = ""; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(1,0,0,0.5)";
+ tooltip = "Subcat2";
+
+ class SUB_CAT_test3
+ {
+ condition = "true"; //must be value
+ action = ""; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(0,1,1,0.5)";
+ tooltip = "Subcat3";
+
+ class SUB_CAT_test4
+ {
+ condition = "true"; //must be value
+ action = ""; //can be empty for categories
+ icon = "#(rgb,8,8,3)color(0,1,0,0.5)";
+ tooltip = "Subcat4";
+ };
+ };
+ };
+ };
+ };
+ };
+};
\ No newline at end of file
diff --git a/Sources/epoch_config/Configs/cfgCrafting.hpp b/Sources/epoch_config/Configs/cfgCrafting.hpp
index fe92758f..e00daa10 100644
--- a/Sources/epoch_config/Configs/cfgCrafting.hpp
+++ b/Sources/epoch_config/Configs/cfgCrafting.hpp
@@ -1,341 +1,742 @@
+/*
+nearby[] =
+{
+ {
+ "Fire", //Name of field, anything
+ "", //image folder path (ie "\x\addons\a3_epoch_code\Data\UI\crafting\"), empty for Epoch default
+ "fire", //image prefix, suffix will be added by code. 2 possible suffixes: [_true.paa, _false.paa]
+ {1,{"ALL"}}, //ARRAY of p3D {0,{"filename.p3d","filename.p3d"}} or ARRAY of logic classes {1,{"AIR","LAND","className"}}. Integer to switch array mode
+ 3, //distance to check in meters
+ 1, //count
+ 1, //BOOL: object has to be on fire
+ 0 //BOOL: object has to be alive (not destroyed)
+ };
+};
+
+//Can be multiple requirements like this, example requires both fire and water (unlimited, but requires mouse scroll if more than 8 elements):
+nearby[] =
+{
+ {"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0},
+ {"Water source","","water",{0,{"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}},3,1,0,0}
+};
+*/
+
class CfgCrafting
{
- class Default
+ DeveloperMode = 0; //used for 3D preview position and scale, set to 0 for live server!
+
+ //You can customize basic theme of crafting UI here:
+ colorScheme[] =
{
- usedIn[] = {};
- recipe[] = {};
- nearby[] = {};
+ "\x\addons\a3_epoch_code\Data\UI\crafting\cancel.paa",
+ "\x\addons\a3_epoch_code\Data\UI\crafting\craft.paa",
+ "\x\addons\a3_epoch_code\Data\UI\crafting\close.paa",
+
+ {"Recipes", {0,0,0,0.8}},
+ {"Ingredients", {0,0,0,0.8}},
+ {"Preview", {1,0.6,0.01,0.8}},
+ {"Resources", {0,0,0,0.8}},
+ {"Description", {0,0,0,0.8}},
+ {" -- Requires -- ", {0.99,0.53,0.03,1}},
+ {" -- Used in -- ", {0.99,0.53,0.03,1}},
+
+ {0,1,0,1}, //Recipe LB, item found
+ {0,1,0,1}, //Ingredients LB, Has items on player
+ {1,1,0,1}, //Ingredients LB, Has items nearby
+ {1,0,0,1}, //Ingredients LB, Missing items
+ {0.5,0.5,0.5,1},//Ingredients LB, Items used in...
+ {0,0,0,0.1}, //Background color
+ {0,0,0,1}, //Frame color
+ {0,0,0,0}, //description ST
+ {0,0,0,0}, //Recipe LB
+ {0,0,0,0}, //Ingredients LB
+
+ {1,1,1,1}, //progress bar
+ {0,0,0,0.3}, //progress background
+ "#FC170F", //progress text HTML color
+
+ {1,0.6,0.01,1} //QTY color
};
- // items
- class ItemCoolerE : Default
+ /** --------- Don't edit --------- **/
+ class Default //className, any object or item
{
- // usedIn[] = { "ItemCooler0", "ItemCooler1", "ItemCooler2", "ItemCooler3", "ItemCooler4" };
+ craftTime = 1; //time it takes to craft
+
+ recipe[] = {}; //nested arrays, {{"item", 1}};
+ nearby[] = {}; //nearby requirements - fire, water source, object
+ usedIn[] = {}; //item is an ingredient
+
+ previewPosition[] = {0.8125,1,0.285}; //XzY
+ previewScale = 1;
+ previewVector = 0; //vector rotation multiplier
+
+ priority = 0; //Recipe list priority, items with 0 are on top followed by order in config file.
+ type = 0; //After crafting, item is added: [0 - to inventory], [1 - in weapon holder], [2 - as vehicle]
+ descriptionFull = ""; //Structured text, added on new line after descriptionShort
+
+ /** --------- Config Overrides --------- **/
+ //displayName = "";
+ //picture = "";
+ //descriptionShort = "";
+ //model = "\x\addons\a3_epoch_assets\models\logo.p3d";
};
- class ItemCooler0 : Default
+
+ /** --------- Main templates --------- **/
+ class WeaponHolder: Default //Placed inside weaponholder in front of player (?)
+ {
+ priority = 0;
+ type = 1;
+ offset[] = {0,1,0}; //local space
+ craftTime = 10;
+ descriptionFull = "Demo: Can be used if player's inventory space is an issue";
+ };
+ class Vehicle: Default //Spawned in front of player (?)
+ {
+ priority = 0;
+ type = 2;
+ offset[] = {0,5,0}; //local space
+ craftTime = 10;
+ descriptionFull = "Demo: Should be used for vehicles only";
+ };
+ class Kit: Default //base building kits gets higher priority on the list
+ {
+ priority = 1;
+ descriptionFull = "Base building material";
+ craftTime = 4;
+ };
+ class Item: Default //Goes into inventory
+ {
+ priority = 2;
+ craftTime = 2;
+ };
+ class Part: Default //Looted part - an ingredient for other items, can't be crafted
+ {
+ priority = 3;
+ descriptionFull = "This item has no recipe, but is a part used for other recipes";
+ };
+
+ /** --------- RECIPES BELOW --------- **/
+
+ // items
+ class ItemCoolerE : Part
+ {
+ usedIn[] = { "ItemCooler0", "ItemCooler1", "ItemCooler2", "ItemCooler3", "ItemCooler4" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
+ };
+ class ItemCooler0 : Item
{
recipe[] = { "ItemCoolerE", { "SnakeMeat_EPOCH", 2 }, "sweetcorn_epoch" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
};
- class ItemCooler1 : Default
+ class ItemCooler1 : Item
{
recipe[] = { "ItemCoolerE", { "CookedRabbit_EPOCH", 2 }, "sweetcorn_epoch" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
};
- class ItemCooler2 : Default
+ class ItemCooler2 : Item
{
recipe[] = { "ItemCoolerE", "CookedChicken_EPOCH", "sweetcorn_epoch" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
};
- class ItemCooler3 : Default
+ class ItemCooler3 : Item
{
recipe[] = { "ItemCoolerE", "CookedGoat_EPOCH", "sweetcorn_epoch" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
};
- class ItemCooler4 : Default
+ class ItemCooler4 : Item
{
recipe[] = { "ItemCoolerE", "CookedSheep_EPOCH", "sweetcorn_epoch" };
+ previewPosition[] = {0.795709,1,0.415296};
+ previewScale = 0.8;
+ previewVector = 0;
};
- class CircuitParts : Default
+ class sweetcorn_epoch : Part
+ {
+ usedIn[] = {"ItemCooler0","ItemCooler1","ItemCooler2","ItemCooler3","ItemCooler4"};
+ previewPosition[] = {0.799332,1,0.26};
+ previewScale = 2.7;
+ previewVector = 0;
+ };
+ class CircuitParts : Part
{
usedIn[] = { "EnergyPack", "EnergyPackLg", "KitPlotPole" };
+ previewPosition[] = {0.791044,1,0.256956};
+ previewScale = 2;
+ previewVector = 2.3;
};
- class EnergyPack : Default
+ class EnergyPack : Item
{
usedIn[] = { "EnergyPackLg" };
- nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { { "CircuitParts", 1 }, { "clean_water_epoch", 1 } };
+ previewPosition[] = {0.8,1,0.29};
+ previewScale = 1.75;
+ previewVector = 2.8;
};
- class EnergyPackLg : Default
+ class EnergyPackLg : Item
{
- nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { { "EnergyPack", 3 }, { "CircuitParts", 1 } };
+ previewPosition[] = {0.8,1,0.29};
+ previewScale = 1.75;
+ previewVector = 2.8;
};
- class PartOre : Default
+ class PartOre : Part
{
usedIn[] = { "ItemScraps" };
+ previewPosition[] = {0.799961,1,0.27};
+ previewScale = 1.25;
};
- class Pelt_EPOCH : Default
+ class Pelt_EPOCH : Part
{
usedIn[] = { "KitTiPi" };
+ previewPosition[] = {0.793741,1,0.274824};
+ previewScale = 0.7;
+ previewVector = 2.2;
};
- class ItemRock : Default
+ class ItemRock : Part
{
usedIn[] = { "KitFirePlace" , "MeleeMaul", "CrudeHatchet" };
+ previewPosition[] = {0.796998,1,0.35};
+ previewScale = 1.3;
};
- class ItemStick : Default
+ class ItemStick : Item
{
usedIn[] = { "WoodClub","MeleeMaul", "CrudeHatchet", "KitFirePlace" };
recipe[] = { { "WoodLog_EPOCH", 1 } };
+ previewPosition[] = {0.8,1,0.25};
+ previewScale = 0.4;
+ previewVector = 1;
};
- class ItemKiloHemp : Default
+ class ItemKiloHemp : Part
{
usedIn[] = { "ItemRope" };
+ previewPosition[] = {0.796267,1,0.322762};
+ previewScale = 0.9;
+ previewVector = 1.4;
};
- class ItemRope : Default
+ class ItemRope : Item
{
usedIn[] = { "WoodClub", "MeleeMaul", "CrudeHatchet" };
recipe[] = { { "ItemKiloHemp", 1 } };
+ previewPosition[] = {0.8,1,0.35};
+ previewScale = 4;
};
- class MeleeMaul : Default
+ class MeleeMaul : Item
{
recipe[] = { { "ItemRock", 1 }, { "ItemStick", 2 }, { "ItemRope", 1 } };
+ previewPosition[] = {0.798975,1,0.300388};
+ previewScale = 0.3;
+ previewVector = -1.8;
};
- class CrudeHatchet : Default
+ class CrudeHatchet : Item
{
recipe[] = { { "ItemRock", 1 }, { "ItemStick", 1 }, { "ItemRope", 1 } };
+ previewPosition[] = {0.786139,1,0.328525};
+ previewScale = 0.6;
};
- class WoodClub : Default
+ class WoodClub : Item
{
recipe[] = { { "ItemStick", 2 } };
+ previewPosition[] = {0.799633,1,0.237804};
+ previewScale = 0.35;
+ previewVector = 2.4;
};
- class WoodLog_EPOCH : Default
+ class WoodLog_EPOCH : Part
{
usedIn[] = { "PartPlankPack", "ItemStick" };
+ previewPosition[] = {0.800064,1,0.25};
+ previewScale = 0.3;
};
- class MortarBucket : Default
+ class MortarBucket : Part
{
usedIn[] = {"KitFoundation","KitCinderWall"};
+ previewPosition[] = {0.799442,1,0.426761};
+ previewScale = 0.6;
+ previewVector = 0;
};
- class ItemScraps : Default
+ class ItemScraps : Item
{
usedIn[] = { "ItemCorrugated" };
- nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { { "PartOre", 2 } };
+ previewPosition[] = {0.797144,1,0.309158};
+ previewScale = 1;
+ previewVector = 2.8;
};
- class ItemCorrugated : Default
+ class ItemCorrugated : Item
{
usedIn[] = {"KitShelf","ItemCorrugatedLg"};
- nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { { "ItemScraps", 2 } };
+ previewPosition[] = {0.791088,1,0.300004};
+ previewScale = 0.2;
+ previewVector = 1;
};
- class CinderBlocks : Default
+ class CinderBlocks : Part
{
usedIn[] = { "KitCinderWall" };
+ previewPosition[] = {0.801866,1,0.35};
+ previewScale = 0.2;
};
- class ItemMixOil : Default
+ class ItemMixOil : Part
{
usedIn[] = { "CSGAS" };
+ previewPosition[] = {0.802419,1,0.433119};
+ previewScale = 1.5;
};
- class jerrycan_epoch : Default
+ class jerrycan_epoch : Part
{
usedIn[] = { "CSGAS" };
+ previewPosition[] = {0.802443,1,0.254301};
+ previewScale = 0.6;
+ previewVector = 4.9;
};
- class VehicleRepair : Default
+ class VehicleRepair : Part
{
usedIn[] = { "VehicleRepairLg" };
+ previewPosition[] = {0.787659,1,0.30098};
+ previewScale = 0.45;
+ previewVector = 1.5;
};
- class VehicleRepairLg : Default
+ class VehicleRepairLg : Item
{
recipe[] = { "VehicleRepair", "ItemCorrugated" };
+ previewPosition[] = {0.798742,1,0.317871};
+ previewScale = 0.25;
+ previewVector = 0.7;
};
// radios
- class EpochRadio0 : Default // Quartz
+ class EpochRadio0 : Part // Quartz
{
usedIn[] = { "EpochRadio1" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio1 : Default // Garnet
+ class EpochRadio1 : Item // Garnet
{
usedIn[] = { "EpochRadio2" };
recipe[] = { "EpochRadio0", "ItemGarnet" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio2 : Default // Citrine
+ class EpochRadio2 : Item // Citrine
{
usedIn[] = { "EpochRadio3" };
recipe[] = { "EpochRadio1", "ItemCitrine" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio3 : Default // Amethyst
+ class EpochRadio3 : Item // Amethyst
{
usedIn[] = { "EpochRadio4" };
recipe[] = { "EpochRadio2", "ItemAmethyst" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio4 : Default // Topaz
+ class EpochRadio4 : Item // Topaz
{
usedIn[] = { "EpochRadio5" };
recipe[] = { "EpochRadio3", "ItemTopaz" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio5 : Default // Sapphire
+ class EpochRadio5 : Item // Sapphire
{
usedIn[] = { "EpochRadio6" };
recipe[] = { "EpochRadio4", "ItemSapphire" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio6 : Default // Onyx
+ class EpochRadio6 : Item // Onyx
{
usedIn[] = { "EpochRadio7" };
recipe[] = { "EpochRadio5", "ItemOnyx" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio7 : Default // Emerald
+ class EpochRadio7 : Item // Emerald
{
usedIn[] = { "EpochRadio8" };
recipe[] = { "EpochRadio6", "ItemEmerald" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio8 : Default // Ruby
+ class EpochRadio8 : Item // Ruby
{
usedIn[] = { "EpochRadio9" };
recipe[] = { "EpochRadio7", "ItemRuby" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
};
- class EpochRadio9 : Default // Jade
+ class EpochRadio9 : Item // Jade
{
recipe[] = { "EpochRadio8", "ItemJade" };
+ model = "\a3\ui_f\objects\Radio.p3d";
+ previewPosition[] = {0.800569,1,0.272473};
+ previewScale = 0.45;
+ previewVector = -3.9;
+ };
+
+ //Gems
+ class ItemGarnet : Part
+ {
+ usedIn[] = {"EpochRadio1"};
+ previewPosition[] = {0.801697,1,0.379502};
+ previewScale = 3;
+ };
+ class ItemCitrine : Part
+ {
+ usedIn[] = {"EpochRadio2"};
+ previewPosition[] = {0.796925,1,0.285847};
+ previewScale = 3.5;
+ previewVector = 2.7;
+ };
+ class ItemAmethyst : Part
+ {
+ usedIn[] = {"EpochRadio3"};
+ previewPosition[] = {0.798082,1,0.277137};
+ previewScale = 3;
+ previewVector = 2.9;
+ };
+ class ItemTopaz : Part
+ {
+ usedIn[] = {"EpochRadio4"};
+ previewPosition[] = {0.79555,1,0.393739};
+ previewScale = 3;
+ };
+ class ItemSapphire : Part
+ {
+ usedIn[] = {"EpochRadio5"};
+ previewPosition[] = {0.804014,1,0.283865};
+ previewScale = 3;
+ previewVector = 3.3;
+ };
+ class ItemOnyx : Part
+ {
+ usedIn[] = {"EpochRadio6"};
+ previewPosition[] = {0.799376,1,0.283337};
+ previewScale = 3;
+ previewVector = 3.1;
+ };
+ class ItemEmerald : Part
+ {
+ usedIn[] = {"EpochRadio7"};
+ previewPosition[] = {0.805568,1,0.293134};
+ previewScale = 3;
+ previewVector = 2.5;
+ };
+ class ItemRuby : Part
+ {
+ usedIn[] = {"EpochRadio8"};
+ previewPosition[] = {0.79555,1,0.393739};
+ previewScale = 3;
+ };
+ class ItemJade : Part
+ {
+ usedIn[] = {"EpochRadio9"};
+ previewPosition[] = {0.796903,1,0.369781};
+ previewScale = 3;
};
// raw meats
- class SnakeCarcass_EPOCH : Default
+ class SnakeCarcass_EPOCH : Part
{
usedIn[] = { "SnakeMeat_EPOCH" };
+ previewPosition[] = {0.808621,1,0.238853};
+ previewScale = 0.55;
+ previewVector = 1.8;
};
- class SnakeMeat_EPOCH : Default
+ class SnakeMeat_EPOCH : Item
{
usedIn[] = { "ItemCooler0" };
- nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "SnakeCarcass_EPOCH" };
+ previewPosition[] = {0.803189,1,0.408752};
+ previewScale = 6;
};
- class RabbitCarcass_EPOCH : Default
+ class RabbitCarcass_EPOCH : Part
{
usedIn[] = { "CookedRabbit_EPOCH" };
+ previewPosition[] = {0.796141,1,0.340971};
+ previewScale = 1.5;
};
- class CookedRabbit_EPOCH : Default
+ class CookedRabbit_EPOCH : Item
{
usedIn[] = { "ItemCooler1" };
- nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "RabbitCarcass_EPOCH" };
+ previewPosition[] = {0.796141,1,0.340971};
+ previewScale = 1.5;
};
- class ChickenCarcass_EPOCH : Default
+ class ChickenCarcass_EPOCH : Part
{
usedIn[] = { "CookedChicken_EPOCH" };
+ previewPosition[] = {0.796141,1,0.340971};
+ previewScale = 0.9;
};
- class CookedChicken_EPOCH : Default
+ class CookedChicken_EPOCH : Item
{
usedIn[] = { "ItemCooler2" };
- nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "ChickenCarcass_EPOCH" };
+ previewPosition[] = {0.796141,1,0.340971};
+ previewScale = 0.9;
};
- class GoatCarcass_EPOCH : Default
+ class GoatCarcass_EPOCH : Part
{
usedIn[] = { "CookedGoat_EPOCH" };
+ previewPosition[] = {0.796141,1,0.27};
+ previewScale = 0.4;
+ previewVector = 2.1;
};
- class CookedGoat_EPOCH : Default
+ class CookedGoat_EPOCH : Item
{
usedIn[] = { "ItemCooler3" };
- nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "GoatCarcass_EPOCH" };
+ previewPosition[] = {0.796141,1,0.27};
+ previewScale = 0.4;
+ previewVector = 2;
};
- class SheepCarcass_EPOCH : Default
+ class SheepCarcass_EPOCH : Part
{
usedIn[] = { "CookedSheep_EPOCH" };
+ previewPosition[] = {0.796141,1,0.27};
+ previewScale = 0.4;
+ previewVector = 2.1;
};
- class CookedSheep_EPOCH : Default
+ class CookedSheep_EPOCH : Item
{
usedIn[] = { "ItemCooler4" };
- nearby[] = {{ "fire", {"ALL"}, 3, 1, "Fire","fire" }};
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "SheepCarcass_EPOCH" };
+ previewPosition[] = {0.796141,1,0.27};
+ previewScale = 0.4;
+ previewVector = 2.1;
};
- class emptyjar_epoch : Default
+ class emptyjar_epoch : Part
{
usedIn[] = { "water_epoch" };
+ previewPosition[] = {0.807346,1,0.43035};
+ previewScale = 2.5;
};
- class water_epoch : Default
+ class water_epoch : Item
{
usedIn[] = { "clean_water_epoch" };
- nearby[] = {{"noclass", {"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}, 3, 1, "Water Source","water"}};
+ nearby[] = {{"Water source","","water",{0,{"barrelwater_f.p3d", "water_source_f.p3d", "pumpa.p3d", "misc_wellpump.p3d"}},3,1,0,0}};
recipe[] = { "emptyjar_epoch" };
+ previewPosition[] = {0.807346,1,0.43035};
+ previewScale = 2.5;
};
- class clean_water_epoch : Default
+ class clean_water_epoch : Item
{
usedIn[] = { "EnergyPack" };
- nearby[] = { { "fire", { "ALL" }, 3, 1, "Fire", "fire" } };
+ nearby[] = {{"Fire", "", "fire", {1,{"ALL"}}, 3, 1, 1, 0}};
recipe[] = { "water_epoch" };
+ previewPosition[] = {0.807346,1,0.43035};
+ previewScale = 2.5;
+ displayName = "Clean Water";
};
// recipes
- class CSGAS : Default
+ class CSGAS : Kit
{
recipe[] = { "ItemMixOil", "jerrycan_epoch" };
+ model = "\x\addons\a3_epoch_assets_2\jerrycan.p3d";
+ previewPosition[] = {0.802443,1,0.254301};
+ previewScale = 0.6;
+ previewVector = 4.9;
};
- class ItemCorrugatedLg : Default
+ class ItemCorrugatedLg : Kit
{
usedIn[] = { "VehicleRepairLg", "KitPlotPole" };
recipe[] = { { "ItemCorrugated", 3 } };
+ previewPosition[] = {0.797491,1,0.32899};
+ previewScale = 0.25;
+ previewVector = 0.5;
};
- class PartPlankPack : Default
+ class PartPlankPack : Kit
{
usedIn[] = {"KitStudWall","KitWoodFloor","KitWoodFoundation","KitWoodStairs","KitWoodRamp","KitWoodLadder","KitWoodTower","KitTiPi"};
recipe[] = {{"WoodLog_EPOCH",2}};
+ previewPosition[] = {0.797837,1,0.288258};
+ previewScale = 0.2;
+ previewVector = 1;
};
- class KitFirePlace : Default
+ class KitFirePlace : Kit
{
recipe[] = {{"ItemRock",2},{"ItemStick",1}};
+ model = "\x\addons\a3_epoch_assets_2\fireplace.p3d";
+ previewPosition[] = {0.791523,1,0.244987};
+ previewScale = 0.2;
+ previewVector = 1.5;
};
- class KitStudWall : Default
+ class KitStudWall : Kit
{
recipe[] = {{"PartPlankPack",4}};
+ model = "\x\addons\a3_epoch_assets\models\Wooden_Wall_SIM.p3d";
+ previewPosition[] = {0.797675,1,0.398882};
+ previewScale = 0.07;
+ previewVector = 0;
};
- class KitWoodFloor : Default
+ class KitWoodFloor : Kit
{
usedIn[] = { "KitWoodTower" };
recipe[] = {{"PartPlankPack",4}};
+ model = "\x\addons\a3_epoch_assets\models\Wooden_Floor.p3d";
+ previewPosition[] = {0.800198,1,0.262418};
+ previewScale = 0.055;
+ previewVector = 3.6;
};
- class KitWoodLadder : Default
+ class KitWoodLadder : Kit
{
recipe[] = { { "PartPlankPack", 4 } };
+ model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Ladder\wood_ladder.p3d";
+ previewPosition[] = {0.798736,1,0.441696};
+ previewScale = 0.08;
+ previewVector = 0;
};
- class KitWoodRamp : Default
+ class KitWoodRamp : Kit
{
recipe[] = { { "PartPlankPack", 6 } };
+ model = "\x\addons\a3_epoch_assets\models\Wood_Ramp.p3d";
+ previewPosition[] = {0.799137,1,0.350575};
+ previewScale = 0.05;
+ previewVector = 0;
};
- class KitWoodStairs : Default
+ class KitWoodStairs : Kit
{
recipe[] = {{"PartPlankPack",4}};
+ model = "\x\addons\a3_epoch_assets\models\Wood_stairs.p3d";
+ previewPosition[] = {0.795037,1,0.377922};
+ previewScale = 0.054;
+ previewVector = 0;
};
- class KitWoodTower : Default
+ class KitWoodTower : Kit
{
recipe[] = { {"KitWoodFloor", 1}, { "PartPlankPack", 4 } };
+ model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Tower\Tower\Base_Tower_Frame.p3d";
+ previewPosition[] = {0.800653,1,0.378749};
+ previewScale = 0.05;
+ previewVector = 0;
};
- class KitTiPi : Default
+ class KitTiPi : Kit
{
recipe[] = { { "Pelt_EPOCH", 4 }, { "PartPlankPack", 2 } };
+ model = "\x\addons\a3_epoch_assets\models\tp.p3d";
+ previewPosition[] = {0.801503,1,0.433758};
+ previewScale = 0.06;
+ previewVector = 0;
};
- class KitShelf : Default
+ class KitShelf : Kit
{
recipe[] = {{"ItemCorrugated",3}};
+ model = "\x\addons\a3_epoch_assets\models\shelf.p3d";
+ previewPosition[] = {0.803749,1,0.448515};
+ previewScale = 0.17;
+ previewVector = 0;
};
- class KitFoundation : Default
+ class KitFoundation : Kit
{
recipe[] = {{"MortarBucket",4}};
+ model = "\x\addons\a3_epoch_assets\models\Concrete_Col.p3d";
+ previewPosition[] = {0.796787,1,0.211457};
+ previewScale = 0.047;
+ previewVector = 0;
};
- class KitWoodFoundation : Default
+ class KitWoodFoundation : Kit
{
recipe[] = {{"PartPlankPack",8}};
+ model = "\x\addons\a3_epoch_assets\models\Wood_Col.p3d";
+ previewPosition[] = {0.796787,1,0.211457};
+ previewScale = 0.047;
+ previewVector = 0;
};
- class KitCinderWall : Default
+ class KitCinderWall : Kit
{
recipe[] = {{"CinderBlocks",2},{"MortarBucket",2}};
+ model = "\x\addons\a3_epoch_assets\models\cinder_half.p3d";
+ previewPosition[] = {0.797638,1,0.341915};
+ previewScale = 0.07;
+ previewVector = 0;
};
- class KitPlotPole : Default
+ class KitPlotPole : Kit
{
recipe[] = {{"ItemCorrugatedLg",2}, {"CircuitParts",2} };
+ model = "\x\addons\a3_epoch_assets\models\jammer.p3d";
+ previewPosition[] = {0.801378,1,0.464834};
+ previewScale = 0.055;
+ previewVector = 0;
};
- class ItemSolar : Default
+ class ItemSolar : Part
{
usedIn[] = { "KitSolarGen" };
+ previewPosition[] = {0.802374,1,0.26};
+ previewScale = 0.19;
+ previewVector = 3.3;
+
};
- class ItemCables : Default
+ class ItemCables : Part
{
usedIn[] = { "KitSolarGen" };
+ previewPosition[] = {0.802374,1,0.26};
+ previewScale = 0.3;
+ previewVector = 2.8;
};
- class ItemBattery : Default
+ class ItemBattery : Part
{
usedIn[] = { "KitSolarGen" };
+ previewPosition[] = {0.802374,1,0.276733};
+ previewScale = 0.4;
};
- class KitSolarGen : Default
+ class KitSolarGen : Kit
{
// TODO recipe
recipe[] = { { "ItemSolar", 1 }, { "ItemCables", 1 }, { "ItemBattery", 1 }, { "ItemCorrugatedLg", 2 }, { "CircuitParts", 2 } };
+ model = "\x\addons\a3_epoch_assets_3\CfgVehicles\Solar_Generator_Complete\Solar_generator.p3d";
+ previewPosition[] = {0.804979,1,0.39189};
+ previewScale = 0.11;
+ previewVector = 0;
};
+
};
\ No newline at end of file
diff --git a/Sources/epoch_config/config.cpp b/Sources/epoch_config/config.cpp
index c85dce63..cc7c7bbf 100644
--- a/Sources/epoch_config/config.cpp
+++ b/Sources/epoch_config/config.cpp
@@ -43,6 +43,9 @@ class CfgAddons
#include "\x\addons\a3_epoch_config\Configs\CfgBaseBuilding.hpp"
#include "\x\addons\a3_epoch_config\Configs\CfgBuildingLootPos.hpp"
+//gitmerge fix
+#include "\x\addons\a3_epoch_config\Configs\CfgDynamicMenu.hpp"
+
class DefaultEventhandlers;
class WeaponFireGun;
class WeaponCloudsGun;