forked from Giallustio/HeartsAndMinds
-
-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #571 from Vdauphin/master_daily
UPDATE: 1.18 to 1.19
- Loading branch information
Showing
299 changed files
with
15,674 additions
and
8,246 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
branches: | ||
only: | ||
- master_daily | ||
- master | ||
language: python | ||
python: | ||
- '3.5' | ||
script: | ||
- python3 tools/sqf_validator.py |
373 changes: 180 additions & 193 deletions
373
=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,59 @@ | ||
private _MainCategory = (localize "STR_BTC_HAM_DOC_TITLE"); | ||
private _MainCategory = localize "str_3den_display3den_menubar_helpdoc_text"; | ||
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")]]; | ||
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")]]; | ||
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")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_DEAFNESS_TITLE", localize "STR_BTC_HAM_DOC_DEAFNESS_TEXT"]]; | ||
|
||
//Vehicles | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_VEHICLES_TITLE"),(localize "STR_BTC_HAM_DOC_VEHICLES_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "str_a3_cfghints_command_vehicles1", localize "STR_BTC_HAM_DOC_VEHICLES_TEXT"]]; | ||
|
||
//Side Mission | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_SIDEMISSION_TITLE"),(localize "STR_BTC_HAM_DOC_SIDEMISSION_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_SIDEMISSION_TITLE", localize "STR_BTC_HAM_DOC_SIDEMISSION_TEXT"]]; | ||
|
||
//FOB | ||
player createDiaryRecord [_MainCategory, ["FOB", (localize "STR_BTC_HAM_DOC_FOB_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, ["FOB", localize "STR_BTC_HAM_DOC_FOB_TEXT"]]; | ||
|
||
//Sling loading | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_SLING_TITLE"),(localize "STR_BTC_HAM_DOC_SLING_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_A3_SlingLoad1", localize "STR_BTC_HAM_DOC_SLING_TEXT"]]; | ||
|
||
//Logistic point | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_LOGISTICP_TITLE"),(localize "STR_BTC_HAM_DOC_LOGISTICP_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_MSQM_MRK_LOGPOINT", localize "STR_BTC_HAM_DOC_LOGISTICP_TEXT"]]; | ||
|
||
//Logistic | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_LOGISTIC_TITLE"),(localize "STR_BTC_HAM_DOC_LOGISTIC_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_ACTION_LOC_MAIN", localize "STR_BTC_HAM_DOC_LOGISTIC_TEXT"]]; | ||
|
||
//Hideout | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_HIDEOUT_TITLE"),(localize "STR_BTC_HAM_DOC_HIDEOUT_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "str_a3_campaign_b_m03_marker02", localize "STR_BTC_HAM_DOC_HIDEOUT_TEXT"]]; | ||
|
||
//IED | ||
player createDiaryRecord [_MainCategory, ["IED", (localize "STR_BTC_HAM_DOC_IED_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, ["IED", localize "STR_BTC_HAM_DOC_IED_TEXT"]]; | ||
|
||
//Intel | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_INTEL_TITLE"),(localize "STR_BTC_HAM_DOC_INTEL_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "str_a3_mdl_category_intel", localize "STR_BTC_HAM_DOC_INTEL_TEXT"]]; | ||
|
||
//Reputation | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_REPUTATION_TITLE"),(localize "STR_BTC_HAM_DOC_REPUTATION_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_REPUTATION_TITLE", localize "STR_BTC_HAM_DOC_REPUTATION_TEXT"]]; | ||
|
||
//Orders | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_ORDERS_TITLE"),(localize "STR_BTC_HAM_DOC_ORDERS_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "str_3den_waypoint_attribute_order_displayname", localize "STR_BTC_HAM_DOC_ORDERS_TEXT"]]; | ||
|
||
//Traffic | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_TRAFFIC_TITLE"),(localize "STR_BTC_HAM_DOC_TRAFFIC_TEXT")]]; | ||
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")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_GEAR_TITLE", localize "STR_BTC_HAM_DOC_GEAR_TEXT"]]; | ||
|
||
//Interaction | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_INTERACTION_TITLE"),(localize "STR_BTC_HAM_DOC_INTERACTION_TEXT")]]; | ||
player createDiaryRecord [_MainCategory, [localize "STR_BTC_HAM_DOC_INTERACTION_TITLE", localize "STR_BTC_HAM_DOC_INTERACTION_TEXT"]]; | ||
|
||
//Version | ||
player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_VERSION_TITLE"), | ||
format ["<img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/> Version %1.4 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/>", btc_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.0 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/>", btc_version] | ||
] | ||
]; |
77 changes: 77 additions & 0 deletions
77
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/arsenal/ammoUsage.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
|
||
/* ---------------------------------------------------------------------------- | ||
Function: btc_fnc_arsenal_ammoUsage | ||
Description: | ||
Select weapons if: | ||
- is a type of item | ||
- and has a ammo usage allowed | ||
- and is not/is parent to a parent | ||
Parameters: | ||
_weapons - Array of weapopns. [Array] | ||
_itemType_ammo_usageAllowed - Weapons allowed filter: array of item type ("AssaultRifle", "MissileLauncher"...), allowed ammo usage ("128 + 512": ammo against vehicles and armored vehicles) and array to check if weapons are parent to a parent. [Array] | ||
Returns: | ||
Array of selected weapons | ||
Examples: | ||
(begin example) | ||
_weapons_selected = [["launch_RPG7_F"], ["MissileLauncher", "256", []]] call btc_fnc_arsenal_ammoUsage; | ||
(end) | ||
Author: | ||
Vdauphin | ||
---------------------------------------------------------------------------- */ | ||
|
||
params [ | ||
["_weapons", ["launch_RPG7_F"], [[]]], | ||
["_itemType_ammo_usageAllowed", ["MissileLauncher", "256", []], [[]]] | ||
]; | ||
_itemType_ammo_usageAllowed params [["_itemType", "MissileLauncher", [""]], ["_ammo_usageAllowed", "256", [""]], ["_parent_array", [], [[]]]]; | ||
|
||
private _cfgWeapons = configFile >> "CfgWeapons"; | ||
private _cfgMagazines = configFile >> "CfgMagazines"; | ||
private _cfgAmmo = configFile >> "CfgAmmo"; | ||
|
||
_weapons select { | ||
private _weapon = _x; | ||
private _magazines = getArray (_cfgWeapons >> _weapon >> "magazines"); | ||
|
||
private _isAllowed = if (_ammo_usageAllowed isEqualTo "") then { | ||
true | ||
} else { | ||
private _aiAmmoUsage_magazines = _magazines apply { | ||
private _ammo = getText (_cfgMagazines >> _x >> "ammo"); | ||
|
||
private _aiAmmoUsage = getText (_cfgAmmo >> _ammo >> "aiAmmoUsageFlags"); | ||
if (_aiAmmoUsage isEqualTo "") then { | ||
_aiAmmoUsage = str getNumber (_cfgAmmo >> _ammo >> "aiAmmoUsageFlags"); | ||
}; | ||
|
||
_aiAmmoUsage; | ||
}; | ||
|
||
if (btc_debug_log) then { | ||
if ("" in _aiAmmoUsage_magazines) then { | ||
[format ["Weapons: %1 AiAmmoUsage Magazines: %2", _weapon, _aiAmmoUsage_magazines], __FILE__, [false]] call btc_fnc_debug_message; | ||
}; | ||
}; | ||
|
||
_ammo_usageAllowed in _aiAmmoUsage_magazines | ||
}; | ||
|
||
private _isParent = if (_parent_array isEqualTo []) then { | ||
true | ||
} else { | ||
_parent_array params ["_not", "_parent_type"]; | ||
if (_not) then { | ||
_weapon isKindOf [_parent_type, _cfgWeapons] | ||
} else { | ||
!(_weapon isKindOf [_parent_type, _cfgWeapons]) | ||
}; | ||
}; | ||
|
||
(_itemType in (_weapon call BIS_fnc_itemType)) && {_isAllowed} && {_isParent} | ||
}; |
69 changes: 69 additions & 0 deletions
69
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/arsenal/data.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
|
||
/* ---------------------------------------------------------------------------- | ||
Function: btc_fnc_arsenal_data | ||
Description: | ||
Add virtual weapons to an object (e.g., ammo box) with restriction. Virtual items can be selected in the BIS/ACE3 Arsenal. | ||
Parameters: | ||
_box - Object to which items will be added. [Object] | ||
_arsenalType - _arsenalType < 3 add BIS Arsenal, _arsenalType > 0 add ACE3 Arsenal. [Number] | ||
_arsenalRestrict - 1 to add to Arsenal _arsenalData, other to restrict Arsenal with _arsenalData. [Number] | ||
_arsenalData - Array of weapons, magazines and items. [Array] | ||
Returns: | ||
Examples: | ||
(begin example) | ||
[btc_gear_object, btc_p_arsenal_Type, btc_p_arsenal_Restrict, btc_custom_arsenal] call btc_fnc_arsenal_data; | ||
(end) | ||
Author: | ||
1kuemmel1 | ||
---------------------------------------------------------------------------- */ | ||
|
||
params [ | ||
["_box", objNull, [objNull]], | ||
["_arsenalType", 0, [0]], | ||
["_arsenalRestrict", 0, [0]], | ||
["_arsenalData", [], [[]]] | ||
]; | ||
_arsenalData params [["_weapons", [], [[]]], ["_magazines", [], [[]]], ["_items", [], [[]]], ["_backpacks", [], [[]]]]; | ||
|
||
//BIS Arsenal | ||
if (_arsenalType < 3) then { | ||
if (_arsenalRestrict isEqualTo 1) then { | ||
//add | ||
[_box, _weapons, false, false] call BIS_fnc_addVirtualWeaponCargo; | ||
[_box, _magazines, false, false] call BIS_fnc_addVirtualMagazineCargo; | ||
[_box, _items, false, false] call BIS_fnc_addVirtualItemCargo; | ||
[_box, _backpacks, false, false] call BIS_fnc_addVirtualBackpackCargo; | ||
}; | ||
|
||
// DO NOT WORK FOR BIS ARSENAL | ||
if (_arsenalRestrict in [2, 3]) then { | ||
//remove | ||
[_box, _weapons, false] call BIS_fnc_removeVirtualWeaponCargo; | ||
[_box, _magazines, false] call BIS_fnc_removeVirtualMagazineCargo; | ||
[_box, _items, false] call BIS_fnc_removeVirtualItemCargo; | ||
[_box, _backpacks, false] call BIS_fnc_removeVirtualBackpackCargo; | ||
}; | ||
}; | ||
|
||
//ACE Arsenal | ||
if (_arsenalType > 0) then { | ||
//add | ||
if (_arsenalRestrict isEqualTo 1) then { | ||
private _aceAdd = []; | ||
{_aceAdd append _x;} forEach [_weapons, _magazines, _items, _backpacks]; | ||
[_box, _aceAdd] call ace_arsenal_fnc_addVirtualItems; | ||
}; | ||
|
||
//remove | ||
if (_arsenalRestrict in [2, 3]) then { | ||
private _aceRemove = []; | ||
{_aceRemove append _x;} forEach [_weapons, _magazines, _items, _backpacks]; | ||
[_box, _aceRemove] call ace_arsenal_fnc_removeVirtualItems; | ||
}; | ||
}; |
63 changes: 63 additions & 0 deletions
63
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/arsenal/garage.sqf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
|
||
/* ---------------------------------------------------------------------------- | ||
Function: btc_fnc_arsenal_garage | ||
Description: | ||
Open virtual Arsenal garage on object position. | ||
Parameters: | ||
_current_garage - Object where the vehicle from garage will spawn. [Object] | ||
Returns: | ||
Examples: | ||
(begin example) | ||
[btc_create_object_point] call btc_fnc_arsenal_garage; | ||
(end) | ||
Author: | ||
Vdauphin | ||
---------------------------------------------------------------------------- */ | ||
|
||
params [ | ||
["_current_garage", objNull, [objNull]] | ||
]; | ||
|
||
if (count (nearestObjects [_current_garage, ["All"], 5]) > 1) exitWith { | ||
hint localize "STR_BTC_HAM_LOG_BASICS_CLEARAREA"; //Clear the area before create another object! | ||
}; | ||
|
||
disableSerialization; | ||
uiNamespace setVariable ["current_garage", _current_garage]; | ||
private _fullVersion = missionNamespace getVariable ["BIS_fnc_arsenal_fullGarage", false]; | ||
if !(isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull])) exitwith { | ||
"Garage Viewer is already running" call bis_fnc_logFormat; | ||
}; | ||
private _veh = createVehicle ["Land_HelipadEmpty_F", getPos _current_garage, [], 0, "CAN_COLLIDE"]; | ||
_veh setPosASL getPosASL _current_garage; | ||
uiNamespace setVariable ["garage_pad", _veh]; | ||
missionNamespace setVariable ["BIS_fnc_arsenal_fullGarage", [true, 0, false, [false]] call BIS_fnc_param]; | ||
with missionNamespace do {BIS_fnc_garage_center = _veh}; | ||
|
||
with uiNamespace do { | ||
private _displayMission = [] call (uiNamespace getVariable "bis_fnc_displayMission"); | ||
if !(isNull findDisplay 312) then {_displayMission = findDisplay 312;}; | ||
_displayMission createDisplay "RscDisplayGarage"; | ||
uiNamespace setVariable ["running_garage", true]; | ||
waitUntil {sleep 0.25; isNull (uiNamespace getVariable ["BIS_fnc_arsenal_cam", objNull])}; | ||
private _logistic_point = uiNamespace getVariable "current_garage"; | ||
private _pad = uiNamespace getVariable "garage_pad"; | ||
deleteVehicle _pad; | ||
private _veh_list = _logistic_point nearEntities 5; | ||
{ | ||
private _type = typeOf _x; | ||
private _pos = getPosASL _x; | ||
private _dir = getDir _x; | ||
private _customization = [_x] call BIS_fnc_getVehicleCustomization; | ||
|
||
_x call CBA_fnc_deleteEntity; | ||
[_type, _pos, _dir, _customization] remoteExec ["btc_fnc_log_createVehicle", 2]; | ||
[_type] remoteExec ["btc_fnc_eh_veh_init", -2]; | ||
} forEach _veh_list; | ||
}; |
Oops, something went wrong.