Skip to content

Commit

Permalink
Merge branch 'unstable' into JCA_Arms_Dealer
Browse files Browse the repository at this point in the history
  • Loading branch information
stutpip123 authored Oct 21, 2024
2 parents f63a926 + d3c46b6 commit 6ada415
Show file tree
Hide file tree
Showing 75 changed files with 632 additions and 187 deletions.
2 changes: 1 addition & 1 deletion A3A/addons/core/Includes/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 11
#define MINOR 2
#define PATCHLVL 0
#define PATCHLVL 1
#define BUILD 0
6 changes: 3 additions & 3 deletions A3A/addons/core/Params.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ class Params
class limitedFT
{
title = $STR_params_allowFT;
values[] = {0,1,2};
texts[] = {$STR_params_allowFT_0, $STR_params_allowFT_1,$STR_params_civ_traffic_none};
values[] = {0,1,2,3};
texts[] = {$STR_params_allowFT_0, $STR_params_allowFT_1, $STR_params_allowFT_2, $STR_params_civ_traffic_none};
default = 0;
};
class civTraffic
Expand Down Expand Up @@ -300,7 +300,7 @@ class Params
title = $STR_A3AU_sway_enabled;
values[] = {0,25,50,75,100};
texts[] = {"0%","25%","50%","75%","100%"};
default = 1;
default = 100;
};

class Spacer60
Expand Down
4 changes: 2 additions & 2 deletions A3A/addons/core/Stringtable.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2724,8 +2724,8 @@
<Russian>Выбрана полная победа&lt;br/&gt;Чтобы выполнить это условие победы, захватите все аванпосты, ресурсы, фабрики, морские порты, военные базы и аэропорты и поддерживайте большую поддержку населения, чем ваши враги.</Russian>
</Key>
<Key ID="STR_antistasi_journal_entry_text_Default_economic">
<Original>Economic Victory Selected&lt;br/&gt;To complete this win condition, Gain more than 2 million units of currency.</Original>
<Russian>Экономическая победа выбрана&lt;br/&gt;Чтобы выполнить это условие победы, получите более 2 миллионов единиц валюты.</Russian>
<Original>Economic Victory Selected&lt;br/&gt;To complete this win condition, Gain more than a set amount of currency.&lt;br/&gt;Calculated as: amount of resources on the map * 100,000&lt;br/&gt;Needed amount on current map : %1%2</Original>
<Russian>Экономическая победа выбрана&lt;br/&gt;Чтобы выполнить это условие победы, получите больше установленной суммы валюты.&lt;br/&gt;Рассчитывается как: количество ресурсов на карте * 100,000.&lt;br/&gt;Необходимая сумма на текущей карте : %1%2</Russian>
</Key>
<Key ID="STR_antistasi_journal_entry_text_Default_logistical">
<Original>Logistical Victory Selected&lt;br/&gt;To complete this win condition, capture all seaports, military bases, and airports, and maintain more population support than your enemies.</Original>
Expand Down
4 changes: 2 additions & 2 deletions A3A/addons/core/Templates/Templates/CUP/CUP_AI_BAF_Arid.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@
["uavsAttack", ["CUP_B_USMC_DYN_MQ9"]] call _fnc_saveToTemplate;
["uavsPortable", ["B_UAV_01_F"]] call _fnc_saveToTemplate;

["vehiclesMilitiaLightArmed", ["CUP_B_LR_Transport_GB_D"]] call _fnc_saveToTemplate;
["vehiclesMilitiaLightArmed", ["CUP_B_LR_MG_GB_D"]] call _fnc_saveToTemplate;
["vehiclesMilitiaTrucks", ["CUP_B_MTVR_USA"]] call _fnc_saveToTemplate;
["vehiclesMilitiaCars", ["CUP_B_LR_MG_GB_D"]] call _fnc_saveToTemplate;
["vehiclesMilitiaCars", ["CUP_B_LR_Transport_GB_D"]] call _fnc_saveToTemplate;
["vehiclesMilitiaAPCs", ["CUP_B_Mastiff_HMG_GB_D", "CUP_B_FV432_Bulldog_GB_D_RWS"]] call _fnc_saveToTemplate;

["vehiclesPolice", ["B_GEN_Offroad_01_gen_F"]] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
["vehiclesMilitiaTrucks", ["CUP_B_MTVR_USA"]] call _fnc_saveToTemplate;
["vehiclesMilitiaCars", ["CUP_B_LR_Transport_GB_W"]] call _fnc_saveToTemplate;
["vehiclesMilitiaAPCs", ["CUP_B_Mastiff_GMG_GB_W", "CUP_B_FV432_Bulldog_GB_W_RWS"]] call _fnc_saveToTemplate;

["vehiclesPolice", ["B_GEN_Offroad_01_gen_F"]] call _fnc_saveToTemplate;

["staticMGs", ["CUP_B_L111A1_BAF_DDPM"]] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ call {
};

if (_basecategory isEqualTo "Headgear") exitWith {
if (getNumber (configfile >> "CfgWeapons" >> _className >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Head" >> "armor") > 0) then {
if (getNumber (configfile >> "CfgWeapons" >> _className >> "ItemInfo" >> "HitpointsProtectionInfo" >> "Head" >> "armor") > 5) then {
_categories pushBack "ArmoredHeadgear";
};
};
Expand Down Expand Up @@ -170,8 +170,8 @@ call {
if (getNumber (_config >> "rhs_disposable") == 1 or _mainmag == "CBA_fakeLauncherMagazine") then {
_categories pushBack "Disposable";
if (getNumber (_config >> "scope") == 1) exitWith { _categories set [0, "UsedLaunchers"] };
if (_mainmag == "CBA_fakeLauncherMagazine" and !isNil "cba_disposable_normalLaunchers") then {
_mainmag = (cba_disposable_normalLaunchers getVariable _classname) # 1; // format is [realLauncher, magazine]
if (_mainmag == "CBA_fakeLauncherMagazine" and !isNil "cba_disposable_normalLaunchers" and {typeName cba_disposable_normalLaunchers == "HASHMAP"}) then {
_mainmag = (cba_disposable_normalLaunchers get _classname) # 1; // format is [realLauncher, magazine]
};
};
if (_categories#0 == "UsedLaunchers") exitWith {};
Expand Down
6 changes: 4 additions & 2 deletions A3A/addons/core/functions/Base/fn_checkWinCondition.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ private _victoryZones = airportsX + milbases + outposts + resourcesX + factories
private _victoryZonesLogistical = airportsX + milbases + seaports;
private _popTotal = 0;
private _popKilled = 0;
private _missingMoney = ((2000000 - _factionMoney) call BIS_fnc_numberText) splitString " " joinString ",";
private _popReb = 0;
private _popGov = 0;
private _popMajority = 0;
private _resourcesCount = count (resourcesX);
private _economicCalculation = (_resourcesCount * 100000);
private _missingMoney = ((_economicCalculation - _factionMoney) call BIS_fnc_numberText) splitString " " joinString ",";

{
private _city = _x;
Expand Down Expand Up @@ -71,7 +73,7 @@ switch (victoryCondition) do
//Economic Victory
case 2:
{
if (_factionMoney >= 2000000) then {
if (_factionMoney >= _economicCalculation) then {
isNil {["ended", true] call A3A_fnc_writebackSaveVar};
["economicVictory",true,true,true,true] remoteExec ["BIS_fnc_endMission"];
} else {
Expand Down
24 changes: 18 additions & 6 deletions A3A/addons/core/functions/Dialogs/fn_fastTravelRadio.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ private _markersX = markersX + [respawnTeamPlayer];

// private _titleStr = localize "STR_A3A_fn_dialogs_ftradio_title";
private _titleStr = "Fast Travel";
if (limitedFT == 2) exitWith {[_titleStr, "Fast travel is disabled for this server."] call A3A_fnc_customHint}; // [_titleStr, localize "STR_A3A_fn_dialogs_ftradio_no_param"]
if (limitedFT == 3) exitWith {[_titleStr, "Fast travel is disabled for this server."] call A3A_fnc_customHint}; // [_titleStr, localize "STR_A3A_fn_dialogs_ftradio_no_param"]
// This needs a proper stringtable ^

if (!isNil "traderMarker") then {
Expand All @@ -26,7 +26,7 @@ if (count hcSelected player == 1) then {
_groupX = group player;
};
private _checkForPlayer = false;
if (!_esHC and {(limitedFT == 1)}) then {_checkForPlayer = true};
if (!_esHC and {(limitedFT == 1 or limitedFT == 2)}) then {_checkForPlayer = true};
private _boss = leader _groupX;

if (_boss != player and {!_esHC}) then {_groupX = player};
Expand Down Expand Up @@ -98,12 +98,24 @@ if (_positionTel isEqualTo []) exitWith {
};

private _base = [_markersX, _positionTel] call BIS_Fnc_nearestPosition;

private _rebelMarkers = if (!isNil "traderMarker") then {["Synd_HQ", traderMarker]} else {["Synd_HQ"]};
if (_checkForPlayer && {!(_base in (_rebelMarkers + airportsX + milbases))}) exitWith {
private _isValidTargetLocation = (_base in (_rebelMarkers + airportsX + milbases));

if (_checkForPlayer && limitedFT == 1 && !_isValidTargetLocation) exitWith {
[localize "STR_A3A_Dialogs_fast_travel_header", localize "STR_A3A_Dialogs_fast_travel_limited"] call SCRT_fnc_misc_deniedHint;
};

private _withinBoundaries = true;
if (limitedFT == 2) then {
private _rebelLocations = (_rebelMarkers + airportsX + milbases) select { sidesX getVariable _x == teamPlayer };
private _nearestPosition = [_rebelLocations, player] call BIS_Fnc_nearestPosition;
private _distanceToNearest = player distance getMarkerPos _nearestPosition;
_withinBoundaries = _distanceToNearest < 50;
};
if (_checkForPlayer && limitedFT == 2 && (!_isValidTargetLocation or !_withinBoundaries)) exitWith {
[localize "STR_A3A_Dialogs_fast_travel_header", localize "STR_A3A_Dialogs_fast_travel_limited_to_between_destinations"] call SCRT_fnc_misc_deniedHint;
};

if ((sidesX getVariable [_base,sideUnknown]) in [Occupants, Invaders]) exitWith {
[localize "STR_A3A_Dialogs_fast_travel_header", localize "STR_A3A_Dialogs_fast_travel_no_enemy_zone"] call SCRT_fnc_misc_deniedHint;
openMap [false,false];
Expand Down Expand Up @@ -141,13 +153,13 @@ if (_positionTel distance getMarkerPos _base < 50) then {
};
};
private _exit = false;
if (limitedFT == 1) then {
if (limitedFT == 1 or limitedFT == 2) then {
_vehicles = [];
{if (vehicle _x != _x) then {_vehicles pushBackUnique (vehicle _x)}} forEach units _groupX;
{if ((vehicle _x) in _vehicles) exitWith {_checkForPlayer = true}} forEach (call A3A_fnc_playableUnits);
};

if (_checkForPlayer and {!(_base in (_rebelMarkers + airportsX + milbases))}) exitWith {
if (_checkForPlayer and !_isValidTargetLocation) exitWith {
[localize "STR_A3A_Dialogs_fast_travel_header", format [localize "STR_A3A_Dialogs_fast_travel_cancel",groupID _groupX]] call A3A_fnc_customHint;
};

Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/REINF/fn_controlunit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ if (staminaEnabled isEqualTo false) then {
};

private _newWeaponSway = swayEnabled / 100;
player setCustomAimCoef _newWeaponSway;
_unit setCustomAimCoef _newWeaponSway;

private _timeX = aiControlTime;

Expand Down
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/REINF/fn_garrisonAdd.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ waitUntil {(_countX < count (garrison getVariable [_markerX, []])) or (sidesX ge

if(((server getVariable ["hr",0]) <= 10) && (loseHROnDeath isEqualTo 2)) then {
_warningText = "<t font ='PuristaBold' align = 'center' size='0.8' color='#bd0000'>" + localize "STR_A3AU_respawn_warning" +"</t>"+"<br />"+"<t font ='PuristaSemibold' align = 'center' size='0.55' color='#ebebeb'>" + format [localize "STR_A3AU_HR_warning_info", (A3A_faction_reb get "name"), (server getVariable ["hr",0])]+"</t>";
[_warningText,0,safezoneY+0.05] spawn BIS_fnc_dynamicText;
[_warningText,0,safezoneY+0.05] remoteExec ["BIS_fnc_dynamicText"];
};

if (sidesX getVariable [_markerX,sideUnknown] == teamPlayer) then {
Expand Down
4 changes: 3 additions & 1 deletion A3A/addons/core/functions/init/fn_briefing.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ switch (victoryCondition) do
player createDiaryRecord ["Diary",[format [localize "STR_antistasi_journal_entry_header_Default_2"],format [localize "STR_antistasi_journal_entry_text_Default_total"]]];
};
case 2: {
player createDiaryRecord ["Diary",[format [localize "STR_antistasi_journal_entry_header_Default_2"],format [localize "STR_antistasi_journal_entry_text_Default_economic"]]];
private _resourcesCount = count (resourcesX);
private _economicCalculation = ((_resourcesCount * 100000) call BIS_fnc_numberText) splitString " " joinString ",";
player createDiaryRecord ["Diary",[format [localize "STR_antistasi_journal_entry_header_Default_2"],format [localize "STR_antistasi_journal_entry_text_Default_economic", _economicCalculation, A3A_faction_civ get "currencySymbol"]]];
};
case 3: {
player createDiaryRecord ["Diary",[format [localize "STR_antistasi_journal_entry_header_Default_2"],format [localize "STR_antistasi_journal_entry_text_Default_logistical"]]];
Expand Down
4 changes: 2 additions & 2 deletions A3A/addons/core/functions/proxy/fn_onPlayerRespawn.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ if (side group _newUnit == teamPlayer) then
if(((server getVariable ["hr",0]) > 10) && (tierWar >= 2)) then
{
_warningText = "<t font ='PuristaSemibold' align = 'center' size='0.5' color='#ebebeb'>" + format [localize "STR_chats_player_kia", _deathPenaltyNum]+"</t>";
[_warningText,0,safezoneY+0.05] spawn BIS_fnc_dynamicText;
[_warningText,0,safezoneY+0.05] remoteExec ["BIS_fnc_dynamicText"];
};
};
};
Expand Down Expand Up @@ -279,4 +279,4 @@ if (staminaEnabled isEqualTo false) then {
};

private _newWeaponSway = swayEnabled / 100;
player setCustomAimCoef _newWeaponSway;
_newunit setCustomAimCoef _newWeaponSway;
2 changes: 1 addition & 1 deletion A3A/addons/garage/Public/config.inc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ HR_GRG_CP_closeCnd = {
};

HR_GRG_Cnd_canAccessAir = {
count (airportsX select {(sidesX getVariable [_x,sideUnknown] == teamPlayer) and (HR_GRG_accessPoint inArea _x)}) > 0
count (airportsX select {(sidesX getVariable [_x,sideUnknown] == teamPlayer) and (HR_GRG_accessPoint inArea _x)}) > 0 || count (milbases select {(sidesX getVariable [_x,sideUnknown] == teamPlayer) and (HR_GRG_accessPoint inArea _x)}) > 0
};

//Lock on garaged vehicles ( Values: [{""}, { getPlayerUID player }] )
Expand Down
35 changes: 35 additions & 0 deletions A3A/addons/main_menu/XEH_preInit.sqf
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#include "script_component.hpp"

private _images = (configfile >> "A3AU_Images") call BIS_fnc_getCfgSubClasses;

private _cfgNameArray = [];
private _pathArray = [];
private _nameArray = [];

{
private _cfgName = _x;
private _path = getText (configFile >> "A3AU_Images" >> _x >> "path");
private _name = getText (configFile >> "A3AU_Images" >> _x >> "name");

_cfgNameArray pushBack _cfgName;
_pathArray pushBack _path;
_nameArray pushBack _name;
} forEach _images; // grab each video entry + data for _x

[
"menu_framework_image", // Internal setting name, should always contain a tag! This will be the global variable which takes the value of the setting.
"LIST", // setting type
"Main Menu Background", // Pretty name shown inside the ingame settings menu. Can be stringtable entry.
["Antistasi Ultimate", "Main Menu"], // Pretty name of the category where the setting can be found. Can be stringtable entry.
[_pathArray, _nameArray, 0], // [default value], [name for default value], index for default value
false, // "_isGlobal" flag. Set this to true to always have this setting synchronized between all clients in multiplayer
{
params ["_value"];

profileNamespace setVariable ["menu_framework_image", _value];

call A3U_fnc_menuImage;

if !([player] call A3U_fnc_isInMenu) exitWith {};
}
] call CBA_fnc_addSetting;
146 changes: 146 additions & 0 deletions A3A/addons/main_menu/cfgMenuImages.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
/*
the "path" value expects a string pointing to an .jpg image file.
the "name" value is what gets used in the cba settings.
*/

class intro_empty
{
path = "None";
name = "None";
};
class intro_a3au
{
path = QPATHTOFOLDER(data\backgrounds\images\a3au_co.jpg);
name = "Antistasi Ultimate";
};
class intro_bwa
{
path = QPATHTOFOLDER(data\backgrounds\images\bwa_co.jpg);
name = "Bundeswehr";
};
class intro_androids_vanguard
{
path = QPATHTOFOLDER(data\backgrounds\images\androids_1_co.jpg);
name = "Androids (Vanguard)";
};
class intro_androids_expeditionary
{
path = QPATHTOFOLDER(data\backgrounds\images\androids_4_co.jpg);
name = "Androids (Expeditionary)";
};
class intro_em
{
path = QPATHTOFOLDER(data\backgrounds\images\em_co.jpg);
name = "Eastern Militia";
};
class intro_wm
{
path = QPATHTOFOLDER(data\backgrounds\images\wm_co.jpg);
name = "Western Militia";
};
class intro_unsc
{
path = QPATHTOFOLDER(data\backgrounds\images\unsc_1_co.jpg);
name = "The Fall of Reach: New Alexandria";
};
class intro_star_clone
{
path = QPATHTOFOLDER(data\backgrounds\images\snowtrooper_clone_co.jpg);
name = "Star Wars Clone";
};
class intro_star_empire
{
path = QPATHTOFOLDER(data\backgrounds\images\snowtrooper_co.jpg);
name = "Star Wars Empire";
};
class intro_ffaa
{
path = QPATHTOFOLDER(data\backgrounds\images\ffaa_co.jpg);
name = "Spain";
};
class intro_italy
{
path = QPATHTOFOLDER(data\backgrounds\images\italy_co.jpg);
name = "Italy";
};
class intro_maps
{
path = QPATHTOFOLDER(data\backgrounds\images\maps_co.jpg);
name = "Maps";
};
class intro_modsets
{
path = QPATHTOFOLDER(data\backgrounds\images\modsets_co.jpg);
name = "Modsets";
};
class intro_chase
{
path = QPATHTOFOLDER(data\backgrounds\images\chase_co.jpg);
name = "Heli Chase";
};
class intro_selfie
{
path = QPATHTOFOLDER(data\backgrounds\images\selfie_co.jpg);
name = "#Selfie!";
};
class intro_stealth
{
path = QPATHTOFOLDER(data\backgrounds\images\stealth_co.jpg);
name = "Stealth";
};
class intro_sunset
{
path = QPATHTOFOLDER(data\backgrounds\images\sunset_co.jpg);
name = "Sunset";
};
class intro_sweden
{
path = QPATHTOFOLDER(data\backgrounds\images\sweden_co.jpg);
name = "Sweden";
};
class intro_transport
{
path = QPATHTOFOLDER(data\backgrounds\images\transport_co.jpg);
name = "Transport";
};
class intro_turkey
{
path = QPATHTOFOLDER(data\backgrounds\images\turkey_co.jpg);
name = "Turkey";
};
class intro_us_army
{
path = QPATHTOFOLDER(data\backgrounds\images\us_army_co.jpg);
name = "US Army";
};
class intro_usmc
{
path = QPATHTOFOLDER(data\backgrounds\images\usmc_co.jpg);
name = "USMC";
};
class intro_vietnam
{
path = QPATHTOFOLDER(data\backgrounds\images\vietnam_co.jpg);
name = "Vietnam";
};
class intro_zombies
{
path = QPATHTOFOLDER(data\backgrounds\images\zombies_co.jpg);
name = "Zombies";
};
class intro_hrLoss
{
path = QPATHTOFOLDER(data\backgrounds\images\hr_loss_co.jpg);
name = "Rebellion Failed";
};
class intro_economicLoss
{
path = QPATHTOFOLDER(data\backgrounds\images\economic_loss_co.jpg);
name = "Economic Ruin";
};
class intro_popLoss
{
path = QPATHTOFOLDER(data\backgrounds\images\pop_loss_co.jpg);
name = "Population Death";
};
Loading

0 comments on commit 6ada415

Please sign in to comment.