Skip to content

Commit

Permalink
Merge pull request #945 from Vdauphin/master_daily
Browse files Browse the repository at this point in the history
UPDATE: 1.20 to 1.21
  • Loading branch information
Vdauphin authored Feb 24, 2021
2 parents 089505c + 6d8d477 commit 0c87d82
Show file tree
Hide file tree
Showing 195 changed files with 6,101 additions and 6,219 deletions.
8 changes: 3 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,21 @@ assignees: ''

---

(Use English only.)
<!-- Use English only. -->

## Before reporting
<!-- ## Before reporting
If you have found an issue with Hearts and Minds please make sure that Hearts and Minds really is the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3`, `@ace` and `@RHSUSAF` on a stable and unchanged Hearts and minds available [here](https://github.com/Vdauphin/HeartsAndMinds/releases) on a dedicated server.
If you have found an issue with Hearts and Minds please make sure that Hearts and Minds really is the cause of the problem. To do this try to reproduce the issue with using only `@CBA_A3` and `@ace` on a stable and unchanged Hearts and minds available [here](https://github.com/Vdauphin/HeartsAndMinds/releases) on a dedicated server. -->

**Arma 3 Version:** `x.xx` (stable / rc / dev)
**CBA Version:** `3.x.x` (stable / dev + commit hash)
**ACE3 Version:** `3.x.x` (stable / dev + commit hash)
**RHS USAF Version:** `0.x.x` (stable / dev + commit hash)
**Hearts and minds Version:** `1.x.x` (stable / dev + commit hash)

**Mods:**
```
- CBA_A3
- ace
- RHS USAF
```

**Description:**
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ assignees: ''

---

(Use English only.)
<!-- Use English only. -->
<!-- You can also use https://github.com/Vdauphin/HeartsAndMinds/discussions/new with Question and answer category -->
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Use English only.)
<!-- Use English only. -->

- FIX/Add: here write the line will be used in the changelog (@Author1, @Author2 ...).

Expand Down
4 changes: 2 additions & 2 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ template: |
Requires [ACE3](http://www.armaholic.com/page.php?id=28557).
_[Optionals :](https://github.com/Vdauphin/HeartsAndMinds/files/5147451/All.Hearts.and.Minds.mods.html.zip)_
- [CUP units and vehicles mod](https://forums.bistudio.com/topic/179326-community-upgrade-project-cup/), [Community Factions Project](https://github.com/tupolov/cfp/releases),
- [RHS USAF](http://www.armaholic.com/page.php?id=27149), [RHS AFRF](http://www.armaholic.com/page.php?id=27150), [RHS GREF](http://www.armaholic.com/page.php?id=30998), [RHS SAF](http://www.armaholic.com/page.php?id=32203),
- [RDS A2 Civilian Pack mod](https://forums.bistudio.com/topic/170165-rds-a2-civilian-pack/),
- [CUP units and vehicles mod](https://forums.bistudio.com/topic/179326-community-upgrade-project-cup/), [Community Factions Project](https://github.com/tupolov/cfp/releases),
- [3CB Factions](https://steamcommunity.com/sharedfiles/filedetails/?id=1673456286), [Project OPFOR](https://forums.bistudio.com/topic/193185-project-opfor/), [Iraqi-Syrian Conflic](http://www.armaholic.com/page.php?id=28406), [Central African Rebels [SFF-R]](http://www.armaholic.com/page.php?id=32465),
- [FAP Units (Foes & Allies Pack)](http://www.armaholic.com/page.php?id=30706), [VETERAN](https://steamcommunity.com/workshop/filedetails/?id=1132375156),
- [Taliban Fighters by EricJ](http://www.armaholic.com/page.php?id=29543),
- [The Unsung Vietnam War Mod](http://www.armaholic.com/page.php?id=29948),
- [Iron Front 3 Lite](http://www.armaholic.com/page.php?id=24714), [Face of War WW2](http://www.armaholic.com/page.php?id=31945),
- [Operation: TREBUCHET](http://www.armaholic.com/page.php?id=28614), [Operation: TREBUCHET First Contact](https://steamcommunity.com/workshop/filedetails/?id=1572627279), [OPCAN - OPTRE Reskin Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=2016312756).
[Changelog](https://github.com/Vdauphin/HeartsAndMinds/milestone/62?closed=1):
[Changelog](https://github.com/Vdauphin/HeartsAndMinds/milestone/52?closed=1):
- Mission.sqm/Param.hpp not changed.
$CHANGES
154 changes: 104 additions & 50 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf

Large diffs are not rendered by default.

80 changes: 64 additions & 16 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp

Large diffs are not rendered by default.

18 changes: 3 additions & 15 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/doc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ player createDiarySubject [_MainCategory, _MainCategory];
//Headless and Data base
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_HEADLESS_TITLE", localize "STR_BTC_HAM_DOC_HEADLESS_TEXT"]];

//Wounds
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_WOUNDS_TITLE", localize "STR_BTC_HAM_DOC_WOUNDS_TEXT"]];

//Deafness
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_DEAFNESS_TITLE", localize "STR_BTC_HAM_DOC_DEAFNESS_TEXT"]];

//Chemical warfare
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_CHEMICALWARFARE_TITLE", localize "STR_BTC_HAM_DOC_CHEMICALWARFARE_TEXT"]];

Expand All @@ -22,8 +16,8 @@ player createDiaryRecord [_MainCategory, [localize "str_a3_cfghints_command_vehi
//Side Mission
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_SIDEMISSION_TITLE", localize "STR_BTC_HAM_DOC_SIDEMISSION_TEXT"]];

//FOB
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_FOB_TITLE", localize "STR_BTC_HAM_DOC_FOB_TEXT"]];
//Respawn position
player createDiaryRecord [_MainCategory, [localize "str_a3_cfgvehicles_modulerespawnposition_f_0", localize "STR_BTC_HAM_DOC_FOB_TEXT"]];

//Sling loading
player createDiaryRecord [_MainCategory, [localize "STR_A3_SlingLoad1", localize "STR_BTC_HAM_DOC_SLING_TEXT"]];
Expand Down Expand Up @@ -52,14 +46,8 @@ player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_ACTION_ORDERS_MA
//Traffic
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_TRAFFIC_TITLE", localize "STR_BTC_HAM_DOC_TRAFFIC_TEXT"]];

//Gear
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_GEAR_TITLE", localize "STR_BTC_HAM_DOC_GEAR_TEXT"]];

//Interaction
player createDiaryRecord [_MainCategory, [localize "STR_ACE_Interaction_DisplayName", localize "STR_BTC_HAM_DOC_INTERACTION_TEXT"]];

//Version
player createDiaryRecord [_MainCategory, [localize "STR_A3_FM_Welcome4",
format (["<img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/> Version %1.%2.%3 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/>"] + btc_version)
format (["<img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/> Version %1.%2.%3 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/> <br/><br/> <img image='\a3\missions_f_orange\Data\Img\orange_overview_ca.paa' width='355' height='200'/>"] + btc_version)
]
];
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ with uiNamespace do {

_x call CBA_fnc_deleteEntity;
[_type, _pos, _dir, _customization] remoteExecCall ["btc_fnc_log_createVehicle", 2];
[_type] remoteExecCall ["btc_fnc_eh_veh_init", -2];
[_type] remoteExecCall ["btc_fnc_veh_init", -2];
} forEach _veh_list;
};
35 changes: 29 additions & 6 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/arsenal/loadout.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Description:
Generate a loadout from an array of defined loadout depending on trait, medical level, color and hour of the day.
Parameters:
_type - Type of loadout: 0 - Rifleman, 1 - Medic, 2 - Repair, 3 - Engineer, 4 - Anti-Tank, 5 - Anti Air, 6 - Sniper, 7 - Machine gunner. [Number]
_type - Type of loadout: 0 - Rifleman, 1 - Medic, 2 - Repair, 3 - Engineer, 4 - Anti-Tank, 5 - Anti Air, 6 - Sniper, 7 - Machine gunner, 8 - CBRN, 9 - Drone hacker. [Number]
_color - Color of skin loadout: 0 - Desert, 1 - Tropic, 2 - Black, 3 - Forest. [Number]
_isDay - Select night (false) or day (true) loadout. [Boolean]
_medicalParameters - Select the correct medical stuff depends on ACE3 medical parameters. [Array]
Expand All @@ -30,7 +30,7 @@ Examples:
sleep 1;
} forEach [false,true];
} forEach [0,1,2,3];
} forEach [0,1,2,3,4,5,6,7];
} forEach [0,1,2,3,4,5,6,7,8,9];
};
(end)
Expand All @@ -55,7 +55,7 @@ if (_color < 0) then {
case (worldName in ["Tanoa", "lingor3"]): {
1
};
case (worldName in ["chernarus", "Enoch", "sara"]): {
case (worldName in ["chernarus", "Enoch", "sara", "vt7"]): {
3
};
default {
Expand All @@ -65,7 +65,7 @@ if (_color < 0) then {
}
};

(_arsenal_loadout apply {_x select _color}) params ["_uniform", "_vest", "_helmet", "_hood", "_laserdesignator", "_night_vision", "_weapon", "_weapon_sniper", "_weapon_machineGunner", "_bipod", "_pistol", "_launcher_AT", "_launcher_AA", "_backpack", "_backpack_big", "_radio"];
(_arsenal_loadout apply {_x select _color}) params ["_uniform", "_uniformCBRN", "_uniformSniper", "_vest", "_helmet", "_hood", "_hoodCBRN", "_laserdesignator", "_night_vision", "_weapon", "_weapon_sniper", "_weapon_machineGunner", "_bipod", "_pistol", "_launcher_AT", "_launcher_AA", "_backpack", "_backpack_big", "_backpackCBRN", "_radio"];

if (_isDay isEqualType 0) then {
(date call BIS_fnc_sunriseSunsetTime) params ["_sunrise", "_sunset"];
Expand Down Expand Up @@ -95,7 +95,28 @@ if (_fractures > 0) then {
};
_cargo_uniform append _medical;

//Choose appropriats weapon/optics depends on _type
private _uniform = switch (_type) do {
case 6: {
_uniformSniper
};
case 8: {
_uniformCBRN
};
default {
_uniform
};
};

private _hood = switch (_type) do {
case 8: {
_hoodCBRN
};
default {
_hood
};
};

//Choose appropriate weapon/optics depends on _type
private _array = switch (_type) do {
case 6: {
[_weapon_sniper, ["ACE_optic_Hamr_2D", "ACE_optic_LRPS_2D"]];
Expand Down Expand Up @@ -150,7 +171,9 @@ private _cargos = [
[_backpack, [[_launcherMagazines param [1, _launcherMagazine], 1, _launcherCount], [_launcherMagazine, 1, _launcherCount]]],
[_backpack_big, [[_launcherMagazine, 2, _launcherCount]]],
[_backpack, [["ACE_Sandbag_empty", 1], ["ACE_Kestrel4500", 1], ["ACE_ATragMX", 1], ["ACE_RangeCard", 1], ["ACE_EntrenchingTool", 1]]],
[]
[],
[_backpackCBRN, [["G_Respirator_white_F", 5]]],
[_backpack, [["muzzle_antenna_02_f", 1], ["muzzle_antenna_01_f", 1], [["hgun_esd_01_F", "", "", "", [], [], ""], 1]]]
];
private _binocular_array = [_laserdesignator, "", "", "", ["Laserbatteries", 1], [], ""];
private _launcher_array = [_launcher, "", "", "", [_launcherMagazine, _launcherCount], [], ""];
Expand Down
6 changes: 6 additions & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/arsenal/trait.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ switch (true) do {
case ([typeOf _player, ["MachineGun", ""]] call btc_fnc_mil_ammoUsage): {
_type_ammoUsageAllowed = [7, [["MachineGun", ""]]];
};
case ("cbrn" in toLower uniform _player): {
_type_ammoUsageAllowed = [8, [["AssaultRifle", "", [false, "Rifle_Long_Base_F"]]]];
};
case (_player getUnitTrait "UAVHacker"): {
_type_ammoUsageAllowed = [9, [["AssaultRifle", "", [false, "Rifle_Long_Base_F"]]]];
};
default {
_type_ammoUsageAllowed = [0, [["AssaultRifle", "", [false, "Rifle_Long_Base_F"]], ["RocketLauncher", ""]]];
};
Expand Down
8 changes: 4 additions & 4 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/create.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Description:
Parameters:
_cache_pos - Position of the cache. [Array]
_p_chem - Create a chemical cache. [Boolean]
_probilityOfChemical - Probability to create a chemical cache. [Number]
_probilityNotChemical - Probability to not create a chemical cache. [Number]
Returns:
Expand All @@ -29,12 +29,12 @@ Author:
params [
["_cache_pos", btc_cache_pos, [[]]],
["_p_chem", btc_p_chem, [true]],
["_probilityOfChemical", 0.7, [0]]
["_probilityNotChemical", 0.7, [0]]
];

private _isChem = false;
if (_p_chem) then {
_isChem = random 1 > _probilityOfChemical;
_isChem = random 1 > _probilityNotChemical;
};
private _cacheType = selectRandom (btc_cache_type select 0);
btc_cache_obj = _cacheType createVehicle _cache_pos;
Expand All @@ -45,7 +45,7 @@ clearWeaponCargoGlobal btc_cache_obj;
clearItemCargoGlobal btc_cache_obj;
clearMagazineCargoGlobal btc_cache_obj;

[btc_cache_obj, "HandleDamage", "btc_fnc_cache_hd_cache"] call btc_fnc_eh_persistOnLocalityChange;
[btc_cache_obj, "HandleDamage", btc_fnc_cache_hd] remoteExecCall ["CBA_fnc_addBISEventHandler", 0, true];

if (_isChem) then {
btc_chem_contaminated pushBack btc_cache_obj;
Expand Down
5 changes: 2 additions & 3 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/cache/find_pos.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ if (_city getVariable ["type", ""] in ["NameLocal", "Hill", "NameMarine"]) exitW
[] call btc_fnc_cache_find_pos;
};

private _xx = _city getVariable ["RadiusX", 500];
private _yy = _city getVariable ["RadiusY", 500];
private _pos = [getPos _city, _xx + _yy] call btc_fnc_randomize_pos;
private _radius = _city getVariable ["radius", 200];
private _pos = [getPos _city, _radius] call btc_fnc_randomize_pos;
private _houses = [_pos, 50] call btc_fnc_getHouses;

if (_houses isEqualTo []) then {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

/* ----------------------------------------------------------------------------
Function: btc_fnc_cache_hd_cache
Function: btc_fnc_cache_hd
Description:
Destroy an ammo cache only when an explposive with damage > 0.6 is used.
Expand All @@ -11,12 +11,14 @@ Parameters:
_damage - Amount of damage get by the object. [Number]
_injurer - Not use. [Object]
_ammo - Type of ammo use to make damage. [String]
_hitIndex - Hit part index of the hit point, -1 otherwise. [Number]
_instigator - Person who pulled the trigger. [Object]
Returns:
Examples:
(begin example)
_result = [] call btc_fnc_cache_hd_cache;
_result = [] call btc_fnc_cache_hd;
(end)
Author:
Expand All @@ -29,46 +31,47 @@ params [
["_part", "", [""]],
["_damage", 0, [0]],
["_injurer", objNull, [objNull]],
["_ammo", "", [""]]
["_ammo", "", [""]],
["_hitIndex", 0, [0]],
["_instigator", objNull, [objNull]]
];

private _explosive = (getNumber(configFile >> "cfgAmmo" >> _ammo >> "explosive") > 0);

if (isNil {_cache getVariable "btc_hd_cache"} && {_explosive} && {_damage > 0.6}) then {
if (
!(_cache getVariable ["btc_fnc_cache_hd_fired", false]) &&
{_explosive} &&
{_damage > 0.6}
) then {
_cache setVariable ["btc_fnc_cache_hd_fired", true];

if (!isServer) exitWith {
[_cache, "HandleDamage", "btc_fnc_cache_hd_cache"] call btc_fnc_eh_removePersistOnLocalityChange;
_this remoteExecCall ["btc_fnc_cache_hd_cache", 2];
_this remoteExecCall ["btc_fnc_cache_hd", 2];
};

_cache setVariable ["btc_hd_cache", true];

//Effects
private _pos = getPosATL btc_cache_obj;
"Bo_GBU12_LGB_MI10" createVehicle _pos;
[_pos] spawn {
params ["_pos"];

sleep random [0.5, 2, 3];
"M_PG_AT" createVehicle _pos;
sleep random [0.5, 2, 3];
"M_Titan_AT" createVehicle _pos;
};
[{
"M_PG_AT" createVehicle _this;
[{
"M_PG_AT" createVehicle _this;
}, _this, random [0.5, 2, 3]] call CBA_fnc_waitAndExecute;
}, _pos, random [0.5, 2, 3]] call CBA_fnc_waitAndExecute;
[_pos] call btc_fnc_deaf_earringing;
[attachedObjects _cache, btc_cache_obj, btc_cache_markers] call CBA_fnc_deleteEntity;

private _marker = createMarker [format ["btc_cache_%1", btc_cache_n], btc_cache_pos];
_marker setMarkerType "hd_destroy";
[_marker, "STR_BTC_HAM_O_EH_HDCACHE_MRK", btc_cache_n] remoteExecCall ["btc_fnc_set_markerTextLocal", [0, -2] select isDedicated, _marker]; //Cached %1 destroyed

_marker setMarkerSize [1, 1];
_marker setMarkerColor "ColorRed";

if (btc_debug_log) then {
[format ["DESTROYED: ID %1 POS %2", btc_cache_n, btc_cache_pos], __FILE__, [false]] call btc_fnc_debug_message;
};

btc_rep_bonus_cache call btc_fnc_rep_change;
[btc_rep_bonus_cache, _instigator] call btc_fnc_rep_change;

//Notification
[0] remoteExecCall ["btc_fnc_show_hint", 0];
Expand Down
Loading

0 comments on commit 0c87d82

Please sign in to comment.