From c15bd15ec6e82131432c188a1525a3cb0ba5d669 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 12:58:35 +0100 Subject: [PATCH 01/21] initial framework for dedicated server support --- source/INIT.sqf | 52 ++++++++++++++++++++---------------- source/initHQ/BluHQinit.sqf | 1 - source/missions/stratmap.sqf | 2 +- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/source/INIT.sqf b/source/INIT.sqf index 919ea7a..3c6e809 100644 --- a/source/INIT.sqf +++ b/source/INIT.sqf @@ -152,6 +152,8 @@ else /// JIP for the client if (isNil "Array_of_FOBname") then { Array_of_FOBname = []; }; + +game_master = ["player1"]; player allowDamage false; @@ -204,31 +206,35 @@ if (isMultiplayer) then { "finishedMissionsNumber" addPublicVariableEventHandler {[] execVM "persistent\persistent_stats_missions_total.sqf";}; // change the shown CP for request dialog }; - if (isServer) then { // SERVER INIT - DUWS_host_start = false; - publicVariable "DUWS_host_start"; - waitUntil {time > 0.1}; - getsize_script = [player] execVM "mapsize.sqf"; - DUWS_host_start = true; - publicVariable "DUWS_host_start"; - - // init High Command - _handle = [] execVM "dialog\hc_init.sqf"; - waitUntil {scriptDone getsize_script}; - }; + if (((vehiclevarname player) in game_master)) then { + if (!isDedicated && !HQ_pos_found_generated) then { // SERVER INIT + DUWS_host_start = false; + publicVariable "DUWS_host_start"; + waitUntil {time > 0.1}; + getsize_script = [player] execVM "mapsize.sqf"; + DUWS_host_start = true; + publicVariable "DUWS_host_start"; + + // init High Command + _handle = [] execVM "dialog\hc_init.sqf"; + waitUntil {scriptDone getsize_script}; + }; + } }; -if (isServer) then { - _null = [] execVM "dialog\startup\hq_placement\placement.sqf"; - waitUntil {chosen_hq_placement}; - - // create random HQ - if (!hq_manually_placed && !player_is_choosing_hqpos) then { - hq_create = [20, 0.015] execVM "initHQ\locatorHQ.sqf"; - waitUntil {scriptDone hq_create}; - }; -}; +if (((vehiclevarname player) in game_master)) then { + if (!isDedicated && !HQ_pos_found_generated) then { + _null = [] execVM "dialog\startup\hq_placement\placement.sqf"; + waitUntil {chosen_hq_placement}; + // create random HQ + if (!hq_manually_placed && !player_is_choosing_hqpos) then { + hq_create = [20, 0.015] execVM "initHQ\locatorHQ.sqf"; + waitUntil {scriptDone hq_create}; + }; + }; +} + /* //////// DEBUG LOOP ///////////// [] spawn { @@ -254,7 +260,7 @@ if (isServer) then { ] execVM 'repetitive_cleanup.sqf'; }; -if (!isServer) then { +if (hasInterface) then { // WHEN CLIENT CONNECTS INIT (might need sleep) waitUntil {isPlayer Player}; hintsilent "Waiting for the host to find an HQ..."; diff --git a/source/initHQ/BluHQinit.sqf b/source/initHQ/BluHQinit.sqf index 1aa7ea1..ce93257 100644 --- a/source/initHQ/BluHQinit.sqf +++ b/source/initHQ/BluHQinit.sqf @@ -38,7 +38,6 @@ publicVariable "hq_blu1"; _hq setpos [_hqblu select 0, _hqblu select 1, 0.59]; _hq disableAI "AUTOTARGET"; _hq setdir 0; -_handle = [hq_blu1] execVM "initHQ\HQaddactions.sqf"; removeallweapons _hq; _hq switchMove "acts_StandingSpeakingUnarmed"; _handle = [_hq] execVM "sounds\radiochatter.sqf"; diff --git a/source/missions/stratmap.sqf b/source/missions/stratmap.sqf index 19d6fea..e6af46c 100644 --- a/source/missions/stratmap.sqf +++ b/source/missions/stratmap.sqf @@ -5,7 +5,7 @@ _counter = 0; if (isnil ("Mission_timeout_request")) then {Mission_timeout_request = true;}; if (!Mission_timeout_request) exitWith {PAPABEAR=[West,"HQ"]; PAPABEAR SideChat "We don't have any other missions for you right now.";}; -if (!isServer) exitWith {hint "Only the host can request side missions for now"}; +if (!((vehiclevarname player) in game_master)) exitWith {hint "Only the host can request side missions for now"}; startLoadingScreen ["Loading zones..."]; _kibot_pos_array_missionPos = [[-99999,-99999,-99999]]; From 8e10e9c89c29431884f0aa541c853cd25043e28f Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 13:07:38 +0100 Subject: [PATCH 02/21] ammobox with armory for every one --- source/support/ammobox.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/support/ammobox.sqf b/source/support/ammobox.sqf index ebd1ed5..bb80db3 100644 --- a/source/support/ammobox.sqf +++ b/source/support/ammobox.sqf @@ -32,7 +32,7 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf", "", 0, true, true, "", "_this == player"]}; +if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf"]}; // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; From 611de6b378bbd3649f3c5598e4a5a36338ccfcc7 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 13:10:48 +0100 Subject: [PATCH 03/21] Invulnerable Guard for the main HQ --- source/initHQ/BluHQinit.sqf | 5 +++++ source/initHQ/guardsHQ.sqf | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 source/initHQ/guardsHQ.sqf diff --git a/source/initHQ/BluHQinit.sqf b/source/initHQ/BluHQinit.sqf index ce93257..afd180c 100644 --- a/source/initHQ/BluHQinit.sqf +++ b/source/initHQ/BluHQinit.sqf @@ -58,6 +58,11 @@ _handle = [(getpos hq_blu1), _hq] execVM "initHQ\fortify.sqf"; sleep 6; ["officerkilled",false,true] call BIS_fnc_endMission; }; + +//CREATE PATROL +_handle = [getpos hq_blu1] execVM "initHQ\guardsHQ.sqf"; +_handle = [getpos hq_blu1] execVM "initHQ\guardsHQ.sqf"; + // IF THE OFFICER IS DEAD -- End OF "SPAWN" // TELEPORT PLAYER diff --git a/source/initHQ/guardsHQ.sqf b/source/initHQ/guardsHQ.sqf new file mode 100644 index 0000000..ad67253 --- /dev/null +++ b/source/initHQ/guardsHQ.sqf @@ -0,0 +1,34 @@ +_centerPos = _this select 0; + +// patrolling guard +_groupPatrol = [ [(_centerPos select 0)+20, (_centerPos select 1)+20], WEST, ["B_Soldier_F","B_Soldier_F","B_Soldier_AT_F","B_engineer_F","B_medic_F","B_recon_F","B_Soldier_AT_F"],[],[],[0.6,0.8,0.7]] call BIS_fnc_spawnGroup; + +_groupPatrol setCombatMode "YELLOW"; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)+20], 0]; + _wp setWaypointType "MOVE"; +_wp setWaypointBehaviour "SAFE"; +_wp setWaypointSpeed "LIMITED"; + + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-20, (_centerPos select 1)+20], 0]; + _wp setWaypointType "MOVE"; +_wp setWaypointBehaviour "SAFE"; +_wp setWaypointSpeed "LIMITED"; + + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-20, (_centerPos select 1)-20], 0]; + _wp setWaypointType "MOVE"; +_wp setWaypointBehaviour "SAFE"; +_wp setWaypointSpeed "LIMITED"; + + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)-20], 0]; + _wp setWaypointType "MOVE"; + + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)+20], 0]; + _wp setWaypointType "CYCLE"; +_wp setWaypointBehaviour "SAFE"; +_wp setWaypointSpeed "LIMITED"; + +// ADD Infinite Ammo eventhandler +{ +_x addEventHandler ["Fired",{(_this select 0) setvehicleammo 1}]; +_x addEventHandler ["HandleDamage", {false}]; +} forEach (units _groupPatrol); From f63f0ef28ab8d1215178ddc3f3acf4721f6a01de Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 16:15:50 +0100 Subject: [PATCH 04/21] Syntax error correction --- source/INIT.sqf | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/source/INIT.sqf b/source/INIT.sqf index 3c6e809..86ef5d6 100644 --- a/source/INIT.sqf +++ b/source/INIT.sqf @@ -205,9 +205,9 @@ if (isMultiplayer) then { if (!isServer) then { "finishedMissionsNumber" addPublicVariableEventHandler {[] execVM "persistent\persistent_stats_missions_total.sqf";}; // change the shown CP for request dialog }; - - if (((vehiclevarname player) in game_master)) then { - if (!isDedicated && !HQ_pos_found_generated) then { // SERVER INIT + + if (!isDedicated && !HQ_pos_found_generated) then { // SERVER INIT + if (((vehiclevarname player) in game_master)) then { DUWS_host_start = false; publicVariable "DUWS_host_start"; waitUntil {time > 0.1}; @@ -219,11 +219,11 @@ if (isMultiplayer) then { _handle = [] execVM "dialog\hc_init.sqf"; waitUntil {scriptDone getsize_script}; }; - } + }; }; -if (((vehiclevarname player) in game_master)) then { - if (!isDedicated && !HQ_pos_found_generated) then { +if (!isDedicated && !HQ_pos_found_generated) then { + if (((vehiclevarname player) in game_master)) then { _null = [] execVM "dialog\startup\hq_placement\placement.sqf"; waitUntil {chosen_hq_placement}; @@ -233,7 +233,7 @@ if (((vehiclevarname player) in game_master)) then { waitUntil {scriptDone hq_create}; }; }; -} +}; /* //////// DEBUG LOOP ///////////// From 60ca5bda1873e57521bbe92a61a51bda620793eb Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 16:46:25 +0100 Subject: [PATCH 05/21] CP not added on cap or recap --- source/captured.sqf | 2 +- source/zonescap/blufor_cap.sqf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/captured.sqf b/source/captured.sqf index 016ab6c..12ca83c 100644 --- a/source/captured.sqf +++ b/source/captured.sqf @@ -22,7 +22,7 @@ _index = 0; } forEach WARCOM_zones_controled_by_OPFOR; // ADD POINTS -if (isServer) then { +if (hasInterface) then { _points = round(_points/3); commandpointsblu1 = commandpointsblu1 + _points; publicVariable "commandpointsblu1"; diff --git a/source/zonescap/blufor_cap.sqf b/source/zonescap/blufor_cap.sqf index 9c45834..7b388fc 100644 --- a/source/zonescap/blufor_cap.sqf +++ b/source/zonescap/blufor_cap.sqf @@ -40,7 +40,7 @@ str(_markername) setMarkerColor "ColorGreen"; // MODIFY MARKER ELLIPSE str(_markername2) setMarkerColor "ColorGreen"; -if (isServer) then { +if (hasInterface) then { commandpointsblu1 = commandpointsblu1 + (_points/2); publicVariable "commandpointsblu1"; }; From 2c6cb376fe5b547f4cd951cbc6f8ea1eb65df3e6 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Mon, 26 Jan 2015 18:06:48 +0100 Subject: [PATCH 06/21] Some change with the Main HQ guards --- source/initHQ/guardsHQ.sqf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/source/initHQ/guardsHQ.sqf b/source/initHQ/guardsHQ.sqf index ad67253..4a02285 100644 --- a/source/initHQ/guardsHQ.sqf +++ b/source/initHQ/guardsHQ.sqf @@ -1,28 +1,28 @@ _centerPos = _this select 0; // patrolling guard -_groupPatrol = [ [(_centerPos select 0)+20, (_centerPos select 1)+20], WEST, ["B_Soldier_F","B_Soldier_F","B_Soldier_AT_F","B_engineer_F","B_medic_F","B_recon_F","B_Soldier_AT_F"],[],[],[0.6,0.8,0.7]] call BIS_fnc_spawnGroup; +_groupPatrol = [ [(_centerPos select 0)+40, (_centerPos select 1)+40], WEST, ["B_Soldier_F","B_Soldier_F","B_Soldier_AT_F","B_engineer_F","B_medic_F","B_recon_F","B_Soldier_AT_F","B_Soldier_AA_F"],[],[],[0.6,0.8,0.7]] call BIS_fnc_spawnGroup; _groupPatrol setCombatMode "YELLOW"; - _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)+20], 0]; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)+40], 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "SAFE"; _wp setWaypointSpeed "LIMITED"; - _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-20, (_centerPos select 1)+20], 0]; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-40, (_centerPos select 1)+40], 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "SAFE"; _wp setWaypointSpeed "LIMITED"; - _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-20, (_centerPos select 1)-20], 0]; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)-40, (_centerPos select 1)-40], 0]; _wp setWaypointType "MOVE"; _wp setWaypointBehaviour "SAFE"; _wp setWaypointSpeed "LIMITED"; - _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)-20], 0]; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)-40], 0]; _wp setWaypointType "MOVE"; - _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+20, (_centerPos select 1)+20], 0]; + _wp = _groupPatrol addWaypoint [[(_centerPos select 0)+40, (_centerPos select 1)+40], 0]; _wp setWaypointType "CYCLE"; _wp setWaypointBehaviour "SAFE"; _wp setWaypointSpeed "LIMITED"; From df163985fe203a125fa6d270c684d9fcd12bc8a8 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Tue, 27 Jan 2015 01:18:21 +0100 Subject: [PATCH 07/21] Dop Ammobox Fixed for all players --- source/support/ammobox.sqf | 3 ++- source/support/fob_ammobox.sqf | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/source/support/ammobox.sqf b/source/support/ammobox.sqf index bb80db3..73c70d0 100644 --- a/source/support/ammobox.sqf +++ b/source/support/ammobox.sqf @@ -32,7 +32,8 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf"]}; +if (support_armory_available) then {[[_ammo,["Armory","VAS\open.sqf",[], 0, false, false, "", "_this distance _target < 4"]],"addAction",true,true] call BIS_fnc_MP;}; + // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; diff --git a/source/support/fob_ammobox.sqf b/source/support/fob_ammobox.sqf index ff6d3c0..40907af 100644 --- a/source/support/fob_ammobox.sqf +++ b/source/support/fob_ammobox.sqf @@ -32,7 +32,7 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf", "", 0, true, true, "", "_this == player"]}; +if (support_armory_available) then {[[_ammo,["Armory","VAS\open.sqf",[], 0, false, false, "", "_this distance _target < 4"]],"addAction",true,true] call BIS_fnc_MP;}; // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; From 258d119bce8c0ee24b934cf328f32fc3fc525db3 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Fri, 30 Jan 2015 00:41:56 +0100 Subject: [PATCH 08/21] Major Change Only server side handle server script, now it's fully persistent --- source/INIT.sqf | 192 +------- source/WARCOM/WARCOM_blu_assault.sqf | 2 +- source/WARCOM/WARCOM_blu_patrol.sqf | 33 +- source/WARCOM/WARCOM_init.sqf | 12 +- source/dialog/startup/startup_common.sqf | 9 + source/initHQ/locatorhq.sqf | 3 +- source/initZones/locatorzonesV1.sqf | 6 +- source/missions/missions/destroy/mission.sqf | 17 +- source/missions/missions/pilot/mission.sqf | 15 +- source/missions/missions/rescue/mission.sqf | 8 +- source/missions/missions/rescue/success.sqf | 3 +- source/missions/missions/sabotage/mission.sqf | 8 +- source/missions/missions/sabotage/success.sqf | 3 +- source/missions/missions/steal/mission.sqf | 10 +- source/missions/missions/target/mission.sqf | 10 +- .../missions/missions/underwater/mission.sqf | 8 +- .../missions/missions/underwater/success.sqf | 3 +- source/serverinit.sqf | 409 ++++++++++++++++++ 18 files changed, 524 insertions(+), 227 deletions(-) create mode 100644 source/serverinit.sqf diff --git a/source/INIT.sqf b/source/INIT.sqf index 86ef5d6..df8c0a6 100644 --- a/source/INIT.sqf +++ b/source/INIT.sqf @@ -1,166 +1,21 @@ diag_log format ["------------------ DUWS-R START ----v0------ player: %1", profileName]; -////////////////////////////////////////////////////// -// HOW TO MANUALLY CREATE THE MISSION: -// 1)YOU MUST PLACE THE HQ LOCATION -// 2)DEFINE THE CAPTURABLE ZONES -// -- YOU CAN ALSO JUST PUT A HQ SOMEWHERE AND LET THE ZONES BEING RANDOMLY GENERATED -// -- YOU MUST PLACE MANUALLY THE HQ IF YOU ARE ALREADY PLACING THE ZONES BY HAND -// 3) DONT FORGET TO DEFINE THE VARIABLES BELOW. If you are ONLY placing the HQ by hand, you just need to put "hq_manually_placed" to -// "true" instead of "false". If you are also placing the zones by hand, make "zones_manually_placed" to "true". -///////////////////////////////////////////////////////////// -// 1) In the gamelogic, for the HQ( !! MAKE ONLY ONE HQ !!): _null=[getpos this] execVM "initHQ\BluHQinit.sqf" -// -// 2) In the init of gamelogic, to create a capturable enemy zone: -// _null = ["zone name",pts awarded upon capture, zone radius,getpos this,false/true,false/true] execvm "createzone.sqf"; -// "zone name": name of the zone -// pts awarded upon capture: points you earn when you capture the zone. Also the amount of points of army power you take and receive -// from the enemy after capture -// zone radius: how large the zone is -// getpos this: It's the position of the zone. The gamelogic actually. You don't have to modify this. -// false/true: if the zone is fortified or not. If the zone is fortified, there will be a bit more enemies and they will be maning -// static defences if there are any -// false/true: if the zone is selecting randomly a prefab base. Prefab is selected according to the zone radius. The bigger the zone, -// the bigger the prefab asset will be chosen. -// -// EXAMPLE, in the init of a gamelogic you have placed on the map: -// _null=["OP Xander",20,200,getpos this,true,false] execvm "initZones\createzone.sqf" -// -// 3) Define these variables: - -// choose between "tropical" - "arid" - "temperate" - "temperate_cold" - "mediterranean" -if (isNil "weather_type") then {weather_type = "tropical";}; -// set the skill range of ennemy AI -if (isNil "opfor_ai_skill") then {opfor_ai_skill = [0.1,0.3];}; -// set the skill range of friendly AI, from 0 to 1 (0 being completely dumb) -if (isNil "blufor_ai_skill") then {blufor_ai_skill = [0.4,0.7];}; - -// you must specify if you have manually placed HQ or not. false = HQ is randomly placed, true = you have manually placed the HQ -hq_manually_placed = false; -// you must specify if you have manually placed the zones or not. false = zones are randomly generated, true = you have manually placed the zones -zones_manually_placed = false; -zones_max_dist_from_hq = 7500; -dynamic_weather_enable = true; -maually_chosen = false; - -if (isNil "enable_fast_travel") then { enable_fast_travel = true; }; -// chopper taxi (support) will fast travel (teleport) or not -if (isNil "enableChopperFastTravel") then { enableChopperFastTravel = true; }; -// Starting CP -if (isNil "commandpointsblu1") then { commandpointsblu1 = 20; }; -// STARTING ARMY POWER -if (isNil "blufor_ap") then {blufor_ap = 0;}; -opfor_ap = 0; - -/////////////////////////////////////////////////////// -// initialise variables -////////////////////////////////////////////////////// -// MOST OF THE VALUES ARE BEING OVERWRITTEN BY PLAYER INPUT AT THE BEGINNING -////////////////////////////////////////////////////// - -///////////////////////////////////////////////////////////// -debugmode = false; // Debug mode, kind of obsolete -/// ------------- VALUES UNDER THIS ARE OVERWRITTEN -zones_number = 9; // Number of capturables zones to create (when zones are created randomly) -zones_spacing = 1200; // minimum space between 2 zones (in meters) // SOON OBSOLETE -zones_max_radius = 1000; // Determine the maximum radius a generated zone can have -zones_min_radius = 200; // Determine the minium radius a generated zone can have. SHOULD NOT BE UNDER 200. - -/////////////////////////////////////////////////////// -// This mission will have a harder time generating stuff if a lot of the terrain of the island is sloped, meaning that valid locations -// will be harder/take longer to find (side missions, mission init). -// Keep that in mind when tweaking the zones amount/radius value. -///////////////////////////////////////////////////////// -// preprocess the qrf file for the EH -QRF_test = compile preprocessFile "WARCOM\WARCOM_opf_qrf.sqf"; -persistent_stat_script_init = [] execVM "persistent\persistent_stats_init.sqf"; -waitUntil {scriptDone persistent_stat_script_init}; -execvm "dynamic_music\dyn_music_init.sqf"; - -// nber of missions succes(!!dont touch!!) -missions_success = 0; - -zones_created = false; -blu_hq_created = false; -can_get_mission = true; -failsafe_zones_not_found = false; -createcenter sideLogic; -LogicGroup = createGroup SideLogic; -PAPABEAR=[West,"HQ"]; -locator_hq_actived = false; -op_zones_index = 0; -clientisSync = false; -fobSwitch = false; -player_is_choosing_hqpos = false; - -if (isNil "amount_zones_created") then { - amount_zones_created = 0; -}; - -if (isNil "HQ_pos_found_generated") then { - HQ_pos_found_generated = false; -}; - -if (isNil "chosen_settings") then { - chosen_settings = false; -}; - -if (isNil "chosen_hq_placement") then { - chosen_hq_placement = false; -}; - -if (isNil "zoneundercontrolblu") then { - zoneundercontrolblu = 0; -}; - -if (isNil "amount_zones_captured") then { - amount_zones_captured = 0; -}; - -if (isNil "savegameNumber") then { - savegameNumber = 0; -}; - -if (isNil "capturedZonesNumber") then { - capturedZonesNumber = 0; -}; - -if (isNil "finishedMissionsNumber") then { - finishedMissionsNumber = 0; -}; -if (isNil "OvercastVar") then { - OvercastVar = 0; -}; - -if (isNil "FogVar") then { - FogVar = 0; -}; +if (isServer) then { nul = [] execVM "serverinit.sqf"; }; +if (isDedicated) exitWith {}; +waitUntil {!isNull player}; -// this is a special one (if/else) -if (isNil "Array_of_FOBS") then { - // if the player is sp or server or no fobs have been created - Array_of_FOBS = []; -} -else /// JIP for the client -{ - { - [_x] execVM "support\FOBactions.sqf"; - } forEach Array_of_FOBS; -}; +player allowDamage false; -if (isNil "Array_of_FOBname") then { - Array_of_FOBname = []; -}; +persistent_stat_script_init = [] execVM "persistent\persistent_stats_init.sqf"; +waitUntil {scriptDone persistent_stat_script_init}; +execvm "dynamic_music\dyn_music_init.sqf"; -game_master = ["player1"]; - -player allowDamage false; #include "dialog\supports_init.hpp" #include "dialog\squad_number_init.hpp" -execVM "misc\gps_marker.sqf"; +if (hasInterface) then { execVM "misc\gps_marker.sqf";}; if (!isMultiplayer) then { getsize_script = [player] execVM "mapsize.sqf"; }; @@ -206,6 +61,9 @@ if (isMultiplayer) then { "finishedMissionsNumber" addPublicVariableEventHandler {[] execVM "persistent\persistent_stats_missions_total.sqf";}; // change the shown CP for request dialog }; + player globalChat format ["gamemaster: %1", game_master]; + player globalChat format ["HQ_pos_found_generated: %1", HQ_pos_found_generated]; + if (!isDedicated && !HQ_pos_found_generated) then { // SERVER INIT if (((vehiclevarname player) in game_master)) then { DUWS_host_start = false; @@ -226,9 +84,11 @@ if (!isDedicated && !HQ_pos_found_generated) then { if (((vehiclevarname player) in game_master)) then { _null = [] execVM "dialog\startup\hq_placement\placement.sqf"; waitUntil {chosen_hq_placement}; - + player globalChat format ["hq_manually_placed: %1", hq_manually_placed]; + player globalChat format ["player_is_choosing_hqpos: %1", player_is_choosing_hqpos]; // create random HQ if (!hq_manually_placed && !player_is_choosing_hqpos) then { + player globalChat "lance recherche position..."; hq_create = [20, 0.015] execVM "initHQ\locatorHQ.sqf"; waitUntil {scriptDone hq_create}; }; @@ -249,16 +109,6 @@ if (!isDedicated && !HQ_pos_found_generated) then { // AMBIANCE LOOP //_nul = [] execVM "musicloop.sqf"; -if (isServer) then { - // group cleaning script - 0 = [ - 60*60, // seconds to delete dead bodies (0 means don't delete) - 60*60, // seconds to delete dead vehicles (0 means don't delete) - 60*60, // seconds to delete dropped weapons (0 means don't delete) - 0, // seconds to deleted planted explosives (0 means don't delete) - 60*60 // seconds to delete dropped smokes/chemlights (0 means don't delete) - ] execVM 'repetitive_cleanup.sqf'; -}; if (hasInterface) then { // WHEN CLIENT CONNECTS INIT (might need sleep) @@ -284,13 +134,9 @@ if (!isMultiplayer) then { _handle = [] execVM "dialog\hc_init.sqf"; }; -if (isServer) then { - // initialise the ressources per zone bonus - _basepoint = [] execVM "zonesundercontrol.sqf"; -}; -// init the bonuses you get when capturing zones -_basepoint = [] execVM "zones_bonus.sqf"; + + // INIT the operative list execVM "dialog\operative\operator_init.sqf"; @@ -347,11 +193,7 @@ if (isMultiplayer) then { ["island_captured_win",true,true] call BIS_fnc_endMission; }; -if (zones_manually_placed) then { - waitUntil {!isNil ("Array_of_OPFOR_zones")}; - sleep 1; - _warcom_init = [Array_of_OPFOR_zones, getpos hq_blu1, [0,0,0], blufor_ap, opfor_ap, 2700,blufor_ai_skill,opfor_ai_skill, 1500] execVM "WARCOM\WARCOM_init.sqf"; -}; + if (mission_DUWS_firstlaunch) then { waitUntil {chosen_settings}; diff --git a/source/WARCOM/WARCOM_blu_assault.sqf b/source/WARCOM/WARCOM_blu_assault.sqf index aaae76c..d651ac8 100644 --- a/source/WARCOM/WARCOM_blu_assault.sqf +++ b/source/WARCOM/WARCOM_blu_assault.sqf @@ -6,7 +6,7 @@ WARCOM_blu_attack_wave_avalaible = false; // Type of attack wave [] spawn { //WARCOM_blu_attack_wave_type = ["B_Soldier_TL_F","B_Soldier_F"]; - + diag_log format ["WARCOM_blufor_ap_assault: %1", WARCOM_blufor_ap]; waitUntil {sleep 1; WARCOM_blufor_ap>=10}; [West,"HQ"] sidechat "This is HQ, BLUFOR troops just arrived on the island, we'll soon be able to push through the enemy lines"; WARCOM_blu_attack_wave_avalaible = true; diff --git a/source/WARCOM/WARCOM_blu_patrol.sqf b/source/WARCOM/WARCOM_blu_patrol.sqf index 7e23455..8cae2fd 100644 --- a/source/WARCOM/WARCOM_blu_patrol.sqf +++ b/source/WARCOM/WARCOM_blu_patrol.sqf @@ -1,9 +1,11 @@ _loop = true; WARCOM_blu_patrol_type = ""; +diag_log format ["WARCOM_blufor_ap_patrol: %1", WARCOM_blufor_ap]; // Type of attack wave [] spawn { + diag_log "spawn1"; WARCOM_blu_patrol_type = (configFile >> "CfgGroups" >> "West" >> "BLU_F" >> "Infantry" >> "BUS_InfTeam"); waitUntil {sleep 1; WARCOM_blufor_ap>40}; @@ -36,25 +38,25 @@ WARCOM_blu_patrol_type = ""; while {true} do { if (count WARCOM_zones_controled_by_BLUFOR > 1) then { // make sure blufor is controlling at least 2 zones - sleep 2; - - // find a zone where to spawn OPF wave *** BEGIN - _found = false; - _randomZone = []; - _failSafe = 0; + sleep 2; + + // find a zone where to spawn OPF wave *** BEGIN + _found = false; + _randomZone = []; + _failSafe = 0; while {!_found} do { - _randomZone = WARCOM_zones_controled_by_BLUFOR call BIS_fnc_selectRandom; - if (_randomZone distance player > 2000) then {_found=true;}; - sleep 0.2; + _randomZone = WARCOM_zones_controled_by_BLUFOR call BIS_fnc_selectRandom; + if (_randomZone distance player > 2000) then {_found=true;}; + sleep 0.2; // player sidechat format["Failsafe: %1",_failsafe]; - _failSafe = _failSafe + 1; - if (_failsafe > 10) then {sleep 300; _failsafe = 0;} + _failSafe = _failSafe + 1; + if (_failsafe > 10) then {sleep 300; _failsafe = 0;} }; // find a zone *** end - _randomZone = [(_randomZone select 0)+40,_randomZone select 1]; - _group = [_randomZone, WEST, WARCOM_blu_patrol_type,[],[],WARCOM_blu_ai_skill_range] call BIS_fnc_spawnGroup; - _opf_assault = [_group] execVM "WARCOM\WARCOM_wp_blu_patrol.sqf"; -// _blu_assault = [_group,"derp"] execVM "WARCOM\WARCOM_gps_marker.sqf"; + _randomZone = [(_randomZone select 0)+40,_randomZone select 1]; + _group = [_randomZone, WEST, WARCOM_blu_patrol_type,[],[],WARCOM_blu_ai_skill_range] call BIS_fnc_spawnGroup; + _opf_assault = [_group] execVM "WARCOM\WARCOM_wp_blu_patrol.sqf"; +// _blu_assault = [_group,"derp"] execVM "WARCOM\WARCOM_gps_marker.sqf"; // spawn armored if (WARCOM_blufor_ap>50) then { @@ -69,3 +71,4 @@ WARCOM_blu_patrol_type = ""; sleep (random 1200); // patrol delay }; }; + diff --git a/source/WARCOM/WARCOM_init.sqf b/source/WARCOM/WARCOM_init.sqf index 0bc45bf..073e179 100644 --- a/source/WARCOM/WARCOM_init.sqf +++ b/source/WARCOM/WARCOM_init.sqf @@ -44,21 +44,25 @@ _WARCOM_zones_controled_by_OPFOR = WARCOM_createdZones; WARCOM_zones_controled_by_OPFOR = [] + _WARCOM_zones_controled_by_OPFOR; // Init BLU patrols +diag_log "Init BLU patrols"; _blu_patrol = [] execVM "WARCOM\WARCOM_blu_patrol.sqf"; -waitUntil {scriptDone _blu_patrol}; +//waitUntil {scriptDone _blu_patrol}; // Init OPF patrols +diag_log "Init OPF patrols"; _opf_patrol = [] execVM "WARCOM\WARCOM_opf_patrol.sqf"; -waitUntil {scriptDone _opf_patrol}; +//waitUntil {scriptDone _opf_patrol}; // Initialize the BLU attack waves +diag_log "Initialize the BLU attack waves"; _blu_assault = [] execVM "WARCOM\WARCOM_blu_assault.sqf"; -waitUntil {scriptDone _blu_assault}; +//waitUntil {scriptDone _blu_assault}; // Init the OPF attack waves +diag_log "Init the OPF attack waves"; _opf_assault = [] execVM "WARCOM\WARCOM_opf_assault.sqf"; -waitUntil {scriptDone _opf_assault}; +//waitUntil {scriptDone _opf_assault}; diff --git a/source/dialog/startup/startup_common.sqf b/source/dialog/startup/startup_common.sqf index b369748..accd89f 100644 --- a/source/dialog/startup/startup_common.sqf +++ b/source/dialog/startup/startup_common.sqf @@ -393,8 +393,17 @@ switch (_index) do { if (zones_max_radius <= zones_min_radius) exitWith {Hint "Unable to generate campaign:\nMaximum radius of a zone\nmust be superior to\nMinimum radius of a zone"}; zones_spacing = zones_max_radius + 200; +publicVariable "chosen_settings"; +publicVariable "zones_max_radius"; +publicVariable "zones_min_radius"; +publicVariable "zones_number"; publicVariable "commandpointsblu1"; publicVariable "weather_type"; publicVariable "blufor_ai_skill"; publicVariable "opfor_ai_skill"; +publicVariable "opfor_ap"; +publicVariable "blufor_ap"; publicVariable "enableChopperFastTravel"; +publicVariable "enable_fast_travel"; +publicVariable "zones_max_dist_from_hq"; + diff --git a/source/initHQ/locatorhq.sqf b/source/initHQ/locatorhq.sqf index ddf40c3..a0b928d 100644 --- a/source/initHQ/locatorhq.sqf +++ b/source/initHQ/locatorhq.sqf @@ -1,8 +1,9 @@ _found = false; _foundSafePos = []; +player globalChat "recherche zone"; while {!_found} do { _foundSafePos = [center_of_map, 0,half_of_map,5,0,0.1,0,[],[[0,0],[0,0]]] call BIS_fnc_findSafePos; if (_foundSafePos select 0 != 0 && _foundSafePos select 1 != 0) then {_found=true;}; }; - +player globalChat format ["foundSafePos: %1", _foundSafePos]; _handle = [_foundSafePos] execVM "initHQ\bluHQinit.sqf"; \ No newline at end of file diff --git a/source/initZones/locatorzonesV1.sqf b/source/initZones/locatorzonesV1.sqf index 99c6e4c..b889d4f 100644 --- a/source/initZones/locatorzonesV1.sqf +++ b/source/initZones/locatorzonesV1.sqf @@ -111,8 +111,10 @@ sleep 20; _zones_array = [_zones_array, 0] call BIS_fnc_removeIndex; //player globalchat format["%1",_zones_array]; -_warcom_init = [_zones_array, getpos hq_blu1, [0,0,0], blufor_ap, opfor_ap, 2700,blufor_ai_skill,opfor_ai_skill, 2000] execVM "WARCOM\WARCOM_init.sqf"; // 2700 is 40 mins -waitUntil {scriptDone _warcom_init}; +serv_zones_array = [] + _zones_array; +publicVariable "serv_zones_array"; +//_warcom_init = [_zones_array, getpos hq_blu1, [0,0,0], blufor_ap, opfor_ap, 2700,blufor_ai_skill,opfor_ai_skill, 2000] execVM "WARCOM\WARCOM_init.sqf"; // 2700 is 40 mins +//waitUntil {scriptDone _warcom_init}; savegame; sleep 1; [[format["Campaign generated
Welcome to %1, %2",_worldName,profilename]]] spawn BIS_fnc_typeText; diff --git a/source/missions/missions/destroy/mission.sqf b/source/missions/missions/destroy/mission.sqf index 373bc0a..384bab6 100644 --- a/source/missions/missions/destroy/mission.sqf +++ b/source/missions/missions/destroy/mission.sqf @@ -29,9 +29,14 @@ _tower setdamage 0.85; _tower setVectorUp [0,0,1]; // TASK AND NOTIFICATION -_taskhandle = player createSimpleTask ["taskDestroy"]; -_taskhandle setSimpleTaskDescription ["We have detected a large amount of enemy trasmissions coming from this area. This is probably caused by a radio tower used by the enemy forces on the island. Destroy the tower. Be sure to take some satchels, which you can find in the armory. Armory can be unlocked at the HQ.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//OLD +//_taskhandle = player createSimpleTask ["taskDestroy"]; +//_taskhandle setSimpleTaskDescription ["We have detected a large amount of enemy trasmissions coming from this area. This is probably caused by a radio tower used by the enemy forces on the island. Destroy the tower. Be sure to take some satchels, which you can find in the armory. Armory can be unlocked at the HQ.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//NEW +//test1 +[west, "_taskhandle", ["taskDestroy.", "We have detected a large amount of enemy trasmissions coming from this area. This is probably caused by a radio tower used by the enemy forces on the island. Destroy the tower. Be sure to take some satchels, which you can find in the armory. Armory can be unlocked at the HQ.", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; + if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; @@ -52,7 +57,11 @@ waitUntil {sleep 1; !alive _tower}; deleteMarker str(_markername2); deleteMarker str(_markername); -player removeSimpleTask _taskhandle; +//OLD +//player removeSimpleTask _taskhandle; + +//NEW +[["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; // Give cookies (bonus & notifications) reward = (30 * cp_reward_multiplier); diff --git a/source/missions/missions/pilot/mission.sqf b/source/missions/missions/pilot/mission.sqf index 805541b..fe65cb9 100644 --- a/source/missions/missions/pilot/mission.sqf +++ b/source/missions/missions/pilot/mission.sqf @@ -41,14 +41,16 @@ _pilot setcaptive true; _pilot switchMove "acts_CrouchingIdleRifle01"; // TASK AND NOTIFICATION -_taskhandle = player createSimpleTask ["taskPilot"]; -_taskhandle setSimpleTaskDescription ["One of our AH-99 helicopters has been downed somewhere around this area. We have reports that the pilot is still alive. You must find him and bring him back to base.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskPilot"]; +//_taskhandle setSimpleTaskDescription ["One of our AH-99 helicopters has been downed somewhere around this area. We have reports that the pilot is still alive. You must find him and bring him back to base.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername));/ if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; }; +[west, "_taskhandle", ["taskPilot.", "One of our AH-99 helicopters has been downed somewhere around this area. We have reports that the pilot is still alive. You must find him and bring him back to base.", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; + ["TaskAssigned",["",_mission_name]] call bis_fnc_showNotification; // PLAYER IS WITH THE PILOT -- @@ -59,7 +61,9 @@ if (!(alive _pilot)) exitWith { deleteMarker str(_markername2); deleteMarker str(_markername); - player removeSimpleTask _taskhandle; + //player removeSimpleTask _taskhandle; + [["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; + ["TaskFailed",["","The pilot is dead"]] call bis_fnc_showNotification; }; @@ -76,7 +80,8 @@ if (!(alive _pilot)) exitWith { deleteMarker str(_markername2); deleteMarker str(_markername); - player removeSimpleTask _taskhandle; + //player removeSimpleTask _taskhandle; + [["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; ["TaskFailed",["","The pilot is dead"]] call bis_fnc_showNotification; }; diff --git a/source/missions/missions/rescue/mission.sqf b/source/missions/missions/rescue/mission.sqf index e7e2af2..d17be4e 100644 --- a/source/missions/missions/rescue/mission.sqf +++ b/source/missions/missions/rescue/mission.sqf @@ -38,9 +38,11 @@ _group = createGroup west; // TASK AND NOTIFICATION _VARtaskgeneratedName = format ["rescue%1%2",round(_MissionPos select 0),round(_Missionpos select 1)]; // generate variable name for task -_taskhandle = player createSimpleTask ["taskRescue"]; -_taskhandle setSimpleTaskDescription ["One of our patrols has been ambushed and requires immediate assistance",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskRescue"]; +//_taskhandle setSimpleTaskDescription ["One of our patrols has been ambushed and requires immediate assistance",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); + +[west, "_taskhandle", ["taskRescue.", "One of our patrols has been ambushed and requires immediate assistance", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; diff --git a/source/missions/missions/rescue/success.sqf b/source/missions/missions/rescue/success.sqf index 8cbd7a9..20f381a 100644 --- a/source/missions/missions/rescue/success.sqf +++ b/source/missions/missions/rescue/success.sqf @@ -14,7 +14,8 @@ private "_task"; _taskgeneratedName = format ["rescue%1%2",round(_MissionPos select 0),round(_Missionpos select 1)]; // generate taskname/variable name call compile format["_task = %1",_taskgeneratedname]; // recall variable and inject it into handle -player removeSimpleTask _task; +//player removeSimpleTask _task; +[["_task", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; // IF SOLDIERS DEAD if (!(alive _sol1) && !(alive _sol2) && !(alive _sol3)) exitWith { diff --git a/source/missions/missions/sabotage/mission.sqf b/source/missions/missions/sabotage/mission.sqf index 79d2fb7..e1236ee 100644 --- a/source/missions/missions/sabotage/mission.sqf +++ b/source/missions/missions/sabotage/mission.sqf @@ -30,9 +30,11 @@ _tower addaction ["Sabotage", "missions\missions\sabotage\success.sqf",[_mission // TASK AND NOTIFICATION _VARtaskgeneratedName = format["tsksabot%1%2",round(_MissionPos select 0),round(_Missionpos select 1)]; // generate variable name for task -_taskhandle = player createSimpleTask ["taskSabot"]; -_taskhandle setSimpleTaskDescription ["The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskSabot"]; +//_taskhandle setSimpleTaskDescription ["The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); + +[west, "_taskhandle", ["taskSabot.", "The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies."], objNull, true] call BIS_fnc_taskCreate; if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; diff --git a/source/missions/missions/sabotage/success.sqf b/source/missions/missions/sabotage/success.sqf index 0953c1a..6acc93d 100644 --- a/source/missions/missions/sabotage/success.sqf +++ b/source/missions/missions/sabotage/success.sqf @@ -16,7 +16,8 @@ call compile format["_taskhandle = %1",_VARtaskgeneratedName]; // recall variabl _object removeAction _action; -player removeSimpleTask _taskhandle; +//player removeSimpleTask _taskhandle; +[["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; deleteMarker str(_markername2); deleteMarker str(_markername); diff --git a/source/missions/missions/steal/mission.sqf b/source/missions/missions/steal/mission.sqf index 1c8a57f..876ccfe 100644 --- a/source/missions/missions/steal/mission.sqf +++ b/source/missions/missions/steal/mission.sqf @@ -44,9 +44,10 @@ _box3 setdir 180; // TASK AND NOTIFICATION -_taskhandle = player createSimpleTask ["taskSteal"]; -_taskhandle setSimpleTaskDescription ["An enemy truck full of supplies has been spotted in the area. Find it and bring it back to the base in one piece.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskSteal"]; +//_taskhandle setSimpleTaskDescription ["An enemy truck full of supplies has been spotted in the area. Find it and bring it back to the base in one piece.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +[west, "_taskhandle", ["taskSteal.", "An enemy truck full of supplies has been spotted in the area. Find it and bring it back to the base in one piece.", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; @@ -73,7 +74,8 @@ waitUntil {sleep 2; ((getdammage _truck1)>0.95 OR (_truck1 distance _initpos)<50 deleteMarker str(_markername2); deleteMarker str(_markername); -player removeSimpleTask _taskhandle; +//player removeSimpleTask _taskhandle; +[["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; if (getdammage _truck1>0.95) exitWith { ["TaskFailed",["","The enemy convoy is destroyed"]] call bis_fnc_showNotification; diff --git a/source/missions/missions/target/mission.sqf b/source/missions/missions/target/mission.sqf index f874c65..f0aac6d 100644 --- a/source/missions/missions/target/mission.sqf +++ b/source/missions/missions/target/mission.sqf @@ -38,9 +38,10 @@ _unit = _group createUnit ["O_soldier_F", _missionpos, [], 0, "FORM"]; _unit = _group createUnit ["O_soldier_F", _missionpos, [], 0, "FORM"]; // TASK AND NOTIFICATION -_taskhandle = player createSimpleTask ["taskTarget"]; -_taskhandle setSimpleTaskDescription ["A high enemy target has been spotted somewhere in this location. Hunt him down.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskTarget"]; +//_taskhandle setSimpleTaskDescription ["A high enemy target has been spotted somewhere in this location. Hunt him down.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +[west, "_taskhandle", ["taskDestroy.", "A high enemy target has been spotted somewhere in this location. Hunt him down.", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; @@ -54,7 +55,8 @@ waitUntil {sleep 2; !alive _target}; // MISSION COMPLETED -- deleteMarker str(_markername2); deleteMarker str(_markername); -player removeSimpleTask _taskhandle; +//player removeSimpleTask _taskhandle; +[["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; sleep 1; diff --git a/source/missions/missions/underwater/mission.sqf b/source/missions/missions/underwater/mission.sqf index 4aefd4f..9bbf4e0 100644 --- a/source/missions/missions/underwater/mission.sqf +++ b/source/missions/missions/underwater/mission.sqf @@ -30,9 +30,11 @@ _tower addaction ["Sabotage", "missions\missions\sabotage\success.sqf",[_mission // TASK AND NOTIFICATION _VARtaskgeneratedName = format["tsksabot%1%2",round(_MissionPos select 0),round(_Missionpos select 1)]; // generate variable name for task -_taskhandle = player createSimpleTask ["taskSabot"]; -_taskhandle setSimpleTaskDescription ["The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies.",_mission_name,""]; -_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); +//_taskhandle = player createSimpleTask ["taskSabot"]; +//_taskhandle setSimpleTaskDescription ["The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies.",_mission_name,""]; +//_taskhandle setSimpleTaskDestination (getMarkerPos str(_markername)); + +[west, "_taskhandle", ["taskDestroy.", "The enemy is using a power supply somewhere in this area. We need you to find it and sabotage it. It will allow us to have a bit of better intel on our enemies.", "(getMarkerPos str(_markername)"], objNull, true] call BIS_fnc_taskCreate; if (!ismultiplayer) then { execVM "utilities\autoSave.sqf"; diff --git a/source/missions/missions/underwater/success.sqf b/source/missions/missions/underwater/success.sqf index 5524921..a0330f0 100644 --- a/source/missions/missions/underwater/success.sqf +++ b/source/missions/missions/underwater/success.sqf @@ -19,7 +19,8 @@ call compile format["_taskhandle = %1",_VARtaskgeneratedName]; _object removeAction _action; -player removeSimpleTask _taskhandle; +//player removeSimpleTask _taskhandle; +[["_taskhandle", "WEST"],"BIS_fnc_deleteTask", true, true] call BIS_fnc_MP; deleteMarker str(_markername2); deleteMarker str(_markername); diff --git a/source/serverinit.sqf b/source/serverinit.sqf new file mode 100644 index 0000000..6c22dd1 --- /dev/null +++ b/source/serverinit.sqf @@ -0,0 +1,409 @@ +if (!isServer) exitWith {}; + + +////////////////////////////////////////////////////// +// HOW TO MANUALLY CREATE THE MISSION: +// 1)YOU MUST PLACE THE HQ LOCATION +// 2)DEFINE THE CAPTURABLE ZONES +// -- YOU CAN ALSO JUST PUT A HQ SOMEWHERE AND LET THE ZONES BEING RANDOMLY GENERATED +// -- YOU MUST PLACE MANUALLY THE HQ IF YOU ARE ALREADY PLACING THE ZONES BY HAND +// 3) DONT FORGET TO DEFINE THE VARIABLES BELOW. If you are ONLY placing the HQ by hand, you just need to put "hq_manually_placed" to +// "true" instead of "false". If you are also placing the zones by hand, make "zones_manually_placed" to "true". +///////////////////////////////////////////////////////////// +// 1) In the gamelogic, for the HQ( !! MAKE ONLY ONE HQ !!): _null=[getpos this] execVM "initHQ\BluHQinit.sqf" +// +// 2) In the init of gamelogic, to create a capturable enemy zone: +// _null = ["zone name",pts awarded upon capture, zone radius,getpos this,false/true,false/true] execvm "createzone.sqf"; +// "zone name": name of the zone +// pts awarded upon capture: points you earn when you capture the zone. Also the amount of points of army power you take and receive +// from the enemy after capture +// zone radius: how large the zone is +// getpos this: It's the position of the zone. The gamelogic actually. You don't have to modify this. +// false/true: if the zone is fortified or not. If the zone is fortified, there will be a bit more enemies and they will be maning +// static defences if there are any +// false/true: if the zone is selecting randomly a prefab base. Prefab is selected according to the zone radius. The bigger the zone, +// the bigger the prefab asset will be chosen. +// +// EXAMPLE, in the init of a gamelogic you have placed on the map: +// _null=["OP Xander",20,200,getpos this,true,false] execvm "initZones\createzone.sqf" +// +// 3) Define these variables: + +// choose between "tropical" - "arid" - "temperate" - "temperate_cold" - "mediterranean" +if (isNil "weather_type") then {weather_type = "tropical";};publicVariable "weather_type"; +// set the skill range of ennemy AI +if (isNil "opfor_ai_skill") then {opfor_ai_skill = [0.1,0.3];};publicVariable "opfor_ai_skill"; +// set the skill range of friendly AI, from 0 to 1 (0 being completely dumb) +if (isNil "blufor_ai_skill") then {blufor_ai_skill = [0.4,0.7];};publicVariable "blufor_ai_skill"; + +// you must specify if you have manually placed HQ or not. false = HQ is randomly placed, true = you have manually placed the HQ +hq_manually_placed = false;publicVariable "hq_manually_placed"; +// you must specify if you have manually placed the zones or not. false = zones are randomly generated, true = you have manually placed the zones +zones_manually_placed = false;publicVariable "zones_manually_placed"; +zones_max_dist_from_hq = 7500;publicVariable "zones_max_dist_from_hq"; +dynamic_weather_enable = true;publicVariable "dynamic_weather_enable"; +manually_chosen = false;publicVariable "manually_chosen"; + +if (isNil "enable_fast_travel") then { enable_fast_travel = true; };publicVariable "enable_fast_travel"; +// chopper taxi (support) will fast travel (teleport) or not +if (isNil "enableChopperFastTravel") then { enableChopperFastTravel = true; };publicVariable "enableChopperFastTravel"; +// Starting CP +if (isNil "commandpointsblu1") then { commandpointsblu1 = 20; };publicVariable "commandpointsblu1"; +// STARTING ARMY POWER +if (isNil "blufor_ap") then {blufor_ap = 0;};publicVariable "blufor_ap"; +opfor_ap = 0; + + +/////////////////////////////////////////////////////// +// initialise variables +////////////////////////////////////////////////////// +// MOST OF THE VALUES ARE BEING OVERWRITTEN BY PLAYER INPUT AT THE BEGINNING +////////////////////////////////////////////////////// + +///////////////////////////////////////////////////////////// +debugmode = false; // Debug mode, kind of obsolete +/// ------------- VALUES UNDER THIS ARE OVERWRITTEN +zones_number = 9; // Number of capturables zones to create (when zones are created randomly) +zones_spacing = 1200; // minimum space between 2 zones (in meters) // SOON OBSOLETE +zones_max_radius = 1000; // Determine the maximum radius a generated zone can have +zones_min_radius = 200; // Determine the minium radius a generated zone can have. SHOULD NOT BE UNDER 200. + +/////////////////////////////////////////////////////// +// This mission will have a harder time generating stuff if a lot of the terrain of the island is sloped, meaning that valid locations +// will be harder/take longer to find (side missions, mission init). +// Keep that in mind when tweaking the zones amount/radius value. +///////////////////////////////////////////////////////// +// preprocess the qrf file for the EH +QRF_test = compile preprocessFile "WARCOM\WARCOM_opf_qrf.sqf"; + + +// nber of missions succes(!!dont touch!!) +missions_success = 0;publicVariable "missions_success"; + +zones_created = false;publicVariable "zones_created"; +blu_hq_created = false;publicVariable "blu_hq_created"; +can_get_mission = true;publicVariable "can_get_mission"; +failsafe_zones_not_found = false;publicVariable "failsafe_zones_not_found"; +createcenter sideLogic; +LogicGroup = createGroup SideLogic;publicVariable "LogicGroup"; +PAPABEAR=[West,"HQ"];publicVariable "PAPABEAR"; +locator_hq_actived = false;publicVariable "locator_hq_actived"; +op_zones_index = 0;publicVariable "op_zones_index"; +clientisSync = false;publicVariable "clientisSync"; +fobSwitch = false;publicVariable "fobSwitch"; +player_is_choosing_hqpos = false;publicVariable "player_is_choosing_hqpos"; + +if (isNil "amount_zones_created") then { + amount_zones_created = 0; +}; + +publicVariable "amount_zones_created"; + +if (isNil "HQ_pos_found_generated") then { + HQ_pos_found_generated = false; +}; + +publicVariable "HQ_pos_found_generated"; + +if (isNil "chosen_settings") then { + chosen_settings = false; +}; + +publicVariable "chosen_settings"; + +if (isNil "chosen_hq_placement") then { + chosen_hq_placement = false; +}; + +publicVariable "chosen_hq_placement"; + +if (isNil "zoneundercontrolblu") then { + zoneundercontrolblu = 0; +}; + +publicVariable "zoneundercontrolblu"; + +if (isNil "amount_zones_captured") then { + amount_zones_captured = 0; +}; + +publicVariable "amount_zones_captured"; + +if (isNil "savegameNumber") then { + savegameNumber = 0; +}; + +publicVariable "savegameNumber"; + +if (isNil "capturedZonesNumber") then { + capturedZonesNumber = 0; +}; + +publicVariable "capturedZonesNumber"; + +if (isNil "finishedMissionsNumber") then { + finishedMissionsNumber = 0; +}; + +publicVariable "finishedMissionsNumber"; + +if (isNil "OvercastVar") then { + OvercastVar = 0; +}; + +publicVariable "OvercastVar"; + +if (isNil "FogVar") then { + FogVar = 0; +}; + +publicVariable "FogVar"; + +// this is a special one (if/else) +if (isNil "Array_of_FOBS") then { + // if the player is sp or server or no fobs have been created + Array_of_FOBS = []; +} +else /// JIP for the client +{ + { + [_x] execVM "support\FOBactions.sqf"; + } forEach Array_of_FOBS; +}; + +if (isNil "Array_of_FOBname") then { + Array_of_FOBname = []; +}; + +publicVariable "Array_of_FOBS"; +publicVariable "Array_of_FOBname"; + +game_master = ["player1"];publicVariable "game_master"; + + + +waitUntil { !isNil "serv_zones_array" }; +diag_log format ["serv_zones_array: %1", serv_zones_array]; +_warcom_init = [serv_zones_array, getpos hq_blu1, [0,0,0], blufor_ap, opfor_ap, 2700,blufor_ai_skill,opfor_ai_skill, 2000] execVM "WARCOM\WARCOM_init.sqf"; // 2700 is 40 mins +waitUntil {scriptDone _warcom_init}; + +if (isServer) then { + // group cleaning script + 0 = [ + 60*60, // seconds to delete dead bodies (0 means don't delete) + 60*60, // seconds to delete dead vehicles (0 means don't delete) + 60*60, // seconds to delete dropped weapons (0 means don't delete) + 0, // seconds to deleted planted explosives (0 means don't delete) + 60*60 // seconds to delete dropped smokes/chemlights (0 means don't delete) + ] execVM 'repetitive_cleanup.sqf'; +}; + + +if (isServer) then { + // initialise the ressources per zone bonus + _basepoint = [] execVM "zonesundercontrol.sqf"; +}; + +// init the bonuses you get when capturing zones +_basepoint = [] execVM "zones_bonus.sqf"; + +if (zones_manually_placed) then { + waitUntil {!isNil ("Array_of_OPFOR_zones")}; + sleep 1; + _warcom_init = [Array_of_OPFOR_zones, getpos hq_blu1, [0,0,0], blufor_ap, opfor_ap, 2700,blufor_ai_skill,opfor_ai_skill, 1500] execVM "WARCOM\WARCOM_init.sqf"; +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + +/* waitUntil { time > 0 }; + +vActiveMission=0; publicVariable "vActiveMission"; +vActiveMarker="none"; publicVariable "vActiveMarker"; +vActiveName="none"; publicVariable "vActiveName"; + +if (vVehicleLock == 0) then { + vMissionScore=100; publicVariable "vMissionScore"; +} else { + vMissionScore=0; publicVariable "vMissionScore"; +}; +vDestroyMission=false; publicVariable "vDestroyMission"; +vNewMissionTimer=0; publicVariable "vNewMissionTimer"; +vMissionStartTime=0; publicVariable "vMissionStartTime"; +vParadropCount=0; publicVariable "vParadropCount"; +vArmorInArea=false; publicVariable "vArmorInArea"; +vMortarInArea=false; publicVariable "vMortarInArea"; +vHeliInArea=false; publicVariable "vHeliInArea"; +vActiveRecruitsAI=0; publicVariable "vActiveRecruitsAI"; +vClaimedLeader="PL1"; publicVariable "vClaimedLeader"; +vClientRequestInfo="none"; publicVariable "vClientRequestInfo"; +vEvacSpawned=false; publicVariable "vEvacSpawned"; + +if (vSupplyEnable == 1) then { + vSupplyTimer = time; + publicVariable "vSupplyTimer"; + vSupplyDown = false; + publicVariable "vSupplyDown"; +}; + +"vClientRequestInfo" addPublicVariableEventHandler { + _id = 0; + if (vClientRequestInfo == "PL1") then { _id = owner Player1; }; + if (vClientRequestInfo == "PL2") then { _id = owner Player2; }; + if (vClientRequestInfo == "PL3") then { _id = owner Player3; }; + if (vClientRequestInfo == "PL4") then { _id = owner Player4; }; + if (vClientRequestInfo == "PL5") then { _id = owner Player5; }; + if (vClientRequestInfo == "PL6") then { _id = owner Player6; }; + if (vClientRequestInfo == "PL7") then { _id = owner Player7; }; + if (vClientRequestInfo == "PL8") then { _id = owner Player8; }; + if (vClientRequestInfo == "PL9") then { _id = owner Player9; }; + if (vClientRequestInfo == "PL10") then { _id = owner Player10; }; + if (vClientRequestInfo == "PL11") then { _id = owner Player11; }; + if (vClientRequestInfo == "PL12") then { _id = owner Player12; }; + vClientRequestInfo="none"; + + _id publicVariableClient "vActiveMission"; + _id publicVariableClient "vActiveMarker"; + _id publicVariableClient "vActiveName"; + _id publicVariableClient "vRedInArea"; + _id publicVariableClient "vBlueInArea"; + _id publicVariableClient "vDetectedInArea"; + _id publicVariableClient "vMHQDead"; + _id publicVariableClient "vMissionScore"; + _id publicVariableClient "vArmorInArea"; + _id publicVariableClient "vMortarInArea"; + _id publicVariableClient "vHeliInArea"; + _id publicVariableClient "vActiveRecruitsAI"; + _id publicVariableClient "vEvacSpawned"; + + if (vSupplyEnable == 1) then { + _id publicVariableClient "vSupplyTimer"; + _id publicVariableClient "vSupplyDown"; + }; +}; + +_CreateMission=false; +_CleanupTimer=time+300; +vLastMission=0; + +while {true} do { + if (time > _CleanupTimer) then { nul = [] execVM "cleanup.sqf"; _CleanupTimer=time+300; }; + if (vActiveMission == 0) then { vNewMissionTimer = time + 60; publicVariable "vNewMissionTimer"; vActiveMission=1000; publicVariable "vActiveMission"; }; + + if ((time > vNewMissionTimer) && (vActiveMission == 1000)) then { + while {true} do { + scopeName "MissionGen"; + vActiveMission=1+floor(random 51); + if (vActiveMission != vLastMission) then { breakOut "MissionGen"; }; + }; + vLastMission=vActiveMission; + publicVariable "vActiveMission"; + vMissionStartTime=time; publicVariable "vMissionStartTime"; + vParadropCount=0; + _CreateMission=true; + }; + + if (vDestroyMission && (vActiveMission > 0)) then { + nul = [] execVM "destroymission.sqf"; + vDestroyMission=false; publicVariable "vDestroyMission"; + vActiveMission=0; publicVariable "vActiveMission"; + vMissionScore=vMissionScore+1; publicVariable "vMissionScore"; + systemChat format [ "Missions done: %1", vMissionScore ]; + }; + + if (_CreateMission) then { + if (vActiveMission == 1) then { nul = [ "Frini" ] execVM "createmission.sqf" }; + if (vActiveMission == 2) then { nul = [ "Ifestiona" ] execVM "createmission.sqf" }; + if (vActiveMission == 3) then { nul = [ "Galati" ] execVM "createmission.sqf" }; + if (vActiveMission == 4) then { nul = [ "Syrta" ] execVM "createmission.sqf" }; + if (vActiveMission == 5) then { nul = [ "Kore" ] execVM "createmission.sqf" }; + if (vActiveMission == 6) then { nul = [ "Orino" ] execVM "createmission.sqf" }; + if (vActiveMission == 7) then { nul = [ "Koroni" ] execVM "createmission.sqf" }; + if (vActiveMission == 8) then { nul = [ "Negades" ] execVM "createmission.sqf" }; + if (vActiveMission == 9) then { nul = [ "Neri" ] execVM "createmission.sqf" }; + if (vActiveMission == 10) then { nul = [ "Panochori" ] execVM "createmission.sqf" }; + if (vActiveMission == 11) then { nul = [ "Therisa" ] execVM "createmission.sqf" }; + if (vActiveMission == 12) then { nul = [ "Poliakko" ] execVM "createmission.sqf" }; + if (vActiveMission == 13) then { nul = [ "Alikampos" ] execVM "createmission.sqf" }; + if (vActiveMission == 14) then { nul = [ "Lakka" ] execVM "createmission.sqf" }; + if (vActiveMission == 15) then { nul = [ "Stavros" ] execVM "createmission.sqf" }; + if (vActiveMission == 16) then { nul = [ "Anthrakia" ] execVM "createmission.sqf" }; + if (vActiveMission == 17) then { nul = [ "Rodopoli" ] execVM "createmission.sqf" }; + if (vActiveMission == 18) then { nul = [ "Charkia" ] execVM "createmission.sqf" }; + if (vActiveMission == 19) then { nul = [ "Kalochori" ] execVM "createmission.sqf" }; + if (vActiveMission == 20) then { nul = [ "Dorida" ] execVM "createmission.sqf" }; + if (vActiveMission == 21) then { nul = [ "Chalkeia" ] execVM "createmission.sqf" }; + if (vActiveMission == 22) then { nul = [ "Pyrgos", "Pyrgos Military Base" ] execVM "createmission.sqf" }; + if (vActiveMission == 23) then { nul = [ "Sofia" ] execVM "createmission.sqf" }; + if (vActiveMission == 24) then { nul = [ "Molos" ] execVM "createmission.sqf" }; + if (vActiveMission == 25) then { nul = [ "Ioannina" ] execVM "createmission.sqf" }; + if (vActiveMission == 26) then { nul = [ "PowerPlant", "Power Plant" ] execVM "createmission.sqf" }; + if (vActiveMission == 27) then { nul = [ "Panagia" ] execVM "createmission.sqf" }; + if (vActiveMission == 28) then { nul = [ "Feres" ] execVM "createmission.sqf" }; + if (vActiveMission == 29) then { nul = [ "Selakano" ] execVM "createmission.sqf" }; + if (vActiveMission == 30) then { nul = [ "MilBase", "Military Base North" ] execVM "createmission.sqf" }; + if (vActiveMission == 31) then { nul = [ "FireBase", "Fire Base" ] execVM "createmission.sqf" }; + if (vActiveMission == 32) then { nul = [ "Zaros" ] execVM "createmission.sqf" }; + if (vActiveMission == 33) then { nul = [ "Factory" ] execVM "createmission.sqf" }; + if (vActiveMission == 34) then { nul = [ "Oreokastro" ] execVM "createmission.sqf" }; + if (vActiveMission == 35) then { nul = [ "Vikos" ] execVM "createmission.sqf" }; + if (vActiveMission == 36) then { nul = [ "Hill299", "Hill 299" ] execVM "createmission.sqf" }; + if (vActiveMission == 37) then { nul = [ "Hill234", "Hill 234" ] execVM "createmission.sqf" }; + if (vActiveMission == 38) then { nul = [ "Abdera" ] execVM "createmission.sqf" }; + if (vActiveMission == 39) then { nul = [ "AirstripNorth", "Airstrip North" ] execVM "createmission.sqf" }; + if (vActiveMission == 40) then { nul = [ "Mine" ] execVM "createmission.sqf" }; + if (vActiveMission == 41) then { nul = [ "AirstripSouth", "Airstrip South" ] execVM "createmission.sqf" }; + if (vActiveMission == 42) then { nul = [ "Crossroads" ] execVM "createmission.sqf" }; + if (vActiveMission == 43) then { nul = [ "Checkpoint" ] execVM "createmission.sqf" }; + if (vActiveMission == 44) then { nul = [ "FarosValley", "Faros Valley" ] execVM "createmission.sqf" }; + if (vActiveMission == 45) then { nul = [ "Dump" ] execVM "createmission.sqf" }; + if (vActiveMission == 46) then { nul = [ "Gori" ] execVM "createmission.sqf" }; + if (vActiveMission == 47) then { nul = [ "Aristi" ] execVM "createmission.sqf" }; + if (vActiveMission == 48) then { nul = [ "FriniWoods", "Frini Woods" ] execVM "createmission.sqf" }; + if (vActiveMission == 49) then { nul = [ "Nidasos" ] execVM "createmission.sqf" }; + if (vActiveMission == 50) then { nul = [ "Athira" ] execVM "createmission.sqf" }; + if (vActiveMission == 51) then { nul = [ "Paros" ] execVM "createmission.sqf" }; + _CreateMission = false; + }; + + if (vClaimedLeader != "none") then { + if (vClaimedLeader == "PL1") then { if (alive Player1) then { group Player1 selectLeader Player1 }; }; + if (vClaimedLeader == "PL2") then { if (alive Player2) then { group Player2 selectLeader Player2 }; }; + if (vClaimedLeader == "PL3") then { if (alive Player3) then { group Player3 selectLeader Player3 }; }; + if (vClaimedLeader == "PL4") then { if (alive Player4) then { group Player4 selectLeader Player4 }; }; + if (vClaimedLeader == "PL5") then { if (alive Player5) then { group Player5 selectLeader Player5 }; }; + if (vClaimedLeader == "PL6") then { if (alive Player6) then { group Player6 selectLeader Player6 }; }; + if (vClaimedLeader == "PL7") then { if (alive Player7) then { group Player7 selectLeader Player7 }; }; + if (vClaimedLeader == "PL8") then { if (alive Player8) then { group Player8 selectLeader Player8 }; }; + if (vClaimedLeader == "PL9") then { if (alive Player9) then { group Player9 selectLeader Player9 }; }; + if (vClaimedLeader == "PL10") then { if (alive Player10) then { group Player10 selectLeader Player10 }; }; + if (vClaimedLeader == "PL11") then { if (alive Player11) then { group Player11 selectLeader Player11 }; }; + if (vClaimedLeader == "PL12") then { if (alive Player12) then { group Player12 selectLeader Player12 }; }; + }; + + sleep 1; +}; + */ \ No newline at end of file From 640a71c229010e70b4845dc5027eb770647b9ab1 Mon Sep 17 00:00:00 2001 From: phr0gz Date: Fri, 30 Jan 2015 16:25:55 +0100 Subject: [PATCH 09/21] Zones placed under server control, AI can cap any zone without anyone on the server --- source/captured.sqf | 2 +- source/initHQ/BluHQinit.sqf | 12 +++++++----- source/initZones/locatorzonesV1.sqf | 4 ++-- source/serverinit.sqf | 19 ++++++++++++++++++- 4 files changed, 28 insertions(+), 9 deletions(-) diff --git a/source/captured.sqf b/source/captured.sqf index 12ca83c..016ab6c 100644 --- a/source/captured.sqf +++ b/source/captured.sqf @@ -22,7 +22,7 @@ _index = 0; } forEach WARCOM_zones_controled_by_OPFOR; // ADD POINTS -if (hasInterface) then { +if (isServer) then { _points = round(_points/3); commandpointsblu1 = commandpointsblu1 + _points; publicVariable "commandpointsblu1"; diff --git a/source/initHQ/BluHQinit.sqf b/source/initHQ/BluHQinit.sqf index afd180c..7323500 100644 --- a/source/initHQ/BluHQinit.sqf +++ b/source/initHQ/BluHQinit.sqf @@ -92,14 +92,16 @@ if (!zones_manually_placed) then { // CALL ZONES GENERATION waitUntil {!isNil {getsize_script}}; // WAIT UNTIL THE MAPSIZE SCRIPT IS DONE + createzone_server = true; + publicVariable "createzone_server"; // CHECK IF ZONES ARE PLACED... // If not execute locatorZonesV1.sqf if the user wants them randomly placed. V2 if the user wants to place zones. - if (!zones_created && !manually_chosen) then { - _zones_create = [50, 0.2] execVM "initZones\locatorZonesV1.sqf"; - } else { - _zones_create = [50, 0.2] execVM "initZones\locatorZonesV2.sqf"; - }; + // if (!zones_created && !manually_chosen) then { + // _zones_create = [50, 0.2] execVM "initZones\locatorZonesV1.sqf"; + // } else { + // _zones_create = [50, 0.2] execVM "initZones\locatorZonesV2.sqf"; + // }; }; player allowDamage true; diff --git a/source/initZones/locatorzonesV1.sqf b/source/initZones/locatorzonesV1.sqf index b889d4f..28fc51f 100644 --- a/source/initZones/locatorzonesV1.sqf +++ b/source/initZones/locatorzonesV1.sqf @@ -52,7 +52,7 @@ while {!_found} do _posDeMeilleurTruc = [center_of_map, 0,half_of_map,5,0,0.1,0,[],[[0,0],[0,0]]] call BIS_fnc_findSafePos; if (_posDeMeilleurTruc select 0 != 0 && _posDeMeilleurTruc select 1 != 0) then {_Posfound=true;}; }; - _playerDistance = _posDeMeilleurTruc distance player; + _playerDistance = _posDeMeilleurTruc distance hq_blu1; @@ -91,7 +91,7 @@ while {!_found} do player globalChat format["Zone location #%1 found !",_i]; player globalChat format["Generating zone #%1",_i]; - waituntil {scriptdone _generatezonescript}; + //waituntil {scriptdone _generatezonescript}; }; // END OF THIRD LOOP }; // END SECOND LOOP }; // END WHILE LOOP --- LOCATION FOUND diff --git a/source/serverinit.sqf b/source/serverinit.sqf index 6c22dd1..87a49a2 100644 --- a/source/serverinit.sqf +++ b/source/serverinit.sqf @@ -159,6 +159,18 @@ if (isNil "FogVar") then { publicVariable "FogVar"; +if (isNil "createzone_server") then { + createzone_server = false; +}; + +publicVariable "createzone_server"; + +if (isNil "mission_number_of_zones_captured") then { + mission_number_of_zones_captured = 0; +}; + +publicVariable "mission_number_of_zones_captured"; + // this is a special one (if/else) if (isNil "Array_of_FOBS") then { // if the player is sp or server or no fobs have been created @@ -180,7 +192,12 @@ publicVariable "Array_of_FOBname"; game_master = ["player1"];publicVariable "game_master"; - + waitUntil {chosen_settings && createzone_server}; + if (!zones_manually_placed) then { + if (!zones_created) then { // CHECK IF ZONES ARE PLACED, IF NOT EXECUTE locatorZonesV1.sqf + _zones_create = [50, 0.2] execVM "initZones\locatorZonesV1.sqf"; // CHECK IF ZONES HAVE ALREADY BEEN PLACED + }; + }; waitUntil { !isNil "serv_zones_array" }; diag_log format ["serv_zones_array: %1", serv_zones_array]; From 26e6ba8c22f7109c7ae675f91918bed86204abe4 Mon Sep 17 00:00:00 2001 From: Brenden Cai Date: Wed, 11 May 2016 18:27:38 +1000 Subject: [PATCH 10/21] Fixes 'Directory Not Found' error by adding check to see if the directory exists and creates it if it does not. --- deployLocalBuild.ps1 | Bin 5002 -> 6010 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/deployLocalBuild.ps1 b/deployLocalBuild.ps1 index 3567e9e11d8f2ad090528e131fe4bb8228dca79e..68619489c10a224b59d998a1a4c72d168d89a4e5 100644 GIT binary patch delta 395 zcmeBD|E0I#2|ITxLj^-7Loq`ML-AxqHc@UBh7=&bh#{CEVDd&D-^qDge3PBn#ZbjL zG&vEf1o>nq|KZ?35?RkH$(hEG$dCgxH+8ZW)-~WT03+&_$IX_f6L0W1GBznP;*d8_(tq?AKUudcYU# lfp`?hgT>&E2k}rH4-z58@j&(DI)3s7b}>fZ&6zxk>;TjwSM~q^ delta 21 dcmeyR*QLJU3H#<-oQqf{-{P#;{7#^U4FGd_3E}_% From be0a2bb5ed0edd865bba90fd3c380db0ebc63e3f Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Sat, 28 May 2016 09:41:00 +1000 Subject: [PATCH 11/21] Added check if there are any existing DUWS files in the mission folders Added a check to see if the file variable actually isn't empty or null so that it doesn't attempt to rename a directory with extension '.bak'. Fixes #121. --- deployLocalBuild.ps1 | Bin 6010 -> 6570 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/deployLocalBuild.ps1 b/deployLocalBuild.ps1 index 68619489c10a224b59d998a1a4c72d168d89a4e5..0b21acf431fcd6b1c01ec99b05fd33aec8eb71e2 100644 GIT binary patch delta 457 zcmeyRx5{`!8gF1GLmGnygD!&~Lq0UTZ>3fX5kT;e1M;8asqD#*v>j`vB^NZ f`5x~jR*=9j^xi$*pvigM0+Ua$`fN53^#Od`XiF1lcAR2n%f1;=jZ?nTIzDS#Yuzf6(MSZh^^q!V;4ou$pX6 I5cgsN0GNFf=l}o! From 5ef638fe15a43780b27b7917db29621cc43b408e Mon Sep 17 00:00:00 2001 From: Ultranoobian Date: Mon, 29 Aug 2016 23:44:46 +1000 Subject: [PATCH 12/21] Removed references to VAS and updated actions to reflect Virtual Arsenal only --- source/INIT.sqf | 6 ++---- source/description.ext | 8 +++----- source/dialog/request_support.sqf | 6 ++---- source/support/FOBactions.sqf | 3 +-- source/support/ammobox.sqf | 10 +++++----- source/support/fob.sqf | 5 ++--- source/support/fob_ammobox.sqf | 10 +++++----- 7 files changed, 20 insertions(+), 28 deletions(-) diff --git a/source/INIT.sqf b/source/INIT.sqf index 89d542e..145d01b 100644 --- a/source/INIT.sqf +++ b/source/INIT.sqf @@ -170,11 +170,9 @@ if (isMultiplayer) then { _revive_activated = paramsArray select 0; // Revives, true or false DUWSMP_CP_death_cost = paramsArray select 1; if (support_armory_available) then { - hq_blu1 addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - hq_blu1 addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + hq_blu1 addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; { - _x addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - _x addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + _x addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS); }; diff --git a/source/description.ext b/source/description.ext index 1e9a779..0ca2d9a 100644 --- a/source/description.ext +++ b/source/description.ext @@ -29,12 +29,10 @@ disabledAI = 1; #include "params.hpp" #include "duws_revive\gui\duws_revive.hpp" -// VAS INIT BEGIN -- ALSO TAW VIEWDISTANCE -#include "taw_vd\dialog.hpp" -#include "VAS\menu.hpp" +// TAW INIT BEGIN -- +#include "taw_vd\dialog.hpp" class CfgFunctions { - #include "VAS\cfgfunctions.hpp" #include "taw_vd\CfgFunctions.hpp" }; -// VAS INIT END -- \ No newline at end of file +// TAW INIT END -- diff --git a/source/dialog/request_support.sqf b/source/dialog/request_support.sqf index 4dc6657..d6f7fa4 100644 --- a/source/dialog/request_support.sqf +++ b/source/dialog/request_support.sqf @@ -88,11 +88,9 @@ switch (_index2) do { ctrlSetText [1000, format["%1",commandpointsblu1]]; lbSetColor [2103, index_support_armory, [0, 1, 0, 1]]; support_armory_available = true; - hq_blu1 addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - hq_blu1 addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + hq_blu1 addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; { - _x addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - _x addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + _x addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS); playSound "loadgun"; diff --git a/source/support/FOBactions.sqf b/source/support/FOBactions.sqf index 4b1d512..551a5e8 100644 --- a/source/support/FOBactions.sqf +++ b/source/support/FOBactions.sqf @@ -4,8 +4,7 @@ _fob addaction ["Player stats","dialog\info\info.sqf", "" _fob addaction ["Request ammobox drop(2CP)","support\fob_ammobox.sqf", "", 0, true, true, "", "_this == player"]; if (support_armory_available) then { - _fob addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - _fob addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + _fob addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; }; _fob addaction ["Squad manager","dialog\squad\squadmng.sqf", "", 0, true, true, "", "_this == player"]; diff --git a/source/support/ammobox.sqf b/source/support/ammobox.sqf index ebd1ed5..e410ec0 100644 --- a/source/support/ammobox.sqf +++ b/source/support/ammobox.sqf @@ -2,7 +2,7 @@ _target = _this select 0; _location = getpos _target; -if (commandpointsblu1<2) exitWith +if (commandpointsblu1<2) exitWith { ["info",["Not enough command points","Not enough Command Points (2CP required)"]] call bis_fnc_showNotification; }; @@ -32,11 +32,11 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf", "", 0, true, true, "", "_this == player"]}; - +if (support_armory_available) then {_ammo addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]}; + // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; - + waitUntil {sleep 1; getpos _ammo select 2<0.2}; _smoke = "SmokeShellGreen" CreateVehicle (getpos _ammo); -["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; \ No newline at end of file +["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; diff --git a/source/support/fob.sqf b/source/support/fob.sqf index 27b44e7..5fd815b 100644 --- a/source/support/fob.sqf +++ b/source/support/fob.sqf @@ -22,7 +22,7 @@ deleteVehicle _trg; if (_amountOPFOR > 0) exitWith { Hint "This position is not clear from enemies"; -PAPABEAR sidechat "Request denied. Enemies are too close to this position."; +PAPABEAR sidechat "Request denied. Enemies are too close to this position."; sleep 15; _art = [player1,"fob_support"] call BIS_fnc_addCommMenuItem; }; @@ -61,8 +61,7 @@ DUWS_fnc_fob = { _this addaction ["Squad manager","dialog\squad\squadmng.sqf", "", 0, true, true, "", "_this == player"]; _this addaction ["FOB manager","dialog\fob\FOBmanageropen.sqf", "", 0, true, true, "", "_this == player"]; if (support_armory_available) then { - _this addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - _this addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + _this addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; }; if (isServer) then { _this addaction ["Rest (wait/save)","savegame.sqf", "", 0, true, true, "", "_this == player"]; diff --git a/source/support/fob_ammobox.sqf b/source/support/fob_ammobox.sqf index ff6d3c0..613cc21 100644 --- a/source/support/fob_ammobox.sqf +++ b/source/support/fob_ammobox.sqf @@ -2,7 +2,7 @@ _target = _this select 0; _location = getpos _target; -if (commandpointsblu1<2) exitWith +if (commandpointsblu1<2) exitWith { ["info",["Not enough command points","Not enough Command Points (2CP required)"]] call bis_fnc_showNotification; }; @@ -32,11 +32,11 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory","VAS\open.sqf", "", 0, true, true, "", "_this == player"]}; - +if (support_armory_available) then {_ammo addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]}; + // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; - + waitUntil {sleep 1; getpos _ammo select 2<0.2}; _smoke = "SmokeShellGreen" CreateVehicle (getpos _ammo); -["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; \ No newline at end of file +["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; From a7cb9535ca126e55e777959403cefd30d989231c Mon Sep 17 00:00:00 2001 From: Ultranoobian Date: Mon, 29 Aug 2016 23:45:27 +1000 Subject: [PATCH 13/21] Deleted VAS files from source --- source/VAS/cfgfunctions.hpp | 48 - source/VAS/common.hpp | 1066 ------------------ source/VAS/config.sqf | 96 -- source/VAS/functions/fn_KRON_StrLeft.sqf | 16 - source/VAS/functions/fn_KRON_StrToArray.sqf | 11 - source/VAS/functions/fn_SaveLoad.sqf | 53 - source/VAS/functions/fn_VASP.sqf | 101 -- source/VAS/functions/fn_accList.sqf | 115 -- source/VAS/functions/fn_accPrompt.sqf | 13 - source/VAS/functions/fn_accType.sqf | 63 -- source/VAS/functions/fn_addGear.sqf | 15 - source/VAS/functions/fn_buildConfig.sqf | 176 --- source/VAS/functions/fn_closeDetails.sqf | 13 - source/VAS/functions/fn_deleteGear.sqf | 54 - source/VAS/functions/fn_details.sqf | 76 -- source/VAS/functions/fn_fetchCfg.sqf | 113 -- source/VAS/functions/fn_fetchCfgDetails.sqf | 138 --- source/VAS/functions/fn_fetchPlayerGear.sqf | 108 -- source/VAS/functions/fn_filter.sqf | 106 -- source/VAS/functions/fn_filterMenu.sqf | 83 -- source/VAS/functions/fn_filterShow.sqf | 55 - source/VAS/functions/fn_handleItem.sqf | 577 ---------- source/VAS/functions/fn_loadGear.sqf | 77 -- source/VAS/functions/fn_loadoutInfo.sqf | 95 -- source/VAS/functions/fn_mainDisplay.sqf | 246 ---- source/VAS/functions/fn_mainInit.sqf | 70 -- source/VAS/functions/fn_onRespawn.sqf | 16 - source/VAS/functions/fn_openDetails.sqf | 12 - source/VAS/functions/fn_playerDisplay.sqf | 60 - source/VAS/functions/fn_qRemoveItem.sqf | 11 - source/VAS/functions/fn_quickAddDrag.sqf | 38 - source/VAS/functions/fn_quickAttachment.sqf | 10 - source/VAS/functions/fn_quickItem.sqf | 12 - source/VAS/functions/fn_quickMag.sqf | 14 - source/VAS/functions/fn_removeGear.sqf | 34 - source/VAS/functions/fn_saveGear.sqf | 76 -- source/VAS/functions/fn_test.sqf | 1 - source/VAS/functions/fn_transferAction.sqf | 19 - source/VAS/functions/fn_transferMenu.sqf | 37 - source/VAS/functions/fn_transferNetwork.sqf | 30 - source/VAS/functions/fn_transferSaveGear.sqf | 29 - source/VAS/functions/fn_transferSaveMenu.sqf | 74 -- source/VAS/functions/fn_updateLoad.sqf | 44 - source/VAS/functions/macro.sqf | 43 - source/VAS/functions/misc_functions.sqf | 49 - source/VAS/menu.hpp | 850 -------------- source/VAS/open.sqf | 18 - source/stringtable.xml | 428 ------- 48 files changed, 5489 deletions(-) delete mode 100644 source/VAS/cfgfunctions.hpp delete mode 100644 source/VAS/common.hpp delete mode 100644 source/VAS/config.sqf delete mode 100644 source/VAS/functions/fn_KRON_StrLeft.sqf delete mode 100644 source/VAS/functions/fn_KRON_StrToArray.sqf delete mode 100644 source/VAS/functions/fn_SaveLoad.sqf delete mode 100644 source/VAS/functions/fn_VASP.sqf delete mode 100644 source/VAS/functions/fn_accList.sqf delete mode 100644 source/VAS/functions/fn_accPrompt.sqf delete mode 100644 source/VAS/functions/fn_accType.sqf delete mode 100644 source/VAS/functions/fn_addGear.sqf delete mode 100644 source/VAS/functions/fn_buildConfig.sqf delete mode 100644 source/VAS/functions/fn_closeDetails.sqf delete mode 100644 source/VAS/functions/fn_deleteGear.sqf delete mode 100644 source/VAS/functions/fn_details.sqf delete mode 100644 source/VAS/functions/fn_fetchCfg.sqf delete mode 100644 source/VAS/functions/fn_fetchCfgDetails.sqf delete mode 100644 source/VAS/functions/fn_fetchPlayerGear.sqf delete mode 100644 source/VAS/functions/fn_filter.sqf delete mode 100644 source/VAS/functions/fn_filterMenu.sqf delete mode 100644 source/VAS/functions/fn_filterShow.sqf delete mode 100644 source/VAS/functions/fn_handleItem.sqf delete mode 100644 source/VAS/functions/fn_loadGear.sqf delete mode 100644 source/VAS/functions/fn_loadoutInfo.sqf delete mode 100644 source/VAS/functions/fn_mainDisplay.sqf delete mode 100644 source/VAS/functions/fn_mainInit.sqf delete mode 100644 source/VAS/functions/fn_onRespawn.sqf delete mode 100644 source/VAS/functions/fn_openDetails.sqf delete mode 100644 source/VAS/functions/fn_playerDisplay.sqf delete mode 100644 source/VAS/functions/fn_qRemoveItem.sqf delete mode 100644 source/VAS/functions/fn_quickAddDrag.sqf delete mode 100644 source/VAS/functions/fn_quickAttachment.sqf delete mode 100644 source/VAS/functions/fn_quickItem.sqf delete mode 100644 source/VAS/functions/fn_quickMag.sqf delete mode 100644 source/VAS/functions/fn_removeGear.sqf delete mode 100644 source/VAS/functions/fn_saveGear.sqf delete mode 100644 source/VAS/functions/fn_test.sqf delete mode 100644 source/VAS/functions/fn_transferAction.sqf delete mode 100644 source/VAS/functions/fn_transferMenu.sqf delete mode 100644 source/VAS/functions/fn_transferNetwork.sqf delete mode 100644 source/VAS/functions/fn_transferSaveGear.sqf delete mode 100644 source/VAS/functions/fn_transferSaveMenu.sqf delete mode 100644 source/VAS/functions/fn_updateLoad.sqf delete mode 100644 source/VAS/functions/macro.sqf delete mode 100644 source/VAS/functions/misc_functions.sqf delete mode 100644 source/VAS/menu.hpp delete mode 100644 source/VAS/open.sqf delete mode 100644 source/stringtable.xml diff --git a/source/VAS/cfgfunctions.hpp b/source/VAS/cfgfunctions.hpp deleted file mode 100644 index afbac13..0000000 --- a/source/VAS/cfgfunctions.hpp +++ /dev/null @@ -1,48 +0,0 @@ -class VAS -{ - tag = "VAS"; - class functions - { - file = "VAS\functions"; - class onRespawn {description = "Called when a selected loadout is set to be loaded on respawn.";}; - class deleteGear {description = "Deletes the selected slot from the profileNamespace.";}; - class loadoutInfo {description = "Pulls up information about the selected slot and displays it.";}; - class loadGear {description = "Loads the selected VAS saved slot.";}; - class saveGear {description = "Saves current gear into selected slot for VAS.";}; - class SaveLoad {description = "Handles request and pulls up either the load menu or save menu.";}; - class details {description = "Handles request, if it is a weapon it will display the magazines for the weapon.";}; - class removeGear {description = "Handles request and removes the selected gear from the player.";}; - class addGear {description = "Adds the selected gear to the player.";}; - class handleItem {description = "Handles the incoming requests and decides how it is to be added or removed.";}; - class filterShow {description = "Checks if we need to hide/show filters.";}; - class filterMenu {description = "When a filter is called it will give us the details and we shall short her out!";}; - class fetchCfg {description = "Checks where to fetch the Cfg Patches from.";}; - class fetchCfgDetails {description = "Returns information about the entity, if no information it will return either nil or an empty array";}; - class buildConfig {description = "Used in preloading of VAS, builds the arrays of weapons/items.";}; - class filter {description = "Takes array of types and filters it and returns what the filter was.";}; - class fetchPlayerGear {description = "Fetches all the gear on the player and returns as one single array.";}; - class mainDisplay {description = "Handles the main part of VAS's Display";}; - class playerDisplay {description = "Used in refreshing the items a player has.";}; - class accType {_description = "Checks what type of an attachment is passed and what it is compatible with.";}; - class openDetails {}; - class closeDetails {}; - class quickMag {}; - class quickItem {}; - class qRemoveItem {}; - class mainInit {description = "Main initialization of VAS, called on mission start."; preInit = 1;}; - class KRON_StrLeft {}; - class KRON_StrToArray {}; - class accPrompt {}; - class quickAddDrag {}; - class updateLoad {}; - class transferMenu {}; - class transferAction {}; - class transferNetwork {}; - class transferSaveMenu {}; - class transferSaveGear {}; - class VASP {}; - class quickAttachment {}; - class accList {}; - class test {}; - }; -}; \ No newline at end of file diff --git a/source/VAS/common.hpp b/source/VAS/common.hpp deleted file mode 100644 index 33cc531..0000000 --- a/source/VAS/common.hpp +++ /dev/null @@ -1,1066 +0,0 @@ -/* - ArmA 3 Wasteland - Code extracted and adapted by Sa-Matra - Using this code without Sa-Matra's direct permission is forbidden -*/ - -class VAS_RscControlsGroup { - type = 15; - idc = -1; - x = 0; - y = 0; - w = safeZoneW; - h = safeZoneH; - shadow = 0; - style = 16; - - class VScrollbar - { - color[] = {1, 1, 1, 0.6}; - width = 0.021; - autoScrollSpeed = -1; - autoScrollDelay = 5; - autoScrollRewind = 0; - shadow = 0; - }; - - class HScrollbar - { - color[] = {1, 1, 1, 0.6}; - height = 0.028; - shadow = 0; - }; - - class ScrollBar { - color[] = {1, 1, 1, 0.6}; - colorActive[] = {1, 1, 1, 1}; - colorDisabled[] = {1, 1, 1, 0.3}; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; - }; - - class Controls {}; -}; - -class VAS_RscControlsGroupNoScrollbars : VAS_RscControlsGroup { - class VScrollbar : VScrollbar { - width = 0; - }; - - class HScrollbar : HScrollbar { - height = 0; - }; -}; - -class VAS_RscListNBox { - style = 16; - type=102; - shadow = 0; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - color[] = {0.95, 0.95, 0.95, 1}; - colorText[] = {1, 1, 1, 1.0}; - colorDisabled[] = {1, 1, 1, 0.25}; - colorScrollbar[] = {0.95, 0.95, 0.95, 1}; - colorSelect[] = {0, 0, 0, 1}; - colorSelect2[] = {0, 0, 0, 1}; - colorSelectBackground[] = {0.95, 0.95, 0.95, 1}; - colorSelectBackground2[] = {1, 1, 1, 0.5}; - period = 1.2; - - class ScrollBar { - color[] = {1, 1, 1, 0.6}; - colorActive[] = {1, 1, 1, 1}; - colorDisabled[] = {1, 1, 1, 0.3}; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; - }; -}; - -class VAS_RscText { - x = 0; - y = 0; - h = 0.037; - w = 0.3; - type = 0; - style = 0; - shadow = 1; - colorShadow[] = {0, 0, 0, 0.5}; - font = "PuristaMedium"; - SizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - text = ""; - colorText[] = {1, 1, 1, 1.0}; - colorBackground[] = {0, 0, 0, 0}; - linespacing = 1; -}; - -class VAS_RscLine : VAS_RscText { - idc = -1; - style = 176; - x = 0.17; - y = 0.48; - w = 0.66; - h = 0; - text = ""; - colorBackground[] = {0, 0, 0, 0}; - colorText[] = {1, 1, 1, 1.0}; -}; - -class VAS_RscTree { - style = 2; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - expandedTexture = "A3\ui_f\data\gui\Rsccommon\Rsctree\expandedTexture_ca.paa"; - hiddenTexture = "A3\ui_f\data\gui\Rsccommon\Rsctree\hiddenTexture_ca.paa"; - rowHeight = 0.0439091; - color[] = {1, 1, 1, 1}; - colorSelect[] = {0.7, 0.7, 0.7, 1}; - colorBackground[] = {0, 0, 0, 0}; - colorSelectBackground[] = {0, 0, 0, 0.5}; - colorBorder[] = {0, 0, 0, 0}; - borderSize = 0; -}; - -class VAS_RscTitle : VAS_RscText { - style = 0; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.95, 0.95, 0.95, 1}; -}; - -class VAS_RscPicture { - shadow = 0; - type = 0; - style = 48; - sizeEx = 0.023; - font = "PuristaMedium"; - colorBackground[] = {}; - colorText[] = {}; - x = 0; - y = 0; - w = 0.2; - h = 0.15; -}; - -class VAS_RscPictureKeepAspect : VAS_RscPicture { - style = 0x30 + 0x800; -}; - -class VAS_RscStructuredText { - type = 13; - style = 0; - x = 0; - y = 0; - h = 0.035; - w = 0.1; - text = ""; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {1, 1, 1, 1.0}; - shadow = 1; - - class Attributes { - font = "PuristaMedium"; - color = "#ffffff"; - align = "left"; - shadow = 1; - }; -}; - -class VAS_RscActiveText { - idc = -1; - type = 11; - style = 0; - x = 0; - y = 0; - h = 0.037; - w = 0.3; - sizeEx = 0.040; - font = "PuristaLight"; - color[] = {1, 1, 1, 1}; - colorActive[] = {1, 0.2, 0.2, 1}; - soundEnter[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEnter", 0.09, 1}; - soundPush[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundPush", 0.0, 0}; - soundClick[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundClick", 0.07, 1}; - soundEscape[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEscape", 0.09, 1}; - action = ""; - text = ""; -}; - -class VAS_RscButton { - style = 2; - x = 0; - y = 0; - w = 0.095589; - h = 0.039216; - shadow = 2; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {1, 1, 1, 1.0}; - colorDisabled[] = {0.4, 0.4, 0.4, 1}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.7}; - colorBackgroundActive[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; - colorBackgroundDisabled[] = {0.95, 0.95, 0.95, 1}; - offsetX = 0.003; - offsetY = 0.003; - offsetPressedX = 0.002; - offsetPressedY = 0.002; - colorFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; - colorShadow[] = {0, 0, 0, 1}; - colorBorder[] = {0, 0, 0, 1}; - borderSize = 0.0; - soundEnter[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEnter", 0.09, 1}; - soundPush[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundPush", 0.0, 0}; - soundClick[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundClick", 0.07, 1}; - soundEscape[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEscape", 0.09, 1}; -}; - -class VAS_RscButtonTextOnly : VAS_RscButton { - SizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - colorBackground[] = {1, 1, 1, 0}; - colorBackgroundActive[] = {1, 1, 1, 0}; - colorBackgroundDisabled[] = {1, 1, 1, 0}; - colorFocused[] = {1, 1, 1, 0}; - colorShadow[] = {1, 1, 1, 0}; - borderSize = 0.0; -}; - -class VAS_RscShortcutButton -{ - idc = -1; - style = 0; - default = 0; - shadow = 1; - w = 0.183825; - h = "( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20)"; - color[] = {1,1,1,1.0}; - colorFocused[] = {1,1,1,1.0}; - color2[] = {0.95,0.95,0.95,1}; - colorDisabled[] = {1,1,1,0.25}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorBackground2[] = {1,1,1,1}; - animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa"; - animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa"; - animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa"; - periodFocus = 1.2; - periodOver = 0.8; - class HitZone - { - left = 0.0; - top = 0.0; - right = 0.0; - bottom = 0.0; - }; - class ShortcutPos - { - left = 0; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - w = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; - h = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - }; - class TextPos - { - left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - right = 0.005; - bottom = 0.0; - }; - period = 0.4; - font = "PuristaMedium"; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - text = ""; - soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; - soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; - action = ""; - class Attributes - { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "left"; - shadow = "true"; - }; - class AttributesImage - { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "left"; - }; -}; - -class VAS_ScrollBar -{ - color[] = {1,1,1,0.6}; - colorActive[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,0.3}; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; - shadow = 0; - scrollSpeed = 0.06; - width = 0; - height = 0; - autoScrollEnabled = 0; - autoScrollSpeed = -1; - autoScrollDelay = 5; - autoScrollRewind = 0; -}; - -class VAS_RscButtonMenu : VAS_RscShortcutButton -{ - idc = -1; - type = 16; - style = "0x02 + 0xC0"; - default = 0; - shadow = 0; - x = 0; - y = 0; - w = 0.095589; - h = 0.039216; - animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - colorBackground[] = {0,0,0,0.8}; - colorBackgroundFocused[] = {1,1,1,1}; - colorBackground2[] = {0.75,0.75,0.75,1}; - color[] = {1,1,1,1}; - colorFocused[] = {0,0,0,1}; - color2[] = {0,0,0,1}; - colorText[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,0.25}; - period = 1.2; - periodFocus = 1.2; - periodOver = 1.2; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - tooltipColorText[] = {1,1,1,1}; - tooltipColorBox[] = {1,1,1,1}; - tooltipColorShade[] = {0,0,0,0.65}; - class TextPos - { - left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - right = 0.005; - bottom = 0.0; - }; - class Attributes - { - font = "PuristaLight"; - color = "#E5E5E5"; - align = "left"; - shadow = "false"; - }; - class ShortcutPos - { - left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005"; - top = 0.005; - w = 0.0225; - h = 0.03; - }; - soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; - soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; - textureNoShortcut = ""; -}; - -class VAS_RscShortcutButtonMain : VAS_RscShortcutButton { - idc = -1; - style = 0; - default = 0; - w = 0.313726; - h = 0.104575; - color[] = {1, 1, 1, 1.0}; - colorDisabled[] = {1, 1, 1, 0.25}; - - class HitZone { - left = 0.0; - top = 0.0; - right = 0.0; - bottom = 0.0; - }; - - class ShortcutPos { - left = 0.0145; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; - w = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2) * (3/4)"; - h = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; - }; - - class TextPos { - left = "( ((safezoneW / safezoneH) min 1.2) / 32) * 1.5"; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20)*2 - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)) / 2"; - right = 0.005; - bottom = 0.0; - }; - animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; - animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\disabled_ca.paa"; - animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\over_ca.paa"; - animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\focus_ca.paa"; - animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\down_ca.paa"; - animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButtonMain\normal_ca.paa"; - period = 0.5; - font = "PuristaMedium"; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; - text = ""; - soundEnter[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEnter", 0.09, 1}; - soundPush[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundPush", 0.0, 0}; - soundClick[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundClick", 0.07, 1}; - soundEscape[] = {"\A3\ui_f\data\Sound\RscButtonMenu\soundEscape", 0.09, 1}; - action = ""; - - class Attributes { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "left"; - shadow = "false"; - }; - - class AttributesImage { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "false"; - }; -}; - -class VAS_RscCheckbox { - idc = -1; - type = 7; - style = 0; - x = "LINE_X(XVAL)"; - y = LINE_Y; - w = "LINE_W(WVAL)"; - h = 0.029412; - colorText[] = {1, 0, 0, 1}; - color[] = {0, 0, 0, 0}; - colorBackground[] = {0, 0, 1, 1}; - colorTextSelect[] = {0, 0.8, 0, 1}; - colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; - colorSelect[] = {0, 0, 0, 1}; - colorTextDisable[] = {0.4, 0.4, 0.4, 1}; - colorDisable[] = {0.4, 0.4, 0.4, 1}; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - rows = 1; - columns = 1; - strings[] = {UNCHECKED}; - checked_strings[] = {CHECKED}; -}; - -class VAS_RscProgress -{ - type = 8; - style = 0; - x = 0.344; - y = 0.619; - w = 0.313726; - h = 0.0261438; - shadow = 2; - texture = "\A3\ui_f\data\GUI\RscCommon\RscProgress\progressbar_ca.paa"; - colorFrame[] = {0,0,0,0}; - colorBar[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])","(profilenamespace getvariable ['GUI_BCG_RGB_A',0.8])"}; -}; - -class VAS_RscListBox -{ - style = 16; - idc = -1; - type = 5; - w = 0.275; - h = 0.04; - font = "PuristaMedium"; - colorSelect[] = {1, 1, 1, 1}; - colorText[] = {1, 1, 1, 1}; - colorBackground[] = {0.28,0.28,0.28,0.28}; - colorSelect2[] = {1, 1, 1, 1}; - colorSelectBackground[] = {0.95, 0.95, 0.95, 0.5}; - colorSelectBackground2[] = {1, 1, 1, 0.5}; - colorScrollbar[] = {0.2, 0.2, 0.2, 1}; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - wholeHeight = 0.45; - rowHeight = 0.04; - color[] = {0.7, 0.7, 0.7, 1}; - colorActive[] = {0,0,0,1}; - colorDisabled[] = {0,0,0,0.3}; - sizeEx = 0.023; - soundSelect[] = {"",0.1,1}; - soundExpand[] = {"",0.1,1}; - soundCollapse[] = {"",0.1,1}; - maxHistoryDelay = 1; - autoScrollSpeed = -1; - autoScrollDelay = 5; - autoScrollRewind = 0; - - class ListScrollBar: VAS_ScrollBar - { - color[] = {1,1,1,1}; - autoScrollEnabled = 1; - }; -}; - -class VAS_RscEdit { - type = 2; - style = 0x00 + 0x40; - font = "PuristaMedium"; - shadow = 2; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorBackground[] = {0, 0, 0, 1}; - colorText[] = {0.95, 0.95, 0.95, 1}; - colorDisabled[] = {1, 1, 1, 0.25}; - autocomplete = false; - colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; - canModify = 1; -}; - -class VAS_RscSlider { - h = 0.025; - color[] = {1, 1, 1, 0.8}; - colorActive[] = {1, 1, 1, 1}; -}; - -class VAS_RscFrame { - type = 0; - idc = -1; - style = 64; - shadow = 2; - colorBackground[] = {0, 0, 0, 0}; - colorText[] = {1, 1, 1, 1}; - font = "PuristaMedium"; - sizeEx = 0.02; - text = ""; -}; - -class VAS_RscBackground : VAS_RscText { - type = 0; - IDC = -1; - style = 512; - shadow = 0; - x = 0.0; - y = 0.0; - w = 1.0; - h = 1.0; - text = ""; - ColorBackground[] = {0.48, 0.5, 0.35, 1}; - ColorText[] = {0.1, 0.1, 0.1, 1}; - font = "PuristaMedium"; - SizeEx = 1; -}; - -class VAS_RscHTML { - colorText[] = {1, 1, 1, 1.0}; - colorBold[] = {1, 1, 1, 1.0}; - colorLink[] = {1, 1, 1, 0.75}; - colorLinkActive[] = {1, 1, 1, 1.0}; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - prevPage = "\A3\ui_f\data\gui\Rsccommon\Rschtml\arrow_left_ca.paa"; - nextPage = "\A3\ui_f\data\gui\Rsccommon\Rschtml\arrow_right_ca.paa"; - shadow = 2; - - class H1 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1.2)"; - align = "left"; - }; - - class H2 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "right"; - }; - - class H3 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "left"; - }; - - class H4 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "left"; - }; - - class H5 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "left"; - }; - - class H6 { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "left"; - }; - - class P { - font = "PuristaMedium"; - fontBold = "PuristaSemibold"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - align = "left"; - }; -}; - -class VAS_RscHitZones { - x = 0; - y = 0; - w = 0.1; - h = 0.1; - xCount = 1; - yCount = 1; - xSpace = 0; - ySpace = 0; -}; - -class VAS_RscMapControl { - moveOnEdges = 1; - x = "SafeZoneXAbs"; - y = "SafeZoneY + 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "SafeZoneWAbs"; - h = "SafeZoneH - 1.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - shadow = 0; - ptsPerSquareSea = 5; - ptsPerSquareTxt = 3; - ptsPerSquareCLn = 10; - ptsPerSquareExp = 10; - ptsPerSquareCost = 10; - ptsPerSquareFor = 9; - ptsPerSquareForEdge = 9; - ptsPerSquareRoad = 6; - ptsPerSquareObj = 9; - showCountourInterval = 0; - scaleMin = 0.001; - scaleMax = 1.0; - scaleDefault = 0.16; - maxSatelliteAlpha = 0.85; - alphaFadeStartScale = 0.35; - alphaFadeEndScale = 0.4; - colorBackground[] = {0.969, 0.957, 0.949, 1.0}; - colorSea[] = {0.467, 0.631, 0.851, 0.5}; - colorForest[] = {0.624, 0.78, 0.388, 0.5}; - colorForestBorder[] = {0.0, 0.0, 0.0, 0.0}; - colorRocks[] = {0.0, 0.0, 0.0, 0.3}; - colorRocksBorder[] = {0.0, 0.0, 0.0, 0.0}; - colorLevels[] = {0.286, 0.177, 0.094, 0.5}; - colorMainCountlines[] = {0.572, 0.354, 0.188, 0.5}; - colorCountlines[] = {0.572, 0.354, 0.188, 0.25}; - colorMainCountlinesWater[] = {0.491, 0.577, 0.702, 0.6}; - colorCountlinesWater[] = {0.491, 0.577, 0.702, 0.3}; - colorPowerLines[] = {0.1, 0.1, 0.1, 1.0}; - colorRailWay[] = {0.8, 0.2, 0.0, 1.0}; - colorNames[] = {0.1, 0.1, 0.1, 0.9}; - colorInactive[] = {1.0, 1.0, 1.0, 0.5}; - colorOutside[] = {0.0, 0.0, 0.0, 1.0}; - colorTracks[] = {0.84, 0.76, 0.65, 0.15}; - colorTracksFill[] = {0.84, 0.76, 0.65, 1.0}; - colorRoads[] = {0.7, 0.7, 0.7, 1.0}; - colorRoadsFill[] = {1.0, 1.0, 1.0, 1.0}; - colorMainRoads[] = {0.9, 0.5, 0.3, 1.0}; - colorMainRoadsFill[] = {1.0, 0.6, 0.4, 1.0}; - colorGrid[] = {0.1, 0.1, 0.1, 0.6}; - colorGridMap[] = {0.1, 0.1, 0.1, 0.6}; - fontLabel = "PuristaMedium"; - sizeExLabel = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - fontGrid = "TahomaB"; - sizeExGrid = 0.02; - fontUnits = "TahomaB"; - sizeExUnits = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - fontNames = "PuristaMedium"; - sizeExNames = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8) * 2"; - fontInfo = "PuristaMedium"; - sizeExInfo = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - fontLevel = "TahomaB"; - sizeExLevel = 0.02; - text = "#(argb,8,8,3)color(1,1,1,1)"; - - class Legend { - x = "SafeZoneX + ( ((safezoneW / safezoneH) min 1.2) / 40)"; - y = "SafeZoneY + safezoneH - 4.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - w = "10 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - h = "3.5 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; - colorBackground[] = {1, 1, 1, 0.5}; - color[] = {0, 0, 0, 1}; - }; - - class ActiveMarker - { - color[] = - { - 0.3, - 0.1, - 0.9, - 1 - }; - size = 50; - }; - - class Task { - icon = "\A3\ui_f\data\map\mapcontrol\taskIcon_CA.paa"; - iconCreated = "\A3\ui_f\data\map\mapcontrol\taskIconCreated_CA.paa"; - iconCanceled = "\A3\ui_f\data\map\mapcontrol\taskIconCanceled_CA.paa"; - iconDone = "\A3\ui_f\data\map\mapcontrol\taskIconDone_CA.paa"; - iconFailed = "\A3\ui_f\data\map\mapcontrol\taskIconFailed_CA.paa"; - color[] = {"(profilenamespace getvariable ['IGUI_TEXT_RGB_R',0])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_G',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_B',1])", "(profilenamespace getvariable ['IGUI_TEXT_RGB_A',0.8])"}; - colorCreated[] = {1, 1, 1, 1}; - colorCanceled[] = {0.7, 0.7, 0.7, 1}; - colorDone[] = {0.7, 1, 0.3, 1}; - colorFailed[] = {1, 0.3, 0.2, 1}; - size = 27; - importance = 1; - coefMin = 1; - coefMax = 1; - }; - - class Waypoint { - icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; - color[] = {0, 0, 0, 1}; - }; - - class WaypointCompleted { - icon = "\A3\ui_f\data\map\mapcontrol\waypointCompleted_ca.paa"; - color[] = {0, 0, 0, 1}; - }; - - class CustomMark { - icon = "\A3\ui_f\data\map\mapcontrol\custommark_ca.paa"; - size = 24; - importance = 1; - coefMin = 1; - coefMax = 1; - color[] = {0, 0, 0, 1}; - }; - - class Command { - icon = "\A3\ui_f\data\map\mapcontrol\waypoint_ca.paa"; - size = 18; - importance = 1; - coefMin = 1; - coefMax = 1; - color[] = {1, 1, 1, 1}; - }; - - class Bush { - icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; - color[] = {0.45, 0.64, 0.33, 0.4}; - size = 14/2; - importance = 0.2 * 14 * 0.05 * 0.05; - coefMin = 0.25; - coefMax = 4; - }; - - class Rock { - icon = "\A3\ui_f\data\map\mapcontrol\rock_ca.paa"; - color[] = {0.1, 0.1, 0.1, 0.8}; - size = 12; - importance = 0.5 * 12 * 0.05; - coefMin = 0.25; - coefMax = 4; - }; - - class SmallTree { - icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; - color[] = {0.45, 0.64, 0.33, 0.4}; - size = 12; - importance = 0.6 * 12 * 0.05; - coefMin = 0.25; - coefMax = 4; - }; - - class Tree { - icon = "\A3\ui_f\data\map\mapcontrol\bush_ca.paa"; - color[] = {0.45, 0.64, 0.33, 0.4}; - size = 12; - importance = 0.9 * 16 * 0.05; - coefMin = 0.25; - coefMax = 4; - }; - - class busstop { - icon = "\A3\ui_f\data\map\mapcontrol\busstop_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class fuelstation { - icon = "\A3\ui_f\data\map\mapcontrol\fuelstation_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class hospital { - icon = "\A3\ui_f\data\map\mapcontrol\hospital_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class church { - icon = "\A3\ui_f\data\map\mapcontrol\church_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class lighthouse { - icon = "\A3\ui_f\data\map\mapcontrol\lighthouse_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class power { - icon = "\A3\ui_f\data\map\mapcontrol\power_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class powersolar { - icon = "\A3\ui_f\data\map\mapcontrol\powersolar_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class powerwave { - icon = "\A3\ui_f\data\map\mapcontrol\powerwave_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class powerwind { - icon = "\A3\ui_f\data\map\mapcontrol\powerwind_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class quay { - icon = "\A3\ui_f\data\map\mapcontrol\quay_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class shipwreck { - icon = "\A3\ui_f\data\map\mapcontrol\shipwreck_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class transmitter { - icon = "\A3\ui_f\data\map\mapcontrol\transmitter_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class watertower { - icon = "\A3\ui_f\data\map\mapcontrol\watertower_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {1, 1, 1, 1}; - }; - - class Cross { - icon = "\A3\ui_f\data\map\mapcontrol\Cross_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {0, 0, 0, 1}; - }; - - class Chapel { - icon = "\A3\ui_f\data\map\mapcontrol\Chapel_CA.paa"; - size = 24; - importance = 1; - coefMin = 0.85; - coefMax = 1.0; - color[] = {0, 0, 0, 1}; - }; - - class Bunker { - icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; - size = 14; - importance = 1.5 * 14 * 0.05; - coefMin = 0.25; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class Fortress { - icon = "\A3\ui_f\data\map\mapcontrol\bunker_ca.paa"; - size = 16; - importance = 2 * 16 * 0.05; - coefMin = 0.25; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class Fountain { - icon = "\A3\ui_f\data\map\mapcontrol\fountain_ca.paa"; - size = 11; - importance = 1 * 12 * 0.05; - coefMin = 0.25; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class Ruin { - icon = "\A3\ui_f\data\map\mapcontrol\ruin_ca.paa"; - size = 16; - importance = 1.2 * 16 * 0.05; - coefMin = 1; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class Stack { - icon = "\A3\ui_f\data\map\mapcontrol\stack_ca.paa"; - size = 20; - importance = 2 * 16 * 0.05; - coefMin = 0.9; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class Tourism { - icon = "\A3\ui_f\data\map\mapcontrol\tourism_ca.paa"; - size = 16; - importance = 1 * 16 * 0.05; - coefMin = 0.7; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; - - class ViewTower { - icon = "\A3\ui_f\data\map\mapcontrol\viewtower_ca.paa"; - size = 16; - importance = 2.5 * 16 * 0.05; - coefMin = 0.5; - coefMax = 4; - color[] = {0, 0, 0, 1}; - }; -}; - -class VAS_RscCombo { - style = 16; - type = 4; - x = 0; - y = 0; - w = 0.12; - h = 0.035; - shadow = 0; - colorSelect[] = {0, 0, 0, 1}; - colorText[] = {0.95, 0.95, 0.95, 1}; - colorBackground[] = {0.4,0.4,0.4,0.4}; - colorSelectBackground[] = {1, 1, 1, 0.7}; - colorScrollbar[] = {1, 0, 0, 1}; - soundSelect[] = { - "", 0.000000, 1 - }; - arrowEmpty = "\A3\ui_f\data\GUI\RscCommon\Rsccombo\arrow_combo_ca.paa"; - arrowFull = "\A3\ui_f\data\GUI\RscCommon\Rsccombo\arrow_combo_active_ca.paa"; - wholeHeight = 0.45; - color[] = {1, 1, 1, 1}; - colorActive[] = {1, 0, 0, 1}; - colorDisabled[] = {1, 1, 1, 0.25}; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - - class ScrollBar { - color[] = {1, 1, 1, 0.6}; - colorActive[] = {1, 1, 1, 1}; - colorDisabled[] = {1, 1, 1, 0.3}; - thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; - arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; - }; -}; - -class VAS_RscToolbox { - colorText[] = {0.95, 0.95, 0.95, 1}; - color[] = {0.95, 0.95, 0.95, 1}; - colorTextSelect[] = {0.95, 0.95, 0.95, 1}; - colorSelect[] = {0.95, 0.95, 0.95, 1}; - colorTextDisable[] = {0.4, 0.4, 0.4, 1}; - colorDisable[] = {0.4, 0.4, 0.4, 1}; - colorSelectedBg[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - font = "PuristaMedium"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 0.8)"; -}; - -class VAS_ActiveTextPicture -{ - idc = -1; - type = 11; - style = 0x30 + 0x800; - x = 0; - y = 0; - h = 0.035; - w = 0.035; - font = "PuristaMedium"; - shadow = 2; - text = ""; - sizeEx = "(((((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - color[] = {1,1,1,1}; - colorText[] = {1,1,1,1}; - colorActive[] = {1,1,1,1}; - soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; - soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; -}; \ No newline at end of file diff --git a/source/VAS/config.sqf b/source/VAS/config.sqf deleted file mode 100644 index 0082ddc..0000000 --- a/source/VAS/config.sqf +++ /dev/null @@ -1,96 +0,0 @@ -//Allow player to respawn with his loadout? If true unit will respawn with all ammo from initial save! Set to false to disable this and rely on other scripts! -vas_onRespawn = true; -//Preload Weapon Config? -vas_preload = true; -//If limiting weapons its probably best to set this to true so people aren't loading custom loadouts with restricted gear. -vas_disableLoadSave = false; -//Amount of save/load slots -vas_customslots = 14; //14 is actually 15 slots, starts from 0 to whatever you set, so always remember when setting a number to minus by 1, i.e 12 will be 11. -//Disable 'VAS hasn't finished loading' Check !!! ONLY RECOMMENDED FOR THOSE THAT USE ACRE AND OTHER LARGE ADDONS !!! -vas_disableSafetyCheck = false; -/* - NOTES ON EDITING! - YOU MUST PUT VALID CLASS NAMES IN THE VARIABLES IN AN ARRAY FORMAT, NOT DOING SO WILL RESULT IN BREAKING THE SYSTEM! - PLACE THE CLASS NAMES OF GUNS/ITEMS/MAGAZINES/BACKPACKS/GOGGLES IN THE CORRECT ARRAYS! TO DISABLE A SELECTION I.E - GOGGLES vas_goggles = [""]; AND THAT WILL DISABLE THE ITEM SELECTION FOR WHATEVER VARIABLE YOU ARE WANTING TO DISABLE! - - EXAMPLE - vas_weapons = ["srifle_EBR_ARCO_point_grip_F","arifle_Khaybar_Holo_mzls_F","arifle_TRG21_GL_F","Binocular"]; - vas_magazines = ["30Rnd_65x39_case_mag","20Rnd_762x45_Mag","30Rnd_65x39_caseless_green"]; - vas_items = ["ItemMap","ItemGPS","NVGoggles"]; - vas_backpacks = ["B_Bergen_sgg_Exp","B_AssaultPack_rgr_Medic"]; - vas_goggles = [""]; - - Example for side specific (TvT) - switch(playerSide) do - { - //Blufor - case west: - { - vas_weapons = ["srifle_EBR_F","arifle_MX_GL_F"]; - vas_items = ["muzzle_snds_H","muzzle_snds_B","muzzle_snds_L","muzzle_snds_H_MG"]; //Removes suppressors from VAS - vas_goggles = ["G_Diving"]; //Remove diving goggles from VAS - }; - //Opfor - case west: - { - vas_weapons = ["srifle_EBR_F","arifle_MX_GL_F"]; - vas_items = ["muzzle_snds_H","muzzle_snds_B","muzzle_snds_L","muzzle_snds_H_MG"]; //Removes suppressors from VAS - vas_goggles = ["G_Diving"]; //Remove diving goggles from VAS - }; - }; -*/ - -//If the arrays below are empty (as they are now) all weapons, magazines, items, backpacks and goggles will be available -//Want to limit VAS to specific weapons? Place the classnames in the array! -vas_weapons = []; -//Want to limit VAS to specific magazines? Place the classnames in the array! -vas_magazines = []; -//Want to limit VAS to specific items? Place the classnames in the array! -vas_items = []; -//Want to limit backpacks? Place the classnames in the array! -vas_backpacks = []; -//Want to limit goggles? Place the classnames in the array! -vas_glasses = []; - - -/* - NOTES ON EDITING: - THIS IS THE SAME AS THE ABOVE VARIABLES, YOU NEED TO KNOW THE CLASS NAME OF THE ITEM YOU ARE RESTRICTING. THIS DOES NOT WORK IN - CONJUNCTION WITH THE ABOVE METHOD, THIs IS ONLY FOR RESTRICTING / LIMITING ITEMS FROM VAS AND NOTHING MORE - - EXAMPLE - vas_r_weapons = ["srifle_EBR_F","arifle_MX_GL_F"]; - vas_r_items = ["muzzle_snds_H","muzzle_snds_B","muzzle_snds_L","muzzle_snds_H_MG"]; //Removes suppressors from VAS - vas_r_goggles = ["G_Diving"]; //Remove diving goggles from VAS - - Example for side specific (TvT) - switch(playerSide) do - { - //Blufor - case west: - { - vas_r_weapons = ["srifle_EBR_F","arifle_MX_GL_F"]; - vas_r_items = ["muzzle_snds_H","muzzle_snds_B","muzzle_snds_L","muzzle_snds_H_MG"]; //Removes suppressors from VAS - vas_r_goggles = ["G_Diving"]; //Remove diving goggles from VAS - }; - //Opfor - case west: - { - vas_r_weapons = ["srifle_EBR_F","arifle_MX_GL_F"]; - vas_r_items = ["muzzle_snds_H","muzzle_snds_B","muzzle_snds_L","muzzle_snds_H_MG"]; //Removes suppressors from VAS - vas_r_goggles = ["G_Diving"]; //Remove diving goggles from VAS - }; - }; -*/ - -//Below are variables you can use to restrict certain items from being used. -//Remove Weapon -vas_r_weapons = []; -vas_r_backpacks = []; -//Magazines to remove from VAS -vas_r_magazines = []; -//Items to remove from VAS -vas_r_items = []; -//Goggles to remove from VAS -vas_r_glasses = []; diff --git a/source/VAS/functions/fn_KRON_StrLeft.sqf b/source/VAS/functions/fn_KRON_StrLeft.sqf deleted file mode 100644 index c0165a9..0000000 --- a/source/VAS/functions/fn_KRON_StrLeft.sqf +++ /dev/null @@ -1,16 +0,0 @@ -/* - Kronzky StrLeft Function -*/ -private["_in","_len","_arr","_out"]; -_in=_this select 0; -_len=(_this select 1)-1; -_arr=[_in] call VAS_fnc_KRON_StrToArray; -_out=""; -if (_len>=(count _arr)) then { - _out=_in; -} else { - for "_i" from 0 to _len do { - _out=_out + (_arr select _i); - }; -}; -_out \ No newline at end of file diff --git a/source/VAS/functions/fn_KRON_StrToArray.sqf b/source/VAS/functions/fn_KRON_StrToArray.sqf deleted file mode 100644 index f24c66c..0000000 --- a/source/VAS/functions/fn_KRON_StrToArray.sqf +++ /dev/null @@ -1,11 +0,0 @@ -/* - Kronzky StrToArray Function -*/ -private["_in","_i","_arr","_out"]; -_in=_this select 0; -_arr = toArray(_in); -_out=[]; -for "_i" from 0 to (count _arr)-1 do { - _out=_out+[toString([_arr select _i])]; -}; -_out \ No newline at end of file diff --git a/source/VAS/functions/fn_SaveLoad.sqf b/source/VAS/functions/fn_SaveLoad.sqf deleted file mode 100644 index 4284771..0000000 --- a/source/VAS/functions/fn_SaveLoad.sqf +++ /dev/null @@ -1,53 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.1 - @file_name: fn_SaveLoad.sqf - @file_author: TAW_Tonic - @file_edit: 5/27/2013 - @file_description: Pulls up Save / Load Dialog -*/ -private["_type","_control","_slot"]; -disableSerialization; -_type = _this select 0; -_show = if(isNil {_this select 1}) then {false} else {true}; - -switch (_type) do -{ - case 0: {_control = VAS_getControl(VAS_save_Display,VAS_save_list);}; - case 1: {_control = VAS_getControl(VAS_load_Display,VAS_load_list);}; -}; - -lbClear _control; //Flush the control/list - -if(vas_disableLoadSave) then -{ - for "_i" from 0 to vas_customslots do - { - if(!isNil {missionNamespace getVariable format["vas_gear_new_%1",_i]}) then - { - _control lbAdd format["%1",(missionNamespace getVariable format["vas_gear_new_%1",_i]) select 0]; - } - else - { - _control lbAdd format["%1 %2",localize "STR_VAS_Main_CL", _i+1]; - }; - }; -} - else -{ - for "_i" from 0 to vas_customslots do - { - if(!isNil {profileNamespace getVariable format["vas_gear_new_%1",_i]}) then - { - _control lbAdd format["%1",(profileNamespace getVariable format["vas_gear_new_%1",_i]) select 0]; - } - else - { - _control lbAdd format["%1 %2",localize "STR_VAS_Main_CL", _i+1]; - }; - }; -}; -if(_show) then -{ - [_type] spawn VAS_fnc_loadoutInfo; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_VASP.sqf b/source/VAS/functions/fn_VASP.sqf deleted file mode 100644 index 8243645..0000000 --- a/source/VAS/functions/fn_VASP.sqf +++ /dev/null @@ -1,101 +0,0 @@ -/* - File: fn_VASP.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Separate 'buildConfig' file, specifically designed for 'VASP'. -*/ -private["_cfg"]; -_cfg = [_this,0,"",[""]] call BIS_fnc_param; -if(_cfg == "") exitWith {}; //Bad data passed, exit. - -diag_log format["VASP: %1",_cfg]; - -switch(_cfg) do -{ - case "CfgWeapons": - { - _arr = uiNamespace getVariable["VASP_weapons",[]]; - _arr = _arr + (uiNamespace getVariable["VASP_items",[]]); - if(count _arr == 0) exitWith {hint "The VASP weapons config is broke?"; uiNamespace setVariable["VASP_weapons",nil]; ["CfgWeapons"] spawn VAS_fnc_buildConfig;}; //Safety check - - _weapons = []; - _items = []; - { - _details = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - _type = _details select 4; - _itemInfo = _details select 5; - _base = configName(inheritsFrom (configFile >> "CfgWeapons" >> _x)); - - switch(true) do - { - case (_type in [1,2,4,5,4096]): - { - if(!(_base in VAS_r_weapons) && !(_x in VAS_r_weapons)) then { - if(_itemInfo == 616 && _type == 4096) then { - _items set[count _items,_x]; - } else { - _weapons set[count _weapons,_x]; - }; - }; - }; - - case (_type == 131072): - { - if(!(_base in VAS_r_items) && !(_x in VAS_r_items)) then { - _items set[count _items,_x]; - }; - }; - }; - } foreach _arr; - - VAS_pre_weapons = _weapons; - VAS_pre_items = _items; - }; - - case "CfgMagazines": - { - _arr = uiNamespace getVariable["VASP_magazines",[]]; - if(count _arr == 0) exitWith {hint "The VASP magazines config is broke?"; uiNamespace setVariable["VASP_magazines",nil]; ["CfgMagazines"] spawn VAS_fnc_buildConfig;}; //Safety check - - _magazines = []; - { - if(!(_x in VAS_R_magazines)) then { - _magazines set[count _magazines,_x]; - }; - } foreach _arr; - - VAS_pre_magazines = _magazines; - }; - - case "CfgVehicles": - { - _arr = uiNamespace getVariable["VASP_backpacks",[]]; - if(count _arr == 0) exitWith {hint "The VASP backpacks config is broke?"; uiNamespace setVariable["VASP_backpacks",nil]; ["CfgVehicles"] spawn VAS_fnc_buildConfig;}; //Safety check - - _backpacks = []; - { - _base = inheritsFrom (configFile >> _cfg >> _x); - if(!(_base in VAS_r_backpacks) && !(_x in VAS_r_backpacks)) then { - _backpacks set[count _backpacks,_x]; - }; - } foreach _arr; - - VAS_pre_backpacks = _backpacks; - }; - - case "CfgGlasses": - { - _arr = uiNamespace getVariable["VASP_glasses",[]]; - if(count _arr == 0) exitWith {hint "The VASP glasses config is broke?"; uiNamespace setVariable["VASP_glasses",nil]; ["CfgGlasses"] spawn VAS_fnc_buildConfig;}; //Safety check - - _glasses = []; - { - if(!(_x in VAS_R_glasses)) then { - _glasses set[count _glasses,_x]; - }; - } foreach _arr; - - VAS_pre_glasses = _glasses; - }; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_accList.sqf b/source/VAS/functions/fn_accList.sqf deleted file mode 100644 index 4a2302b..0000000 --- a/source/VAS/functions/fn_accList.sqf +++ /dev/null @@ -1,115 +0,0 @@ -/* - File: fn_accList.sqf - Version Edit: 2.5 - Author: Bryan "Tonic" Boardwine - - Description: - Compiles a list of compatible attachments, first checks to see whether or not - the new compatibleItmes class structure is in use, if it is it uses that list.. - Otherwise it switches to old style method. -*/ -private["_weapon","_configInfo","_items","_badItems"]; -_weapon = [_this,0,"",[""]] call BIS_fnc_param; -if(_weapon == "") exitWith {[]}; - -_configInfo = [_weapon,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; -if(count _configInfo == 0) exitWith {[]}; -if(count (_configInfo select 14) > 0) then { - _items = []; - _badItems = []; - { - _config = configFile >> "CfgWeapons" >> _data >> "WeaponSlotsInfo" >> _x >> "compatibleItems"; - for "_i" from 0 to count(_config)-1 do - { - _entry = _config select _i; - if(getNumber(_entry) == 0) then { - if(!((configName _entry) in _badItems)) then { - _badItems set[count _badItems,(configName _entry)]; - }; - } else { - if(!isNil "VAS_box_items") then { - if((configName _entry) in VAS_box_items) then { - _items set[count _items,(configName _entry)]; - }; - } else { - if(count (vas_items) == 0) then { - if(!((configName _entry) in vas_r_items)) then { - _items set[count _items,(configName _entry)]; - }; - } else { - if((configName _entry) in vas_items) then { - _items set[count _items,(configName _entry)]; - }; - }; - }; - }; - }; - - if(count _badItems > 0) then { - _parent = inheritsFrom _config; - for "_i" from 0 to count(_parent)-1 do - { - _entry = _parent select _i; - if(!((configName _entry) in _badItems)) then { - if(!isNil "VAS_box_items") then { - if((configName _entry) in VAS_box_items) then { - _items set[count _items,(configName _entry)]; - }; - } else { - if(count (vas_items) == 0) then { - if(!((configName _entry) in vas_r_items)) then { - _items set[count _items,(configName _entry)]; - }; - } else { - if((configName _entry) in vas_items) then { - _items set[count _items,(configName _entry)]; - }; - }; - }; - }; - }; - }; - } foreach (_configInfo select 14); - - { - if(!isNil "VAS_box_items") then { - if(_x in VAS_box_items) then { - _items set[count _items,_x]; - }; - } else { - if(count (vas_items) == 0) then { - if(!(_x in vas_r_items)) then { - _items set[count _items,_x]; - }; - } else { - if(_x in vas_items) then { - _items set[count _items,_x]; - }; - }; - }; - } foreach (_configInfo select 12); - - _items = _items + (_configInfo select 12); -} else { - _items = []; - { - if(!isNil "VAS_box_items") then { - if(_x in VAS_box_items) then { - _items set[count _items,_x]; - }; - } else { - if(count (vas_items) == 0) then { - if(!(_x in vas_r_items)) then { - _items set[count _items,_x]; - }; - } else { - if(_x in vas_items) then { - _items set[count _items,_x]; - }; - }; - }; - } foreach ((_configInfo select 10) + (_configInfo select 11) + (_configInfo select 12)); -}; - -//Remove attachments that are not suppose to be in it. -_items; \ No newline at end of file diff --git a/source/VAS/functions/fn_accPrompt.sqf b/source/VAS/functions/fn_accPrompt.sqf deleted file mode 100644 index b25599c..0000000 --- a/source/VAS/functions/fn_accPrompt.sqf +++ /dev/null @@ -1,13 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.0 - @file_name: fn_accPrompt.sqf - @file_author: TAW_Tonic - @file_edit: 9/25/2013 - @file_description: Work-around for displaying attachment choice prompt and localizing it. -*/ -createDialog "VAS_prompt"; -disableSerialization; - -waitUntil {!isNull (findDisplay VAS_prompt_Display)}; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_text)) ctrlSetStructuredText parseText format["%1
%2",localize "STR_VAS_Prompt_acc1", localize "STR_VAS_Prompt_acc2"]; \ No newline at end of file diff --git a/source/VAS/functions/fn_accType.sqf b/source/VAS/functions/fn_accType.sqf deleted file mode 100644 index cdfb54b..0000000 --- a/source/VAS/functions/fn_accType.sqf +++ /dev/null @@ -1,63 +0,0 @@ -/* - File: fn_accType.sqf - Author: TAW_Tonic - - Description: - Checks what type of an attachment is passed and what it is compatible with. - Should now be compatible with the new compatibleItems class structure... This was not a fun task but thankfully - Robalo gave me some code that showed me the way. If it isn't 100% compatible then IDFK. The foreach in a foreach drove me nuts and - not the best way to do things, I really don't know what I was thinking but doing PHP code for two weeks and playing GTA V tends to make you - forget things.... Wow what a ramble... blah blah blah. - - Returns: - 0: Unknown Error - 1: Primary - 2: Secondary - 3: Handgun -*/ -private["_item","_type","_tmp","_ret","_weaponArray"]; -_item = [_this,0,"",[""]] call BIS_fnc_param; -_type = [_this,1,0,[0]] call BIS_fnc_param; -if(_item == "" || _type == 0) exitWith {0}; -_ret = 0; - -_weaponArray = [primaryWeapon player, secondaryWeapon player, handgunWeapon player]; -{ - if(_ret != 0) exitWith {}; //Make sure we exit the loop since there was already a match. - if(_x != "") then - { - _weapon = _x; - _cfgInfo = [_weapon,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - _legacyItems = ((_cfgInfo select 10) + (_cfgInfo select 11) + (_cfgInfo select 12)); - _newItems = _cfgInfo select 14; - - //Check Legacy Items first - if(count _legacyItems > 0) then - { - for "_i" from 0 to (count _legacyItems)-1 do - { - _legacyItems set[_i,toLower(_legacyItems select _i)]; - }; - - if((toLower _item) in _legacyItems) exitWith {_ret = switch(_weapon) do {case (primaryWeapon player): {1};case (secondaryWeapon player) : {2};case (handgunWeapon player): {3};default {0};};}; - }; - - //Check new compatibleItems class structure - if(count _newItems > 0) then - { - //This gets weird with foreach in foreach :\ - { - if(_ret != 0) exitWith {}; - _cfg = getNumber(configFile >> "CfgWeapons" >> _weapon >> "WeaponSlotsInfo" >> _x >> "compatibleItems" >> _item); - if(isNil "_cfg") then {_cfg = 0;}; - if(_cfg == 1) exitWith - { - _ret = switch(_weapon) do {case (primaryWeapon player): {1};case (secondaryWeapon player) : {2};case (handgunWeapon player): {3};default {0};}; - }; - } foreach _newItems; - if(_ret != 0) exitWith {}; //Make sure we exit the loop - }; - }; -} foreach _weaponArray; - -_ret; \ No newline at end of file diff --git a/source/VAS/functions/fn_addGear.sqf b/source/VAS/functions/fn_addGear.sqf deleted file mode 100644 index b7e88d9..0000000 --- a/source/VAS/functions/fn_addGear.sqf +++ /dev/null @@ -1,15 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.7 - @file_name: add_gear.sqf - @file_author: TAW_Tonic - @file_edit: 8/2/2013 - @file_description: Adds an item selected. -*/ -private["_data","_handle"]; -disableSerialization; - -_data = VAS_getSelData(VAS_virt_list); -_handle = [_data,true,false,false,false] spawn VAS_fnc_handleItem; -waitUntil {scriptDone _handle}; -[] spawn VAS_fnc_playerDisplay; \ No newline at end of file diff --git a/source/VAS/functions/fn_buildConfig.sqf b/source/VAS/functions/fn_buildConfig.sqf deleted file mode 100644 index 537975d..0000000 --- a/source/VAS/functions/fn_buildConfig.sqf +++ /dev/null @@ -1,176 +0,0 @@ -/* - @version: 2.0 - @file_name: build_config.sqf - @file_edit: 9/24/2013 - @file_author: TAW_Tonic - @file_description: If preload is enabled, it will build our preloaded config, otherwise fetches everything from the config. -*/ -private["_cfg","_type","_temp","_ret","_master","_class","_details","_displayName","_scope","_type","_str","_itemInfo"]; -_cfg = [_this,0,"",[""]] call BIS_fnc_param; -if(_cfg == "") exitWith {}; //Bad data passed, exit. - -if(VAS_preload && {!isNil {VAS_pre_weapons}} && {!isNil {VAS_pre_magazines}} && {!isNil {VAS_pre_items}} && {!isNil {VAS_pre_backpacks}} && {!isNil {VAS_pre_glasses}}) exitWith {}; - -switch(_cfg) do -{ - case "CfgWeapons": - { - if(!isNil {uiNamespace getVariable "VASP_weapons"}) exitWith {["CfgWeapons"] call VAS_fnc_VASP;}; - _temp = []; - _ret = []; - _ret2 = []; - _master = configFile >> _cfg; - private["_base","_ret2"]; - for "_i" from 0 to (count _master)-1 do - { - _class = _master select _i; - if(isClass _class) then - { - _class = configName _class; - _details = [_class,_cfg] call VAS_fnc_fetchCfgDetails; - _displayName = _details select 1; - _picture = _details select 2; - _scope = _details select 3; - _type = _details select 4; - _itemInfo = _details select 5; - _base = configName(inheritsFrom (configFile >> "CfgWeapons" >> _class)); - //diag_log format["DEBUG - %1 :: %2",_class,_base]; - - _str = [_class,4] call VAS_fnc_KRON_StrLeft; - - if(_scope >= 2 && _str != "ACRE") then - { - switch (true) do - { - case (_type in [1,2,4,5,4096]): - { - if(_picture != "" && _displayName != "") then - { - if(_itemInfo == 616 && _type == 4096) then - { - _ret2 set[count _ret2,_class]; - } - else - { - if(!(_displayName in _temp) && !(_base in VAS_r_weapons) && !(_class in VAS_r_weapons)) then - { - _temp set[count _temp,_displayName]; - _ret set[count _ret,_class]; - }; - }; - }; - }; - - case (_type == 131072): - { - if(_picture != "" && !(_base in VAS_r_items) && !(_class in VAS_r_items)) then - { - _ret2 set[count _ret2,_class]; - }; - }; - }; - }; - }; - }; - - VAS_pre_weapons = _ret; - VAS_pre_items = _ret2; - }; - - case "CfgMagazines": - { - if(!isNil {uiNamespace getVariable "VASP_magazines"}) exitWith {["CfgMagazines"] call VAS_fnc_VASP;}; - if(count VAS_magazines > 0) exitWith {}; //Don't waste CPU-processing on something that isn't required. - _temp = []; - _ret = []; - _master = configFile >> _cfg; - for "_i" from 0 to (count _master)-1 do - { - _class = _master select _i; - if(isClass _class) then - { - _class = configName _class; - _details = [_class,_cfg] call VAS_fnc_fetchCfgDetails; - _displayName = _details select 1; - _picture = _details select 2; - _scope = _details select 3; - - if(_scope >= 1 && _picture != "" && !(_displayName in _temp)) then - { - _str = [_class,4] call VAS_fnc_KRON_StrLeft; - if(_str != "ACRE" && !(_class in VAS_R_magazines)) then - { - _temp set[count _temp,_displayName]; - _ret set[count _ret,_class]; - }; - }; - }; - }; - - VAS_pre_magazines = _ret; - }; - - case "CfgVehicles": - { - if(!isNil {uiNamespace getVariable "VASP_backpacks"}) exitWith {["CfgVehicles"] call VAS_fnc_VASP;}; - if(count VAS_backpacks > 0) exitWith {}; //Don't waste CPU-processing on something that isn't required. - _ret = []; - _master = configFile >> _cfg; - private["_base"]; - for "_i" from 0 to (count _master)-1 do - { - _class = _master select _i; - if(isClass _class) then - { - _class = configName _class; - _details = [_class,_cfg] call VAS_fnc_fetchCfgDetails; - _displayName = _details select 1; - _picture = _details select 2; - _scope = _details select 3; - _type = _details select 4; - _base = inheritsFrom (configFile >> _cfg >> _class); - if(_scope >= 2 && _type == "Backpacks" && _picture != "") then - { - _str = [_class,4] call VAS_fnc_KRON_StrLeft; - if(_str != "ACRE" && !(_base in VAS_r_backpacks) && !(_class in VAS_r_backpacks)) then - { - _ret set[count _ret,_class]; - }; - }; - }; - }; - - VAS_pre_backpacks = _ret; - }; - - case "CfgGlasses": - { - if(!isNil {uiNamespace getVariable "VASP_glasses"}) exitWith {["CfgGlasses"] call VAS_fnc_VASP;}; - if(count VAS_glasses > 0) exitWith {}; //Don't waste CPU-processing on something that isn't required. - _temp = []; - _ret = []; - _master = configFile >> _cfg; - for "_i" from 0 to (count _master)-1 do - { - _class = _master select _i; - if(isClass _class) then - { - _class = configName _class; - _details = [_class,_cfg] call VAS_fnc_fetchCfgDetails; - _displayName = _details select 1; - _picture = _details select 2; - - if(_picture != "" && _displayName != "None" && !(_displayName in _temp)) then - { - _str = [_class,4] call VAS_fnc_KRON_StrLeft; - if(_str != "ACRE" && !(_class in VAS_r_glasses)) then - { - _temp set[count _temp,_displayName]; - _ret set[count _ret,_class]; - }; - }; - }; - }; - VAS_pre_glasses = _ret; - }; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_closeDetails.sqf b/source/VAS/functions/fn_closeDetails.sqf deleted file mode 100644 index 99a792f..0000000 --- a/source/VAS/functions/fn_closeDetails.sqf +++ /dev/null @@ -1,13 +0,0 @@ -/* - File: fn_closeDetails.sqf - Author: TAW_Tonic - - Description: - Quick like Macro for closing the details menu, doesn't work within macros.sqf -*/ -#include "macro.sqf" -ctrlShow [VAS_detail_mags_list,false]; -ctrlShow[VAS_detail_mags,false]; -ctrlShow [VAS_detail_magsbg,false]; -ctrlShow[VAS_AccBG,false]; -ctrlShow[VAS_AccList,false]; \ No newline at end of file diff --git a/source/VAS/functions/fn_deleteGear.sqf b/source/VAS/functions/fn_deleteGear.sqf deleted file mode 100644 index 86c5ccc..0000000 --- a/source/VAS/functions/fn_deleteGear.sqf +++ /dev/null @@ -1,54 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.0 - @file_name: fn_deleteGear.sqf - @file_author: TAW_Tonic - @file_edit: 9/24/2013 - @file_description: Deletes a saved slot and prompts if you actually want to delete it. -*/ -private["_slot","_data"]; -_slot = lbCurSel VAS_load_list; -if(_slot == -1) exitWith {hint localize "STR_VAS_Prompt_selectSlotFail";}; -if(vas_disableLoadSave) then -{ - _data = missionNamespace getVariable format["vas_gear_new_%1",_slot]; -} - else -{ - _data = profileNameSpace getVariable format["vas_gear_new_%1",_slot]; -}; - -if(isNil {_data}) exitWith {hint localize "STR_VAS_Prompt_deleteSlotNoInfo";}; -createDialog "VAS_prompt"; -disableSerialization; - -waitUntil {!isNull (findDisplay VAS_prompt_Display)}; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_text)) ctrlSetStructuredText parseText format["%3 %1
%2",_slot+1,_data select 0,localize "STR_VAS_Prompt_deleteSlotWarning"]; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_true)) ctrlSetText localize "STR_VAS_Prompt_deleteYes"; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_false)) ctrlSetText localize "STR_VAS_Prompt_deleteNo"; - -waitUntil {!isNil {vas_prompt_choice}}; - -if(vas_prompt_choice) then -{ - if(vas_disableLoadSave) then - { - hint format["%2:\n%1",(missionNamespace getVariable format["vas_gear_new_%1",_slot]) select 0,localize "STR_VAS_Prompt_deleteSuccess"]; - missionNamespace setVariable[format["vas_gear_new_%1",_slot],nil]; - [1,true] spawn VAS_fnc_SaveLoad; - vas_prompt_choice = nil; - } - else - { - hint format["You deleted slot:\n%1",(profileNameSpace getVariable format["vas_gear_new_%1",_slot]) select 0]; - profileNameSpace setVariable[format["vas_gear_new_%1",_slot],nil]; - saveProfileNamespace; - [1,true] spawn VAS_fnc_SaveLoad; - vas_prompt_choice = nil; - }; -} - else -{ - vas_prompt_choice = nil; - hint format["%2 %1",_slot+1,localize "STR_VAS_Prompt_deleteCanelled"]; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_details.sqf b/source/VAS/functions/fn_details.sqf deleted file mode 100644 index dbd5222..0000000 --- a/source/VAS/functions/fn_details.sqf +++ /dev/null @@ -1,76 +0,0 @@ -#include "macro.sqf" -/* - File: fn_details.sqf - Version Edit: 2.5 - Author: Bryan "Tonic" Boardwine - - Description: - Displays details about the weapon mainly magazines. -*/ -disableSerialization; -if((uiNamespace getvariable "VAS_UI_FILTER") != "guns" && !(uiNamespace getVariable "VAS_UI_QuickMag")) exitWith {call VAS_fnc_closeDetails;}; //Filter not on guns? exit -private["_control","_data","_control","_magazines","_details","_items","_addToLb"]; -_control = _this select 0; -if(isNil {_control}) exitWith {call VAS_fnc_closeDetails;}; -if((_this select 1) == -1) exitWith {call VAS_fnc_closeDetails;}; -_data = (_control lbData (_this select 1)); - -_details = [_data] call VAS_fnc_fetchCfgDetails; -if(count _details == 0) exitWith {call VAS_fnc_closeDetails;}; //No info? Exit -if(!((_details select 4) in [1,2,4,5,4096])) exitWith {call VAS_fnc_closeDetails;}; //Not a gun? Exit -if(count (_details select 7) == 0) exitwith {call VAS_fnc_closeDetails;}; //No mags? Exit -_magazines = (_details select 7); -(VAS_getControl(VAS_Main_Display,VAS_detail_mags)) ctrlSetStructuredText parseText format["%1",(_details select 1)]; -_control = VAS_getControl(VAS_Main_Display,VAS_detail_mags_list); -lbClear _control; - -_addToLb = { - private["_control","_item","_tmp"]; - disableSerialization; - _control = _this select 0; - _item = _this select 1; - _tmp = [_item,"CfgMagazines"] call VAS_fnc_fetchCfgDetails; - - if(count _tmp > 0) then - { - _control lbAdd format["%1", (_tmp select 1)]; - _control lbSetData [(lbSize _control)-1,_x]; - _control lbSetPicture [(lbSize _control)-1,(_tmp select 2)]; - }; -}; - -{ - if(!isNil "VAS_box_magazines") then { - if(!(_x in VAS_box_magazines)) exitWith {}; - [_control,_x] call _addToLb; - } else { - if(count vas_magazines == 0) then { - if(_x in vas_r_magazines) exitWith {}; - [_control,_x] call _addToLb; - } else { - if(!(_x in vas_magazines)) exitWith {}; - [_control,_x] call _addToLb; - }; - }; -} foreach _magazines; - -_items = [_data] call VAS_fnc_accList; - -_control = ((findDisplay 2500) displayCtrl 2851); -lbClear _control; - -if(count _items > 0) then { - { - _cfgInfo = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - _control lbAdd format["%1", _cfgInfo select 1]; - _control lbSetData [(lbSize _control)-1,_x]; - _control lbSetPicture [(lbSize _control)-1,_cfgInfo select 2]; - } foreach _items; - ctrlShow[VAS_AccBG,true]; - ctrlShow[VAS_AccList,true]; -} else { - ctrlShow[VAS_AccBG,false]; - ctrlShow[VAS_AccList,false]; -}; - -call VAS_fnc_openDetails; \ No newline at end of file diff --git a/source/VAS/functions/fn_fetchCfg.sqf b/source/VAS/functions/fn_fetchCfg.sqf deleted file mode 100644 index c40d4fe..0000000 --- a/source/VAS/functions/fn_fetchCfg.sqf +++ /dev/null @@ -1,113 +0,0 @@ -/* - File: fn_fetchCfg.sqf - Version Edit: 2.5 - Author: Bryan "Tonic" Boardwine - - Description: - I honestly can't remember, something about handling configs/presets/something. -*/ -private["_request","_filter","_list"]; -_request = _this select 0; -_filter = if(isNil {_this select 1}) then {nil} else {_this select 1}; //Need to handle this so it doesn't throw an error. -switch(_request) do -{ - case "guns": - { - if(!isNil "VAS_box_weapons") exitWith {_list = VAS_box_weapons;}; - if(count VAS_weapons > 0) then - { - if(!isNil {_filter}) then - { - _list = [VAS_weapons,_filter] call VAS_fnc_filter; - } - else - { - _list = VAS_weapons; - }; - } - else - { - if(isNil {VAS_pre_weapons}) then {["CfgWeapons"] call VAS_fnc_buildConfig;}; - if(!isNil {_filter}) then - { - _list = [VAS_pre_weapons,_filter] call VAS_fnc_filter; - } - else - { - _list = VAS_pre_weapons; - }; - }; - }; - - case "mags": - { - if(!isNil "VAS_box_magazines") exitWith {_list = VAS_box_magazines}; - if(count VAS_magazines > 0) then - { - _list = VAS_magazines; - } - else - { - if(isNil {VAS_pre_magazines}) then {["CfgMagazines"] call VAS_fnc_buildConfig;}; - _list = VAS_pre_magazines; - }; - }; - - case "items": - { - if(!isNil "VAS_box_items") exitWith {_list = VAS_box_items}; - if(count VAS_items > 0) then - { - if(!isnil {_filter}) then - { - _list = [VAS_items,_filter] call VAS_fnc_filter; - } - else - { - _list = VAS_items; - }; - } - else - { - if(isNil {VAS_pre_items}) then {["CfgWeapons"] call VAS_fnc_buildConfig;}; - if(!isNil {_filter}) then - { - _list = [VAS_pre_items,_filter] call VAS_fnc_filter; - } - else - { - _list = VAS_pre_items; - }; - }; - }; - - case "packs": - { - if(!isNil "VAS_box_backpacks") exitWith {_list = VAS_box_backpacks;}; - if(count VAS_backpacks > 0) then - { - _list = VAS_backpacks; - } - else - { - if(isNil {VAS_pre_backpacks}) then {["CfgVehicles"] call VAS_fnc_buildConfig;}; - _list = VAS_pre_backpacks; - }; - }; - - case "glass": - { - if(!isNil "VAS_box_goggles") exitWith {_list = VAS_box_goggles;}; - if(count VAS_glasses > 0) then - { - _list = VAS_glasses; - } - else - { - if(isNil {VAS_pre_glasses}) then {["CfgGlasses"] call VAS_fnc_buildConfig;}; - _list = VAS_pre_glasses; - }; - }; -}; - -_list; \ No newline at end of file diff --git a/source/VAS/functions/fn_fetchCfgDetails.sqf b/source/VAS/functions/fn_fetchCfgDetails.sqf deleted file mode 100644 index 8d199f4..0000000 --- a/source/VAS/functions/fn_fetchCfgDetails.sqf +++ /dev/null @@ -1,138 +0,0 @@ -/* - @version: 1.7 - @file_name: fn_fetchCfgDetails.sqf - @file_author: TAW_Tonic - @file_edit: 8/2/2013 - @file_description: Fetch information about the entities config - - USAGE: - [Classname,Cfg* (Optional)] call VAS_fnc_fetchCfgDetails; - - Return: - 0: classname - 1: displayname - 2: picture - 3: scope - 4: type - 5: itemInfo Type (if any, -1 means none) - 6: Cfg Location i.e CfgWeapons - 7: Magazines - 8: Muzzles - 9: Short Description - 10: acc_Pointers - 11: acc_Optics - 12: acc_Muzzles - 13: Base (Superclass) - 14: New compatibleItems Structure -*/ -private["_entity","_cfg","_ret","_type","_acc_p","_acc_o","_slotclasses","_acc_m","_scope","_displayName","_picture","_config","_itemInfo","_muzzles","_magazines","_desc","_base"]; -_entity = [_this,0,"",[""]] call BIS_fnc_param; -_type = -1; -_acc_p = []; -_acc_o = []; -_acc_m = []; -_slotclasses = []; -_scope = 0; -_itemInfo = -1; -_muzzles = []; -_magazines = []; -if(_entity == "") exitWith {[]}; -_cfg = if(isNil {_this select 1}) then -{ - switch (true) do - { - case (isClass (configFile >> "CfgMagazines" >> _entity)) : {"CfgMagazines";}; - case (isClass (configFile >> "CfgWeapons" >> _entity)) : {"CfgWeapons";}; - case (isClass (configFile >> "CfgVehicles" >> _entity)) : {"CfgVehicles";}; - case (isClass (configFile >> "CfgGlasses" >> _entity)) : {"CfgGlasses";}; - }; -} - else -{ - _this select 1 -}; - -//Final Check - -_ret = []; -if(typeName _cfg != "STRING") exitWith {[]}; //Not a config -if(!isClass (configFile >> _cfg >> _entity)) exitWith {[]}; -if(_cfg == "") exitWith {[]}; //Not a config, who is passing bad data? - -_config = configFile >> _cfg >> _entity; -_displayName = getText(_config >> "displayName"); -_picture = getText(_config >> "picture"); -_desc = getText(_config >> "descriptionshort"); -_base = inheritsFrom _config; - -switch (_cfg) do -{ - case "CfgVehicles": - { - _type = getText(_config >> "vehicleClass"); - _scope = getNumber(_config >> "scope"); - }; - - case "CfgWeapons": - { - _scope = getNumber(_config >> "scope"); - _type = getNumber(_config >> "type"); - _desc = getText(_config >> "descriptionshort"); - - //Compatible attachments - if(isClass (_config >> "WeaponSlotsInfo")) then - { - _acc_p = getArray(_config >> "WeaponSlotsInfo" >> "PointerSlot" >> "compatibleItems"); - _acc_o = getArray(_config >> "WeaponSlotsInfo" >> "CowsSlot" >> "compatibleItems"); - _acc_m = getArray(_config >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems"); - - { private "_thiscfgitem"; - for "_i" from 0 to (count(_x) - 1) do { - _thiscfgitem = _x select _i; - if (isClass _thiscfgitem) then { - if !((configName _thiscfgitem) in _slotclasses) then { - _slotclasses set [count _slotclasses, configName _thiscfgitem]; - }; - }; - }; - } forEach ([_config>>"WeaponSlotsInfo"] call bis_fnc_returnParents); - - }; - - if(isClass (_config >> "ItemInfo")) then - { - _itemInfo = getNumber(_config >> "ItemInfo" >> "Type"); - }; - - _muzzles = getArray(_config >> "muzzles"); - _magazines = getArray(_config >> "magazines"); - if(!isNil {_muzzles}) then - { - private["_tmp"]; - // _base = inheritsFrom (configFile >> "CfgWeapons" >> _entity); - { - if(_x != "this") then - { - _tmp = getArray(_base >> _x >> "magazines"); - { - _magazines set[count _magazines, _x]; - } foreach (_tmp); - }; - } foreach _muzzles; - }; - }; - - case "CfgMagazines": - { - _scope = getNumber(_config >> "scope"); - }; -}; - -if(!isNil "_slotclasses") then -{ - _slotclasses = _slotclasses - ["MuzzleSlot"]; - _slotclasses = _slotclasses - ["CowsSlot"]; - _slotclasses = _slotclasses - ["PointerSlot"]; -}; -_ret = [_entity,_displayName,_picture,_scope,_type,_itemInfo,_cfg,_magazines,_muzzles,_desc,_acc_p,_acc_o,_acc_m,_base,_slotclasses]; -_ret; \ No newline at end of file diff --git a/source/VAS/functions/fn_fetchPlayerGear.sqf b/source/VAS/functions/fn_fetchPlayerGear.sqf deleted file mode 100644 index 80f1a1e..0000000 --- a/source/VAS/functions/fn_fetchPlayerGear.sqf +++ /dev/null @@ -1,108 +0,0 @@ -/* - @version: 1.3 - @file_name: fn_fetchPlayerGear.sqf - @file_author: TAW_Tonic - @file_edit: 7/9/2013 - @file_description: Retrieves players current gear and returns it. -*/ -private["_ret","_curWep"]; -_ret = []; - -//Fetch Weapons -if(primaryWeapon player != "") then {_ret set[count _ret,primaryWeapon player];}; -if(secondaryWeapon player != "") then {_ret set[count _ret,secondaryWeapon player];}; -if(handgunWeapon player != "") then {_ret set[count _ret,handgunWeapon player];}; - -//Fetch Current Magazines -if(count (primaryWeaponMagazine player) > 0) then -{ - { - _ret set[count _ret,_x]; - } foreach (primaryWeaponMagazine player); -}; - -if(count (secondaryWeaponMagazine player) > 0) then -{ - { - _ret set[count _ret,_x]; - } foreach (secondaryWeaponMagazine player); -}; - -if(count (handgunMagazine player) > 0) then -{ - { - _ret set[count _ret,_x]; - } foreach (handgunMagazine player); -}; - -//Hard code for Laser Desigantor batteries -_curWep = currentWeapon player; - -if("Laserdesignator" in assignedItems player) then -{ - player selectWeapon "Laserdesignator"; - if(currentMagazine player != "") then {_ret set[count _ret,(currentMagazine player)];}; -}; - -player selectWeapon _curWep; - -//Fetch rest of misc information. -if(uniform player != "") then -{ - _ret set[count _ret, uniform player]; //Get uniform - {_ret set[count _ret,_x];} foreach (uniformItems player); //Get uniform items -}; - -if(vest player != "") then -{ - _ret set[count _ret, vest player]; //Get vest - {_ret set[count _ret,_x];} foreach (vestItems player); //Get vest items -}; - -if(backpack player != "") then -{ - _ret set[count _ret,backpack player]; //Get Backpack - {_ret set[count _ret,_x];} foreach (backpackItems player); //Get Backpack Items -}; - -if(count (assignedItems player) > 0) then -{ - { - _ret set[count _ret,_x]; - } foreach (assignedItems player); -}; - -if(headGear player != "") then -{ - _ret set[count _ret,headGear player]; -}; - -if(goggles player != "") then -{ - _ret set[count _ret, goggles player]; -}; - -//Fetch Primary weapon attachments -if(primaryWeapon player != "") then -{ - { - if(((primaryWeaponItems player) select _x) != "") then - { - _ret set[count _ret,((primaryWeaponItems player) select _x)]; - }; - } foreach [0,1,2]; -}; - -if(handgunWeapon player != "") then -{ - { - if(((handgunItems player) select _x) != "") then - { - _ret set[count _ret,((handgunItems player) select _x)]; - }; - } foreach [0,1,2]; -}; - -//Fetch secondary weapon attachments (placeholder) - -_ret; //Return! \ No newline at end of file diff --git a/source/VAS/functions/fn_filter.sqf b/source/VAS/functions/fn_filter.sqf deleted file mode 100644 index 5abac92..0000000 --- a/source/VAS/functions/fn_filter.sqf +++ /dev/null @@ -1,106 +0,0 @@ -/* - @version: 1.9 - @file_name: fn_filter.sqf - @file_author: TAW_Tonic - @file_edit: 9/1/2013 - @file_description: Takes current array of items and filters it for what we need. -*/ -private["_items","_filter","_ret","_itemInfo","_type","_details"]; -_items = _this select 0; -_filter = _this select 1; -_ret = []; -{ - if(_x != "") then - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details == 0) exitWith {_ret}; - _type = _details select 4; - _itemInfo = _details select 5; - - switch (true) do - { - case ((_details select 6) == "CfgMagazines") : - { - if(typeName _filter == "STRING") then - { - if(_filter == "mag") then - { - _ret set[count _ret,_x]; - }; - }; - }; - - case ((_details select 6) == "CfgGlasses" && typeName _filter == "STRING") : - { - if(_filter == "glass") then - { - _ret set[count _ret,_x]; - }; - }; - - case (_type in [1,2,4,5,4096] && (_itemInfo == 0 OR _itemInfo == -1)) : - { - switch(typeName _filter) do - { - case "ARRAY": - { - if(_type in _filter) then - { - _ret set [count _ret,_x]; - }; - }; - - case "SCALAR": - { - if(_type == _filter) then - { - _ret set [count _ret,_x]; - }; - }; - }; - }; - - case (_type in [4096,131072]) : - { - if(_type == 4096 && _itemInfo == 0) exitWith {}; - switch(typeName _filter) do - { - case "ARRAY": - { - if(_itemInfo in _filter) then - { - _ret set[count _ret,_x]; - }; - }; - - case "SCALAR": - { - switch (true) do - { - case (_itemInfo == _filter) : {_ret set[count _ret,_x];}; - case (_type == _filter) : {_ret set[count _ret,_x];}; - }; - }; - - case "STRING": - { - if(_filter == "items") then - { - _ret set[count _ret,_x]; - }; - }; - }; - }; - - case (typeName _type == "STRING" && typeName _filter == "STRING") : - { - if(_type == "Backpacks" && _filter == "packs") then - { - _ret set[count _ret,_x]; - }; - }; - }; - }; -} foreach _items; - -_ret \ No newline at end of file diff --git a/source/VAS/functions/fn_filterMenu.sqf b/source/VAS/functions/fn_filterMenu.sqf deleted file mode 100644 index 81ad610..0000000 --- a/source/VAS/functions/fn_filterMenu.sqf +++ /dev/null @@ -1,83 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.8 - @file_name: fn_filterMenu.sqf - @file_author: TAW_Tonic - @file_edit: 8/27/2013 - @file_description: When a filter is called it will give us the details and we shall sort her out! -*/ -waitUntil {!isNull (findDisplay VAS_Main_Display)}; -disableSerialization; -private["_req","_filter","_control","_details","_data","_myfilter","_return"]; -_req = _this select 0; -_return = if(count _this > 1) then {true} else {false}; -_filter = uiNamespace getVariable "VAS_UI_FILTER"; -uiNamespace setVariable["VAS_UI_FILTER_VAR",_req]; - -switch(_filter) do -{ - case "guns": - { - switch(_req) do - { - case 0: {_data = [_filter,1] call VAS_fnc_fetchCfg; _myfilter = 1;}; - case 1: {_data = [_filter,1] call VAS_fnc_fetchCfg; _myfilter = 1;}; - case 2: {_data = [_filter,5] call VAS_fnc_fetchCfg; _myfilter = 5;}; - case 3: {_data = [_filter,4] call VAS_fnc_fetchCfg; _myfilter = 4;}; - case 4: {_data = [_filter,2] call VAS_fnc_fetchCfg; _myfilter = 2;}; - }; - }; - - case "items": - { - switch(_req) do - { - case 0: {_data = [_filter,801] call VAS_fnc_fetchCfg; _myfilter = 801;}; - case 1: {_data = [_filter,701] call VAS_fnc_fetchCfg; _myfilter = 701;}; - case 2: {_data = [_filter,605] call VAS_fnc_fetchCfg; _myfilter = 605;}; - case 3: - { - _data = [_filter,[201,101,301]] call VAS_fnc_fetchCfg; - _myfilter = [201,101,301]; - }; - case 4: {_data = [_filter,[0,616,621,619,620,401]] call VAS_fnc_fetchCfg; _myfilter = [0,616,621,619,620,401];}; - }; - }; -}; - -if(_return) then -{ - _info = [([] call VAS_fnc_fetchPlayerGear),_myfilter] call VAS_fnc_filter; - _info; -} - else -{ - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - lbClear VAS_getControl(VAS_Main_Display,VAS_virt_list); - lbClear VAS_getControl(VAS_Main_Display,VAS_unit_list); - - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _data; - - lbSort _control; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),_myfilter] call VAS_fnc_filter; - - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_filterShow.sqf b/source/VAS/functions/fn_filterShow.sqf deleted file mode 100644 index ac36909..0000000 --- a/source/VAS/functions/fn_filterShow.sqf +++ /dev/null @@ -1,55 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.0 - @file_name: filter_show.sqf - @file_author: TAW_Tonic - @file_edit: 5/9/2013 - @file_description: Checks if we need to hide/show filters. - -*/ -private["_req"]; -_req = _this select 0; -_cur_filter = uiNamespace getVariable "VAS_UI_FILTER"; - -switch(_req) do -{ - case "guns": - { - ctrlSetText[VAS_filter_1,localize "STR_VAS_Main_Rifles"]; - ctrlSetText[VAS_filter_2,localize "STR_VAS_Main_Scoped"]; - ctrlSetText[VAS_filter_3,localize "STR_VAS_Main_Heavy"]; - ctrlSetText[VAS_filter_4,localize "STR_VAS_Main_Launcher"]; - ctrlSetText[VAS_filter_5,localize "STR_VAS_Main_Pistols"]; - - ctrlShow[VAS_filter_1,true]; - ctrlShow[VAS_filter_2,true]; - ctrlShow[VAS_filter_3,true]; - ctrlShow[VAS_filter_4,true]; - ctrlShow[VAS_filter_5,true]; - }; - - case "items": - { - ctrlSetText[VAS_filter_1,localize "STR_VAS_Main_Uniforms"]; - ctrlSetText[VAS_filter_2,localize "STR_VAS_Main_Vests"]; - ctrlSetText[VAS_filter_3,localize "STR_VAS_Main_Headgear"]; - ctrlSetText[VAS_filter_4,localize "STR_VAS_Main_Attachments"]; - ctrlSetText[VAS_filter_5,localize "STR_VAS_Main_Misc"]; - - ctrlShow[VAS_filter_1,true]; - ctrlShow[VAS_filter_2,true]; - ctrlShow[VAS_filter_3,true]; - ctrlShow[VAS_filter_4,true]; - ctrlShow[VAS_filter_5,true]; - }; - - default - { - ctrlShow[VAS_filter_1,false]; - ctrlShow[VAS_filter_2,false]; - ctrlShow[VAS_filter_3,false]; - ctrlShow[VAS_filter_4,false]; - ctrlShow[VAS_filter_5,false]; - }; -}; - \ No newline at end of file diff --git a/source/VAS/functions/fn_handleItem.sqf b/source/VAS/functions/fn_handleItem.sqf deleted file mode 100644 index 0f3428a..0000000 --- a/source/VAS/functions/fn_handleItem.sqf +++ /dev/null @@ -1,577 +0,0 @@ -/* - @version: 2.2 - @file_name: fn_handleItem.sqf - @file_author: TAW_Tonic - @file_edit: 12/7/2013 - @file_description: Handles the incoming requests and adds or removes it. -*/ -private["_item","_details","_bool","_ispack","_items","_isgun","_ongun","_override","_toUniform","_toVest"]; -_item = [_this,0,"",[""]] call BIS_fnc_param; -_bool = [_this,1,false,[false]] call BIS_fnc_param; -_ispack = [_this,2,false,[false]] call BIS_fnc_param; -_ongun = [_this,3,false,[false]] call BIS_fnc_param; -_override = [_this,4,false,[false]] call BIS_fnc_param; -_toUniform = [_this,5,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a uniform. -_toVest = [_this,6,false,[false]] call BIS_fnc_param; //Manual override to send items specifically to a vest - -//Some checks -if(_item == "") exitWith {}; -_isgun = false; - -//Patch by Robalo for TFAR radio's. -if (getText (configFile >> "CfgWeapons" >> _item >> "simulation") == "ItemRadio") then { - if (isClass(configFile >> "CfgPatches" >> "task_force_radio_items")) then { - _radio = getText (configFile >> "CfgWeapons" >> _item >> "tf_parent"); - if (typeName _radio == "STRING" && _radio != "") then {_item = _radio}; - }; -}; - -_details = [_item] call VAS_fnc_fetchCfgDetails; -if(count _details == 0) exitWith {}; - -//First check for restricted items -if( -(_item in VAS_r_weapons) OR (_item in VAS_r_backpacks) OR (_item in VAS_r_magazines) OR (_item in VAS_r_items) OR (_item in VAS_r_glasses) OR -((_details select 13) in VAS_r_weapons) OR ((_details select 13) in VAS_r_backpacks) OR ((_details select 13) in VAS_r_magazines) OR ((_details select 13) in VAS_r_items) OR ((_details select 13) in VAS_r_glasses) -) exitWith {systemChat format["%1 %2",_details select 1,localize "STR_VAS_restricted"];}; - -//Second check for restricted items -if( -(count VAS_weapons > 0 && !(_item in VAS_weapons)) && -(count VAS_items > 0 && !(_item in VAS_items)) && -(count VAS_backpacks > 0 && !(_item in VAS_backpacks)) && -(count VAS_magazines > 0 && !(_item in VAS_magazines)) && -(count VAS_glasses > 0 && !(_item in VAS_glasses)) -) exitWith {systemChat format["%1 %2",_details select 1,localize "STR_VAS_restricted"]}; - -if(_bool) then -{ - switch((_details select 6)) do - { - case "CfgGlasses": - { - if(_toUniform) exitWith {player addItemToUniform _item;}; - if(_toVest) exitWith {player addItemToVest _item;}; - - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - if(goggles player != "") then - { - removeGoggles player; - }; - player addGoggles _item; - }; - }; - }; - - case "CfgVehicles": - { - if(backpack player != "") then - { - _items = (backpackItems player); - removeBackpack player; - }; - player addBackpack _item; - clearAllItemsFromBackpack player; - if(!isNil {_items}) then - { - {[_x,true,true,false,true] spawn VAS_fnc_handleItem; } foreach _items; - }; - }; - - case "CfgMagazines": - { - if(_toUniform) exitWith {player addItemToUniform _item;}; - if(_toVest) exitWith {player addItemToVest _item;}; - if(_ispack) exitWith {player addItemToBackpack _item;}; - - player addMagazine _item; - }; - - case "CfgWeapons": - { - //New addition - if(_toUniform) exitWith {player addItemToUniform _item;}; - if(_toVest) exitWith {player addItemToVest _item;}; - if(_ispack) exitWith {player addItemToBackpack _item;}; - - if((_details select 4) in [1,2,4,5,4096]) then - { - if((_details select 4) == 4096) then - { - if((_details select 5) == -1) then - { - _isgun = true; - }; - } - else - { - _isgun = true; - }; - }; - - if(_isgun) then - { - if(!_ispack && _override) exitWith {}; //It was in the vest/uniform, try to close to prevent it overriding stuff... (Actual weapon and not an item) - if(_item == "MineDetector") then - { - player addItem _item; - } - else - { - player addWeapon _item; - }; - } - else - { - switch(_details select 5) do - { - case 0: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - if(_item in (assignedItems player)) then - { - player addItem _item; - } - else - { - player addItem _item; - player assignItem _item; - }; - }; - }; - }; - case 605: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - if(headGear player == _item) then - { - player addItem _item; - } - else - { - if(headGear player != "") then - { - removeHeadGear player; - }; - player addHeadGear _item; - }; - }; - }; - }; - case 801: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - if(uniform player == _item) then - { - player addItem _item; - } - else - { - if(uniform player != "") then - { - _items = uniformItems player; - removeUniform player; - }; - - if(!(player isUniformAllowed _item)) then { - player forceAddUniform _item; - } else { - player addUniform _item; - }; - - if(!isNil {_items}) then - { - {[_x,true,false,false,true] spawn VAS_fnc_handleItem;} foreach _items; - }; - }; - }; - }; - }; - case 701: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - if(vest player == _item) then - { - player addItem _item; - } - else - { - if(vest player != "") then - { - _items = vestItems player; - removeVest player; - }; - - player addVest _item; - - if(!isNil {_items}) then - { - {[_x,true,false,false,true] spawn VAS_fnc_handleItem;} foreach _items; - }; - }; - }; - }; - }; - - case 201: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - private["_type"]; - _type = [_item,201] call VAS_fnc_accType; - if(_ongun) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - [] call VAS_fnc_accPrompt; - waitUntil {!isNil {vas_prompt_choice}}; - if(vas_prompt_choice) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - player addItem _item; - }; - vas_prompt_choice = nil; - }; - }; - }; - }; - - case 301: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - private["_type"]; - _type = [_item,301] call VAS_fnc_accType; - - if(_ongun) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - [] call VAS_fnc_accPrompt; - waitUntil {!isNil {vas_prompt_choice}}; - if(vas_prompt_choice) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - player addItem _item; - }; - vas_prompt_choice = nil; - }; - }; - }; - }; - - case 101: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - private["_type"]; - _type = [_item,101] call VAS_fnc_accType; - - if(_ongun) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - [] call VAS_fnc_accPrompt; - waitUntil {!isNil {vas_prompt_choice}}; - if(vas_prompt_choice) then - { - switch (_type) do - { - case 1: { player addPrimaryWeaponItem _item; }; - case 2: { player addSecondaryWeaponItem _item; }; - case 3: { player addHandgunItem _item; }; - }; - } - else - { - player addItem _item; - }; - vas_prompt_choice = nil; - }; - }; - }; - }; - - case 621: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - player addItem _item; - player assignItem _item; - }; - }; - }; - - case 616: - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - if(_override) then - { - player addItem _item; - } - else - { - player addItem _item; - player assignItem _item; - }; - }; - }; - - default - { - if(_ispack) then - { - player addItemToBackpack _item; - } - else - { - player addItem _item; - }; - }; - }; - }; - }; - }; -} - else -{ - switch((_details select 6)) do - { - case "CfgVehicles": - { - removeBackpack player; - }; - - case "CfgMagazines": - { - player removeMagazine _item; - }; - - case "CfgGlasses": - { - if(_item == goggles player) then - { - removeGoggles player; - } - else - { - player removeItem _item; - }; - }; - - case "CfgWeapons": - { - if((_details select 4) in [1,2,4,5,4096]) then - { - if((_details select 4) == 4096) then - { - if((_details select 5) == -1) then - { - _isgun = true; - }; - } - else - { - _isgun = true; - }; - }; - - if(_isgun) then - { - switch(true) do - { - case (primaryWeapon player == _item) : {_ispack = false;}; - case (secondaryWeapon player == _item) : {_ispack = false;}; - case (handGunweapon player == _item) : {_ispack = false;}; - case (_item in assignedItems player) : {_ispack = false;}; - default {_ispack = true;}; - }; - - if(_item == "MineDetector") then - { - player removeItem _item; - } - else - { - if(_ispack) then - { - player removeItemFromBackpack _item; - } - else - { - switch(true) do - { - case (_item in (uniformItems player)): {player removeItemFromUniform _item;}; - case (_item in (vestItems player)) : {player removeItemFromVest _item;}; - case (_item in (backpackItems player)) : {player removeItemFromBackpack _item;}; - default {player removeWeapon _item;}; - }; - }; - }; - } - else - { - switch((_details select 5)) do - { - case 0: {player unassignItem _item; player removeItem _item;}; - case 605: {if(headGear player == _item) then {removeHeadgear player} else {player removeItem _item};}; - case 801: {if(uniform player == _item) then {removeUniform player} else {player removeItem _item};}; - case 701: {if(vest player == _item) then {removeVest player} else {player removeItem _item};}; - case 621: {player unassignItem _item; player removeItem _item;}; - case 616: {player unassignItem _item; player removeItem _item;}; - default - { - switch (true) do - { - case (_item in (primaryWeaponItems player)) : {player removePrimaryWeaponItem _item;}; - case (_item in (handgunItems player)) : {player removeHandgunItem _item;}; - default {player removeItem _item;}; - }; - }; - }; - }; - }; - }; -}; - -if(!isNil "VAS_fnc_updateLoad") then -{ - [] call VAS_fnc_updateLoad; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_loadGear.sqf b/source/VAS/functions/fn_loadGear.sqf deleted file mode 100644 index f3a4127..0000000 --- a/source/VAS/functions/fn_loadGear.sqf +++ /dev/null @@ -1,77 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.0 - @file_name: fn_loadGear.sqf - @file_author: TAW_Tonic - @file_edit: 9/24/2013 - @file_description: Load saved gear in old VAS format. -*/ -private["_slot","_loadout","_primary","_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_handle"]; -if(!isNil {VAS_loadout_ip}) exitWith {}; -_slot = if(isNil {_this select 0}) then {lbCurSel VAS_load_list} else {_this select 0}; -if(_slot == -1) exitWith {hint localize "STR_VAS_Prompt_slotSelFail";}; -if(vas_disableLoadSave) then -{ - _loadout = missionNamespace getVariable format["vas_gear_new_%1",_slot]; -} - else -{ - _loadout = profileNamespace getVariable format["vas_gear_new_%1",_slot]; -}; - -if(isNil {_loadout}) exitWith {}; //Slot data doesn't exist -VAS_loadout_ip = true; -_primary = _loadout select 1; -_launcher = _loadout select 2; -_handgun = _loadout select 3; -_magazines = _loadout select 4; -_uniform = _loadout select 5; -_vest = _loadout select 6; -_backpack = _loadout select 7; -_items = _loadout select 8; -_primitems = _loadout select 9; -_secitems = _loadout select 10; -_handgunitems = _loadout select 11; -_uitems = _loadout select 12; -_vitems = _loadout select 13; -_bitems = _loadout select 14; - -//Strip the unit down -RemoveAllWeapons player; -{player removeMagazine _x;} foreach (magazines player); -removeUniform player; -removeVest player; -removeBackpack player; -removeGoggles player; -removeHeadGear player; -{ - player unassignItem _x; - player removeItem _x; -} foreach (assignedItems player); - -//Add the gear -if(_uniform != "") then {_handle = [_uniform,true,false,false,false] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};}; -if(_vest != "") then {_handle = [_vest,true,false,false,false] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};}; -if(_backpack != "") then {_handle = [_backpack,true,false,false,false] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};}; -{ - _handle = [_x,true,false,false,false] spawn VAS_fnc_handleItem; - waitUntil {scriptDone _handle}; -} foreach _magazines; - -if(_primary != "") then {[_primary,true,false,false,false] spawn VAS_fnc_handleItem;}; -if(_launcher != "") then {[_launcher,true,false,false,false] spawn VAS_fnc_handleItem;}; -if(_handgun != "") then {[_handgun,true,false,false,false] spawn VAS_fnc_handleItem;}; - -{_handle = [_x,true,false,false,false] spawn VAS_fnc_handleItem; waitUntil {scriptDone _handle};} foreach _items; -{[_x,true,false,false,true,true] call VAS_fnc_handleItem;} foreach (_uitems); -{[_x,true,false,false,true,false,true] call VAS_fnc_handleItem;} foreach (_vitems); -{[_x,true,true,false,false] call VAS_fnc_handleItem;} foreach (_bitems); -{[_x,true,false,true,false] call VAS_fnc_handleItem;} foreach (_primitems); -{[_x,true,false,true,false] call VAS_fnc_handleItem;} foreach (_secitems); -{[_x,true,false,true,false] call VAS_fnc_handleItem;} foreach (_handgunitems); - -if(primaryWeapon player != "") then -{ - player selectWeapon (primaryWeapon player); -}; -VAS_loadout_ip = nil; \ No newline at end of file diff --git a/source/VAS/functions/fn_loadoutInfo.sqf b/source/VAS/functions/fn_loadoutInfo.sqf deleted file mode 100644 index 26cb5e2..0000000 --- a/source/VAS/functions/fn_loadoutInfo.sqf +++ /dev/null @@ -1,95 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.0 - @file_name: fn_loadoutInfo.sqf - @file_author: TAW_Tonic - @file_edit: 9/24/2013 - @file_description: Pulls up the selected saved slots loadout. -*/ -private["_control","_slot","_type","_loadout"]; -_type = _this select 0; -disableSerialization; - -switch (_type) do -{ - case 0: {_control = VAS_getControl(VAS_save_Display,VAS_save_fetch); _slot = lbCurSel VAS_save_list;}; - case 1: {_control = VAS_getControl(VAS_load_Display,VAS_load_fetch); _slot = lbCurSel VAS_load_list}; -}; - -lbClear _control; - -if(_slot == -1) exitWith {hint localize "STR_VAS_Prompt_slotNoInfo";}; //No slot selected -if(vas_disableLoadSave) then -{ - _loadout = missionNamespace getVariable format["vas_gear_new_%1",_slot]; -} - else -{ - _loadout = profileNamespace getVariable format["vas_gear_new_%1",_slot]; -}; - -if(isNil {_loadout}) exitWith {(VAS_getControl(VAS_save_Display,VAS_save_text)) ctrlSetText localize "STR_VAS_Save_CLN";}; //No information in this slot. -if(_type == 0) then -{ - (VAS_getControl(VAS_save_Display,VAS_save_text)) ctrlSetText (_loadout select 0); -}; - -// Original Code -/* -{ - switch(typeName _x) do - { - case "STRING": - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - }; - - case "ARRAY": - { - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _x; - }; - }; -} foreach _loadout; -*/ - -// Modified Code by naong -private ["_listItems","_loadout_array","_className","_name"]; -_loadout_array = []; -{ - switch(typeName _x) do { - case "STRING": { - _loadout_array = _loadout_array + [_x]; - }; - case "ARRAY": { - { - _loadout_array = _loadout_array + [_x]; - } forEach _x; - }; - }; -} forEach _loadout; - -_listItems = []; -{ - _className = _x; - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then { - _name = (_details select 1); - if (_listItems find _name < 1) then { - _control lbAdd format["[%1] %2",({_x == _className} count _loadout_array),_name]; - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - _listItems = _listItems + [_name]; - }; - }; -} forEach _loadout_array; \ No newline at end of file diff --git a/source/VAS/functions/fn_mainDisplay.sqf b/source/VAS/functions/fn_mainDisplay.sqf deleted file mode 100644 index 7c2d510..0000000 --- a/source/VAS/functions/fn_mainDisplay.sqf +++ /dev/null @@ -1,246 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.6 - @file_name: fn_mainDisplay.sqf - @file_author: Bryan "Tonic" Boardwine - @file_edit: 5/21/2014 - @file_description: When called, sort the call and display our targeted information. -*/ -private["_request","_filter","_control","_info"]; -waitUntil {!isNull (findDisplay VAS_Main_Display)}; -disableSerialization; -_request = _this select 0; -_filter = _this select 1; -[_request] call VAS_fnc_filterShow; - -lbClear VAS_getControl(VAS_Main_Display,VAS_virt_list); -lbClear VAS_getControl(VAS_Main_Display,VAS_unit_list); - -uiNamespace setVariable["VAS_UI_FILTER",_request]; - -if(_filter && !isNil {(uiNamespace getVariable "VAS_UI_FILTER_VAR")}) exitWith -{ - [(uiNamespace getVariable "VAS_UI_FILTER_VAR")] spawn VAS_fnc_filterMenu; -}; -uiNamespace setVariable ["VAS_UI_FILTER_VAR",nil]; -uiNamespace setVariable ["VAS_UI_QuickMag",false]; - -[] call VAS_fnc_updateLoad; - -lbSetCurSel[VAS_virt_list,0]; -lbSetCurSel[VAS_unit_list,0]; - -switch (_request) do -{ - case "guns": - { - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - _info = ["guns"] call VAS_fnc_fetchCfg; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - { - _details = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetValue [(lbSize _control)-1,(_details select 4)]; //Value for index is type - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),[1,2,4,5,4096]] call VAS_fnc_filter; - - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - { - _details = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetValue [(lbSize _control)-1,(_details select 4)]; //Value for index is type - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - }; - - case "mags": - { - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - _info = ["mags"] call VAS_fnc_fetchCfg; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - { - _details = [_x,"CfgMagazines"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),"mag"] call VAS_fnc_filter; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - private["_mags","_mag"]; - _mags = []; - { - _details = [_x,"CfgMagazines"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - if(!(_x in _mags)) then - { - _mags set[count _mags,_x]; - _mag = _x; - _control lbAdd format["[%1] %2",({_x == _mag} count _info),(_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - }; - } foreach _info; - }; - }; - - case "items": - { - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - _info = ["items"] call VAS_fnc_fetchCfg; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - { - _details = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetValue [(lbSize _control)-1,(_details select 4)]; //Value for index is type - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),"items"] call VAS_fnc_filter; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - - { - _details = [_x,"CfgWeapons"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetValue [(lbSize _control)-1,(_details select 4)]; //Value for index is type - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - }; - - case "packs": - { - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - _info = ["packs"] call VAS_fnc_fetchCfg; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - { - _details = [_x,"CfgVehicles"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),"packs"] call VAS_fnc_filter; - - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - - { - _details = [_x,"CfgVehicles"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - }; - - case "glass": - { - _control = VAS_getControl(VAS_Main_Display,VAS_virt_list); - _info = ["glass"] call VAS_fnc_fetchCfg; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - - { - _details = [_x,"CfgGlasses"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - - _control = VAS_getControl(VAS_Main_Display,VAS_unit_list); - _info = [([] call VAS_fnc_fetchPlayerGear),"glass"] call VAS_fnc_filter; - [_control,_info] spawn { - private["_control","_info"]; - disableSerialization; - _control = _this select 0; - _info = _this select 1; - - { - _details = [_x,"CfgGlasses"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; - }; - }; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_mainInit.sqf b/source/VAS/functions/fn_mainInit.sqf deleted file mode 100644 index 6deda2f..0000000 --- a/source/VAS/functions/fn_mainInit.sqf +++ /dev/null @@ -1,70 +0,0 @@ -/* - @version: 2.0 - @file_name: fn_mainInit.sqf - @file_author: TAW_Tonic - @file_edit: 9/24/2013 - @file_description: Only called once during the initialization of VAS and uses compileFinal on all VAS functions. -*/ -[] spawn -{ - if(isNil "VAS_init_complete") then - { - private["_handle"]; - VAS_init_timeOnStart = time; - VAS_init_complete = false; - _handle = [] execVM "VAS\config.sqf"; - waitUntil {scriptDone _handle;}; - if(isNil "VAS_fnc_buildConfig") exitWith {diag_log "::VAS:: function VAS_fnc_buildConfig is nil"}; - ["CfgWeapons"] call VAS_fnc_buildConfig; - ["CfgMagazines"] call VAS_fnc_buildConfig; - ["CfgVehicles"] call VAS_fnc_buildConfig; - ["CfgGlasses"] call VAS_fnc_buildConfig; - VAS_init_complete = true; - } - else - { - VAS_init_timeOnStart = time; - [] call compile PreprocessFileLineNumbers "VAS\config.sqf"; - ["CfgWeapons"] call VAS_fnc_buildConfig; - ["CfgMagazines"] call VAS_fnc_buildConfig; - ["CfgVehicles"] call VAS_fnc_buildConfig; - ["CfgGlasses"] call VAS_fnc_buildConfig; - - sleep 2.5; - if(!isNil "vas_r_weapons") then { VAS_init_complete = true; }; - }; - - waitUntil {!isNull player && player == player}; - if(player diarySubjectExists "VAS")exitwith{}; - player createDiarySubject ["VAS","Virtual Ammobox System (VAS)"]; - player createDiaryRecord["VAS", - [ - "Virtual Ammobox System (VAS) v2.0", - " - Virtual Ammobox System (VAS) is a virtual ammobox inventory system created by Tonic AKA TAW_Tonic. If you have any problems with VAS please report them on the forums.
-
- Virtual Ammobox BIS Topic: - http://forums.bistudio.com/showthread.php?149077-Virtual-Ammobox-System-%28VAS%29 -
-
-

-

- Credits and Thanks:
- Kronzky - For his string function library
- SaMatra - For help with UI Resources and Russian Translation
- Dslyecxi - For his Paper doll giving insight on how to detect item types.
- Tyrghen on Armaholic - For giving me the tip about CfgFunctions
- naong - For his code tweaks to the Load / Save display.
- Coding from armaholic - Translation of VAS from English->German
- El nabot from Armaholic - Translation of VAS from English->French
- czesiek77 from Armaholic - Translation of VAS from English->Polish
- Ficc from BIS Forums - Translation of VAS from English->Portuguese
- ramius86 on BIS Forums - Translation of VAS from English->Italian
- RabsRincon on Armaholic - Translation of VAS from English->Spanish
- Bakarda on BIS/Armaholic - Translation of VAS from English->Czech
-

-

- " - ] - ]; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_onRespawn.sqf b/source/VAS/functions/fn_onRespawn.sqf deleted file mode 100644 index f093a7f..0000000 --- a/source/VAS/functions/fn_onRespawn.sqf +++ /dev/null @@ -1,16 +0,0 @@ -#include "macro.sqf" -/* - File: fn_onRespawn.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Used for 'Load On Respawn', if no selection was found it will remove the - current respawn handler if it exists. -*/ -VAS_slot = lbCurSel VAS_load_list; -if(VAS_slot == -1) exitWith {hint localize "STR_VAS_Prompt_onRespawnFail"; if(!isNil "VAS_Respawn_Handler") then {player removeEventHandler["Respawn",VAS_Respawn_Handler]; VAS_Respawn_Handler = nil;}}; - -if(isNil "VAS_Respawn_Handler") then -{ - VAS_Respawn_Handler = player addEventHandler ["Respawn", {[VAS_slot] spawn VAS_fnc_loadGear;}]; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_openDetails.sqf b/source/VAS/functions/fn_openDetails.sqf deleted file mode 100644 index 4d9a34e..0000000 --- a/source/VAS/functions/fn_openDetails.sqf +++ /dev/null @@ -1,12 +0,0 @@ -/* - File: fn_openDetails.sqf - Author: TAW_Tonic - - Description: - Used as a quick macro to open the details menu for weapon information. - Doesn't work within macro.sqf which is why it's a separate file. -*/ -#include "macro.sqf" -ctrlShow [VAS_detail_mags_list,true]; -ctrlShow[VAS_detail_mags,true]; -ctrlShow [VAS_detail_magsbg,true]; \ No newline at end of file diff --git a/source/VAS/functions/fn_playerDisplay.sqf b/source/VAS/functions/fn_playerDisplay.sqf deleted file mode 100644 index c2c2edf..0000000 --- a/source/VAS/functions/fn_playerDisplay.sqf +++ /dev/null @@ -1,60 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.2 - @file_name: fn_playerDisplay.sqf - @file_author: TAW_Tonic - @file_edit: 5/23/2013 - @file_description: When called, sort the call and display our targeted information. -*/ -private["_control","_info","_details"]; -disableSerialization; -switch((uiNamespace getVariable "VAS_UI_FILTER")) do -{ - case "guns": {_info = [([] call VAS_fnc_fetchPlayerGear),[1,2,4,5,4096]] call VAS_fnc_filter;}; - case "mags": {_info = [([] call VAS_fnc_fetchPlayerGear),"mag"] call VAS_fnc_filter;}; - case "items": {_info = [([] call VAS_fnc_fetchPlayerGear),"items"] call VAS_fnc_filter;}; - case "packs": {_info = [([] call VAS_fnc_fetchPlayerGear),"packs"] call VAS_fnc_filter;}; - case "glass": {_info = [([] call VAS_fnc_fetchPlayerGear),"glass"] call VAS_fnc_filter;}; -}; - -if(!isNil {(uiNamespace getVariable "VAS_UI_FILTER_VAR")}) then -{ - _info = [(uiNamespace getVariable "VAS_UI_FILTER_VAR"),true] call VAS_fnc_filterMenu; -}; - -waitUntil {typeName _info == "ARRAY"}; - -_control = VAS_getControl(VAS_Main_Display,VAS_unit_list); -lbClear _control; - -if((uiNamespace getVariable "VAS_UI_FILTER") == "mags") then -{ - private["_mags","_mag"]; - _mags = []; - { - _details = [_x,"CfgMagazines"] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - if(!(_x in _mags)) then - { - _mags set[count _mags,_x]; - _mag = _x; - _control lbAdd format["[%1] %2",({_x == _mag} count _info),(_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - }; - } foreach _info; -} - else -{ - { - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then - { - _control lbAdd format["%1", (_details select 1)]; //Displayname on list - _control lbSetData [(lbSize _control)-1,(_details select 0)]; //Data for index is classname - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - }; - } foreach _info; -}; \ No newline at end of file diff --git a/source/VAS/functions/fn_qRemoveItem.sqf b/source/VAS/functions/fn_qRemoveItem.sqf deleted file mode 100644 index a75b306..0000000 --- a/source/VAS/functions/fn_qRemoveItem.sqf +++ /dev/null @@ -1,11 +0,0 @@ -/* - File: fn_qRemoveItem.sqf - Author: TAW_Tonic - - Description: - Used in the double click removal function of VAS. -*/ -private["_data","_handle"]; -_data = (_this select 0) lbData (_this select 1); -[_data,false,false,false,false] call VAS_fnc_handleItem; -[] spawn VAS_fnc_playerDisplay; \ No newline at end of file diff --git a/source/VAS/functions/fn_quickAddDrag.sqf b/source/VAS/functions/fn_quickAddDrag.sqf deleted file mode 100644 index aee127e..0000000 --- a/source/VAS/functions/fn_quickAddDrag.sqf +++ /dev/null @@ -1,38 +0,0 @@ -/* - File: fn_quickAddDrag.sqf - Version Edit: 2.5 - Author: Bryan "Tonic" Boardwine - - Description: - Used in the new drag and drop system to add items to a specific container. -*/ -private["_ctrl","_arr","_display"]; -disableSerialization; -_ctrl = [_this,0,controlNull,[controlNull]] call BIS_fnc_param; -_arr = [_this,4,[],[[]]] call BIS_fnc_param; -_display = findDisplay 2500; -if(isNull _ctrl OR count _arr == 0) exitWith {}; //Bad data was sent so exit. - -_arr = _arr select 0; -switch(_ctrl) do -{ - case (_display displayCtrl 2960): - { - player addItemToUniform (_arr select 2); - }; - - case (_display displayCtrl 2961): - { - player addItemToVest (_arr select 2); - }; - - case (_display displayCtrl 2962): - { - player addItemToBackpack (_arr select 2); - }; -}; - -//Update UI. -[] call VAS_fnc_updateLoad; -[] spawn VAS_fnc_playerDisplay; -true; \ No newline at end of file diff --git a/source/VAS/functions/fn_quickAttachment.sqf b/source/VAS/functions/fn_quickAttachment.sqf deleted file mode 100644 index 4b36554..0000000 --- a/source/VAS/functions/fn_quickAttachment.sqf +++ /dev/null @@ -1,10 +0,0 @@ -/* - File: fn_quickAttachment.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Quickly adds an attachment from the attachment list dialog. -*/ -private["_data"]; -_data = (_this select 0) lbData (_this select 1); -[_data,true,false,true,false] call VAS_fnc_handleItem; \ No newline at end of file diff --git a/source/VAS/functions/fn_quickItem.sqf b/source/VAS/functions/fn_quickItem.sqf deleted file mode 100644 index df3d75f..0000000 --- a/source/VAS/functions/fn_quickItem.sqf +++ /dev/null @@ -1,12 +0,0 @@ -/* - File: fn_quickItem.sqf - Author: TAW_Tonic - - Description: - Used in the double clicking functionality to quickly get an item/weapon from VAS. -*/ -private["_data","_handle"]; -_data = (_this select 0) lbData (_this select 1); -_handle = [_data,true,false,false,false] spawn VAS_fnc_handleItem; -waitUntil {scriptDone _handle}; -[] spawn VAS_fnc_playerDisplay; \ No newline at end of file diff --git a/source/VAS/functions/fn_quickMag.sqf b/source/VAS/functions/fn_quickMag.sqf deleted file mode 100644 index 375809a..0000000 --- a/source/VAS/functions/fn_quickMag.sqf +++ /dev/null @@ -1,14 +0,0 @@ -/* - File: fn_quickItem.sqf - Author: TAW_Tonic - - Description: - Used in the double clicking functionality to quickly get an item/weapon from VAS. -*/ -private["_data","_handle"]; -_data = (_this select 0) lbData (_this select 1); -[_data,true,false,false,false] call VAS_fnc_handleItem; -uiNamespace setVariable["VAS_UI_FILTER","mags"]; -uiNamespace setVariable ["VAS_UI_FILTER_VAR",nil]; -uiNamespace setVariable ["VAS_UI_QuickMag",true]; -[] spawn VAS_fnc_playerDisplay; \ No newline at end of file diff --git a/source/VAS/functions/fn_removeGear.sqf b/source/VAS/functions/fn_removeGear.sqf deleted file mode 100644 index ac5c7ff..0000000 --- a/source/VAS/functions/fn_removeGear.sqf +++ /dev/null @@ -1,34 +0,0 @@ -#include "macro.sqf" -/* - @version: 1.7 - @file_name: fn_removeGear.sqf - @file_author: TAW_Tonic - @file_edit: 8/2/2013 - @file_description: Removes an item selected. -*/ -private["_data","_handle","_all","_fil"]; -_all = _this select 0; -_fil = uiNamespace getVariable "VAS_UI_FILTER"; -disableSerialization; -_data = VAS_getSelData(VAS_unit_list); - -switch(_all) do -{ - case true: - { - switch (_fil) do - { - case "mags": {player removeMagazines _data}; - case "items": {player removeItems _data}; - }; - [] call VAS_fnc_updateLoad; - }; - - case false: - { - [_data,false,false,false,false] call VAS_fnc_handleItem; - - }; -}; - -[] spawn VAS_fnc_playerDisplay; \ No newline at end of file diff --git a/source/VAS/functions/fn_saveGear.sqf b/source/VAS/functions/fn_saveGear.sqf deleted file mode 100644 index 205d78c..0000000 --- a/source/VAS/functions/fn_saveGear.sqf +++ /dev/null @@ -1,76 +0,0 @@ -#include "macro.sqf" -/* - @version: 2.0 - @file_name: fn_saveGear.sqf - @file_author: TAW_Tonic - @file_edit: 9/24/2013 - @file_description: Save to profileNamespace in old VAS format -*/ -private["_title","_slot","_primary,_launcher","_handgun","_magazines","_uniform","_vest","_backpack","_items","_primitems","_secitems","_handgunitems","_uitems","_vitems","_bitems","_curWep"]; -_title = ctrlText VAS_save_text; -_slot = lbCurSel VAS_save_list; -if(_slot == -1) exitWith {hint localize"STR_VAS_Prompt_slotSelFail"}; - -//Old format / code -_primary = primaryWeapon player; -_launcher = secondaryWeapon player; -_handgun = handGunWeapon player; -_magazines = []; -_uniform = uniform player; -_vest = vest player; -_backpack = backpack player; -_items = assignedItems player; -_primitems = primaryWeaponItems player; -_secitems = secondaryWeaponItems player; -_handgunitems = handGunItems player; -_uitems = []; -_vitems = []; -_bitems = []; -if(_uniform != "") then {{_uitems set[count _uitems,_x];} foreach (uniformItems player);}; -if(_vest != "") then {{_vitems set[count _vitems,_x];} foreach (vestItems player);}; -if(_backpack != "") then {{_bitems set[count _bitems,_x];} foreach (backPackItems player);}; - -if(goggles player != "") then { _items set[count _items, goggles player]; }; -if(headgear player != "") then { _items set[count _items, headgear player]; }; -if(count (primaryWeaponMagazine player) > 0) then -{ - { - _magazines set[count _magazines,_x]; - } foreach (primaryWeaponMagazine player); -}; - -if(count (secondaryWeaponMagazine player) > 0) then -{ - { - _magazines set[count _magazines,_x]; - } foreach (secondaryWeaponMagazine player); -}; - -if(count (handgunMagazine player) > 0) then -{ - { - _magazines set[count _magazines,_x]; - } foreach (handgunMagazine player); -}; - -//Hard code for Laser Desigantor batteries -_curWep = currentWeapon player; -if("Laserdesignator" in assignedItems player) then -{ - player selectWeapon "Laserdesignator"; - if(currentMagazine player != "") then {_magazines set[count _magazines,(currentMagazine player)];}; -}; - -player selectWeapon _curWep; - -if(vas_disableLoadSave) then -{ - missionNamespace setVariable[format["vas_gear_new_%1",_slot],[_title,_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems]]; -} - else -{ - profileNameSpace setVariable[format["vas_gear_new_%1",_slot],[_title,_primary,_launcher,_handgun,_magazines,_uniform,_vest,_backpack,_items,_primitems,_secitems,_handgunitems,_uitems,_vitems,_bitems]]; - saveProfileNamespace; -}; - -[0,true] spawn VAS_fnc_SaveLoad; \ No newline at end of file diff --git a/source/VAS/functions/fn_test.sqf b/source/VAS/functions/fn_test.sqf deleted file mode 100644 index e471f33..0000000 --- a/source/VAS/functions/fn_test.sqf +++ /dev/null @@ -1 +0,0 @@ -[_fnc_scriptName,_fnc_scriptNameParent] execVM "test.sqf"; \ No newline at end of file diff --git a/source/VAS/functions/fn_transferAction.sqf b/source/VAS/functions/fn_transferAction.sqf deleted file mode 100644 index 4bbbf0d..0000000 --- a/source/VAS/functions/fn_transferAction.sqf +++ /dev/null @@ -1,19 +0,0 @@ -#include "macro.sqf" -/* - File: fn_transferAction.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Sends the transfer request to the selected user. -*/ -private["_control","_targetUser"]; -disableSerialization; -_control = VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_UnitsList); -if(lbCurSel _control == -1) exitWith {}; -_targetUser = _control lbData (lbCurSel _control); -if(_targetUser == "") exitWith {hint localize "STR_VAS_Transfer_BadUnit"}; -{if(str(_x) == _targetUser) exitWith {_targetUser = _x;}} foreach playableUnits; //Fetch the users actual object. -if(isNull _targetUser) exitWith {hint localize "STR_VAS_Transfer_BadUnit"}; - -[[name player,VAS_Transfer_Loadout],"VAS_fnc_transferNetwork",_targetUser,false] spawn BIS_fnc_MP; -closeDialog 0; \ No newline at end of file diff --git a/source/VAS/functions/fn_transferMenu.sqf b/source/VAS/functions/fn_transferMenu.sqf deleted file mode 100644 index 3b07785..0000000 --- a/source/VAS/functions/fn_transferMenu.sqf +++ /dev/null @@ -1,37 +0,0 @@ -#include "macro.sqf" -/* - File: fn_transferMenu.sqf - Author Bryan "Tonic" Boardwine - - Description: - Opens the transfer menu to transfer a saved loadout to - another player in the server. -*/ -private["_control","_slot","_loadout","_teammates"]; -disableSerialization; -_control = VAS_getControl(VAS_load_Display,VAS_load_fetch); -_slot = lbCurSel VAS_load_list; -if(_slot == -1) exitWith {hint localize "STR_VAS_Transfer_NoSlotSelection";}; -if(vas_disableLoadSave) then -{ - VAS_Transfer_Loadout = missionNamespace getVariable format["vas_gear_new_%1",_slot]; -} - else -{ - VAS_Transfer_Loadout = profileNamespace getVariable format["vas_gear_new_%1",_slot]; -}; - -if(isNil "VAS_Transfer_Loadout") exitWith {hint localize "STR_VAS_Transfer_NoSlotSelection";}; -if(!createDialog "VAS_TransferMenu") exitWith {hint "Couldn't open the transfer menu?"}; -(VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_SaveMainMenu)) ctrlShow false; - -_control = VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_UnitsList); -//Fill the units units list. -{ - if(side _x == playerSide) then - { - _control lbAdd format["%1", name _x]; - _control lbSetData[(lbSize _control)-1,str _x]; - _control lbSetPicture [(lbSize _control)-1,([_x,"texture"] call BIS_fnc_rankParams)]; - }; -} foreach playableUnits; \ No newline at end of file diff --git a/source/VAS/functions/fn_transferNetwork.sqf b/source/VAS/functions/fn_transferNetwork.sqf deleted file mode 100644 index 8a8cbfd..0000000 --- a/source/VAS/functions/fn_transferNetwork.sqf +++ /dev/null @@ -1,30 +0,0 @@ -#include "macro.sqf" -/* - File: fn_transferNetwork.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Receives information sent for a transfer request and prompts the user. - - STR_VAS_Transfer_Request -*/ -private["_from"]; -_from = [_this,0,"",[""]] call BIS_fnc_param; -_loadout = [_this,1,[],[[]]] call BIS_fnc_param; -if(_from == "") exitWith {}; -if(count _loadout == 0) exitWith {}; - -if(!createDialog "VAS_prompt") exitWith {hint format["%1 tried to send you a saved loadout but we couldn't open the menu.",_from];}; -disableSerialization; -waitUntil {!isNull (findDisplay VAS_prompt_Display)}; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_text)) ctrlSetStructuredText parseText format["%1 %2
%3",_from,localize "STR_VAS_Transfer_Request",localize "STR_VAS_Transfer_Request2"]; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_true)) ctrlSetText localize "STR_VAS_Prompt_deleteYes"; -(VAS_getControl(VAS_prompt_Display,VAS_prompt_false)) ctrlSetText localize "STR_VAS_Prompt_deleteNo"; - -waitUntil {!isNil "vas_prompt_choice"}; -if(vas_prompt_choice) then -{ - [_loadout] spawn VAS_fnc_transferSaveMenu; -}; - -vas_prompt_choice = nil; \ No newline at end of file diff --git a/source/VAS/functions/fn_transferSaveGear.sqf b/source/VAS/functions/fn_transferSaveGear.sqf deleted file mode 100644 index 60bf057..0000000 --- a/source/VAS/functions/fn_transferSaveGear.sqf +++ /dev/null @@ -1,29 +0,0 @@ -#include "macro.sqf" -/* - File: fn_transferSaveGear.sqf - - Description: - Laziness at it's best.. -*/ -private["_slot","_title"]; -if(isNil "VAS_Loadout_Gear") exitWith {}; -disableSerialization; -_title = ctrlText VAS_transfer_save_text; -_slot = lbCurSel VAS_transfer_save_list; - -if(_slot == -1) exitWith {hint localize"STR_VAS_Prompt_slotSelFail"}; - -VAS_Loadout_Gear set[0,_title]; -if(vas_disableLoadSave) then -{ - missionNamespace setVariable[format["vas_gear_new_%1",_slot],VAS_Loadout_Gear]; -} - else -{ - profileNameSpace setVariable[format["vas_gear_new_%1",_slot],VAS_Loadout_Gear]; - saveProfileNamespace; -}; - -closeDialog 0; - -VAS_Loadout_Gear = nil; \ No newline at end of file diff --git a/source/VAS/functions/fn_transferSaveMenu.sqf b/source/VAS/functions/fn_transferSaveMenu.sqf deleted file mode 100644 index 4d139ed..0000000 --- a/source/VAS/functions/fn_transferSaveMenu.sqf +++ /dev/null @@ -1,74 +0,0 @@ -#include "macro.sqf" -/* - File: fn_transferSaveMenu.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Blah blah allows the person to save the loadout sent to them from someone else. - Pretty redundant design but I just got lazy at this point. -*/ -private["_control","_loadout_array"]; -VAS_Loadout_Gear = [_this,0,[],[[]]] call BIS_fnc_param; -if(!createDialog "VAS_TransferMenu") exitWith {hint "Couldn't open the transfer menu?"}; -disableSerialization; -(VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_unitsMenu)) ctrlShow false; - -_control = VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_save_list); -if(vas_disableLoadSave) then -{ - for "_i" from 0 to vas_customslots do - { - if(!isNil {missionNamespace getVariable format["vas_gear_new_%1",_i]}) then - { - _control lbAdd format["%1",(missionNamespace getVariable format["vas_gear_new_%1",_i]) select 0]; - } - else - { - _control lbAdd format["%1 %2",localize "STR_VAS_Main_CL", _i+1]; - }; - }; -} - else -{ - for "_i" from 0 to vas_customslots do - { - if(!isNil {profileNamespace getVariable format["vas_gear_new_%1",_i]}) then - { - _control lbAdd format["%1",(profileNamespace getVariable format["vas_gear_new_%1",_i]) select 0]; - } - else - { - _control lbAdd format["%1 %2",localize "STR_VAS_Main_CL", _i+1]; - }; - }; -}; - -(VAS_getControl(VAS_transfer_MainMenu,VAS_transfer_save_text)) ctrlSetText (VAS_Loadout_Gear select 0); -_control = VAS_getControl(VAS_transfer_MainMenu,VAS_save_fetch); -_loadout_array = []; -{ - switch(typeName _x) do { - case "STRING": { - _loadout_array = _loadout_array + [_x]; - }; - case "ARRAY": { - { - _loadout_array = _loadout_array + [_x]; - } forEach _x; - }; - }; -} forEach VAS_Loadout_Gear; - -_listItems = []; -{ - _className = _x; - _details = [_x] call VAS_fnc_fetchCfgDetails; - if(count _details > 0) then { - _name = (_details select 1); - if (_listItems find _name < 1) then { - _control lbAdd format["[%1] %2",({_x == _className} count _loadout_array),_name]; - _control lbSetPicture [(lbSize _control)-1,(_details select 2)]; - _listItems = _listItems + [_name]; - }; - }; -} forEach _loadout_array; \ No newline at end of file diff --git a/source/VAS/functions/fn_updateLoad.sqf b/source/VAS/functions/fn_updateLoad.sqf deleted file mode 100644 index 324e1cf..0000000 --- a/source/VAS/functions/fn_updateLoad.sqf +++ /dev/null @@ -1,44 +0,0 @@ -#include "macro.sqf" -/* - File: fn_updateLoad.sqf - Author: Bryan "Tonic" Boardwine - - Description: - A simple handler for updating the gear load displays. -*/ -private["_cfgInfo"]; -{ - _container = _x select 0; - if(_container != "") then - { - _load = _x select 1; - _cfgInfo = [_container] call VAS_fnc_fetchCfgDetails; - if(count _cfgInfo > 0) then - { - if(_container == backpack player) then - { - _maxLoad = getNumber(configFile >> "CfgVehicles" >> _container >> "maximumload"); - if(_maxLoad == 0) then {_load = 1;}; - }; - - (VAS_getControl(VAS_Main_Display,(_x select 2))) ctrlShow true; - (VAS_getControl(VAS_Main_Display,(_x select 3))) ctrlShow true; - (VAS_getControl(VAS_Main_Display,(_x select 4))) ctrlShow true; - (VAS_getControl(VAS_Main_Display,(_x select 3))) ctrlSetText (_cfgInfo select 2); - (VAS_getControl(VAS_Main_Display,(_x select 3))) ctrlSetToolTip format["%1 | %2%3 Full",_cfgInfo select 1,round(_load * 100),"%"]; - (VAS_getControl(VAS_Main_Display,(_x select 4))) progressSetPosition _load; - } - else - { - (VAS_getControl(VAS_Main_Display,(_x select 2))) ctrlShow false; - (VAS_getControl(VAS_Main_Display,(_x select 3))) ctrlShow false; - (VAS_getControl(VAS_Main_Display,(_x select 4))) ctrlShow false; - }; - } - else - { - (VAS_getControl(VAS_Main_Display,(_x select 2))) ctrlShow false; - (VAS_getControl(VAS_Main_Display,(_x select 3))) ctrlShow false; - (VAS_getControl(VAS_Main_Display,(_x select 4))) ctrlShow false; - }; -} foreach [[uniform player,loadUniform player,2950,2960,2970],[vest player,loadVest player,2951,2961,2971],[backPack player,loadBackpack player,2952,2962,2972]]; diff --git a/source/VAS/functions/macro.sqf b/source/VAS/functions/macro.sqf deleted file mode 100644 index 48d6a1d..0000000 --- a/source/VAS/functions/macro.sqf +++ /dev/null @@ -1,43 +0,0 @@ -//VAS Main Display idc's -#define VAS_Main_Display 2500 -#define VAS_detail_magsbg 2507 -#define VAS_detail_mags 2508 -#define VAS_detail_mags_list 2509 -#define VAS_virt_list 2501 -#define VAS_unit_list 2502 -#define VAS_filter_1 2580 -#define VAS_filter_2 2581 -#define VAS_filter_3 2582 -#define VAS_filter_4 2583 -#define VAS_filter_5 2584 -#define VAS_AccBG 2850 -#define VAS_AccList 2851 - -//Define VAS Load idc's -#define VAS_load_Display 2520 -#define VAS_load_list 2521 -#define VAS_load_fetch 2522 - -//Define VAS Save idc's -#define VAS_save_Display 2510 -#define VAS_save_list 2511 -#define VAS_save_fetch 2513 -#define VAS_save_text 2512 - -//Define VAS Prompt idc's -#define VAS_prompt_Display 2550 -#define VAS_prompt_text 2551 -#define VAS_prompt_true 2552 -#define VAS_prompt_false 2553 - -//Define VAS Transfer Menu IDC's -#define VAS_transfer_MainMenu 2560 -#define VAS_transfer_unitsMenu 2600 -#define VAS_transfer_UnitsList 2601 -#define VAS_transfer_SaveMainMenu 2700 -#define VAS_transfer_save_list 2711 -#define VAS_transfer_save_text 2712 - -//Control Macros -#define VAS_getControl(disp,ctrl) ((findDisplay ##disp) displayCtrl ##ctrl) -#define VAS_getSelData(ctrl) (lbData[##ctrl,(lbCurSel ##ctrl)]) \ No newline at end of file diff --git a/source/VAS/functions/misc_functions.sqf b/source/VAS/functions/misc_functions.sqf deleted file mode 100644 index 0a725e2..0000000 --- a/source/VAS/functions/misc_functions.sqf +++ /dev/null @@ -1,49 +0,0 @@ -/* - @version: 1.0 - @file_name: misc_functions.sqf - @file_author: TAW_Tonic - @file_edit: 5/23/2013 - @file_description: A file of functions that well.. just weren't fat enough to make it to its own file.. EAT MORE PIE FUNCTIONS... EAT MORE PIE... -*/ -VAS_fnc_openDetails = -{ - #include "macro.sqf" - ctrlShow [VAS_detail_mags_list,true]; - ctrlShow[VAS_detail_mags,true]; - ctrlShow [VAS_detail_magsbg,true]; -}; - -VAS_fnc_closeDetails = -{ - #include "macro.sqf" - ctrlShow [VAS_detail_mags_list,false]; - ctrlShow[VAS_detail_mags,false]; - ctrlShow [VAS_detail_magsbg,false]; -}; - -VAS_fnc_quickMag = -{ - private["_data","_handle"]; - _data = (_this select 0) lbData (_this select 1); - [_data,true,nil,nil,nil] call VAS_fnc_handleItem; - uiNamespace setVariable["VAS_UI_FILTER","mags"]; - uiNamespace setVariable ["VAS_UI_FILTER_VAR",nil]; - [] spawn VAS_fnc_playerDisplay; -}; - -VAS_fnc_quickItem = -{ - private["_data","_handle"]; - _data = (_this select 0) lbData (_this select 1); - _handle = [_data,true,nil,nil,nil] spawn VAS_fnc_handleItem; - waitUntil {scriptDone _handle}; - [] spawn VAS_fnc_playerDisplay; -}; - -VAS_fnc_qRemoveItem = -{ - private["_data","_handle"]; - _data = (_this select 0) lbData (_this select 1); - [_data,false,nil,nil,nil] call VAS_fnc_handleItem; - [] spawn VAS_fnc_playerDisplay; -}; \ No newline at end of file diff --git a/source/VAS/menu.hpp b/source/VAS/menu.hpp deleted file mode 100644 index 4017914..0000000 --- a/source/VAS/menu.hpp +++ /dev/null @@ -1,850 +0,0 @@ -/* - Author: Bryan "Tonic" Boardwine - Website: www.iamtonic.co - Use of the VAS system is permitted although modification and distribution must be approved by Tonic. -*/ - -#include "common.hpp" - -class VAS_Diag { - idd = 2500; - name= "Virtual_Ammobox_Sys"; - movingEnable = 1; - enableSimulation = true; - onLoad = ""; - onUnload = "VAS_box_weapons = nil; VAS_box_magazines = nil; VAS_box_items = nil; VAS_box_backpacks = nil; VAS_box_goggles = nil;"; //When the dialog is gone set these back to nil. - - class controlsBackground { - class VAS_RscTitleBackground:VAS_RscText { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.1; - y = 0.2; - w = 0.8; - h = (1 / 25); - }; - - class MainBackground:VAS_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.1; - y = 0.2 + (11 / 250); - w = 0.8; - h = 0.6 - (22 / 250); - }; - - class vasText : VAS_RscText - { - idc = -1; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - text = "$STR_VAS_Main_VirtGear"; - sizeEx = 0.04; - x = 0.12; y = 0.27; - w = 0.275; h = 0.04; - }; - - class vasgText : VAS_RscText - { - idc = -1; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - text = "$STR_VAS_Main_YCG"; - sizeEx = 0.04; - - x = 0.60; y = 0.27; - w = 0.275; h = 0.04; - }; - - class VAS_ContainerBG : VAS_RscText - { - colorBackground[] = {0,0,0,0.7}; - idc = 2950; - x = 0.905; - y = 0.2 + (11 / 250); - w = 0.09; - h = 0.235 - (22 / 250); - }; - - class VAS_VestBG : VAS_ContainerBG - { - idc = 2951; - y = 0.35 + (11 / 250); - }; - - class VAS_BackpackBG : VAS_ContainerBG - { - idc = 2952; - y = 0.5 + (11 / 250); - }; - - class VAS_UniformPicSlot : VAS_ActiveTextPicture - { - idc = 2960; - text = ""; - onLBDrop = "_this call VAS_fnc_quickAddDrag;"; - x = 0.905; - y = 0.25; - w = "3 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - h = "3 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - - class VAS_VestPicSlot : VAS_UniformPicSlot - { - idc = 2961; - text = ""; - onLBDrop = "_this call VAS_fnc_quickAddDrag;"; - y = 0.395; - }; - - class VAS_BackpackPicSlot : VAS_UniformPicSlot - { - idc = 2962; - text = ""; - onLBDrop = " _this call VAS_fnc_quickAddDrag; "; - y = 0.55; - }; - - class VAS_loadBarP : VAS_RscProgress - { - idc = 2970; - texture = ""; - textureExt = ""; - colorBar[] = {0.9,0.9,0.9,0.9}; - colorExtBar[] = {1,1,1,1}; - colorFrame[] = {1,1,1,1}; - x = 0.9075; - y = 0.371; - w = 0.086; - h = 0.015; - }; - - class VAS_VestLoad : VAS_loadBarP - { - idc = 2971; - y = 0.52; - }; - - class VAS_BackpackLoad : VAS_loadBarP - { - idc = 2972; - y = 0.67; - }; - }; - - class controls { - - class gundetailsbg : VAS_RscText - { - colorBackground[] = {0, 0, 0, 0.7}; - idc = 2507; - text = ""; - - x = -0.205; - y = 0.2 + (11 / 250); - w = 0.3; - h = 0.35 - (22 / 250); - }; - - class AttachmentsBG : VAS_RscText - { - colorBackground[] = {0,0,0,0.7}; - idc = 2850; - text = ""; - x = -0.205; - y = 0.47 + (11 / 250); - w = 0.3; - h = 0.32 - (22 / 250); - }; - - class AttachmentsList : VAS_RscListBox - { - colorBackground[] = {0,0,0,0}; - idc = 2851; - text = ""; - onLBDblClick = "_this call VAS_fnc_quickAttachment"; - canDrag = 1; - sizeEx = 0.035; - x = -0.2; y = 0.47 + (11 / 250); - w = 0.29; h = 0.32 - (22 / 250); - }; - - class gundetails : VAS_RscStructuredText - { - idc = 2508; - text = ""; - //text = "EBR 21 7.62 mm Uses:"; - x = -0.265; - y = 0.21 + (11 / 250); - w = 0.4; h = 0.15; - }; - - class gundetailslist : VAS_RscListBox - { - colorBackground[] = {0,0,0,0}; - idc = 2509; - text = ""; - canDrag = 1; - onLBDblClick = "_this spawn VAS_fnc_quickMag;"; - sizeEx = 0.030; - - x = -0.2; y = 0.3; - w = 0.29; h = 0.16; - }; - - class vasGear : VAS_RscListBox - { - idc = 2501; - text = ""; - sizeEx = 0.032; - canDrag = 1; - onLBSelChanged = "_this spawn VAS_fnc_details"; - onLBDblClick = "_this spawn VAS_fnc_quickItem;"; - - x = 0.12; y = 0.31; - w = 0.275; h = 0.340; - }; - - class vasPGear : VAS_RscListBox - { - idc = 2502; - text = ""; - sizeEx = 0.032; - onLBDblClick = "_this spawn VAS_fnc_qRemoveItem;"; - //onLBSelChanged = "[2502] execVM 'gear\selection.sqf'"; - - x = 0.60; y = 0.31; - w = 0.275; h = 0.340; - }; - - class WeaponsBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_Weapons"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "['guns',false] spawn VAS_fnc_mainDisplay"; - x = 0.42; y = 0.30; - w = (6.25 / 40); - h = (1 / 25); - }; - - class MagazinesBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_Magazines"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "['mags',false] spawn VAS_fnc_mainDisplay"; - x = 0.42; y = 0.35; - w = (6.25 / 40); - h = (1 / 25); - }; - - class ItemsBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_Items"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "['items',false] spawn VAS_fnc_mainDisplay"; - x = 0.42; y = 0.40; - w = (6.25 / 40); - h = (1 / 25); - }; - - class BackpacksBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_Backpacks"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "['packs',false] spawn VAS_fnc_mainDisplay"; - x = 0.42; y = 0.45; - w = (6.25 / 40); - h = (1 / 25); - }; - - class GogglesBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_Goggles"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "['glass',false] spawn VAS_fnc_mainDisplay"; - x = 0.42; y = 0.50; - w = (6.25 / 40); - h = (1 / 25); - }; - - //Filter Buttons - class Filter1 : VAS_RscActiveText - { - idc = 2580; - text = "$STR_VAS_Main_Uniforms"; - action = "[0] spawn VAS_fnc_filterMenu"; - sizeEx = 0.04; - - x = 0.43; y = 0.55; - w = 0.275; h = 0.04; - }; - - class Filter2 : VAS_RscActiveText - { - idc = 2581; - text = "$STR_VAS_Main_Vests"; - action = "[1] spawn VAS_fnc_filterMenu"; - sizeEx = 0.04; - - x = 0.43; y = 0.58; - w = 0.275; h = 0.04; - }; - - class Filter3 : VAS_RscActiveText - { - idc = 2582; - text = "$STR_VAS_Main_Headgear"; - action = "[2] spawn VAS_fnc_filterMenu"; - sizeEx = 0.04; - - x = 0.43; y = 0.61; - w = 0.275; h = 0.04; - }; - - class Filter4 : VAS_RscActiveText - { - idc = 2583; - text = "$STR_VAS_Main_Attachments"; - action = "[3] spawn VAS_fnc_filterMenu"; - sizeEx = 0.04; - - x = 0.43; y = 0.64; - w = 0.275; h = 0.04; - }; - - class Filter5 : VAS_RscActiveText - { - idc = 2584; - text = "$STR_VAS_Main_Misc"; - action = "[4] spawn VAS_fnc_filterMenu"; - sizeEx = 0.04; - - x = 0.43; y = 0.67; - w = 0.275; h = 0.04; - }; - - class Title : VAS_RscTitle { - colorBackground[] = {0, 0, 0, 0}; - idc = -1; - text = "Virtual Ammobox System"; - x = 0.1; - y = 0.2; - w = 0.8; - h = (1 / 25); - }; - - class VersionNumber : Title { - idc = 2404; - style = 1; - text = "v2.6"; - }; - - class ButtonAddG : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_btnAdd"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[] spawn VAS_fnc_addGear"; - - x = 0.13; - y = 0.67; - w = (10 / 40); - h = (1 / 25); - }; - class ButtonRemoveG : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_btnRemove"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[false] spawn VAS_fnc_removeGear;"; - - x = 0.61; - y = 0.67; - w = (10 / 40); - h = (1 / 25); - }; - - class ButtonClose : VAS_RscButtonMenu { - idc = -1; - //shortcuts[] = {0x00050000 + 2}; - text = "$STR_VAS_Main_btnClose"; - onButtonClick = "closeDialog 0;"; - x = 0.1; - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class ButtonSaveGear : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Main_btnSave"; - onButtonClick = "createDialog ""VAS_Save_Diag"";"; - x = 0.1 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class ButtonLoadGear : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Main_btnLoad"; - onButtonClick = "createDialog ""VAS_Load_Diag"";"; - x = 0.1 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class ButtonRemoveAll : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Main_btnRemoveAll"; - onButtonClick = "[true] spawn VAS_fnc_removeGear;"; - x = 0.42 + (6.25 / 19.8) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; -}; - -class VAS_Load_Diag { - idd = 2520; - name= "Virtual_Ammobox_Sys Load"; - movingEnable = false; - enableSimulation = true; - onLoad = "[1] spawn VAS_fnc_SaveLoad"; - - class controlsBackground { - class VAS_RscTitleBackground:VAS_RscText { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class MainBackground:VAS_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.1; - y = 0.2 + (11 / 250); - w = 0.6; - h = 0.6 - (22 / 250); - }; - }; - - class controls { - - - class Title : VAS_RscTitle { - colorBackground[] = {0, 0, 0, 0}; - idc = -1; - text = "$STR_VAS_Load_Title"; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class LoadLoadoutList : VAS_RscListBox - { - idc = 2521; - text = ""; - sizeEx = 0.035; - onLBSelChanged = "[1] spawn VAS_fnc_loadoutInfo"; - - x = 0.12; y = 0.26; - w = 0.230; h = 0.360; - }; - - class LoadFetchList : VAS_RscListBox - { - idc = 2522; - colorBackground[] = {0,0,0,0}; - text = ""; - sizeEx = 0.030; - - x = 0.35; y = 0.26; - w = 0.330; h = 0.360; - }; - - - class CloseLoadMenu : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Main_btnClose"; - onButtonClick = "closeDialog 0;"; - x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class LoadOnRespawnMenu : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Load_LOR"; - onButtonClick = "if(vas_onRespawn) then {[] call VAS_fnc_onRespawn;} else {hint ""Disabled""};"; - x = 0.10 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (9 / 40); - h = (1 / 25); - }; - - class TransBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Load_TransferBtn"; - onButtonClick = "[] call VAS_fnc_transferMenu"; - x = 0.33 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class GearLoadMenu : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Load_btnLoad"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[] spawn VAS_fnc_loadGear"; - x = 0.05 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class GearDeleteMenu : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Load_btnDelete"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[] spawn VAS_fnc_deleteGear"; - x = 0.25 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; -}; - -class VAS_TransferMenu -{ - idd = 2560; - name = "Virtual_Ammobox_sys_transfermenu"; - movingEnabled = false; - enableSimulation = true; - - class Controls - { - class MainMenu : VAS_RscControlsGroup - { - idc = 2600; - - class Controls - { - class VAS_RscTitleBackground : VAS_RscText - { - idc = -1; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - x = 0.25; - y = 0.2; - w = 0.5; - h = (1 / 25); - }; - - class MainBackground : VAS_RscText - { - colorBackground[] = {0,0,0,0.7}; - idc = -1; - x = 0.25; - y = 0.2 + (11 / 250); - w = 0.5; - h = 0.6 - (22 / 250); - }; - - class Title : VAS_RscTitle - { - idc = -1; - text = "$STR_VAS_Transfer_MainMenu"; - x = 0.25; - y = 0.2; - w = 0.5; - h = (1 / 25); - }; - - class UnitsList : VAS_RscListBox - { - idc = 2601; - text = ""; - sizeEx = 0.045; - canDrag = 1; - x = 0.26; y = 0.26; - w = 0.47; h = 0.45; - }; - - class TransBtn : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Load_TransferBtn"; - onButtonClick = "[] call VAS_fnc_transferAction"; - x = 0.26 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; - }; - - class TransferSaveMenu : VAS_RscControlsGroup - { - idc = 2700; - - class Controls - { - class VAS_RscTitleBackground:VAS_RscText - { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class MainBackground:VAS_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.1; - y = 0.2 + (11 / 250); - w = 0.6; - h = 0.6 - (22 / 250); - }; - - class Title : VAS_RscTitle { - colorBackground[] = {0, 0, 0, 0}; - idc = -1; - text = "$STR_VAS_Save_Title"; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class SaveLoadoutList : VAS_RscListBox - { - idc = 2711; - text = ""; - sizeEx = 0.035; - - x = 0.12; y = 0.26; - w = 0.230; h = 0.360; - }; - - class SaveFetchList : VAS_RscListBox - { - idc = 2513; - colorBackground[] = {0,0,0,0}; - text = ""; - sizeEx = 0.030; - - x = 0.35; y = 0.26; - w = 0.330; h = 0.360; - }; - - class SaveLoadEdit : VAS_RscEdit - { - idc = 2712; - text = "$STR_VAS_Save_CLN"; - - x = -0.05 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (13 / 40); - h = (1 / 25); - }; - - class GearSaveMenu : VAS_RscButtonMenu - { - idc = -1; - text = "$STR_VAS_Save_btnSave"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[] call VAS_fnc_transferSaveGear"; - x = 0.35 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; - }; - }; -}; - -class VAS_Save_Diag { - idd = 2510; - name= "Virtual_Ammobox_Sys Save"; - movingEnable = false; - enableSimulation = true; - onLoad = "[0] spawn VAS_fnc_SaveLoad"; - - class controlsBackground { - class VAS_RscTitleBackground:VAS_RscText { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class MainBackground:VAS_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.1; - y = 0.2 + (11 / 250); - w = 0.6; - h = 0.6 - (22 / 250); - }; - }; - - class controls - { - class Title : VAS_RscTitle { - colorBackground[] = {0, 0, 0, 0}; - idc = -1; - text = "$STR_VAS_Save_Title"; - x = 0.1; - y = 0.2; - w = 0.6; - h = (1 / 25); - }; - - class SaveLoadoutList : VAS_RscListBox - { - idc = 2511; - text = ""; - sizeEx = 0.035; - onLBSelChanged = "[0] spawn VAS_fnc_loadoutInfo"; - - x = 0.12; y = 0.26; - w = 0.230; h = 0.360; - }; - - class SaveFetchList : VAS_RscListBox - { - idc = 2513; - colorBackground[] = {0,0,0,0}; - text = ""; - sizeEx = 0.030; - - x = 0.35; y = 0.26; - w = 0.330; h = 0.360; - }; - - class SaveLoadEdit : VAS_RscEdit - { - idc = 2512; - text = "$STR_VAS_Save_CLN"; - - x = -0.05 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (13 / 40); - h = (1 / 25); - }; - - class CloseSaveMenu : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Main_btnClose"; - onButtonClick = "closeDialog 0;"; - x = -0.06 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.8 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class GearSaveMenu : VAS_RscButtonMenu { - idc = -1; - text = "$STR_VAS_Save_btnSave"; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "[] call VAS_fnc_saveGear"; - x = 0.35 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.73 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; -}; - -class VAS_prompt -{ - idd = 2550; - name = "Virtual_Ammobox_sys_prompt"; - movingEnabled = false; - enableSimulation = true; - - class controlsBackground { - class VAS_RscTitleBackground:VAS_RscText { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.3; - y = 0.2; - w = 0.47; - h = (1 / 25); - }; - - class MainBackground:VAS_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.3; - y = 0.2 + (11 / 250); - w = 0.47; - h = 0.22 - (22 / 250); - }; - }; - - class controls - { - class InfoMsg : VAS_RscStructuredText - { - idc = 2551; - sizeEx = 0.020; - text = ""; - x = 0.287; - y = 0.2 + (11 / 250); - w = 0.5; h = 0.12; - }; - - class addtogun : VAS_RscButtonMenu { - idc = 2552; - text = "$STR_VAS_Prompt_addToWeapon"; - //colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "vas_prompt_choice = true; closeDialog 0;"; - x = 0.145 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.42 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class addtogear : VAS_RscButtonMenu { - idc = 2553; - text = "$STR_VAS_Prompt_addToInv"; - //colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 0.5}; - onButtonClick = "vas_prompt_choice = false; closeDialog 0;"; - x = 0.455 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.42 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - - class blankPHVAS : VAS_RscText - { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.304 + (6.25 / 40) + (1 / 250 / (safezoneW / safezoneH)); - y = 0.42 - (1 / 25); - w = (5.9 / 40); - h = (1 / 25); - }; - }; -}; \ No newline at end of file diff --git a/source/VAS/open.sqf b/source/VAS/open.sqf deleted file mode 100644 index d014b76..0000000 --- a/source/VAS/open.sqf +++ /dev/null @@ -1,18 +0,0 @@ -if(isNil "VAS_init_complete") exitWith {hint "VAS never initialized.\n\nThis means CfgFunctions.hpp was never called via Description.ext";}; -if(!VAS_init_complete && !vas_disableSafetyCheck) exitWith {if((time - VAS_init_timeOnStart) > 25) then {[] call VAS_fnc_mainInit;}; hint "VAS hasn't finished loading yet."}; - -//Set up some variables incase a 'limited' weapons/mags/items field is meant for that container (Mainly support for an upcoming feature). -VAS_box_weapons = (_this select 0) getVariable "bis_weapons"; -VAS_box_magazines = (_this select 0) getVariable "bis_magazines"; -VAS_box_items = (_this select 0) getVariable "bis_items"; -VAS_box_backpacks = (_this select 0) getVariable "bis_backpacks"; -VAS_box_goggles = (_this select 0) getVariable "bis_goggles"; - -createDialog "VAS_Diag"; -["guns",false] spawn VAS_fnc_mainDisplay; -ctrlShow [2507,false]; -ctrlShow [2508,false]; -ctrlShow [2509,false]; -ctrlShow [2850,false]; -ctrlShow [2851,false]; -disableSerialization; \ No newline at end of file diff --git a/source/stringtable.xml b/source/stringtable.xml deleted file mode 100644 index a11e3b9..0000000 --- a/source/stringtable.xml +++ /dev/null @@ -1,428 +0,0 @@ - - - - - Weapons - Waffen - Armes - Broń - Armas - Armi - Zbrane - Оружие - Armas - - - Magazines - Magazine - Chargeurs - Amunicja - Munições - Munizioni - Munice - Патроны - Cargadores - - - Items - Gegenstände - Objets - Przedmioty - Items - Oggetti - Predmety - Вещи - Articulos - - - Backpacks - Rucksäcke - Sacs à dos - Plecaki - Mochilas - Zaini - Batohy - Рюкзаки - Mochilas - - - Goggles - Brillen - Lunettes - Gogle - Óculos - Occhiali - Bryle - Очки - Gafas - - - Uniforms - Uniformen - Uniformes - Mundury - Uniformes - Uniformi - Uniformy - Униформа - Uniformes - - - Vests - Westen - Gilets Tac. - Kamizelki - Coletes - Gibernaggio - Vesty - Разгрузка - Ropa - - - Headgear - Kopfbekleidung - Casques - Nakrycia głowy - Capacetes - Elmetto - Pokryvky Hlavy - Шлемы - Cascos - - - Attachments - Anbauteile - Objets Attachés - Dodatki - Acessórios - Accessori - Doplnky - Приспособления - Accesorios - - - Misc - Diverses - Objets Divers - Inne - Diversos - Varie - Ostatni - Разное - Diversos - - - Add Item - Zufügen - Ajouter Arme/Obj. - Dodaj przedmiot - Acrescemtar Item - Aggiungi oggetto - Pridat predmet - Добавить - Equipar Articulo - - - Remove Item - Entfernen - Retirer Arme/Obj. - Usuń przedmiot - Remover Item - Rimuovi oggetto - Odebrat Predmet - Убрать - Eliminar Articulo - - - Close - Schließen - Fermer - Zamknij - Fechar - Chiudi - Zavrit - Закрыть - Cerrar - - - Load Gear - Laden - Charger - Załaduj wyposażenie - Carregar Equipamento - Carica equipaggiamento - Nahrat Vybaveni - Загрузить - Cargar - - - Save Gear - Speichern - Sauver - Zapisz wyposażenie - Gravar Equipamento - Salva equipaggiamento - Ulozit Vybaveni - Сохранить - Guardar - - - Remove All - Alles Entfernen - Retir.Tout - Usuń wszystko - Retirar Tudo - Rimuovi tutto - Odebrat Vse - Очистить - Eliminar Todo - - - Virtual Ammobox - Interaktive Waffenkiste - Caixa de Munições Virtual - Виртуальный ящик - - - Your Current Gear - Aktuelle Ausrüstung - Votre équipement actuel - Twoje Aktualne Wyposażenie - Equipamento Actual - Equipaggiamento attuale - Vase soucasne vybaveni - Ваше снаряжение - Equipamiento Actual - - - Custom Loadout - Angepasste Ausrüstung - Emplacement perso - Niestandardowe wyposażenie - Equipamento Customizado - Equip. personalizzato - Vlastni Vybava - Особый набор - Equipamiento Customizado - - - Rifles - Gewehre - Fusils (Tous) - Karabiny - Espingardas - Fucili - Pusky - Винтовки - Fusiles - - - Scoped - Fernkampf - Fusils (Longs) - Bron Ciężka - Telescópicas - Fucili (ottica) - Odstrelovacky - С оптикой - Fusiles Largos - - - Heavy - Schwere Waffen - Lourds - Wyrzutnie - Pesadas - Pesanti - Tezke Zbrane - Тяжелое - Pesadas - - - Launcher - Raketenwerfer - Lanceurs - Lança-Misseis - Lanciamissili - Odpalovace - Гранатометы - Lanzamisiles - - - Pistols - Pistolen - Pistolets - Pistolety - Pistolas - Pistole - Pistole - Пистолеты - Pistolas - - - is a restricted item and will not be added to your inventory. - è un oggetto bloccato e non sarà aggiunto al tuo inventario - - - - - Virtual Ammobox System - Load Gear - Virtual Ammobox System - Ausrüstung Laden - Caisse Virtuelle - Charger - Caixa de Munições Virtual - Carregar - Virtual Ammobox System - Carica equipaggiamento - Virtual Ammobox System - Nahrat Vybaveni - Виртуальный ящик - Загрузка снаряжения - Virtual Ammobox System - Cargar Equipamiento - - - Load On Respawn - Beim Respawn Laden - Charg. à la réap - Załaduj przy respawnie - Carregar em Respawn - Carica al respawn - Vybava-respawn - Загрузить при появлении - Equipar En Respawn - - - Transfer - - - Load - Laden - Charger - Załaduj - Carregar - Carica - Nahrat - Загрузить - Cargar - - - Delete - Löschen - Supprimer - Usuń - Apagar - Cancella - Smazat - Удалить - Eliminar - - - - - Virtual Ammobox System - Save Gear - Virtual Ammobox System - Ausrüstung Speichern - Caisse Virtuelle - Sauver - Caixa de Munições Virtual - Gravar - Virtual Ammobox System - Salva equipaggiamento - Virtual Ammobox System - Ulozit Vybaveni - Виртуальный ящик - Сохранение снаряжения - Virtual Ammobox System - Guardar Equipamiento - - - Save - Speichern - Sauver - Zapisz - Gravar - Salva - Uloz - Сохранить - Guardar - - - Custom Loadout Name - Angepasste Ausrüstung - Nom de l'emplacement perso - Nome da Selecção - Nome equipaggiamento - Nazev Vybavy - Название набора - Nombre De Equipamiento Customizado - - - - - Virtual Ammobox System - Transfer Menu - - - Virtual Ammobox System - Save Transfer - - - wants to transfer you their saved loadout. - - - Would you like to receive this request and save it? - - - You either did not select a slot that you wanted to transfer to another user or the slot had no information. - - - The selected user either doesn't exist. - - - - - You didn't select a slot to delete! - Non hai selezionato uno slot da cancellare - - - You can't delete that slot, it has no information! - Non puoi cancellare questo slot, è già vuoto - - - You are about to delete slot - Stai per cancellare lo slot - - - You cancelled deleting slot - Hai cancellato lo slot cancellandolo - - - You deleted slot - Hai cancellato lo slot - - - Yes - - - - - No - No - No - - - You didn't select a slot! - Non hai selezionato uno slot! - - - No slot was selected to be loaded upon respawn! - Non hai selezionato nessuno slot da caricare al respawn! - - - You didn't select a slot! - Non hai selezionato uno slot - - - Weapon - Armi - - - Inventory - Inventario - - - What do you want to do with that attachment? - Cosa vuoi fare con questo accessorio? - - - Please know that if you choose to add it to your weapon your current existing attachment in that slot will be lost. - Attenzione, se attacchi l'accessorio alla tua arma, l'accessorio attaccato attualmente sarà sostituito. - - - \ No newline at end of file From 41c4d505ccacb47f6c4c4f2470c26ecec1e25c4b Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Mon, 30 Jan 2017 19:52:02 +1100 Subject: [PATCH 14/21] Merged dedi support into VA cleanup --- source/support/ammobox.sqf | 7 ++++--- source/support/fob_ammobox.sqf | 8 ++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/support/ammobox.sqf b/source/support/ammobox.sqf index e410ec0..0018fea 100644 --- a/source/support/ammobox.sqf +++ b/source/support/ammobox.sqf @@ -2,7 +2,7 @@ _target = _this select 0; _location = getpos _target; -if (commandpointsblu1<2) exitWith +if (commandpointsblu1<2) exitWith { ["info",["Not enough command points","Not enough Command Points (2CP required)"]] call bis_fnc_showNotification; }; @@ -32,11 +32,12 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]}; +if (support_armory_available) then {[[_ammo,["Armory","bisArsenal.sqf",[], 0, false, false, "", "_this distance _target < 4"]],"addAction",true,true] call BIS_fnc_MP;}; + // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; - + waitUntil {sleep 1; getpos _ammo select 2<0.2}; _smoke = "SmokeShellGreen" CreateVehicle (getpos _ammo); ["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; diff --git a/source/support/fob_ammobox.sqf b/source/support/fob_ammobox.sqf index 613cc21..564a195 100644 --- a/source/support/fob_ammobox.sqf +++ b/source/support/fob_ammobox.sqf @@ -2,7 +2,7 @@ _target = _this select 0; _location = getpos _target; -if (commandpointsblu1<2) exitWith +if (commandpointsblu1<2) exitWith { ["info",["Not enough command points","Not enough Command Points (2CP required)"]] call bis_fnc_showNotification; }; @@ -32,11 +32,11 @@ _ammo addMagazineCargo ["Chemlight_green", 70]; _ammo addBackpackCargo ["B_AssaultPack_khk",10]; -if (support_armory_available) then {_ammo addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]}; - +if (support_armory_available) then {[[_ammo,["Armory","bisArsenal.sqf",[], 0, false, false, "", "_this distance _target < 4"]],"addAction",true,true] call BIS_fnc_MP;}; + // magazines[] = {"1Rnd_HE_Grenade_shell","UGL_FlareWhite_F","UGL_FlareGreen_F","UGL_FlareRed_F","UGL_FlareYellow_F","UGL_FlareCIR_F","1Rnd_Smoke_Grenade_shell","1Rnd_SmokeRed_Grenade_shell","1Rnd_SmokeGreen_Grenade_shell","1Rnd_SmokeYellow_Grenade_shell","1Rnd_SmokePurple_Grenade_shell","1Rnd_SmokeBlue_Grenade_shell","1Rnd_SmokeOrange_Grenade_shell","3Rnd_HE_Grenade_shell","3Rnd_UGL_FlareWhite_F","3Rnd_UGL_FlareGreen_F","3Rnd_UGL_FlareRed_F","3Rnd_UGL_FlareYellow_F","3Rnd_UGL_FlareCIR_F","3Rnd_Smoke_Grenade_shell","3Rnd_SmokeRed_Grenade_shell","3Rnd_SmokeGreen_Grenade_shell","3Rnd_SmokeYellow_Grenade_shell","3Rnd_SmokePurple_Grenade_shell","3Rnd_SmokeBlue_Grenade_shell","3Rnd_SmokeOrange_Grenade_shell"}; - + waitUntil {sleep 1; getpos _ammo select 2<0.2}; _smoke = "SmokeShellGreen" CreateVehicle (getpos _ammo); ["info",["Supply delivered","The supply crate has been marked with green smokes"]] call bis_fnc_showNotification; From 1e8a3b93171e380a254f6bde22aa615ef5306e84 Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 08:06:18 +1100 Subject: [PATCH 15/21] Updated TAW-VD to v1.5 Possible fix for #1 --- source/description.ext | 4 +- source/taw_vd/CfgFunctions.hpp | 25 +- source/taw_vd/GUI.h | 668 ++++++++++++++++++ source/taw_vd/defines.h | 44 ++ source/taw_vd/dialog.hpp | 507 ------------- source/taw_vd/fn_onChar.sqf | 36 + source/taw_vd/fn_onSavePressed.sqf | 26 + source/taw_vd/fn_onSaveSelectionChanged.sqf | 28 + source/taw_vd/fn_onSliderChange.sqf | 47 -- source/taw_vd/fn_onSliderChanged.sqf | 35 + ...rainChange.sqf => fn_onTerrainChanged.sqf} | 9 +- source/taw_vd/fn_openMenu.sqf | 41 ++ source/taw_vd/fn_openSaveManager.sqf | 31 + source/taw_vd/fn_openTAWVD.sqf | 29 - source/taw_vd/fn_stateTracker.fsm | 177 +++++ source/taw_vd/fn_tawvdInit.sqf | 27 - source/taw_vd/fn_trackViewDistance.sqf | 23 - source/taw_vd/fn_updateViewDistance.sqf | 17 +- 18 files changed, 1120 insertions(+), 654 deletions(-) create mode 100644 source/taw_vd/GUI.h create mode 100644 source/taw_vd/defines.h delete mode 100644 source/taw_vd/dialog.hpp create mode 100644 source/taw_vd/fn_onChar.sqf create mode 100644 source/taw_vd/fn_onSavePressed.sqf create mode 100644 source/taw_vd/fn_onSaveSelectionChanged.sqf delete mode 100644 source/taw_vd/fn_onSliderChange.sqf create mode 100644 source/taw_vd/fn_onSliderChanged.sqf rename source/taw_vd/{fn_onTerrainChange.sqf => fn_onTerrainChanged.sqf} (73%) create mode 100644 source/taw_vd/fn_openMenu.sqf create mode 100644 source/taw_vd/fn_openSaveManager.sqf delete mode 100644 source/taw_vd/fn_openTAWVD.sqf create mode 100644 source/taw_vd/fn_stateTracker.fsm delete mode 100644 source/taw_vd/fn_tawvdInit.sqf delete mode 100644 source/taw_vd/fn_trackViewDistance.sqf diff --git a/source/description.ext b/source/description.ext index 0ca2d9a..a45f6ca 100644 --- a/source/description.ext +++ b/source/description.ext @@ -30,9 +30,9 @@ disabledAI = 1; #include "duws_revive\gui\duws_revive.hpp" // TAW INIT BEGIN -- -#include "taw_vd\dialog.hpp" +#include "taw_vd\GUI.h" class CfgFunctions { - #include "taw_vd\CfgFunctions.hpp" + #include "taw_vd\CfgFunctions.hpp" }; // TAW INIT END -- diff --git a/source/taw_vd/CfgFunctions.hpp b/source/taw_vd/CfgFunctions.hpp index 54dd257..65be88c 100644 --- a/source/taw_vd/CfgFunctions.hpp +++ b/source/taw_vd/CfgFunctions.hpp @@ -1,14 +1,21 @@ -class TAWVD -{ +class TAW_VD { tag = "TAWVD"; - class TAW_VD - { + + class Initialize { file = "taw_vd"; - class onSliderChange {}; - class onTerrainChange {}; + class stateTracker { + ext = ".fsm"; + postInit = 1; + headerType = -1; + }; + + class onSliderChanged {}; + class onTerrainChanged {}; class updateViewDistance {}; - class openTAWVD {}; - class trackViewDistance {}; - class tawvdInit {postInit = 1;}; + class openMenu {}; + class onChar {}; + class openSaveManager {}; + class onSavePressed {}; + class onSaveSelectionChanged {}; }; }; \ No newline at end of file diff --git a/source/taw_vd/GUI.h b/source/taw_vd/GUI.h new file mode 100644 index 0000000..0a5c9ec --- /dev/null +++ b/source/taw_vd/GUI.h @@ -0,0 +1,668 @@ +#include "defines.h" + +class RscEdit { + type = 2; + style = 0x00 + 0x40; + font = "PuristaMedium"; + shadow = 2; + sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorBackground[] = {0, 0, 0, 1}; + soundSelect[] = {"",0.1,1}; + soundExpand[] = {"",0.1,1}; + colorText[] = {0.95, 0.95, 0.95, 1}; + colorDisabled[] = {1, 1, 1, 0.25}; + autocomplete = false; + colorSelection[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", 1}; + canModify = 1; +}; + +class RscListBox { + style = 16; + idc = -1; + type = 5; + w = 0.275; + h = 0.04; + font = "PuristaMedium"; + colorSelect[] = {1, 1, 1, 1}; + colorText[] = {1, 1, 1, 1}; + colorBackground[] = {0.28,0.28,0.28,0.28}; + colorSelect2[] = {1, 1, 1, 1}; + colorSelectBackground[] = {0.95, 0.95, 0.95, 0.5}; + colorSelectBackground2[] = {1, 1, 1, 0.5}; + colorScrollbar[] = {0.2, 0.2, 0.2, 1}; + colorPicture[] = {1,1,1,1}; + colorPictureSelected[] = {1,1,1,1}; + colorPictureDisabled[] = {1,1,1,1}; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + wholeHeight = 0.45; + rowHeight = 0.04; + color[] = {0.7, 0.7, 0.7, 1}; + colorActive[] = {0,0,0,1}; + colorDisabled[] = {0,0,0,0.3}; + sizeEx = 0.023; + soundSelect[] = {"",0.1,1}; + soundExpand[] = {"",0.1,1}; + soundCollapse[] = {"",0.1,1}; + maxHistoryDelay = 1; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + tooltipColorText[] = {1,1,1,1}; + tooltipColorBox[] = {1,1,1,1}; + tooltipColorShade[] = {0,0,0,0.65}; + + class ListScrollBar { + color[] = {1,1,1,1}; + colorActive[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,0.3}; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + shadow = 0; + scrollSpeed = 0.06; + width = 0; + height = 0; + autoScrollEnabled = 1; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + } +}; + +class RscCheckBox { + access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) + idc = -1; // Control identification (without it, the control won't be displayed) + type = 77; // Type + style = ST_LEFT + ST_MULTI; // Style + default = 0; // Control selected by default (only one within a display can be used) + blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. + + x = 0; + y = 0; + w = 1 * GUI_GRID_CENTER_W; // Width + h = 1 * GUI_GRID_CENTER_H; // Height + + //Colors + color[] = { 1, 1, 1, 0.7 }; // Texture color + colorFocused[] = { 1, 1, 1, 1 }; // Focused texture color + colorHover[] = { 1, 1, 1, 1 }; // Mouse over texture color + colorPressed[] = { 1, 1, 1, 1 }; // Mouse pressed texture color + colorDisabled[] = { 1, 1, 1, 0.2 }; // Disabled texture color + + //Background colors + colorBackground[] = { 0, 0, 0, 0 }; // Fill color + colorBackgroundFocused[] = { 0, 0, 0, 0 }; // Focused fill color + colorBackgroundHover[] = { 0, 0, 0, 0 }; // Mouse hover fill color + colorBackgroundPressed[] = { 0, 0, 0, 0 }; // Mouse pressed fill color + colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // Disabled fill color + + //Textures + textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked CheckBox. + textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked CheckBox. + textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked focused CheckBox (Could be used for showing different texture when focused). + textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked focused CheckBox. + textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; + textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; + + tooltip = ""; // Tooltip text + tooltipColorShade[] = { 0, 0, 0, 1 }; // Tooltip background color + tooltipColorText[] = { 1, 1, 1, 1 }; // Tooltip text color + tooltipColorBox[] = { 1, 1, 1, 1 }; // Tooltip frame color + + //Sounds + soundClick[] = { "\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1 }; // Sound played after control is activated in format {file, volume, pitch} + soundEnter[] = { "\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1 }; // Sound played when mouse cursor enters the control + soundPush[] = { "\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1 }; // Sound played when the control is pushed down + soundEscape[] = { "\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1 }; // Sound played when the control is released after pushing down +}; + +class RscXSliderH { + style = 1024; + type = 43; + shadow = 2; + x = 0; + y = 0; + h = 0.029412; + w = 0.400000; + color[] = { + 1, 1, 1, 0.7 + }; + colorActive[] = { + 1, 1, 1, 1 + }; + colorDisabled[] = { + 1, 1, 1, 0.500000 + }; + arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; + thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; +}; + +class RscText { + x = 0; + y = 0; + h = 0.037; + w = 0.3; + type = 0; + style = 0; + shadow = 1; + colorShadow[] = {0, 0, 0, 0.5}; + font = "PuristaMedium"; + SizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + colorText[] = {1, 1, 1, 1.0}; + colorBackground[] = {0, 0, 0, 0}; + linespacing = 1; +}; + +class RscTitle:RscText { + style = 0; + shadow = 0; + sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + colorText[] = {0.95, 0.95, 0.95, 1}; +}; + +class RscShortcutButton { + idc = -1; + style = 0; + default = 0; + shadow = 1; + w = 0.183825; + h = "( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20)"; + color[] = {1,1,1,1.0}; + colorFocused[] = {1,1,1,1.0}; + color2[] = {0.95,0.95,0.95,1}; + colorDisabled[] = {1,1,1,0.25}; + colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; + colorBackground2[] = {1,1,1,1}; + animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; + animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa"; + animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa"; + animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa"; + periodFocus = 1.2; + periodOver = 0.8; + class HitZone + { + left = 0.0; + top = 0.0; + right = 0.0; + bottom = 0.0; + }; + class ShortcutPos + { + left = 0; + top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + w = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; + h = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + }; + class TextPos + { + left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; + top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + right = 0.005; + bottom = 0.0; + }; + period = 0.4; + font = "PuristaMedium"; + size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + text = ""; + soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; + soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; + soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; + soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; + action = ""; + class Attributes + { + font = "PuristaMedium"; + color = "#E5E5E5"; + align = "left"; + shadow = "true"; + }; + class AttributesImage + { + font = "PuristaMedium"; + color = "#E5E5E5"; + align = "left"; + }; +}; + +class RscControlsGroup { + type = 15; + idc = -1; + x = 0; + y = 0; + w = 1; + h = 1; + shadow = 0; + style = 16; + + class ScrollBar { + color[] = {1, 1, 1, 0.6}; + colorActive[] = {1, 1, 1, 1}; + colorDisabled[] = {1, 1, 1, 0.3}; + thumb = "\A3\ui_f\data\gui\cfg\scrollbar\thumb_ca.paa"; + arrowFull = "\A3\ui_f\data\gui\cfg\scrollbar\arrowFull_ca.paa"; + arrowEmpty = "\A3\ui_f\data\gui\cfg\scrollbar\arrowEmpty_ca.paa"; + border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; + shadow = 0; + scrollSpeed = 0.05; + }; + + class VScrollbar:ScrollBar { + width = 0.021; + autoScrollSpeed = -1; + autoScrollDelay = 5; + autoScrollRewind = 0; + shadow = 0; + color[] = {1, 1, 1, 0.6}; + }; + + class HScrollbar:ScrollBar { + height = 0.028; + shadow = 0; + color[] = {1, 1, 1, 0.6}; + }; + + //class ListScrollBar : ScrollBar {}; + + class Controls {}; +}; + +class RscControlsGroupNoScrollbars : RscControlsGroup { + class VScrollbar : VScrollbar { + width = 0; + }; + + class HScrollbar : HScrollbar { + height = 0; + }; +}; + +class RscButtonMenu:RscShortcutButton { + idc = -1; + type = 16; + style = "0x02 + 0xC0"; + default = 0; + shadow = 0; + x = 0; + y = 0; + w = 0.095589; + h = 0.039216; + animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; + animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; + animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; + colorBackground[] = {0,0,0,0.8}; + colorBackgroundFocused[] = {1,1,1,1}; + colorBackground2[] = {0.75,0.75,0.75,1}; + color[] = {1,1,1,1}; + colorFocused[] = {0,0,0,1}; + color2[] = {0,0,0,1}; + colorText[] = {1,1,1,1}; + colorDisabled[] = {1,1,1,0.25}; + period = 1.2; + periodFocus = 1.2; + periodOver = 1.2; + size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; + tooltipColorText[] = {1,1,1,1}; + tooltipColorBox[] = {1,1,1,1}; + tooltipColorShade[] = {0,0,0,0.65}; + class TextPos + { + left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; + right = 0.005; + bottom = 0.0; + }; + class Attributes + { + font = "PuristaLight"; + color = "#E5E5E5"; + align = "left"; + shadow = "false"; + }; + class ShortcutPos + { + left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005"; + top = 0.005; + w = 0.0225; + h = 0.03; + }; + soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; + soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; + soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; + soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; + textureNoShortcut = ""; +}; + +class TAW_VDMenu { + idd = MENU_IDD; + name = "TAW_VDMenu"; + movingEnabled = 0; + enableSimulation = 1; + + onLoad = "((_this select 0) displayCtrl 2999) ctrlSetFade 1; ((_this select 0) displayCtrl 2999) ctrlCommit 0;"; + + class controlsBackground { + class TitleBackground : RscText { + colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" }; + idc = -1; + x = .3; + y = .2; + w = .5; + h = (1 / 25); + }; + + class MainBackground : RscText { + colorBackground[] = { 0, 0, 0, .7 }; + idc = -1; + x = .3; + y = .2 + (11 / 250); + w = .5; + h = .57 - (22 / 250); + }; + + class Title : RscTitle { + colorBackround[] = { 0, 0, 0, 0 }; + idc = -1; + text = "View Settings (SCRIPT)"; + x = .3; + y = .2; + w = .8; + h = (1 / 25); + }; + + class OnFootText : RscText { + idc = -1; + text = "Infantry:"; + x = .32; + y = .258; + w = .275; + h = .04; + }; + + class inCarText : OnFootText { + text = "Ground:"; + y = .305; + }; + + class inAirText : OnFootText { + text = "Air:"; + y = .355; + }; + + class ObjectText : OnFootText { + text = "Object:"; + y = .655; + }; + + class DroneText : OnFootText { + text = "Drone:"; + y = .405; + }; + + class TerrainBackground : TitleBackground { + text = "Grass Settings"; + shadow = 0; + y = .46; + }; + + class ObjectBackground : TitleBackground { + text = "Object Settings"; + y = .55; + }; + + class ButtonClose : RscButtonMenu { + idc = -1; + text = "Close"; + onButtonClick = "closeDialog 0;"; + x = 0.3; + y = 0.77 - (1 / 25); + w = (6.25 / 40); + h = (1 / 25); + }; + + class SaveManagerBtn:ButtonClose { + text = "Saves"; + onButtonClick = "[] call tawvd_fnc_openSaveManager;"; + x = .465; + }; + }; + + class controls { + + //Sliders + class VD_onFoot_slider : RscXSliderH { + idc = INFANTRY_SLIDER; + text = ""; + onSliderPosChanged = "[0, _this select 1] call TAWVD_fnc_onSliderChanged;"; + toolTip = "View Distance while on foot"; + x = .42; + y = .30 - (1 / 25); + w = "9 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; + h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; + }; + + class VD_inCar_slider : VD_onFoot_slider { + idc = GROUND_SLIDER; + toolTip = "View distance while in a ground vehicle"; + onSliderPosChanged = "[1, _this select 1] call TAWVD_fnc_onSliderChanged;"; + y = .35 - (1 / 25); + }; + + class VD_inAir_slider : VD_onFoot_slider { + idc = AIR_SLIDER; + toolTip = "View distance while in an aircraft"; + onSliderPosChanged = "[2, _this select 1] call TAWVD_fnc_onSliderChanged;"; + y = .40 - (1 / 25); + }; + + class VD_Object_slider : VD_onFoot_slider { + idc = OBJECT_SLIDER; + toolTip = "Object rendering distance"; + onSliderPosChanged = "[3, _this select 1] call TAWVD_fnc_onSliderChanged;"; + y = .7 - (1 / 25); + }; + + class VD_Drone_slider:VD_onFoot_slider { + idc = DRONE_SLIDER; + toolTip = "View distance while operating a UAV/UGV"; + onSliderPosChanged = "[4, _this select 1] call TAWVD_fnc_onSliderChanged;"; + y = .45 - (1 / 25); + } + + //Values (RscEdit Butons) + class VD_onFoot_Edit : RscEdit { + idc = INFANTRY_EDIT; + text = ""; + onKeyUp = "[_this select 0, _this select 1, 'ground',true] call TAWVD_fnc_onChar;"; + + x = .7; + y = .258; + w = .08; + h = .04; + }; + + class VD_inCar_Edit : VD_onFoot_Edit { + idc = GROUND_EDIT; + onKeyUp = "[_this select 0, _this select 1, 'vehicle',true] call TAWVD_fnc_onChar;"; + y = .31; + }; + + class VD_inAir_Edit : VD_onFoot_Edit { + idc = AIR_EDIT; + onKeyUp = "[_this select 0, _this select 1, 'air',true] call TAWVD_fnc_onChar;"; + y = .36; + }; + + class VD_inDrone_Edit:VD_onFoot_Edit { + idc = DRONE_EDIT; + onKeyUp = "[_this select 0, _this select 1, 'drone',true] call TAWVD_fnc_onChar;"; + y = .41; + }; + + class VD_Object_Edit : VD_onFoot_Edit { + idc = OBJECT_EDIT; + onKeyUp = "[_this select 0, _this select 1, 'object',true] call TAWVD_fnc_onChar;"; + y = .656; + }; + + //Grass Settings + class VD_terrain_none { + idc = TERRAIN_NONE; + type = 11; + style = 0; + font = "PuristaLight"; + color[] = { 1, 1, 1, 1 }; + colorActive[] = { 1, 0.2, 0.2, 1 }; + colorDisabled[] = {0, 0, 0, 1}; + soundEnter[] = { "\A3\ui_f\data\sound\onover", 0.09, 1 }; + soundPush[] = { "\A3\ui_f\data\sound\new1", 0.0, 0 }; + soundClick[] = { "\A3\ui_f\data\sound\onclick", 0.07, 1 }; + soundEscape[] = { "\A3\ui_f\data\sound\onescape", 0.09, 1 }; + text = "None"; + action = "['none'] call TAWVD_fnc_onTerrainChanged;"; + sizeEx = 0.04; + + x = .38; y = .505; + w = .275; h = .04; + }; + + class VD_terrain_low : VD_terrain_none { + idc = -1; + text = "Low"; + action = "['low'] call TAWVD_fnc_onTerrainChanged;"; + x = .47; + }; + + class VD_terrain_normal : VD_terrain_none { + idc = -1; + text = "Normal"; + action = "['norm'] call TAWVD_fnc_onTerrainChanged;"; + x = .56; + }; + + class VD_terrain_high : VD_terrain_none { + idc = -1; + text = "High"; + action = "['high'] call TAWVD_fnc_onTerrainChanged;"; + x = .67; + }; + + class ObjectSyncCheckbox : RscCheckbox + { + idc = 2931; + x = .32; y = .6; + tooltip = "Sync object rendering with view rendering"; + onCheckedChanged = "if((_this select 1) == 1) then {tawvd_syncObject = true;ctrlEnable [2941,false]; ctrlEnable [2942,false];} else {tawvd_syncObject = false; ctrlEnable [2942,true]; ctrlEnable [2941,true];};"; + w = 1 * GUI_GRID_CENTER_W; + h = 1 * GUI_GRID_CENTER_H; + }; + + class ObjectSynctext : RscText { + idc = -1; + text = "Sync with view"; + x = .345; y = .596; + w = .35; h = .04; + }; + + class Manager:RscControlsGroup { + idc = MANAGER_GROUP; + + x = -0.21; y = .2; + w = .5; h = 3; + class Controls { + class SaveLoadGroup:RscControlsGroupNoScrollbars { + idc = SAVELOAD_GROUP; + + x = 0; + y = 0; + w = .5; + h = 3; + + class Controls { + class MyTitleBackground:RscText { + colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" }; + idc = -1; + x = 0; + y = 0; + w = .5; + h = (1 / 25); + }; + + class Title : RscTitle { + colorBackround[] = { 0, 0, 0, 0 }; + idc = -1; + text = "Save Manager"; + x = 0; + y = 0; + w = .8; + h = (1 / 25); + }; + + class MainBackground:RscText { + colorBackground[] = { 0, 0, 0, .7 }; + idc = -1; + x = 0; + y = 0 + (11 / 250); + w = .5; + h = .57 - (22 / 250); + }; + + class SaveList:RscListBox { + idc = SAVES_LIST; + sizeEx = 0.04; + colorBackground[] = {0.1,0.1,0.1,0.9}; + x = 0; y = 0 + (11 / 250); + w = .5; h = .49 - (22 / 250); + + onLBSelChanged = "_this call TAWVD_fnc_onSaveSelectionChanged;"; + }; + + class SaveSlotName:VD_onFoot_Edit { + idc = SLOT_NAME; + text = "SAVE NAME"; + colorBackground[] = {0,0,0,0.6}; + onKeyUp = ""; + + x = .025; y = .42 + (11 / 250); + w = .45; + }; + + class SaveButton:RscButtonMenu { + text = "Save"; + onButtonClick = "[] call TAWVD_fnc_onSavePressed;"; + x = 0; + y = 0.57 - (1 / 25); + w = (6.25 / 40); + h = (1 / 25); + }; + + class HideButton:RscButtonMenu { + text = "Hide"; + onButtonClick = "((findDisplay 2900) displayCtrl 2999) ctrlSetFade 1; ((findDisplay 2900) displayCtrl 2999) ctrlCommit 0.3;"; + x = .16; + y = 0.57 - (1 / 25); + w = (6.25 / 40); + h = (1 / 25); + }; + }; + }; + }; + }; + }; +}; \ No newline at end of file diff --git a/source/taw_vd/defines.h b/source/taw_vd/defines.h new file mode 100644 index 0000000..e75b7f9 --- /dev/null +++ b/source/taw_vd/defines.h @@ -0,0 +1,44 @@ +/* Main display IDD & IDC's */ +#define MENU_IDD 2900 +#define INFANTRY_SLIDER 2901 +#define INFANTRY_EDIT 2902 +#define GROUND_SLIDER 2911 +#define GROUND_EDIT 2912 +#define AIR_SLIDER 2921 +#define AIR_EDIT 2922 +#define OBJECT_SLIDER 2941 +#define OBJECT_EDIT 2942 +#define DRONE_SLIDER 2951 +#define DRONE_EDIT 2952 +#define TERRAIN_NONE 2950 +#define GUI_GRID_CENTER_WAbs ((safezoneW / safezoneH) min 1.2) +#define GUI_GRID_CENTER_HAbs (GUI_GRID_CENTER_WAbs / 1.2) +#define GUI_GRID_CENTER_W (GUI_GRID_CENTER_WAbs / 40) +#define GUI_GRID_CENTER_H (GUI_GRID_CENTER_HAbs / 25) +#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) +#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) +#define ST_LEFT 0x00 +#define ST_MULTI 0x10 +#define SEL(ARRAY,INDEX) (ARRAY select INDEX) + +/* Save / Load Manager */ +#define MANAGER_GROUP 2999 +#define SAVELOAD_GROUP 3000 +#define SAVES_LIST 3001 +#define SLOT_NAME 3002 + +/* Namespace Macros */ +#define SVAR_MNS missionNamespace setVariable +#define SVAR_UINS uiNamespace setVariable +#define SVAR_PNS parsingNamespace setVariable +#define GVAR_MNS missionNamespace getVariable +#define GVAR_UINS uiNamespace getVariable +#define GVAR_PNS parsingNamespace getVariable + +/* Condition Macros */ +#define EQUAL(condition1,condition2) condition1 isEqualTo condition2 + +/* Display Macros */ +#define CONTROL(disp,ctrl) ((findDisplay ##disp) displayCtrl ##ctrl) +#define CONTROL_DATA(ctrl) (lbData[ctrl,lbCurSel ctrl]) +#define CONTROL_DATAI(ctrl,index) ctrl lbData index \ No newline at end of file diff --git a/source/taw_vd/dialog.hpp b/source/taw_vd/dialog.hpp deleted file mode 100644 index 523c932..0000000 --- a/source/taw_vd/dialog.hpp +++ /dev/null @@ -1,507 +0,0 @@ -/* - ArmA 3 TAW View Distance Management -*/ -#define ST_LEFT 0x00 -#define ST_MULTI 0x10 -#define GUI_GRID_CENTER_WAbs ((safezoneW / safezoneH) min 1.2) -#define GUI_GRID_CENTER_HAbs (GUI_GRID_CENTER_WAbs / 1.2) -#define GUI_GRID_CENTER_W (GUI_GRID_CENTER_WAbs / 40) -#define GUI_GRID_CENTER_H (GUI_GRID_CENTER_HAbs / 25) -#define GUI_GRID_CENTER_X (safezoneX + (safezoneW - GUI_GRID_CENTER_WAbs)/2) -#define GUI_GRID_CENTER_Y (safezoneY + (safezoneH - GUI_GRID_CENTER_HAbs)/2) - -class TAWVD_Checkbox -{ - access = 0; // Control access (0 - ReadAndWrite, 1 - ReadAndCreate, 2 - ReadOnly, 3 - ReadOnlyVerified) - idc = -1; // Control identification (without it, the control won't be displayed) - type = 77; // Type - style = ST_LEFT + ST_MULTI; // Style - default = 0; // Control selected by default (only one within a display can be used) - blinkingPeriod = 0; // Time in which control will fade out and back in. Use 0 to disable the effect. - - x = 0; - y = 0; - w = 1 * GUI_GRID_CENTER_W; // Width - h = 1 * GUI_GRID_CENTER_H; // Height - - //Colors - color[] = { 1, 1, 1, 0.7 }; // Texture color - colorFocused[] = { 1, 1, 1, 1 }; // Focused texture color - colorHover[] = { 1, 1, 1, 1 }; // Mouse over texture color - colorPressed[] = { 1, 1, 1, 1 }; // Mouse pressed texture color - colorDisabled[] = { 1, 1, 1, 0.2 }; // Disabled texture color - - //Background colors - colorBackground[] = { 0, 0, 0, 0 }; // Fill color - colorBackgroundFocused[] = { 0, 0, 0, 0 }; // Focused fill color - colorBackgroundHover[] = { 0, 0, 0, 0 }; // Mouse hover fill color - colorBackgroundPressed[] = { 0, 0, 0, 0 }; // Mouse pressed fill color - colorBackgroundDisabled[] = { 0, 0, 0, 0 }; // Disabled fill color - - //Textures - textureChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked CheckBox. - textureUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked CheckBox. - textureFocusedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; //Texture of checked focused CheckBox (Could be used for showing different texture when focused). - textureFocusedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; //Texture of unchecked focused CheckBox. - textureHoverChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; - textureHoverUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; - texturePressedChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; - texturePressedUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; - textureDisabledChecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_checked_ca.paa"; - textureDisabledUnchecked = "\A3\Ui_f\data\GUI\RscCommon\RscCheckBox\CheckBox_unchecked_ca.paa"; - - tooltip = ""; // Tooltip text - tooltipColorShade[] = { 0, 0, 0, 1 }; // Tooltip background color - tooltipColorText[] = { 1, 1, 1, 1 }; // Tooltip text color - tooltipColorBox[] = { 1, 1, 1, 1 }; // Tooltip frame color - - //Sounds - soundClick[] = { "\A3\ui_f\data\sound\RscButton\soundClick", 0.09, 1 }; // Sound played after control is activated in format {file, volume, pitch} - soundEnter[] = { "\A3\ui_f\data\sound\RscButton\soundEnter", 0.09, 1 }; // Sound played when mouse cursor enters the control - soundPush[] = { "\A3\ui_f\data\sound\RscButton\soundPush", 0.09, 1 }; // Sound played when the control is pushed down - soundEscape[] = { "\A3\ui_f\data\sound\RscButton\soundEscape", 0.09, 1 }; // Sound played when the control is released after pushing down - -}; -class TAWVD_RscShortcutButton { - idc = -1; - style = 0; - default = 0; - shadow = 1; - w = 0.183825; - h = "( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20)"; - color[] = {1,1,1,1.0}; - colorFocused[] = {1,1,1,1.0}; - color2[] = {0.95,0.95,0.95,1}; - colorDisabled[] = {1,1,1,0.25}; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorBackgroundFocused[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.69])","(profilenamespace getvariable ['GUI_BCG_RGB_G',0.75])","(profilenamespace getvariable ['GUI_BCG_RGB_B',0.5])",1}; - colorBackground2[] = {1,1,1,1}; - animTextureDefault = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureNormal = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureDisabled = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\normal_ca.paa"; - animTextureOver = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\over_ca.paa"; - animTextureFocused = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\focus_ca.paa"; - animTexturePressed = "\A3\ui_f\data\GUI\RscCommon\RscShortcutButton\down_ca.paa"; - periodFocus = 1.2; - periodOver = 0.8; - class HitZone - { - left = 0.0; - top = 0.0; - right = 0.0; - bottom = 0.0; - }; - class ShortcutPos - { - left = 0; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - w = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; - h = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - }; - class TextPos - { - left = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1) * (3/4)"; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 20) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - right = 0.005; - bottom = 0.0; - }; - period = 0.4; - font = "PuristaMedium"; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - text = ""; - soundEnter[] = {"\A3\ui_f\data\sound\RscButton\soundEnter",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButton\soundPush",0.09,1}; - soundClick[] = {"\A3\ui_f\data\sound\RscButton\soundClick",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButton\soundEscape",0.09,1}; - action = ""; - class Attributes - { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "left"; - shadow = "true"; - }; - class AttributesImage - { - font = "PuristaMedium"; - color = "#E5E5E5"; - align = "left"; - }; -}; - -class TAWVD_RscText { - x = 0; - y = 0; - h = 0.037; - w = 0.3; - type = 0; - style = 0; - shadow = 1; - colorShadow[] = {0, 0, 0, 0.5}; - font = "PuristaMedium"; - SizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - text = ""; - colorText[] = {1, 1, 1, 1.0}; - colorBackground[] = {0, 0, 0, 0}; - linespacing = 1; -}; - -class TAWVD_RscTitle : TAWVD_RscText { - style = 0; - shadow = 0; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - colorText[] = {0.95, 0.95, 0.95, 1}; -}; - -class TAWVD_RscButtonMenu : TAWVD_RscShortcutButton { - idc = -1; - type = 16; - style = "0x02 + 0xC0"; - default = 0; - shadow = 0; - x = 0; - y = 0; - w = 0.095589; - h = 0.039216; - animTextureNormal = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDisabled = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureOver = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureFocused = "#(argb,8,8,3)color(1,1,1,1)"; - animTexturePressed = "#(argb,8,8,3)color(1,1,1,1)"; - animTextureDefault = "#(argb,8,8,3)color(1,1,1,1)"; - colorBackground[] = {0,0,0,0.8}; - colorBackgroundFocused[] = {1,1,1,1}; - colorBackground2[] = {0.75,0.75,0.75,1}; - color[] = {1,1,1,1}; - colorFocused[] = {0,0,0,1}; - color2[] = {0,0,0,1}; - colorText[] = {1,1,1,1}; - colorDisabled[] = {1,1,1,0.25}; - period = 1.2; - periodFocus = 1.2; - periodOver = 1.2; - size = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; - tooltipColorText[] = {1,1,1,1}; - tooltipColorBox[] = {1,1,1,1}; - tooltipColorShade[] = {0,0,0,0.65}; - class TextPos - { - left = "0.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - top = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) - ( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)) / 2"; - right = 0.005; - bottom = 0.0; - }; - class Attributes - { - font = "PuristaLight"; - color = "#E5E5E5"; - align = "left"; - shadow = "false"; - }; - class ShortcutPos - { - left = "(6.25 * ( ((safezoneW / safezoneH) min 1.2) / 40)) - 0.0225 - 0.005"; - top = 0.005; - w = 0.0225; - h = 0.03; - }; - soundEnter[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEnter",0.09,1}; - soundPush[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundPush",0.09,1}; - soundClick[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundClick",0.09,1}; - soundEscape[] = {"\A3\ui_f\data\sound\RscButtonMenu\soundEscape",0.09,1}; - textureNoShortcut = ""; -}; - -class TAWVD_RscXSliderH -{ - style = 1024; - type = 43; - shadow = 2; - x = 0; - y = 0; - h = 0.029412; - w = 0.400000; - color[] = { - 1, 1, 1, 0.7 - }; - colorActive[] = { - 1, 1, 1, 1 - }; - colorDisabled[] = { - 1, 1, 1, 0.500000 - }; - arrowEmpty = "\A3\ui_f\data\gui\cfg\slider\arrowEmpty_ca.paa"; - arrowFull = "\A3\ui_f\data\gui\cfg\slider\arrowFull_ca.paa"; - border = "\A3\ui_f\data\gui\cfg\slider\border_ca.paa"; - thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; -}; - -class TAWVD_activeText -{ - idc = -1; - type = 11; - style = 0; - x = 0; - y = 0; - h = 0.037; - w = 0.3; - sizeEx = 0.040; - font = "PuristaLight"; - color[] = {1, 1, 1, 1}; - colorActive[] = {1, 0.2, 0.2, 1}; - soundEnter[] = {"\A3\ui_f\data\sound\onover", 0.09, 1}; - soundPush[] = {"\A3\ui_f\data\sound\new1", 0.0, 0}; - soundClick[] = {"\A3\ui_f\data\sound\onclick", 0.07, 1}; - soundEscape[] = {"\A3\ui_f\data\sound\onescape", 0.09, 1}; - action = ""; - text = ""; -}; - -class TAW_VD -{ - idd = 2900; - name= "taw_vd"; - movingEnable = false; - enableSimulation = true; - //onLoad = "['guns'] execVM 'gear\switch.sqf'"; - - class controlsBackground { - class TAWVD_RscTitleBackground:TAWVD_RscText { - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - idc = -1; - x = 0.3; - y = 0.2; - w = 0.5; - h = (1 / 25); - }; - - class MainBackground : TAWVD_RscText { - colorBackground[] = {0, 0, 0, 0.7}; - idc = -1; - x = 0.3; - y = 0.2 + (11 / 250); - w = 0.5; - h = 0.57 - (22 / 250); - }; - - class VDonFoot : TAWVD_RscText - { - idc = -1; - text = "On Foot:"; - - x = 0.32; y = 0.258; - w = 0.275; h = 0.04; - }; - - class VDinCar : TAWVD_RscText - { - idc = -1; - text = "In Car:"; - - x = 0.32; y = 0.305; - w = 0.275; h = 0.04; - }; - - class VDinAir : TAWVD_RscText - { - idc = -1; - text = "In Air:"; - - x = 0.32; y = 0.355; - w = 0.275; h = 0.04; - }; - - class VDObject : VDinAir - { - text = "Object:"; - y = 0.655; - }; - - class VDTerrSet : TAWVD_RscText - { - idc = -1; - text = "Grass Settings"; - shadow = 0; - colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; - - x = 0.30; - y = 0.45; - w = 0.5; - h = (1 / 25); - }; - - class VDObjectSet : VDTerrSet - { - text = "Object Settings"; - y = 0.55; - }; - - }; - - class controls - { - class Title : TAWVD_RscTitle { - colorBackground[] = {0, 0, 0, 0}; - idc = -1; - text = "TAW View Distance Script"; - x = 0.3; - y = 0.2; - w = 0.8; - h = (1 / 25); - }; - - class VD_onfoot_slider : TAWVD_RscXSliderH - { - idc = 2901; - text = ""; - onSliderPosChanged = "[0,_this select 1] call TAWVD_fnc_onSliderChange;"; - tooltip = "View distance while on foot"; - x = 0.42; - y = 0.30 - (1 / 25); - - w = "9 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - - class VD_onfoot_value : TAWVD_RscText - { - idc = 2902; - text = ""; - - x = 0.70; y = 0.258; - w = 0.275; h = 0.04; - }; - - class VD_car_slider : TAWVD_RscXSliderH - { - idc = 2911; - text = ""; - onSliderPosChanged = "[1,_this select 1] call TAWVD_fnc_onSliderChange;"; - tooltip = "View distance while in a land vehicle"; - x = 0.42; - y = 0.35 - (1 / 25); - - w = "9 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - - class VD_car_value : TAWVD_RscText - { - idc = 2912; - text = ""; - - x = 0.70; y = 0.31; - w = 0.275; h = 0.04; - }; - - class VD_air_slider : TAWVD_RscXSliderH - { - idc = 2921; - text = ""; - onSliderPosChanged = "[2,_this select 1] call TAWVD_fnc_onSliderChange;"; - tooltip = "View distance while in a air vehicle"; - x = 0.42; - y = 0.40 - (1 / 25); - - w = "9 * ( ((safezoneW / safezoneH) min 1.2) / 40)"; - h = "1 * ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25)"; - }; - - class VD_air_value : TAWVD_RscText - { - idc = 2922; - text = ""; - - x = 0.70; y = 0.36; - w = 0.275; h = 0.04; - }; - - class ObjectSyncCheckbox : TAWVD_Checkbox - { - idc = 2931; - x = 0.32; y = 0.6; - tooltip = "Sync object rendering with view rendering"; - onCheckedChanged = "if((_this select 1) == 1) then {tawvd_syncObject = true;ctrlEnable [2941,false];} else {tawvd_syncObject = false; ctrlEnable [2941,true];};"; - - }; - - class ObjectSyncText : TAWVD_RscText - { - idc = -1; - text = "Sync with view"; - x = 0.345; y = 0.596; - w = 0.35; h = 0.04; - }; - - class VD_object_slider : VD_air_slider - { - idc = 2941; - onSliderPosChanged = "[3,_this select 1] call TAWVD_fnc_onSliderChange;"; - tooltip = "Object rendering distance"; - y = 0.70 - (1 / 25); - }; - - class VD_Object_Value : VD_air_value - { - idc = 2942; - y = 0.656; - }; - - class VD_terr_none : TAWVD_activeText - { - idc = -1; - text = "None"; - action = "['none'] call TAWVD_fnc_onTerrainChange;"; - sizeEx = 0.04; - - x = 0.38; y = 0.50; - w = 0.275; h = 0.04; - }; - - class VD_terr_low : TAWVD_activeText - { - idc = -1; - text = "Low"; - action = "['low'] call TAWVD_fnc_onTerrainChange;"; - sizeEx = 0.04; - - x = 0.47; y = 0.50; - w = 0.275; h = 0.04; - }; - - class VD_terr_normal : TAWVD_activeText - { - idc = -1; - text = "Normal"; - action = "['norm'] call TAWVD_fnc_onTerrainChange;"; - sizeEx = 0.04; - - x = 0.56; y = 0.50; - w = 0.275; h = 0.04; - }; - - class VD_terr_high : TAWVD_activeText - { - idc = -1; - text = "High"; - action = "['high'] call TAWVD_fnc_onTerrainChange;"; - sizeEx = 0.04; - - x = 0.67; y = 0.50; - w = 0.275; h = 0.04; - }; - - class ButtonClose : TAWVD_RscButtonMenu { - idc = -1; - //shortcuts[] = {0x00050000 + 2}; - text = "Close"; - onButtonClick = "closeDialog 0;"; - x = 0.48; - y = 0.77 - (1 / 25); - w = (6.25 / 40); - h = (1 / 25); - }; - }; -}; \ No newline at end of file diff --git a/source/taw_vd/fn_onChar.sqf b/source/taw_vd/fn_onChar.sqf new file mode 100644 index 0000000..2026cab --- /dev/null +++ b/source/taw_vd/fn_onChar.sqf @@ -0,0 +1,36 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + When a character is entered it is validated and changes the + correct slider it is associated with. I probably over-complicated + this more then I had to but onChar behaves weird. + + PARAMS: + 0: CONTROL + 1: SCALAR (INT) + 2: STRING (Case option) +*/ +private["_value","_varName","_maxRange"]; +params ["_control","_code","_slider"]; + +disableSerialization; +if(isNull _control) exitWith {}; //POOOOOP + +_maxRange = if(!isNil "tawvd_maxRange") then {tawvd_maxRange} else {20000}; +_value = parseNumber (ctrlText _control); +if(_value > _maxRange OR _value < 100) exitwith {[] call TAWVD_fnc_openMenu;}; + +_varName = switch (_slider) do { + case "ground": {"tawvd_foot"}; + case "vehicle": {"tawvd_car"}; + case "air": {"tawvd_air"}; + case "object": {"tawvd_object"}; + case "drone": {"tawvd_drone"}; + default {"tawvd_foot"}; +}; + +SVAR_MNS [_varName,_value]; +[] call TAWVD_fnc_updateViewDistance; +[] call TAWVD_fnc_openMenu; \ No newline at end of file diff --git a/source/taw_vd/fn_onSavePressed.sqf b/source/taw_vd/fn_onSavePressed.sqf new file mode 100644 index 0000000..fb5ea4a --- /dev/null +++ b/source/taw_vd/fn_onSavePressed.sqf @@ -0,0 +1,26 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + Updates the view distance dependant on whether the player + is on foot, a car or an aircraft. +*/ +private ["_saveIndex","_saveName"]; +_saveIndex = lbCurSel SAVES_LIST; +_saveName = ctrlText SLOT_NAME; + +SVAR_PNS [format["tawvd_slot_%1",_saveIndex], + [ + _saveName, + tawvd_foot, + tawvd_car, + tawvd_air, + tawvd_drone, + tawvd_object, + tawvd_syncObject + ] +]; + +saveProfileNamespace; +[] call TAWVD_fnc_openSaveManager; diff --git a/source/taw_vd/fn_onSaveSelectionChanged.sqf b/source/taw_vd/fn_onSaveSelectionChanged.sqf new file mode 100644 index 0000000..2715028 --- /dev/null +++ b/source/taw_vd/fn_onSaveSelectionChanged.sqf @@ -0,0 +1,28 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + Updates the view distance dependant on whether the player + is on foot, a car or an aircraft. +*/ +private "_saveData"; +params [["_control",controlNull,[controlNull]],["_index",-1,[0]]]; + +/* Error checks */ +if(EQUAL(_index,-1) OR isNull _control) exitWith {}; +_saveData = GVAR_PNS format["tawvd_slot_%1",_index]; +if(isNil "_saveData") exitWith {}; + +/* Set variables to chosen slot data */ +CONTROL(MENU_IDD,SLOT_NAME) ctrlSetText (SEL(_saveData,0)); +SVAR_MNS ["tawvd_foot",SEL(_saveData,1)]; +SVAR_MNS ["tawvd_car",SEL(_saveData,2)]; +SVAR_MNS ["tawvd_air",SEL(_saveData,3)]; +SVAR_MNS ["tawvd_drone",SEL(_saveData,4)]; +SVAR_MNS ["tawvd_object",SEL(_saveData,5)]; +SVAR_MNS ["tawvd_syncObject",SEL(_saveData,6)]; + +/* Update Menu & View Distance */ +[] call TAWVD_fnc_updateViewDistance; +[] call TAWVD_fnc_openMenu; \ No newline at end of file diff --git a/source/taw_vd/fn_onSliderChange.sqf b/source/taw_vd/fn_onSliderChange.sqf deleted file mode 100644 index e3fdc2a..0000000 --- a/source/taw_vd/fn_onSliderChange.sqf +++ /dev/null @@ -1,47 +0,0 @@ -/* - File: fn_onSliderChange.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Called when the slider is changed for any field and updates the view distance for it. -*/ -private["_mode","_value"]; -_mode = [_this,0,-1,[0]] call BIS_fnc_param; -_value = [_this,1,-1,[0]] call BIS_fnc_param; -if(_mode == -1 OR _value == -1) exitWith {}; -disableSerialization; - -switch (_mode) do -{ - case 0: - { - tawvd_foot = round(_value); - ctrlSetText[2902,format["%1",tawvd_foot]]; - [] call TAWVD_fnc_updateViewDistance; - }; - - case 1: - { - tawvd_car = round(_value); - ctrlSetText[2912,format["%1",tawvd_car]]; - [] call TAWVD_fnc_updateViewDistance; - }; - - case 2: - { - tawvd_air = round(_value); - ctrlSetText[2922,format["%1",tawvd_air]]; - [] call TAWVD_fnc_updateViewDistance; - }; - - case 3: { - tawvd_object = round(_value); - ctrlSetText[2942,format["%1",tawvd_object]]; - setObjectViewDistance [tawvd_object,100]; - }; -}; - -if(tawvd_syncObject) then { - sliderSetPosition[2941, tawvd_object]; - ctrlSetText[2942,format["%1",tawvd_object]]; -}; \ No newline at end of file diff --git a/source/taw_vd/fn_onSliderChanged.sqf b/source/taw_vd/fn_onSliderChanged.sqf new file mode 100644 index 0000000..a8423d5 --- /dev/null +++ b/source/taw_vd/fn_onSliderChanged.sqf @@ -0,0 +1,35 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + Called when the slider is changed for any field and + updates the view distance for it. +*/ +private "_varData"; +params [["_mode",-1,[0]],["_value",-1,[0]]]; + +if(EQUAL(_mode,-1) OR EQUAL(_value,-1)) exitWith {}; + +disableSerialization; + +_varData = switch(_mode) do { + case 0: {["tawvd_foot",INFANTRY_EDIT]}; + case 1: {["tawvd_car",GROUND_EDIT]}; + case 2: {["tawvd_air",AIR_EDIT]}; + case 3: {["tawvd_object",OBJECT_EDIT]}; + case 4: {["tawvd_drone",DRONE_EDIT]}; +}; + +SVAR_MNS [SEL(_varData,0),round(_value)]; +ctrlSetText[SEL(_varData,1),str(GVAR_MNS SEL(_varData,0))]; +[] call TAWVD_fnc_updateViewDistance; + +if(EQUAL(_mode,3)) then { + setObjectViewDistance [tawvd_object,100]; +}; + +if(tawvd_syncObject) then { + sliderSetPosition[OBJECT_SLIDER, tawvd_object]; + ctrlSetText[OBJECT_EDIT,str(tawvd_object)]; +}; \ No newline at end of file diff --git a/source/taw_vd/fn_onTerrainChange.sqf b/source/taw_vd/fn_onTerrainChanged.sqf similarity index 73% rename from source/taw_vd/fn_onTerrainChange.sqf rename to source/taw_vd/fn_onTerrainChanged.sqf index e74c205..2194d9d 100644 --- a/source/taw_vd/fn_onTerrainChange.sqf +++ b/source/taw_vd/fn_onTerrainChanged.sqf @@ -1,16 +1,15 @@ + /* - File: fn_onTerrainChange.sqf Author: Bryan "Tonic" Boardwine Description: Updates the players terraingrid when called. */ -private["_type"]; -_type = [_this,0,"",[""]] call BIS_fnc_param; +private "_type"; +_type = param [0,"",[""]]; if(_type == "") exitWith {}; -switch (_type) do -{ +switch (_type) do { case "none": {if(isNil "tawvd_disablenone") then {setTerrainGrid 50;};}; case "low": {setTerrainGrid 30;}; case "norm": {setTerrainGrid 12.5;}; diff --git a/source/taw_vd/fn_openMenu.sqf b/source/taw_vd/fn_openMenu.sqf new file mode 100644 index 0000000..bac3f4d --- /dev/null +++ b/source/taw_vd/fn_openMenu.sqf @@ -0,0 +1,41 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + Called via addAction and opens the TAW View Distance Menu +*/ +if(isNull (findDisplay MENU_IDD)) then { + if(!createDialog "TAW_VDMenu") exitWith {hint "Something went wrong, the menu won't open?"}; +}; +disableSerialization; + +{ + ctrlSetText[SEL(_x,0),str(SEL(_x,1))]; +} foreach [[INFANTRY_EDIT,tawvd_foot],[GROUND_EDIT,tawvd_car],[AIR_EDIT,tawvd_air],[OBJECT_EDIT,tawvd_object],[DRONE_EDIT,tawvd_drone]]; + +//Setup the sliders +{ + if(!isNil "tawvd_maxRange") then { + slidersetRange [_x select 0,100,tawvd_maxRange]; + } else { + slidersetRange [_x select 0,100,20000]; + }; + ((findDisplay MENU_IDD) displayCtrl (_x select 0)) sliderSetSpeed [100,100,100]; + sliderSetPosition[_x select 0, _x select 1]; +} foreach [[INFANTRY_SLIDER,tawvd_foot],[GROUND_SLIDER,tawvd_car],[AIR_SLIDER,tawvd_air],[OBJECT_SLIDER,tawvd_object],[DRONE_SLIDER,tawvd_drone]]; + +((findDisplay MENU_IDD) displayCtrl 2931) cbSetChecked tawvd_syncObject; + +if(tawvd_syncObject) then { + ctrlEnable [OBJECT_SLIDER,false]; + ctrlEnable [OBJECT_EDIT,false]; +} else { + ctrlEnable [OBJECT_SLIDER,true]; + ctrlEnable [OBJECT_EDIT,true]; +}; + +//Lets disable it.. +if(!isNil "tawvd_disablenone") then { + ctrlEnable [TERRAIN_NONE,false]; +}; \ No newline at end of file diff --git a/source/taw_vd/fn_openSaveManager.sqf b/source/taw_vd/fn_openSaveManager.sqf new file mode 100644 index 0000000..03a4029 --- /dev/null +++ b/source/taw_vd/fn_openSaveManager.sqf @@ -0,0 +1,31 @@ +#include "defines.h" +/* + Author: Bryan "Tonic" Boardwine + + Description: + Updates the view distance dependant on whether the player + is on foot, a car or an aircraft. +*/ +private ["_controlGrp","_saveList"]; +disableSerialization; + +/* Store displays */ +_controlGrp = CONTROL(MENU_IDD,MANAGER_GROUP); +_saveList = CONTROL(MENU_IDD,SAVES_LIST); +lbClear _saveList; //Purge the list + +/* Make the Saves manager group visible */ +_controlGrp ctrlSetfade 0; +_controlGrp ctrlCommit .3; + +/* Fill the listbox */ +for "_i" from 0 to 9 do { + _varData = GVAR_PNS format["tawvd_slot_%1",_i]; + if(!isNil "_varData") then { + _saveList lbAdd SEL(_varData,0); + _saveList lbSetData [(lbSize _saveList)-1,"true"]; + } else { + _saveList lbAdd format["Save Slot %1",_i]; + _saveList lbSetData [(lbSize _saveList)-1,"false"]; + }; +}; \ No newline at end of file diff --git a/source/taw_vd/fn_openTAWVD.sqf b/source/taw_vd/fn_openTAWVD.sqf deleted file mode 100644 index 092fed3..0000000 --- a/source/taw_vd/fn_openTAWVD.sqf +++ /dev/null @@ -1,29 +0,0 @@ -/* - File: fn_openTAWVD.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Called via addAction and opens the TAW View Distance Menu -*/ -if(!createDialog "TAW_VD") exitWith {hint "Something went wrong, the menu won't open?"}; -disableSerialization; - -ctrlSetText[2902, format["%1", tawvd_foot]]; -ctrlSetText[2912, format["%1", tawvd_car]]; -ctrlSetText[2922, format["%1", tawvd_air]]; -ctrlSetText[2942, format["%1", tawvd_object]]; - -//Setup the sliders -{ - slidersetRange [_x select 0,100,12000]; - ((findDisplay 2900) displayCtrl (_x select 0)) sliderSetSpeed [100,100,100]; - sliderSetPosition[_x select 0, _x select 1]; -} foreach [[2901,tawvd_foot],[2911,tawvd_car],[2921,tawvd_air],[2941,tawvd_object]]; - -((finddisplay 2900) displayCtrl 2931) cbSetChecked tawvd_syncObject; - -if(tawvd_syncObject) then { - ctrlEnable [2941,false]; -} else { - ctrlEnable [2941,true]; -}; \ No newline at end of file diff --git a/source/taw_vd/fn_stateTracker.fsm b/source/taw_vd/fn_stateTracker.fsm new file mode 100644 index 0000000..ba7e91e --- /dev/null +++ b/source/taw_vd/fn_stateTracker.fsm @@ -0,0 +1,177 @@ +/*%FSM*/ +/*%FSM*/ +/* +item0[] = {"init",0,4346,-39.234997,-157.457230,50.765003,-107.457222,0.000000,"init"}; +item1[] = {"true",8,218,-39.286701,-67.901810,50.713299,-17.901814,0.000000,"true"}; +item2[] = {"I_am_a_loop__",2,250,-37.913574,2.551729,52.086441,52.551727,0.000000,"I am a loop.."}; +item3[] = {"Dead_Player",4,218,-137.117889,56.721581,-47.117889,106.721581,0.000000,"Dead Player"}; +item4[] = {"I_am_dead_Set_my",2,250,-215.837250,109.620483,-125.837227,159.620499,0.000000,"I am dead" \n "Set my corpse"}; +item5[] = {"Alive_player",4,218,-215.185760,16.088562,-125.185867,66.088623,0.000000,"Alive player"}; +item6[] = {"Re_add_my_action",2,250,-215.481354,-68.055023,-125.481308,-18.054995,0.000000,"Re-add my" \n "action please"}; +item7[] = {"State_changed",4,218,107.007217,1.512135,197.007202,51.512016,0.000000,"State changed"}; +item8[] = {"Update_me",2,250,107.804337,-67.884735,197.804352,-17.884773,0.000000,"Update me"}; +link0[] = {0,1}; +link1[] = {1,2}; +link2[] = {2,3}; +link3[] = {2,7}; +link4[] = {3,4}; +link5[] = {4,5}; +link6[] = {5,6}; +link7[] = {6,1}; +link8[] = {7,8}; +link9[] = {8,1}; +globals[] = {0.000000,0,0,0,0,640,480,1,12,6316128,1,-604.631348,604.623535,286.974182,-497.663422,1404,911,1}; +window[] = {2,-1,-1,-32000,-32000,785,25,1465,25,3,1422}; +*//*%FSM*/ +class FSM +{ + fsmName = "TAW_VD State Tracker"; + class States + { + /*%FSM*/ + class init + { + name = "init"; + init = /*%FSM*/"private [""_playerState"",""_corpse"",""_actionID"",""_droneState""];" \n + "" \n + "_playerState = vehicle player;" \n + "_droneState = UAVControl (getConnectedUAV player) select 1;" \n + "tawvd_addon_disable = true;" \n + "" \n + "if(isNil {profileNamespace getVariable ""tawvd_foot""}) then {" \n + " profileNamespace setVariable [""tawvd_foot"",viewDistance];" \n + " profileNamespace setVariable [""tawvd_car"",viewDistance];" \n + " profileNamespace setVariable [""tawvd_air"",viewDistance];" \n + " profileNamespace setVariable [""tawvd_drone"",viewDistance];" \n + " profileNamespace setVariable [""tawvd_object"",viewDistance];" \n + " saveProfileNamespace;" \n + "};" \n + "" \n + "tawvd_foot = profileNamespace getVariable [""tawvd_foot"",viewDistance];" \n + "tawvd_car = profileNamespace getVariable [""tawvd_car"",viewDistance];" \n + "tawvd_air = profileNamespace getVariable [""tawvd_air"",viewDistance];" \n + "tawvd_drone = profileNamespace getVariable [""tawvd_drone"",viewDistance];" \n + "tawvd_object = profileNamespace getVariable [""tawvd_object"",viewDistance];" \n + "" \n + "tawvd_syncObject = true;" \n + "_actionID = player addAction[""Settings"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="I_am_a_loop__"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class I_am_a_loop__ + { + name = "I_am_a_loop__"; + init = /*%FSM*/""/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class State_changed + { + priority = 0.000000; + to="Update_me"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"(vehicle player != _playerState OR (UAVControl getConnectedUAV player select 1) != _droneState)"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + /*%FSM*/ + class Dead_Player + { + priority = 0.000000; + to="I_am_dead_Set_my"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"!alive player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class I_am_dead_Set_my + { + name = "I_am_dead_Set_my"; + init = /*%FSM*/"_corpse = player;" \n + "_corpse removeAction _actionID;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class Alive_player + { + priority = 0.000000; + to="Re_add_my_action"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"alive player"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Re_add_my_action + { + name = "Re_add_my_action"; + init = /*%FSM*/"_actionID = player addAction[""Settings"",TAWVD_fnc_openMenu,[],-99,false,false,"""",''];"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="I_am_a_loop__"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + /*%FSM*/ + class Update_me + { + name = "Update_me"; + init = /*%FSM*/"[] call TAWVD_fnc_updateViewDistance;" \n + "_playerState = vehicle player;" \n + "_droneState = UAVControl (getConnectedUAV player) select 1;"/*%FSM*/; + precondition = /*%FSM*/""/*%FSM*/; + class Links + { + /*%FSM*/ + class true + { + priority = 0.000000; + to="I_am_a_loop__"; + precondition = /*%FSM*/""/*%FSM*/; + condition=/*%FSM*/"true"/*%FSM*/; + action=/*%FSM*/""/*%FSM*/; + }; + /*%FSM*/ + }; + }; + /*%FSM*/ + }; + initState="init"; + finalStates[] = + { + }; +}; +/*%FSM*/ \ No newline at end of file diff --git a/source/taw_vd/fn_tawvdInit.sqf b/source/taw_vd/fn_tawvdInit.sqf deleted file mode 100644 index 94a5282..0000000 --- a/source/taw_vd/fn_tawvdInit.sqf +++ /dev/null @@ -1,27 +0,0 @@ -/* - File: fn_tawvdInit.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Master init for TAW View Distance (Addon version). - If the script verson is present it will exit. -*/ -if(!isMultiplayer) exitWith {}; -tawvd_foot = viewDistance; -tawvd_car = viewDistance; -tawvd_air = viewDistance; -tawvd_syncObject = true; //Enable the automatic syncing of Object View rendering with the current view distance. -tawvd_object = tawvd_foot; - -tawvd_addon_disable = true; -//The hacky method... Apparently if you stall (sleep or waitUntil) with CfgFunctions you stall the mission initialization process... Good job BIS, why wouldn't you spawn it via preInit or postInit? -[] spawn -{ - waitUntil {!isNull player && player == player}; - waitUntil{!isNil "BIS_fnc_init"}; - waitUntil {!(isNull (findDisplay 46))}; - - tawvd_action = player addAction["Settings",TAWVD_fnc_openTAWVD,[],-99,false,false,"",'']; - - [] spawn TAWVD_fnc_trackViewDistance; -}; \ No newline at end of file diff --git a/source/taw_vd/fn_trackViewDistance.sqf b/source/taw_vd/fn_trackViewDistance.sqf deleted file mode 100644 index 86f4f0c..0000000 --- a/source/taw_vd/fn_trackViewDistance.sqf +++ /dev/null @@ -1,23 +0,0 @@ -/* - File: fn_trackViewDistance.sqf - Author: Bryan "Tonic" Boardwine - - Description: - Constantly monitors the players state. - - i.e Player gets in landvehicle then adjust viewDistance. -*/ -private["_old","_recorded"]; -while {true} do -{ - _recorded = vehicle player; - if(!alive player) then - { - _old = player; - _old removeAction tawvd_action; - waitUntil {alive player}; - tawvd_action = player addAction["Settings",TAWVD_fnc_openTAWVD,[],-99,false,false,"",'']; - }; - [] call TAWVD_fnc_updateViewDistance; - waitUntil {_recorded != vehicle player || !alive player}; -}; \ No newline at end of file diff --git a/source/taw_vd/fn_updateViewDistance.sqf b/source/taw_vd/fn_updateViewDistance.sqf index 57a4190..38fe689 100644 --- a/source/taw_vd/fn_updateViewDistance.sqf +++ b/source/taw_vd/fn_updateViewDistance.sqf @@ -1,21 +1,28 @@ +#include "defines.h" /* - File: fn_updateViewDistance.sqf Author: Bryan "Tonic" Boardwine Description: - Updates the view distance dependant on whether the player is on foot, a car or an aircraft. + Updates the view distance dependant on whether the player + is on foot, a car or an aircraft. */ -private["_dist"]; -switch (true) do -{ +private "_dist"; +switch (true) do { + case (!(EQUAL(SEL(UAVControl getConnectedUAV player,1),""))): { + setViewDistance tawvd_drone; + _dist = tawvd_drone; + }; + case ((vehicle player) isKindOf "Man"): { setViewDistance tawvd_foot; _dist = tawvd_foot; }; + case ((vehicle player) isKindOf "LandVehicle"): { setViewDistance tawvd_car; _dist = tawvd_car; }; + case ((vehicle player) isKindOf "Air"): { setViewDistance tawvd_air; _dist = tawvd_air; From f3a023aed8f896f94e743fcf486358c16223a638 Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 08:21:15 +1100 Subject: [PATCH 16/21] Fixed class definition clash --- source/taw_vd/GUI.h | 82 ++++++++++++++++++++++----------------------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/source/taw_vd/GUI.h b/source/taw_vd/GUI.h index 0a5c9ec..26322e2 100644 --- a/source/taw_vd/GUI.h +++ b/source/taw_vd/GUI.h @@ -1,6 +1,6 @@ #include "defines.h" -class RscEdit { +class RscEdit_taw { type = 2; style = 0x00 + 0x40; font = "PuristaMedium"; @@ -16,7 +16,7 @@ class RscEdit { canModify = 1; }; -class RscListBox { +class RscListBox_taw { style = 16; idc = -1; type = 5; @@ -51,7 +51,7 @@ class RscListBox { tooltipColorText[] = {1,1,1,1}; tooltipColorBox[] = {1,1,1,1}; tooltipColorShade[] = {0,0,0,0.65}; - + class ListScrollBar { color[] = {1,1,1,1}; colorActive[] = {1,1,1,1}; @@ -145,7 +145,7 @@ class RscXSliderH { thumb = "\A3\ui_f\data\gui\cfg\slider\thumb_ca.paa"; }; -class RscText { +class RscText_taw { x = 0; y = 0; h = 0.037; @@ -162,14 +162,14 @@ class RscText { linespacing = 1; }; -class RscTitle:RscText { +class RscTitle:RscText_taw { style = 0; shadow = 0; sizeEx = "( ( ( ((safezoneW / safezoneH) min 1.2) / 1.2) / 25) * 1)"; colorText[] = {0.95, 0.95, 0.95, 1}; }; -class RscShortcutButton { +class RscShortcutButton_taw { idc = -1; style = 0; default = 0; @@ -234,7 +234,7 @@ class RscShortcutButton { font = "PuristaMedium"; color = "#E5E5E5"; align = "left"; - }; + }; }; class RscControlsGroup { @@ -258,7 +258,7 @@ class RscControlsGroup { shadow = 0; scrollSpeed = 0.05; }; - + class VScrollbar:ScrollBar { width = 0.021; autoScrollSpeed = -1; @@ -267,15 +267,15 @@ class RscControlsGroup { shadow = 0; color[] = {1, 1, 1, 0.6}; }; - + class HScrollbar:ScrollBar { height = 0.028; shadow = 0; color[] = {1, 1, 1, 0.6}; }; - + //class ListScrollBar : ScrollBar {}; - + class Controls {}; }; @@ -283,13 +283,13 @@ class RscControlsGroupNoScrollbars : RscControlsGroup { class VScrollbar : VScrollbar { width = 0; }; - + class HScrollbar : HScrollbar { height = 0; }; }; -class RscButtonMenu:RscShortcutButton { +class RscButtonMenu:RscShortcutButton_taw { idc = -1; type = 16; style = "0x02 + 0xC0"; @@ -354,11 +354,11 @@ class TAW_VDMenu { name = "TAW_VDMenu"; movingEnabled = 0; enableSimulation = 1; - + onLoad = "((_this select 0) displayCtrl 2999) ctrlSetFade 1; ((_this select 0) displayCtrl 2999) ctrlCommit 0;"; class controlsBackground { - class TitleBackground : RscText { + class TitleBackground : RscText_taw { colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" }; idc = -1; x = .3; @@ -367,7 +367,7 @@ class TAW_VDMenu { h = (1 / 25); }; - class MainBackground : RscText { + class MainBackground : RscText_taw { colorBackground[] = { 0, 0, 0, .7 }; idc = -1; x = .3; @@ -375,7 +375,7 @@ class TAW_VDMenu { w = .5; h = .57 - (22 / 250); }; - + class Title : RscTitle { colorBackround[] = { 0, 0, 0, 0 }; idc = -1; @@ -386,7 +386,7 @@ class TAW_VDMenu { h = (1 / 25); }; - class OnFootText : RscText { + class OnFootText : RscText_taw { idc = -1; text = "Infantry:"; x = .32; @@ -409,7 +409,7 @@ class TAW_VDMenu { text = "Object:"; y = .655; }; - + class DroneText : OnFootText { text = "Drone:"; y = .405; @@ -435,7 +435,7 @@ class TAW_VDMenu { w = (6.25 / 40); h = (1 / 25); }; - + class SaveManagerBtn:ButtonClose { text = "Saves"; onButtonClick = "[] call tawvd_fnc_openSaveManager;"; @@ -477,7 +477,7 @@ class TAW_VDMenu { onSliderPosChanged = "[3, _this select 1] call TAWVD_fnc_onSliderChanged;"; y = .7 - (1 / 25); }; - + class VD_Drone_slider:VD_onFoot_slider { idc = DRONE_SLIDER; toolTip = "View distance while operating a UAV/UGV"; @@ -486,7 +486,7 @@ class TAW_VDMenu { } //Values (RscEdit Butons) - class VD_onFoot_Edit : RscEdit { + class VD_onFoot_Edit : RscEdit_taw { idc = INFANTRY_EDIT; text = ""; onKeyUp = "[_this select 0, _this select 1, 'ground',true] call TAWVD_fnc_onChar;"; @@ -508,7 +508,7 @@ class TAW_VDMenu { onKeyUp = "[_this select 0, _this select 1, 'air',true] call TAWVD_fnc_onChar;"; y = .36; }; - + class VD_inDrone_Edit:VD_onFoot_Edit { idc = DRONE_EDIT; onKeyUp = "[_this select 0, _this select 1, 'drone',true] call TAWVD_fnc_onChar;"; @@ -570,32 +570,32 @@ class TAW_VDMenu { tooltip = "Sync object rendering with view rendering"; onCheckedChanged = "if((_this select 1) == 1) then {tawvd_syncObject = true;ctrlEnable [2941,false]; ctrlEnable [2942,false];} else {tawvd_syncObject = false; ctrlEnable [2942,true]; ctrlEnable [2941,true];};"; w = 1 * GUI_GRID_CENTER_W; - h = 1 * GUI_GRID_CENTER_H; + h = 1 * GUI_GRID_CENTER_H; }; - class ObjectSynctext : RscText { + class ObjectSynctext : RscText_taw { idc = -1; text = "Sync with view"; x = .345; y = .596; w = .35; h = .04; }; - + class Manager:RscControlsGroup { idc = MANAGER_GROUP; - + x = -0.21; y = .2; w = .5; h = 3; class Controls { class SaveLoadGroup:RscControlsGroupNoScrollbars { idc = SAVELOAD_GROUP; - + x = 0; y = 0; w = .5; h = 3; - + class Controls { - class MyTitleBackground:RscText { + class MyTitleBackground:RscText_taw { colorBackground[] = { "(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])" }; idc = -1; x = 0; @@ -603,7 +603,7 @@ class TAW_VDMenu { w = .5; h = (1 / 25); }; - + class Title : RscTitle { colorBackround[] = { 0, 0, 0, 0 }; idc = -1; @@ -613,8 +613,8 @@ class TAW_VDMenu { w = .8; h = (1 / 25); }; - - class MainBackground:RscText { + + class MainBackground:RscText_taw { colorBackground[] = { 0, 0, 0, .7 }; idc = -1; x = 0; @@ -622,27 +622,27 @@ class TAW_VDMenu { w = .5; h = .57 - (22 / 250); }; - - class SaveList:RscListBox { + + class SaveList:RscListBox_taw { idc = SAVES_LIST; sizeEx = 0.04; colorBackground[] = {0.1,0.1,0.1,0.9}; x = 0; y = 0 + (11 / 250); w = .5; h = .49 - (22 / 250); - + onLBSelChanged = "_this call TAWVD_fnc_onSaveSelectionChanged;"; }; - + class SaveSlotName:VD_onFoot_Edit { idc = SLOT_NAME; text = "SAVE NAME"; colorBackground[] = {0,0,0,0.6}; onKeyUp = ""; - + x = .025; y = .42 + (11 / 250); w = .45; }; - + class SaveButton:RscButtonMenu { text = "Save"; onButtonClick = "[] call TAWVD_fnc_onSavePressed;"; @@ -651,7 +651,7 @@ class TAW_VDMenu { w = (6.25 / 40); h = (1 / 25); }; - + class HideButton:RscButtonMenu { text = "Hide"; onButtonClick = "((findDisplay 2900) displayCtrl 2999) ctrlSetFade 1; ((findDisplay 2900) displayCtrl 2999) ctrlCommit 0.3;"; @@ -665,4 +665,4 @@ class TAW_VDMenu { }; }; }; -}; \ No newline at end of file +}; From 14eabbb55776bf57d27f2e0ffb0cf158a9bff037 Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 12:16:02 +1100 Subject: [PATCH 17/21] Fixed issue #1 --- source/duws_revive/reviveInit.sqf | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/duws_revive/reviveInit.sqf b/source/duws_revive/reviveInit.sqf index 8b0fa49..6ccc568 100644 --- a/source/duws_revive/reviveInit.sqf +++ b/source/duws_revive/reviveInit.sqf @@ -5,13 +5,13 @@ DUWS_revive_addaction = { if (!DUWS_player_injured) then { _this addaction ["Revive","duws_revive\playerRevived.sqf", "", 0, true, true, "", "((_target distance _this) < 3"]; }; -}; +}; DUWS_revive_respawned = { if (!DUWS_player_injured) then { - removeAllActions _this; + //removeAllActions _this; }; -}; +}; DUWS_revive_revived = { if (_this == player) then { @@ -38,18 +38,17 @@ DUWS_sync_animhealing = { _this switchmove "AinvPknlMstpSlayWpstDnon_medic"; }; - + // Compile scripts getLoadout = compile preprocessFileLineNumbers 'duws_revive\get_loadout.sqf'; setLoadout = compile preprocessFileLineNumbers 'duws_revive\set_loadout.sqf'; - + // Save loadout every 5 seconds [] spawn { while{true} do { if(alive player) then { saved_loadout = [player] call getLoadout; }; - sleep 5; + sleep 5; }; }; - \ No newline at end of file From b491c9476325a481dcdfcd19092e3d52266c402c Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 14:28:29 +1100 Subject: [PATCH 18/21] Removed another reference to old VAS --- source/INIT.sqf | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/INIT.sqf b/source/INIT.sqf index a564df3..a0cb2a7 100644 --- a/source/INIT.sqf +++ b/source/INIT.sqf @@ -40,11 +40,9 @@ if (isMultiplayer) then { }]; "support_specialized_training_available" addPublicVariableEventHandler {lbSetColor [2103, 11, [0, 1, 0, 1]];}; "support_armory_available" addPublicVariableEventHandler { - hq_blu1 addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - hq_blu1 addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + hq_blu1 addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; { - _x addaction ["Armory 1 (VAS)","VAS\open.sqf", "", 0, true, true, "", "_this == player"]; - _x addaction ["Armory 2 (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; + _x addaction ["Armory (VA)","bisArsenal.sqf", "", 0, true, true, "", "_this == player"]; } forEach (Array_of_FOBS); lbSetColor [2103, 5, [0, 1, 0, 1]]; }; From a5f074b8e9893b7a384d8ae4567492cc853f68cb Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 14:45:13 +1100 Subject: [PATCH 19/21] Changed class ScrollBar to ComboScrollBar --- source/dialog/defines.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dialog/defines.hpp b/source/dialog/defines.hpp index e1bcb1a..60cacc8 100644 --- a/source/dialog/defines.hpp +++ b/source/dialog/defines.hpp @@ -197,7 +197,7 @@ class RscCombo soundCollapse[] = {"",0.1,1}; maxHistoryDelay = 1; - class ScrollBar + class ComboScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; @@ -243,7 +243,7 @@ class RscListBox arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; colorDisabled[] = {}; - class ScrollBar + class ComboScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; From 64dafccf672aa131e03e8bc1030f64374c7514cb Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Tue, 31 Jan 2017 14:45:13 +1100 Subject: [PATCH 20/21] Changed class ScrollBar to ComboScrollBar Fixes issue #6 --- source/dialog/defines.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/dialog/defines.hpp b/source/dialog/defines.hpp index e1bcb1a..60cacc8 100644 --- a/source/dialog/defines.hpp +++ b/source/dialog/defines.hpp @@ -197,7 +197,7 @@ class RscCombo soundCollapse[] = {"",0.1,1}; maxHistoryDelay = 1; - class ScrollBar + class ComboScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; @@ -243,7 +243,7 @@ class RscListBox arrowFull = "#(argb,8,8,3)color(1,1,1,1)"; colorDisabled[] = {}; - class ScrollBar + class ComboScrollBar { color[] = {1,1,1,0.6}; colorActive[] = {1,1,1,1}; From 88219fd60846117bb8c69604b0af2225f4fbc445 Mon Sep 17 00:00:00 2001 From: UltraNoobian Date: Wed, 1 Feb 2017 07:54:56 +1100 Subject: [PATCH 21/21] Possible fix for issue #7 --- source/dialog/defines.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/dialog/defines.hpp b/source/dialog/defines.hpp index 60cacc8..d096be4 100644 --- a/source/dialog/defines.hpp +++ b/source/dialog/defines.hpp @@ -255,6 +255,8 @@ class RscListBox border = "\A3\ui_f\data\gui\cfg\scrollbar\border_ca.paa"; }; + class ListScrollBar {}; + style = 16; font = "Puristamedium"; shadow = 2;