Skip to content

Commit

Permalink
Merge branch 'unstable' into YLArms_Arms_Dealer
Browse files Browse the repository at this point in the history
  • Loading branch information
stutpip123 authored Oct 21, 2024
2 parents a9d1478 + d1b2e35 commit be2dbfd
Show file tree
Hide file tree
Showing 98 changed files with 3,934 additions and 194 deletions.
8 changes: 7 additions & 1 deletion A3A/addons/core/CfgMarkers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,18 @@ class CfgMarkers
texture = QPATHTOFOLDER(Pictures\Markers\CSAT_SFIA_Marker.paa);
};

class a3a_flag_FIN: flag_NATO
{
name = "Finland";
icon = QPATHTOFOLDER(Pictures\Markers\marker_fin_co.paa);
texture = QPATHTOFOLDER(Pictures\Markers\marker_fin_co.paa);
};

class a3a_flag_LRI: flag_NATO
{
name = "LRI";
icon = QPATHTOFOLDER(Pictures\Markers\marker_lri_co.paa);
texture = QPATHTOFOLDER(Pictures\Markers\marker_lri_co.paa);

};

class a3a_flag_cdf: flag_NATO
Expand Down
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
Binary file not shown.
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
1,239 changes: 1,239 additions & 0 deletions A3A/addons/core/Templates/Templates/CUP/CUP_AI_NorAF_Arctic.sqf

Large diffs are not rendered by default.

1,349 changes: 1,349 additions & 0 deletions A3A/addons/core/Templates/Templates/CUP/CUP_AI_NorAF_Temperate.sqf

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions A3A/addons/core/Templates/Templates/CUP/templates.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,29 @@
flagTexture = "a3\data_f_enoch\flags\flag_enoch_co.paa";
name = "CUP LDF";
file = "CUP_AI_LDF";
};

//CUP NorAF

class NorAF_Base : CUP_Base
{
requiredAddons[] = {"CUP_Creatures_People_Civil_Russia", "CUP_BaseConfigs", "CUP_AirVehicles_Core", "Flex_CUP_NOR_Faction"}; // units, weapons, vehicles
//requiredAddons[] = {"CUP_AirVehicles_Core"}; // vehicles requires units & weapons
priority = 61;
};

class CUP_NorAF_Temperate : NorAF_Base
{
side = "Occ";
flagTexture = "\A3\ui_f\data\map\markers\flags\Norway_ca.paa";
name = "CUP NorAF Temperate";
file = "CUP_AI_NorAF_Temperate";
climate[] = {"temperate","tropical"};
};

class CUP_NorAF_Arctic : CUP_NorAF_Temperate
{
name = "CUP NorAF Arctic";
file = "CUP_AI_NorAF_Arctic";
climate[] = {"arctic"};
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

["flag", "Flag_FIA_F"] call _fnc_saveToTemplate;
["flagTexture", QPATHTOFOLDER(Templates\Templates\NFtS\flag_finland.paa)] call _fnc_saveToTemplate;
["flagMarkerType", "NORTH_Flag_FIN"] call _fnc_saveToTemplate;
["flagMarkerType", "a3a_flag_FIN"] call _fnc_saveToTemplate;

["vehiclesBasic", ["NORTH_FIN_41_R75"]] call _fnc_saveToTemplate;
["vehiclesLightUnarmed", ["LIB_Kfz1_w"]] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

["flag", "Flag_FIA_F"] call _fnc_saveToTemplate;
["flagTexture", QPATHTOFOLDER(Templates\Templates\NFtS\flag_finland.paa)] call _fnc_saveToTemplate;
["flagMarkerType", "NORTH_Flag_FIN"] call _fnc_saveToTemplate;
["flagMarkerType", "a3a_flag_FIN"] call _fnc_saveToTemplate;

["vehiclesBasic", ["NORTH_FIN_41_R75"]] call _fnc_saveToTemplate;
["vehiclesLightUnarmed", ["LIB_Kfz1_sernyt"]] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

["flag", "Flag_FIA_F"] call _fnc_saveToTemplate;
["flagTexture", QPATHTOFOLDER(Templates\Templates\NFtS\flag_norway.paa)] call _fnc_saveToTemplate;
["flagMarkerType", "NORTH_Flag_FIN"] call _fnc_saveToTemplate;
["flagMarkerType", "flag_Norway"] call _fnc_saveToTemplate;

["vehiclesBasic", ["NORTH_FIN_41_R75"]] call _fnc_saveToTemplate;
["vehiclesLightUnarmed", ["LIB_Kfz1_w"]] call _fnc_saveToTemplate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

["flag", "Flag_FIA_F"] call _fnc_saveToTemplate;
["flagTexture", QPATHTOFOLDER(Templates\Templates\NFtS\flag_norway.paa)] call _fnc_saveToTemplate;
["flagMarkerType", "NORTH_Flag_FIN"] call _fnc_saveToTemplate;
["flagMarkerType", "flag_Norway"] call _fnc_saveToTemplate;

["vehiclesBasic", ["NORTH_FIN_41_R75"]] call _fnc_saveToTemplate;
["vehiclesLightUnarmed", ["LIB_Kfz1_sernyt"]] call _fnc_saveToTemplate;
Expand Down
2 changes: 2 additions & 0 deletions A3A/addons/core/Templates/script_component.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define COMPONENT templates
#include "\x\A3A\addons\core\Includes\script_mod.hpp"
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/init/fn_initClient.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -666,4 +666,4 @@ if (staminaEnabled isEqualTo false) then {
};

private _newWeaponSway = swayEnabled / 100;
player setCustomAimCoef _newWeaponSway;
player setCustomAimCoef _newWeaponSway;
2 changes: 1 addition & 1 deletion A3A/addons/core/functions/init/fn_initVarServer.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,8 @@ private _vehicleResourceCosts = createHashMap;
{ _vehicleResourceCosts set [_x, 150] } forEach FactionGet(all, "vehiclesDropPod") + FactionGet(all, "uavsAttack");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesCAS") + FactionGet(all, "vehiclesPlanesAA");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesHelisAttack");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesCAS") + FactionGet(all, "vehiclesPlanesAA");
{ _vehicleResourceCosts set [_x, 275] } forEach FactionGet(all, "vehiclesPlanesGunship");
{ _vehicleResourceCosts set [_x, 250] } forEach FactionGet(all, "vehiclesPlanesLargeCAS") + FactionGet(all, "vehiclesPlanesLargeAA");

// Threat table
private _groundVehicleThreat = createHashMap;
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
26 changes: 26 additions & 0 deletions A3A/addons/hals/Addons/store/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class cfgHALsStore
#include "config\eaw.hpp"
#include "config\cwr.hpp"
#include "config\ylarms.hpp"
#include "config\ProjInfAD.hpp"
#include "config\JCAArsenal.hpp"
};

class stores
Expand Down Expand Up @@ -846,6 +848,30 @@ class cfgHALsStore
"magazinesYLA",
"underbarrelYLA",
"specialWeaponsYLA"
class projinf_stock
{
displayName = $STR_ARMS_DEALER_STORE;
categories[] = {
"handgunsProjInfAD",
"riflesProjInfAD",
"sniperRiflesProjInfAD",
"muzzlesProjInfAD",
"opticsProjInfAD",
"magazinesProjInfAD",
"underbarrelProjInfAD"
class jca_stock
{
displayName = $STR_ARMS_DEALER_STORE;
categories[] = {
"handgunsJCA",
"riflesJCA",
"sniperRiflesJCA",
"smgJCA",
"underbarrelJCA",
"pointersJCA",
"muzzlesJCA",
"opticsJCA",
"magazinesJCA"
};
};
};
Expand Down
Loading

0 comments on commit be2dbfd

Please sign in to comment.