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 remote-tracking branch 'refs/remotes/origin/master_daily' into …
…master_stable # Conflicts: # =BTC=co@30_Hearts_and_Minds.Altis/core/def/mission.sqf # =BTC=co@30_Hearts_and_Minds.Altis/core/doc.sqf # README.md
- Loading branch information
Showing
119 changed files
with
1,358 additions
and
1,368 deletions.
There are no files selected for viewing
413 changes: 159 additions & 254 deletions
413
=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.
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
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
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
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
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
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
15 changes: 15 additions & 0 deletions
15
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/add_grenade.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,15 @@ | ||
|
||
private _unit = _this select 0; | ||
|
||
_unit addMagazines [selectRandom btc_g_civs, 1]; | ||
|
||
_unit addEventHandler ["Fired", { | ||
if ((_this select 1) isEqualTo "Throw") then { | ||
(_this select 0) removeEventHandler ["Fired", _thisEventHandler]; | ||
[_this select 0] joinSilent createGroup [civilian, true]; | ||
[{ | ||
(_this select 0) call btc_fnc_rep_add_eh; | ||
(group (_this select 0)) call btc_fnc_civ_addWP; | ||
}, [_this select 0], 20] call CBA_fnc_waitAndExecute; | ||
}; | ||
}]; |
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,37 @@ | ||
|
||
private _factions = _this select 0; | ||
|
||
private _type_units = []; | ||
private _type_boats = []; | ||
private _type_veh = []; | ||
|
||
//Get all vehicles | ||
private _allclass = ("(configName _x) isKindOf 'AllVehicles'" configClasses (configFile >> "CfgVehicles")) apply {configName _x}; | ||
_allclass = _allclass select {getNumber(configfile >> "CfgVehicles" >> _x >> "scope") isEqualTo 2}; | ||
|
||
//Check if faction existe | ||
_factions = _factions apply {if !isClass(configFile >> "CfgFactionClasses" >> _x) then {"CIV_F"} else {_x};}; | ||
|
||
{ | ||
private _faction = _x; | ||
|
||
//Get all vehicles of the _faction selected | ||
private _allclass_f = _allclass select {(toUpper getText(configFile >> "cfgvehicles" >> _x >> "faction")) isEqualTo _faction}; | ||
|
||
//Units | ||
_type_units append (_allclass_f select {_x isKindOf "Man"}); | ||
if (_type_units isEqualTo []) then {_type_units append ["C_man_1","C_man_1_1_F","C_man_1_2_F","C_man_1_3_F","C_man_polo_1_F","C_man_polo_1_F_afro","C_man_polo_1_F_euro","C_man_polo_1_F_asia","C_man_polo_2_F","C_man_polo_2_F_afro","C_man_polo_2_F_euro","C_man_polo_2_F_asia","C_man_polo_3_F","C_man_polo_3_F_afro","C_man_polo_3_F_euro","C_man_polo_3_F_asia","C_man_polo_4_F","C_man_polo_4_F_afro","C_man_polo_4_F_euro","C_man_polo_4_F_asia","C_man_polo_5_F","C_man_polo_5_F_afro","C_man_polo_5_F_euro","C_man_polo_5_F_asia","C_man_polo_6_F","C_man_polo_6_F_afro","C_man_polo_6_F_euro","C_man_polo_6_F_asia","C_man_p_fugitive_F","C_man_p_fugitive_F_afro","C_man_p_fugitive_F_euro","C_man_p_fugitive_F_asia","C_man_p_beggar_F","C_man_p_beggar_F_afro","C_man_p_beggar_F_euro","C_man_p_beggar_F_asia","C_man_w_worker_F","C_man_hunter_1_F","C_Orestes","C_Nikos","C_Man_casual_4_F","C_Man_casual_5_F","C_Man_casual_6_F","C_Man_sport_1_F","C_Man_sport_2_F","C_Man_sport_3_F","C_Man_casual_1_F","C_Man_casual_2_F","C_Man_casual_3_F"]}; | ||
|
||
//Vehicles | ||
_type_boats append (_allclass_f select {_x isKindOf "Ship"}); | ||
if (_type_boats isEqualTo []) then {_type_boats append ["C_Rubberboat","C_Boat_Civil_01_F","C_Boat_Civil_01_rescue_F","C_Boat_Civil_01_police_F","C_Boat_Transport_02_F","C_Scooter_Transport_01_F"];}; | ||
_type_veh append (_allclass_f select {(_x isKindOf "Car") || (_x isKindOf "Truck") || (_x isKindOf "Truck_F")}); | ||
if (_type_veh isEqualTo []) then {_type_veh append ["C_Hatchback_01_F","C_SUV_01_F","C_Offroad_01_F","C_Van_01_transport_F","C_Van_01_box_F","C_Truck_02_transport_F","C_Truck_02_covered_F","C_Offroad_02_unarmed_F"]}; | ||
} forEach _factions; | ||
|
||
//Final filter unwanted units type | ||
_type_units = _type_units select {((_x find "_Driver_") isEqualTo -1) && ((_x find "_base") isEqualTo -1) && ((_x find "_unarmed_") isEqualTo -1) && ((_x find "_VR_") isEqualTo -1) && ((_x find "_pilot_") isEqualTo -1)}; | ||
_type_veh = _type_veh select {((_x find "UAV") isEqualTo -1) && ((_x find "UGV") isEqualTo -1) && ((_x find "_Kart_") isEqualTo -1)}; | ||
|
||
|
||
[_type_units,_type_boats,_type_veh] |
28 changes: 28 additions & 0 deletions
28
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/civ/get_grenade.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,28 @@ | ||
|
||
private ["_pos","_range","_units"]; | ||
|
||
_pos = _this select 0; | ||
_range = _this select 1; | ||
_units = []; | ||
if (count _this > 2) then {_units = _this select 2;} else {_units = _pos nearEntities [btc_civ_type_units, _range];}; | ||
|
||
_units = (_units select {side _x isEqualTo civilian}); | ||
|
||
if (_units isEqualTo []) exitWith {}; | ||
|
||
{ | ||
if (btc_debug_log) then {diag_log format ["fnc_civ_get_grenade %1 - %2",_x,side _x];}; | ||
|
||
_x call btc_fnc_rep_remove_eh; | ||
|
||
[_x] call btc_fnc_civ_add_grenade; | ||
|
||
[_x] joinSilent createGroup [btc_enemy_side, true]; | ||
|
||
(group _x) setVariable ["getWeapons",true]; | ||
|
||
(group _x) setBehaviour "AWARE"; | ||
private _wp = (group _x) addWaypoint [_pos, 10]; | ||
_wp setWaypointType "GUARD"; | ||
_wp setWaypointCombatMode "RED"; | ||
} foreach [selectRandom _units]; |
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
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
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
4 changes: 2 additions & 2 deletions
4
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/common/clean_up.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
39 changes: 39 additions & 0 deletions
39
=BTC=co@30_Hearts_and_Minds.Altis/core/fnc/common/delete.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,39 @@ | ||
// [marker array], [object array],[fx object array (test_EmptyObjectForSmoke)] , [group array] | ||
|
||
{ | ||
deletemarker _x; | ||
} foreach (_this select 0); | ||
|
||
{ | ||
private _object = _x; | ||
[{ | ||
params ["_args", "_id"]; | ||
if ({_x distance _args < 1000} count playableUnits == 0) then { | ||
[_id] call CBA_fnc_removePerFrameHandler; | ||
deleteVehicle _args; | ||
}; | ||
} , 5, _object] call CBA_fnc_addPerFrameHandler; | ||
} forEach (_this select 1); | ||
|
||
{ | ||
private _fx = _x; | ||
[{ | ||
params ["_args", "_id"]; | ||
if ({_x distance _args < 1000} count playableUnits == 0) then { | ||
[_id] call CBA_fnc_removePerFrameHandler; | ||
_args call btc_fnc_deleteTestObj; | ||
}; | ||
} , 5, _fx] call CBA_fnc_addPerFrameHandler; | ||
} forEach (_this select 2); | ||
|
||
{ | ||
private _group = _x; | ||
[{ | ||
params ["_args", "_id"]; | ||
if ({_x distance leader _args < 1000} count playableUnits == 0) then { | ||
[_id] call CBA_fnc_removePerFrameHandler; | ||
{deleteVehicle _x} foreach units _args; | ||
[_args] call btc_fnc_deletegroup; | ||
}; | ||
} , 5, _group] call CBA_fnc_addPerFrameHandler; | ||
} forEach (_this select 3); |
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
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
Oops, something went wrong.