diff --git a/A3-Antistasi/Dialogs/dialogHQ.sqf b/A3-Antistasi/Dialogs/dialogHQ.sqf deleted file mode 100644 index 46302f461d..0000000000 --- a/A3-Antistasi/Dialogs/dialogHQ.sqf +++ /dev/null @@ -1,64 +0,0 @@ -private ["_display","_childControl","_veh","_texto","_coste","_tipoVeh"]; -_nul = createDialog "HQ_menu"; - -sleep 1; -disableSerialization; - -_display = findDisplay 100; - -if (str (_display) != "no display") then -{ - _ChildControl = _display displayCtrl 109; - _ChildControl ctrlSetTooltip format ["Current level: %2. Next Level Training Cost: %1 €",1000 + (1.5*((skillFIA) *750)),skillFIA]; -/* - _ChildControl = _display displayCtrl 110; - { - _subVeh = _x; - if ((_subVeh distance bandera < 10) and (_subVeh!=caja) and (_subVeh!=mapa) and (_subVeh!=cajaveh)) then {_veh = _subVeh} - } forEach vehicles; - - if (isNil "_veh") then - { - _texto = "No vehicles to sell" - } - else - { - _tipoVeh = typeOf _veh; - _coste = 0; - - if (_tipoVeh in vehFIA) then {_coste = round (([_tipoVeh] call A3A_fnc_vehiclePrice)/2); _texto = "Fia Vehicle."}; - - if (_tipoVeh in arrayCivVeh) then - { - if (_tipoVeh == "C_Van_01_fuel_F") then {_coste = 50} else {_coste = 25}; - _texto = "Civ Vehicle." - }; - if (_tipoVeh in vehAAFAT) then - { - if ((_tipoVeh == "I_APC_tracked_03_cannon_F") or (_tipoVeh == "I_APC_Wheeled_03_cannon_F")) then - { - _coste = 1000; - } - else - { - _coste = 5000; - }; - _texto = "AAF Tank"; - }; - if (_tipoVeh in vehAAFnormal) then {_coste = 300; _texto = "AAF Normal Vehicle."}; - if (_coste == 0) then - { - _texto = "The closest vehicle is not suitable in our marketplace" - } - else - { - _coste = round (_coste * (1-damage _veh)); - _texto = format ["%2 Price: %1 €",_coste,_texto]; - }; - }; - - _ChildControl ctrlSetTooltip format ["%1",_texto]; - //You need this to cue animation -- will smoothly animate to new position. Could use zero here - //_ChildControl ctrlCommit 1; -*/ -}; diff --git a/A3-Antistasi/Dialogs/headquarters.sqf b/A3-Antistasi/Dialogs/headquarters.sqf new file mode 100644 index 0000000000..92b01dfcf0 --- /dev/null +++ b/A3-Antistasi/Dialogs/headquarters.sqf @@ -0,0 +1,12 @@ +private ["_display","_childControl","_veh","_texto","_coste","_tipoVeh"]; +_nul = createDialog "headquarters"; + +sleep 1; +disableSerialization; + +_display = findDisplay 100; +if (str (_display) != "no display") then +{ + _ChildControl = _display displayCtrl 109; + _ChildControl ctrlSetTooltip format [ localize "str_antistasi_hq_button_train_ai_tooltip", skillFIA, 1000 + (1.5 * ((skillFIA) * 750)) ]; +}; diff --git a/A3-Antistasi/Dialogs/firstLoad.sqf b/A3-Antistasi/Dialogs/load_previous_session.sqf similarity index 86% rename from A3-Antistasi/Dialogs/firstLoad.sqf rename to A3-Antistasi/Dialogs/load_previous_session.sqf index 58b4dd1d18..26a443c9b4 100644 --- a/A3-Antistasi/Dialogs/firstLoad.sqf +++ b/A3-Antistasi/Dialogs/load_previous_session.sqf @@ -1,8 +1,8 @@ -_nul=createDialog "first_load"; +_nul = createDialog "load_previous_session"; _bypass = false; -if (count _this > 0) then {_bypass = true}; +if (count _this > 0) then { _bypass = true }; //bypass es true cuando un JIP carga waitUntil {dialog}; hint "W A R N I N G\n\nREAD THIS!!!\n\n\nAntistasi does NOT support vanilla save. Do not expect 100% of functionalities if you Save&Exit and after you come back with Resume option. Both on SP and MP.\n\n\nAntistasi has an in built save system, GTA alike, which is the system you have to use in order to have full functionalities.\n\nTo Save: Go to the Map Board, select ""Game Options"" and hit on ""Persistent Save"" button.\n\nTo load: RESTART the game and click YES on this window"; diff --git a/A3-Antistasi/Stringtable.xml b/A3-Antistasi/Stringtable.xml new file mode 100644 index 0000000000..01d9bb3d3f --- /dev/null +++ b/A3-Antistasi/Stringtable.xml @@ -0,0 +1,114 @@ + + + + + + + + + Load previous session? + Load previous session? + Загрузить последнюю сессию? + + + + Yes + Yes + Да + + + Loads the pervious personal session + Loads the pervious personal session + Загрузить последнюю персональную сессию + + + + No + No + Нет + + + Starts a new game + Starts a new game + Начать новую игру + + + + + + + + + HQ Options - Commander Only + HQ Options - Commander Only + + + Close + Close + + + + Grab 100€ from Pool + Grab 100€ from Pool + + + Take 100€ from faction pool and add it to your personnal account. It will damage your position among the faction in the commander career + Take 100€ from faction pool and add it to your personnal account. It will damage your position among the faction in the commander career + + + + Manage Garrisons + Manage Garrisons + + + Add or remove units to garrisons + Add or remove units to garrisons + + + + Move HQ to another Zone + Move HQ to another Zone + + + Maru will join your group. Ammobox must be empty. To rebuild, select the Build action near Maru + Maru will join your group. Ammobox must be empty. To rebuild, select the Build action near Maru + + + + Ingame Member's List + Ingame Member's List + + + Displays which server members are currently playing + Displays which server members are currently playing + + + + Rebuild Assets + Rebuild Assets + + + Cost: 5.000 € + Cost: 5.000 € + + + + Train AI - Skill Upgrade + Train AI - Skill Upgrade + + + Current level: %1. Next Level Training Cost: %2€ + Current level: %1. Next Level Training Cost: %2€ + + + + Garage Access + Garage Access + + + Check Faction garage + Check Faction garage + + + + \ No newline at end of file diff --git a/A3-Antistasi/dialogs.hpp b/A3-Antistasi/dialogs.hpp index 1d4a7b6a06..0e59fe97d9 100644 --- a/A3-Antistasi/dialogs.hpp +++ b/A3-Antistasi/dialogs.hpp @@ -1,174 +1,174 @@ -//Game start -class first_load { - idd=-1; - movingenable=false; +class load_previous_session +{ + idd = -1; + movingenable = false; - class controls { - class HQ_box: BOX + class controls + { + class lps_box: BOX { idc = -1; - text = ""; //--- ToDo: Localize; + text = ""; x = 0.244979 * safezoneW + safezoneX; y = 0.223941 * safezoneH + safezoneY; w = 0.445038 * safezoneW; h = 0.20 * safezoneH;//30 }; - class HQ_frame: RscFrame + class lps_frame: RscFrame { idc = -1; - text = "Load previous session?"; //--- ToDo: Localize; + text = $STR_antistasi_lps_frame_text; x = 0.254979 * safezoneW + safezoneX; y = 0.233941 * safezoneH + safezoneY; w = 0.425038 * safezoneW; h = 0.18 * safezoneH;//28 }; - class HQ_button_Gsquad: RscButton + class lps_button_yes: RscButton { idc = -1; - text = "YES"; //--- ToDo: Localize; + text = $STR_antistasi_lps_button_yes_text; + tooltip = $STR_antistasi_lps_button_yes_tooltip; x = 0.272481 * safezoneW + safezoneX; y = 0.317959 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Loads the pervious personal session"; action = "closeDialog 0;nul = [true] execVM ""statSave\loadAccount.sqf"";"; }; - class HQ_button_Gstatic: RscButton + class lps_button_no: RscButton { idc = -1; - text = "NO"; //--- ToDo: Localize; + text = $STR_antistasi_lps_button_no_text; + tooltip = $STR_antistasi_lps_button_no_tooltip; x = 0.482498 * safezoneW + safezoneX; y = 0.317959 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Starts a new game"; - //action = "closeDialog 0;if ((player == theBoss) and (isNil ""placementDone"") and !(isMultiplayer)) then {_nul = [] spawn A3A_fnc_placementselection};"; action = "closeDialog 0;if ((player == theBoss) and (isNil ""placementDone"") and !(isMultiplayer)) then {closeDialog 0;[] execVM ""dialogs\difficultyMenu.sqf""};"; }; }; }; -//FLAG -class HQ_menu { - idd=100; - movingenable=false; +class headquarters +{ + idd = 100; + movingenable = false; - class controls { - //Structure - class HQ_box: BOX + class controls + { + class hq_box: BOX { idc = 101; - text = ""; //--- ToDo: Localize; + text = $STR_antistasi_hq_box_text; x = 0.244979 * safezoneW + safezoneX; y = 0.223941 * safezoneH + safezoneY; w = 0.445038 * safezoneW; h = 0.492103 * safezoneH; }; - class HQ_frame: RscFrame + class hq_frame: RscFrame { idc = 102; - text = "HQ Options - Commander Only"; //--- ToDo: Localize; + text = $STR_antistasi_hq_frame_text; x = 0.254979 * safezoneW + safezoneX; y = 0.233941 * safezoneH + safezoneY; w = 0.425038 * safezoneW; h = 0.462103 * safezoneH; }; - class HQ_button_back: RscButton + class hq_button_close: RscButton { idc = 103; - text = "Back"; //--- ToDo: Localize; + text = $STR_antistasi_hq_button_close_text; x = 0.61 * safezoneW + safezoneX; y = 0.251941 * safezoneH + safezoneY; - w = 0.06 * safezoneW;//0.175015 + w = 0.06 * safezoneW; h = 0.05 * safezoneH; action = "closeDialog 0"; }; - //Buttons L and R - class HQ_button_load: RscButton + class hq_button_withdraw: RscButton { - idc = 104; //L1 - text = "Grab 100 € from Pool"; //--- ToDo: Localize; + idc = 104; + text = $STR_antistasi_hq_button_withdraw_text; + tooltip = $STR_antistasi_hq_button_withdraw_tooltip; x = 0.272481 * safezoneW + safezoneX; y = 0.317959 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Take 100 € from faction pool and add it to your personnal account. It will damage your position among the faction in the commander career"; action = "if (isMultiPlayer) then {if (player == theBoss) then {nul=call A3A_fnc_theBossSteal} else {hint ""Only Player Commander has access to this function""}} else {hint ""This function is MP only""};"; }; - class HQ_button_savegame: RscButton + class hq_button_garrisons: RscButton { - idc = 105; //L2 - text = "Manage Garrisons"; //--- ToDo: Localize; + idc = 105; + text = $STR_antistasi_hq_button_garrisons_text; + tooltip = $STR_antistasi_hq_button_garrisons_tooltip; x = 0.272481 * safezoneW + safezoneX; y = 0.415981 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Add or remove units to garrisons"; action = "closeDialog 0;if (player == theBoss) then {nul=CreateDialog ""build_menu""} else {hint ""Only Player Commander has access to this function""};"; }; - class HQ_button_moveHQ: RscButton + class hq_button_move_headquarters: RscButton { - idc = 106; //L3 - text = "Move HQ to another Zone"; //--- ToDo: Localize; + idc = 106; + text = $STR_antistasi_hq_button_move_headquarters_text; + tooltip = $STR_antistasi_hq_button_move_headquarters_tooltip; x = 0.272481 * safezoneW + safezoneX; y = 0.514003 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Maru will join your group. Ammobox must be empty. To rebuild, select the Build action near Maru"; action = "closeDialog 0;if (player == theBoss) then {nul = [] spawn A3A_fnc_moveHQ;} else {hint ""Only Player Commander has access to this function""};"; }; - class HQ_button_recruitUnit: RscButton + class hq_button_members_list: RscButton { - idc = 107; //R1 - text = "Ingame Member's List"; //--- ToDo: Localize; + idc = 107; + text = $STR_antistasi_hq_button_members_list_text; + tooltip = $STR_antistasi_hq_button_members_list_tooltip; x = 0.482498 * safezoneW + safezoneX; y = 0.317959 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Displays which server members are currently playing"; action = "if (player == theBoss) then {if (isMultiplayer) then {nul = [] call A3A_fnc_membersList} else {hint ""This function is MP only""}} else {hint ""Only Player Commander has access to this function""};"; }; - class HQ_button_recruitSquad: RscButton + class hq_button_rebuild_assets: RscButton { - idc = 108; //R2 - text = "Rebuild Assets"; //--- ToDo: Localize; + idc = 108; + text = $STR_antistasi_hq_button_rebuild_assets_text; + tooltip = $STR_antistasi_hq_button_rebuild_assets_tooltip; x = 0.482498 * safezoneW + safezoneX; y = 0.514003 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Cost: 5.000 €"; action = "closeDialog 0;if (player == theBoss) then {nul=[] spawn A3A_fnc_rebuildAssets} else {hint ""Only Player Commander has access to this function""};"; }; - class HQ_button_vehicle: RscButton + class hq_button_train_ai: RscButton { - idc = 109; //R3 - text = "Train AI - Skill Upgrade"; //--- ToDo: Localize; + idc = 109; + text = $STR_antistasi_hq_button_train_ai_text; + tooltip = $STR_antistasi_hq_button_train_ai_tooltip; x = 0.482498 * safezoneW + safezoneX; y = 0.415981 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = ""; action = "closeDialog 0;if (player == theBoss) then {nul = [] call A3A_fnc_FIAskillAdd} else {hint ""Only Player Commander has access to this function""};"; }; - class HQ_button_skill: RscButton + class hq_button_garage: RscButton { - idc = 110; //M4 - text = "Garage Access"; //--- ToDo: Localize; + idc = 110; + text = $STR_antistasi_hq_button_garage_text; + tooltip = $STR_antistasi_hq_button_garage_tooltip; x = 0.37749 * safezoneW + safezoneX; y = 0.612025 * safezoneH + safezoneY; w = 0.175015 * safezoneW; h = 0.0560125 * safezoneH; - tooltip = "Check Faction garage"; action = "closeDialog 0;nul = [false] spawn A3A_fnc_garage"; }; }; -}; //slots: 6+1 -class build_menu { - idd=-1; - movingenable=false; +}; - class controls { - //Structure +class build_menu { + idd = -1; + movingenable = false; + + class controls + { class HQ_box: BOX { idc = -1; diff --git a/A3-Antistasi/initPlayerLocal.sqf b/A3-Antistasi/initPlayerLocal.sqf index bc8f5536b2..d8e7b312c1 100644 --- a/A3-Antistasi/initPlayerLocal.sqf +++ b/A3-Antistasi/initPlayerLocal.sqf @@ -498,7 +498,7 @@ if (_isJip) then } else { - _nul = [] execVM "Dialogs\firstLoad.sqf"; + _nul = [] execVM "Dialogs\load_previous_session.sqf"; }; diag_log "Antistasi MP Client. JIP client finished"; player setPos (getMarkerPos respawnBuenos); @@ -522,7 +522,7 @@ else } else { - _nul = [true] execVM "Dialogs\firstLoad.sqf"; + _nul = [true] execVM "Dialogs\load_previous_session.sqf"; }; diag_log "Antistasi MP Client. Client finished"; } @@ -531,13 +531,13 @@ else miembros = []; player setUnitTrait ["medic",true]; player setUnitTrait ["engineer",true]; - _nul = [] execVM "Dialogs\firstLoad.sqf"; + _nul = [] execVM "Dialogs\load_previous_session.sqf"; }; } else { player setVariable ["score", 0,true]; - _nul = [true] execVM "Dialogs\firstLoad.sqf"; + _nul = [true] execVM "Dialogs\load_previous_session.sqf"; player setPos (getMarkerPos respawnBuenos); }; } @@ -545,7 +545,7 @@ else { if !(isServer) then { - _nul = [] execVM "Dialogs\firstLoad.sqf"; + _nul = [] execVM "Dialogs\load_previous_session.sqf"; player setPos (getMarkerPos respawnBuenos); }; }; @@ -595,7 +595,7 @@ if ((!isServer) and (isMultiplayer)) then {caja call jn_fnc_arsenal_init}; caja allowDamage false; caja addAction ["Transfer Vehicle cargo to Ammobox", "[] call A3A_fnc_vaciar"]; caja addAction ["Move this asset", "moveHQObject.sqf",nil,0,false,true,"","(_this == theBoss)"]; -bandera addAction ["HQ Management", {[] execVM "Dialogs\dialogHQ.sqf"},nil,0,false,true,"","(_this == theBoss) and (petros == leader group petros)"]; +bandera addAction ["HQ Management", {[] execVM "Dialogs\headquarters.sqf"},nil,0,false,true,"","(_this == theBoss) and (petros == leader group petros)"]; bandera allowDamage false; bandera addAction ["Unit Recruitment", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot recruit units while there are enemies near you"} else {nul=[] execVM "Dialogs\unit_recruit.sqf"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"]; bandera addAction ["Buy Vehicle", {if ([player,300] call A3A_fnc_enemyNearCheck) then {hint "You cannot buy vehicles while there are enemies near you"} else {nul = createDialog "vehicle_option"}},nil,0,false,true,"","(isPlayer _this) and (_this == _this getVariable ['owner',objNull]) and (side (group _this) == buenos)"];