Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/master_stable' into…
Browse files Browse the repository at this point in the history
… master_daily

# Conflicts:
#	=BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
#	=BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp
#	=BTC=co@30_Hearts_and_Minds.Altis/core/doc.sqf
#	=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/compile.sqf
#	=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/mil/create_group.sqf
#	=BTC=co@30_Hearts_and_Minds.Altis/description.ext
#	=BTC=co@30_Hearts_and_Minds.Altis/mission.sqm
#	=BTC=co@30_Hearts_and_Minds.Altis/mission_Tanoa.sqm

Some string are no more need
(#400)
  • Loading branch information
Vdauphin committed Dec 29, 2017
2 parents 95ec1af + f7d2904 commit e8dd239
Show file tree
Hide file tree
Showing 13 changed files with 1,125 additions and 1,593 deletions.
11 changes: 1 addition & 10 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

private ["_p_civ_veh","_p_db","_p_en","_hideout_n","_cache_info_def","_cache_info_ratio","_info_chance","_p_rep","_p_skill","_c_array","_tower","_array","_chopper","_p_civ","_btc_rearming_vehicles","_vehicles","_magazines","_p_city_radius","_magazines_static","_static","_btc_rearming_static","_magazines_clean","_weapons_usefull","_magazines_static_clean","_p_en_AA"];

btc_version = 1.17; diag_log format ["=BTC= HEARTS AND MINDS VERSION %1",(str(btc_version) + ".5")];
btc_version = 1.17; diag_log format ["=BTC= HEARTS AND MINDS VERSION %1",(str(btc_version) + ".6")];

//Param

Expand Down Expand Up @@ -30,9 +30,6 @@ _info_chance = "btc_p_info_chance" call BIS_fnc_getParamValue;

//<< Medical options >>
btc_p_redeploy = ("btc_p_redeploy" call BIS_fnc_getParamValue) isEqualTo 1;
if !("btc_p_med_level" call BIS_fnc_getParamValue < 0) then {ace_medical_level = "btc_p_med_level" call BIS_fnc_getParamValue;};
if !("btc_p_adv_wounds" call BIS_fnc_getParamValue < 0) then {ace_medical_enableAdvancedWounds = ("btc_p_adv_wounds" call BIS_fnc_getParamValue) isEqualTo 1;};
if !("btc_p_rev" call BIS_fnc_getParamValue < 0) then {ace_medical_maxReviveTime = "btc_p_rev" call BIS_fnc_getParamValue;};

//<< Skill options >>
btc_p_set_skill = ("btc_p_set_skill" call BIS_fnc_getParamValue) isEqualTo 1;
Expand All @@ -57,17 +54,11 @@ btc_p_side_mission_cycle = ("btc_p_side_mission_cycle" call BIS_fnc_getParamValu

//<< Other options >>
_p_rep = "btc_p_rep" call BIS_fnc_getParamValue;
if !("btc_p_rearm" call BIS_fnc_getParamValue < 0) then {ace_rearm_level = "btc_p_rearm" call BIS_fnc_getParamValue;};
btc_p_garage = ("btc_p_garage" call BIS_fnc_getParamValue) isEqualTo 1;
_p_city_radius = ("btc_p_city_radius" call BIS_fnc_getParamValue) * 100;
btc_p_trigger = if (("btc_p_trigger" call BIS_fnc_getParamValue) isEqualTo 1) then {"this && !btc_db_is_saving && (false in (thisList apply {_x isKindOf 'Plane'})) && (false in (thisList apply {(_x isKindOf 'Helicopter') && (speed _x > 190)}))"} else {"this && !btc_db_is_saving"};
btc_p_debug = "btc_p_debug" call BIS_fnc_getParamValue;

//OPTION must be use for H&M
if (ace_medical_maxReviveTime > 0) then {ace_medical_enableRevive = 1;ace_medical_preventInstaDeath = true};
ace_medical_enableFor = 1;
ace_cargo_enable = false;

//btc_acre_mod = isClass(configFile >> "cfgPatches" >> "acre_main");
//btc_tfr_mod = isClass(configFile >> "cfgPatches" >> "task_force_radio");

Expand Down
24 changes: 0 additions & 24 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/def/param.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,24 +125,6 @@ class Params {
texts[]={$STR_DISABLED,$STR_ENABLED}; // texts[]={"Off","On"};
default = 1;
};
class btc_p_med_level { // Medical Level
title = __EVAL(format [" %1",(localize "STR_BTC_HAM_MEDI_LEVEL")]);
values[] = {-1,1,2};
texts[] = {$STR_BTC_HAM_O_BASIC_DEFAULT,$STR_ACE_Medical_MedicalSettings_basic,$STR_ACE_Medical_MedicalSettings_advanced}; // texts[]={"Default","Basic","Advanced"};
default = -1;
};
class btc_p_adv_wounds { // Advanced Wounds
title = __EVAL(format [" %1",(localize "STR_BTC_HAM_MEDI_WOUNDS")]);
values[] = {-1,0,1};
texts[] = {$STR_BTC_HAM_O_BASIC_DEFAULT,$STR_DISABLED,$STR_ENABLED}; // texts[]={"Default","Off","On"};
default = -1;
};
class btc_p_rev { // Revive time:
title = __EVAL(format [" %1",(localize "STR_BTC_HAM_MEDI_REVTIME")]);
values[]={-1,0,60,120,180,240,300,600,900,1200,999999};
texts[]={$STR_BTC_HAM_O_BASIC_DEFAULT,$STR_DISABLED,"60","120","180","240","300","600","900","1200","999999"}; //texts[]={"Default","Off","60","120","180","240","300","600","900","1200","999999"};
default = -1;
};
class btc_p_skill_title { // << A3 Skill options >>
title = $STR_BTC_HAM_PARAM_SKILL_TITLE;
values[]={0};
Expand Down Expand Up @@ -257,12 +239,6 @@ class Params {
texts[]={$STR_BTC_HAM_PARAM_OTHER_REPSTART_VLOW,$STR_BTC_HAM_PARAM_IED_RATIO_LOW,$STR_BTC_HAM_PARAM_IED_RATIO_NORMAL,$STR_BTC_HAM_PARAM_IED_RATIO_HIGH}; //texts[]={"Very Low","Low","Normal","High"};
default = 200;
};
class btc_p_rearm { // Rearm Level:
title = __EVAL(format [" %1",(localize "STR_BTC_HAM_PARAM_OTHER_REARMLEVEL")]);
values[]={-1,0,1,2};
texts[]={$STR_BTC_HAM_O_BASIC_DEFAULT,$STR_ACE_Rearm_RearmSettings_vehicle,$STR_ACE_Rearm_RearmSettings_magazine,$STR_ACE_Rearm_RearmSettings_caliber}; // texts[]={"Default","Entire Vehicle","Entire Magazine","Amount based on caliber"};
default = -1;
};
class btc_p_garage { // Activate garage for admin:
title = __EVAL(format [" %1",(localize "STR_BTC_HAM_PARAM_OTHER_GARAGEADMIN")]);
values[]={0,1};
Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/doc.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,6 @@ player createDiaryRecord [_MainCategory, [(localize "STR_BTC_HAM_DOC_INTERACTION

//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 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/>",(str(btc_version) + ".5")]
format ["<img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/> Version %1 <img image='\A3\ui_f\data\igui\cfg\simpleTasks\types\download_ca.paa' width='20' height='20'/>",(str(btc_version) + ".6")]
]
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

params ["_rpos"];

private _objects = lineIntersectsObjs [[_rpos select 0, _rpos select 1, (getTerrainHeightASL _rpos) + 1], [_rpos select 0, _rpos select 1, (getTerrainHeightASL _rpos) + 100], objNull, objNull, false, 16];

if (_objects isEqualTo []) exitWith {_rpos};

private _object = _objects select 0;
if (_object in nearestTerrainObjects [_object, ["HIDE", "ROCK", "ROCKS"], 1]) then {
_roads = _rpos nearRoads 100;
if (_roads isEqualTo []) then {
_rpos = [_rpos,5,50,10,false] call btc_fnc_findsafepos;
} else {
_rpos = getPos (_roads select 0);
};
};

if (btc_debug_log) then {
_objects = lineIntersectsObjs [[_rpos select 0, _rpos select 1, (getTerrainHeightASL _rpos) + 1], [_rpos select 0, _rpos select 1, (getTerrainHeightASL _rpos) + 100], objNull, objNull, false, 16];
if !(_objects isEqualTo []) then {
_object = _objects select 0;
if (_object in nearestTerrainObjects [_object, ["HIDE", "ROCK", "ROCKS"], 1]) then {
diag_log format ["FIND POS OUTSIDE ROCK: POS %1 Still inside rock", _rpos];
if (btc_debug) then {
systemChat "FIND POS OUTSIDE ROCK: Still inside rock";
private _marker = createmarker [format ["btc_inrock_%1", _rpos], _rpos];
_marker setmarkertype "mil_unknown";
_marker setMarkerText "In rock";
_marker setMarkerSize [0.5, 0.5];
};
};
};
};

_rpos
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ for "_i" from 0 to (2 + (floor (random 3))) do
};
};

if (_allowwater) then {
private _nearestLocation = nearestLocation [_pos, ""];
private _wp = _group addWaypoint [locationPosition _nearestLocation, 0];
_wp setWaypointType "MOVE";
_wp setWaypointCompletionRadius 20;
_wp setWaypointCombatMode "RED";
_wp setWaypointTimeout [20, 30, 60];
};

private _wp = _group addWaypoint [_pos, 0];
_wp setWaypointType "CYCLE";
_wp setWaypointCompletionRadius 20;
1 change: 1 addition & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/compile.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ if (isServer) then {
btc_fnc_deletegroup = compile preprocessFileLineNumbers "core\fnc\common\deletegroup.sqf";
btc_fnc_delete = compile preprocessFileLineNumbers "core\fnc\common\delete.sqf";
btc_fnc_final_phase = compile preprocessFileLineNumbers "core\fnc\common\final_phase.sqf";
btc_fnc_findPosOutsideRock = compile preprocessFileLineNumbers "core\fnc\common\findposoutsiderock.sqf";

//CITY
btc_fnc_city_activate = compile preprocessFileLineNumbers "core\fnc\city\activate.sqf";
Expand Down
2 changes: 1 addition & 1 deletion =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/db/save.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ _array_veh = [];
_data pushBack _cont;
_array_veh pushBack _data;
//diag_log format ["VEH %1 DATA %2",_x,_data];
} foreach btc_vehicles;
} foreach (btc_vehicles - [objNull]);
profileNamespace setVariable [format ["btc_hm_%1_vehs",_name],_array_veh];

//Objects status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,19 @@ switch (typeName _city) do {

_rpos = [_pos, _area, btc_p_sea] call btc_fnc_randomize_pos;

_pos_iswater = (surfaceIsWater _rpos);
_pos_iswater = surfaceIsWater _rpos;
if (_pos_iswater) then {
_unit_type = selectRandom btc_type_divers;
} else {
_unit_type = selectRandom btc_type_units;
_newpos = _rpos findEmptyPosition [0, 40];
_newpos = _rpos findEmptyPosition [0, 40, _unit_type];
if !(_newpos isEqualTo []) then {_rpos = _newpos;};
_rpos = [_rpos] call btc_fnc_findPosOutsideRock;
};

_group = createGroup btc_enemy_side;
[_group createUnit [_unit_type, _rpos, [], 0, "NONE"]] joinSilent _group;
(leader _group) setpos _rpos;
(leader _group) setPos _rpos;
private _groups = [];
_groups pushBack _group;
private _structure = objNull;
Expand Down
8 changes: 4 additions & 4 deletions =BTC=co@30_Hearts_and_Minds.Altis/core/fnc/side/hack.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ _marker setMarkerSize [0.6, 0.6];

//// Create terminal \\\\
private _terminal = createVehicle ["Land_DataTerminal_01_F", _pos, [], 0, "CAN_COLLIDE"];
{btc_side_done = false} remoteExec ["call", 0];
_pos = [[_pos, 100] call btc_fnc_randomize_pos, 50, 500, 30, 0, 60 * (pi / 180), 0] call BIS_fnc_findSafePos;
private _launchsite = createVehicle ["Land_PenBlack_F", _pos, [], 0, "FLY"];

Expand All @@ -40,9 +39,9 @@ private _launchsite = createVehicle ["Land_PenBlack_F", _pos, [], 0, "FLY"];
private _action = ["Open",(localize "STR_BTC_HAM_SIDE_HACK_ACEACTION"),"\A3\ui_f\data\igui\cfg\simpleTasks\types\intel_ca.paa",{ //Start Hacking
[_this select 0,3] call BIS_fnc_dataTerminalAnimate;
{btc_side_done = true} remoteExec ["call", 0];
},{!btc_side_done}] call ace_interact_menu_fnc_createAction;
},{isNil "btc_side_done"}] call ace_interact_menu_fnc_createAction;
[_this select 0, 0, ["ACE_MainActions"], _action] call ace_interact_menu_fnc_addActionToObject;
}] remoteExec ["call", -2];
}] remoteExec ["call", -2, _terminal];

waitUntil {sleep 5; (btc_side_aborted || btc_side_failed || btc_side_done)};
if (btc_side_aborted || btc_side_failed) exitWith {
Expand All @@ -64,6 +63,7 @@ _groups apply {_x setBehaviour "CARELESS"};

waitUntil {sleep 5; (btc_side_aborted || btc_side_failed || ({_x isEqualTo grpNull} count _groups > 0) || !(_city getVariable ["active", false]))};
if (btc_side_aborted || btc_side_failed) exitWith {
{btc_side_done = Nil} remoteExec ["call", -2];
16 remoteExec ["btc_fnc_task_fail", 0];
[[_marker], [_terminal], [], []] call btc_fnc_delete;
btc_side_assigned = false;publicVariable "btc_side_assigned";
Expand All @@ -81,7 +81,7 @@ private _rocket = createVehicle ["ace_rearm_Missile_AGM_02_F", [_pos select 0, _
private _fx = createVehicle ["test_EmptyObjectForSmoke", [_pos select 0, _pos select 1, _altitude], [], 0, "CAN_COLLIDE"];
_fx attachTo [_rocket,[0,0,0]];

{btc_side_done = false} remoteExec ["call", 0];
{btc_side_done = Nil} remoteExec ["call", -2];
btc_side_assigned = false;publicVariable "btc_side_assigned";
[[_marker], [_rocket, _terminal], [_fx], []] call btc_fnc_delete;
if (btc_side_aborted || btc_side_failed || !(_city getVariable ["active", false])) exitWith {
Expand Down
1 change: 1 addition & 0 deletions =BTC=co@30_Hearts_and_Minds.Altis/description.ext
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ loadScreen = "core\img\btc.paa";
author = $STR_BTC_HAM_DESCR_AUTHOR;
onLoadName = $STR_BTC_HAM_DESCR_NAME;
onLoadMission = $STR_BTC_HAM_DESCR_MISSION;
enabledebugconsole = 1;

#include "core\def\dlg_def.hpp"

Expand Down
Loading

0 comments on commit e8dd239

Please sign in to comment.