-
Notifications
You must be signed in to change notification settings - Fork 10
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 #36 from MisterHLunaticwraith/DevBranch
v1.18.1 release
- Loading branch information
Showing
32 changed files
with
774 additions
and
58 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
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
80 changes: 80 additions & 0 deletions
80
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_BFT.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,80 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_ | ||
Author: Mr H. | ||
Description: | ||
Return value: | ||
Public: No | ||
Parameters: | ||
Example(s): | ||
[]call MRH_fnc_MilsimTools_Core_; | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params ["_units","_ctrlMap"]; | ||
private _handle = [ | ||
{ | ||
params ["_units","_ctrlMap"]; | ||
_units append [objNull]; //the last unit won't display name for some reason | ||
{ | ||
if ([_x ]FUNC(showOnBFT)) then { | ||
if ((isNull objectParent _x) || (objectParent _x) != (objectParent (leader group _x))) then { | ||
_ctrlMap drawIcon | ||
[ | ||
getText (configFile >>"cfgVehicles">>typeOf _x>>"icon"), | ||
[([side _x, false] call BIS_fnc_sideColor),[0,1,1,1]]select (_x isEqualTo MRH_player), | ||
getPos _x, | ||
24, | ||
24, | ||
[getDir _x,0] select isFormationLeader _x, | ||
name _x, | ||
0, | ||
0.05, | ||
"Unifont", | ||
"right" | ||
]; | ||
}; | ||
if (isFormationLeader _x) then | ||
{ | ||
private _icons = [group _x] FUNC(NATO_symbols_for); | ||
_icons params ["_icon","_modifier"]; | ||
_ctrlMap drawIcon | ||
[ | ||
_icon, | ||
[([side _x, false] call BIS_fnc_sideColor),[0,1,1,1]]select (_x isEqualTo MRH_player), | ||
(getPos _x)vectorAdd [0,4,0], | ||
24, | ||
24, | ||
[getDir _x,0] select isFormationLeader _x, | ||
["",groupId group _x] select isFormationLeader _x, | ||
0, | ||
0.05, | ||
"Unifont", | ||
"right" | ||
]; | ||
_ctrlMap drawIcon | ||
[ | ||
_modifier, | ||
([side _x, false] call BIS_fnc_sideColor), | ||
(getPos _x)vectorAdd [0,2,0], | ||
24, | ||
24, | ||
[getDir _x,0] select isFormationLeader _x, | ||
["",groupId group _x] select isFormationLeader _x, | ||
0, | ||
0.05, | ||
"Unifont", | ||
"right" | ||
]; | ||
}; | ||
}; | ||
|
||
}forEach _units; | ||
|
||
}, | ||
[_units,_ctrlMap], | ||
{}, | ||
{ | ||
((ctrlShown (_this select 1)) && ([MRH_Player] FUNC(isConnectedToAntenna))) | ||
} | ||
] FUNC(conditionalPFEH); | ||
TRACE("BFT called"); |
42 changes: 42 additions & 0 deletions
42
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_NATO_symbols_for.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,42 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_ | ||
Author: Mr H. | ||
Description: | ||
Return value: | ||
Public: No | ||
Parameters: | ||
Example(s): | ||
[]call MRH_fnc_MilsimTools_Core_; | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params ["_grp"]; | ||
private ["_icon","_modifier","_leader"]; | ||
_leader = leader _grp; | ||
switch (true) do | ||
{ | ||
case (isNull (objectParent _leader)):{ | ||
if ((rank _leader) in ["CAPTAIN","MAJOR","COLONEL"])then {_icon ="\A3\Ui_f\data\Map\Markers\NATO\b_hq.paa"}else {_icon ="\A3\Ui_f\data\Map\Markers\NATO\b_inf.paa" | ||
}}; | ||
case( (objectParent _leader)isKindOf "AIR") :{_icon ="\A3\ui_f\data\map\markers\nato\b_plane.paa"}; | ||
case( (objectParent _leader)isKindOf "Car") :{_icon = "\A3\ui_f\data\map\markers\nato\b_motor_inf.paa"}; | ||
case( (objectParent _leader)isKindOf "APC_Tracked_01_base_F") :{_icon = "\A3\ui_f\data\map\markers\nato\b_mech_inf.paa"}; | ||
case( (objectParent _leader)isKindOf "Tank") :{_icon = "\A3\ui_f\data\map\markers\nato\b_armor.paa"}; | ||
case( (objectParent _leader)isKindOf "Static") :{_icon ="\A3\ui_f\data\map\markers\nato\b_mortar.paa"}; | ||
case( (objectParent _leader)isKindOf "Boat_F") :{_icon ="\A3\ui_f\data\map\markers\nato\b_naval.paa"}; | ||
default {_icon ="\A3\Ui_f\data\Map\Markers\NATO\b_inf.paa"}; | ||
}; | ||
|
||
|
||
|
||
switch (true) do | ||
{ | ||
case (rank _leader == "PRIVATE"): {_modifier =""}; | ||
case (rank _leader == "CORPORAL"): {_modifier = "\A3\ui_f\data\map\markers\nato\group_0.paa";}; | ||
case (rank _leader == "SERGEANT"): {_modifier = "\A3\ui_f\data\map\markers\nato\group_1.paa"}; | ||
case (rank _leader == "LIEUTENANT"): {_modifier ="\A3\ui_f\data\map\markers\nato\group_3.paa"}; | ||
case (rank _leader == "CAPTAIN"): {_modifier ="\A3\ui_f\data\map\markers\nato\group_4.paa"}; | ||
case (rank _leader == "MAJOR"): {_modifier ="\A3\ui_f\data\map\markers\nato\group_5.paa"}; | ||
case (rank _leader == "COLONEL"): {_modifier ="\A3\ui_f\data\map\markers\nato\group_6.paa"}; | ||
}; | ||
[_icon,_modifier] |
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
20 changes: 20 additions & 0 deletions
20
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_addToBFTenabledList.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,20 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_addToBFTenabledList | ||
Author: Mr H. | ||
Description: Will add the class to vehicles or items that show up on the BluFor tracker (provided a friendly unit is in them or they have item on self) | ||
Return value: List of all allowed classes, updated with new ones | ||
Public: Yes | ||
Parameters: | ||
0-<STRING> or <ARRAY> of <STRINGS> can either be vehicles classnames or items classnames | ||
Example(s): | ||
["My_vehicle"]call MRH_fnc_MilsimTools_Core_addToBFTenabledList; | ||
["My_item"]call MRH_fnc_MilsimTools_Core_addToBFTenabledList; | ||
[["My_veh1","My_veh2","My_veh3","My_item1","My_item2"]]call MRH_fnc_MilsimTools_Core_addToBFTenabledList; | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params ["_add"]; | ||
private _allowedClasses = missionNamespace getVariable ["MRH_soldierTab_BFT_enabling_items_andVehs",[]]; | ||
if ((typeName _add)isEqualTo "ARRAY")then {_allowedClasses append _add}; | ||
if ((typeName _add)isEqualTo "STRING")then {_allowedClasses pushBackUnique _add}; | ||
missionNamespace setVariable ["MRH_soldierTab_BFT_enabling_items_andVehs",_allowedClasses,true]; | ||
_allowedClasses |
48 changes: 48 additions & 0 deletions
48
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_allPlayers.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,48 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_allPlayers | ||
Author: Mr H. | ||
Description: Sets the variables MRH_allplayers (allplayers excluding HCs), MRH_allAlivePlayers (allplayers excluding HCs that are considered alive by Milsim Tools) and MRH_allAliveAndConsciousPlayers (allplayers excluding HCs that are considered alive by Milsim Tools and conscious by ACE3) on the LOCAL machine various events call this function on every machine. | ||
NOTE: These are auto-updated everywhere: | ||
-Whenever a player connects | ||
-Whenever a player disconnects | ||
-Whenever a player is killed | ||
-Whenever a player's conscious state is changed | ||
-Whenever a player respawns | ||
-Whenever the setRevived function is called on a unit | ||
Return value: MRH_allPlayers OR MRH_allAlivePlayers OR MRH_allAliveAndConsciousPlayers depending on the input parameter, default is MRH_allPlayers | ||
Public: Yes | ||
Parameters: | ||
0- <NUMBER> optionnal, if 0 (default) will return MRH_allPlayers, 1 MRH_allAlivePlayers,2 MRH_allAliveAndConsciousPlayers | ||
Example(s): | ||
call MRH_fnc_MilsimTools_Core_allPlayers; | ||
0 call MRH_fnc_MilsimTools_Core_allPlayers; | ||
//both of the above return MRH_allPlayers | ||
1 call MRH_fnc_MilsimTools_Core_allPlayers; //returns MRH_allAlivePlayers | ||
2 call MRH_fnc_MilsimTools_Core_allPlayers; // returns MRH_allAliveAndConsciousPlayers | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params [["_return",0]]; | ||
|
||
// MRH_allPlayers excludes HCs | ||
MRH_allPlayers = allPlayers - entities "HeadlessClient_F"; | ||
|
||
//MRH_allAlivePlayers excludes players that are considered dead by the mod & excludes HCs | ||
private _MRH_allAlivePlayers = []; | ||
{ | ||
if !(_x getVariable ["MRH_MilsimTools_Core_HasDied",false]) then {_MRH_AllAlivePlayers pushBackUnique _x}; | ||
} forEach MRH_allPlayers; | ||
|
||
MRH_allAlivePlayers = _MRH_allAlivePlayers; | ||
|
||
//MRH_allAliveAndConsciousPlayers excludes players that are considered dead by the mod,unconscious by ACE3 & excludes HCs | ||
private _MRH_allAliveAndConsciousPlayers =[]; | ||
{ | ||
if ([_x] call ace_common_fnc_isAwake) then {_MRH_allAliveAndConsciousPlayers pushBackUnique _x}; | ||
}forEach _MRH_allAlivePlayers; | ||
|
||
MRH_allAliveAndConsciousPlayers = _MRH_allAliveAndConsciousPlayers; | ||
([MRH_allPlayers,MRH_allAlivePlayers,MRH_allAliveAndConsciousPlayers] select _return) |
16 changes: 16 additions & 0 deletions
16
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_armaWeightToReal.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,16 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_ | ||
Author: Mr H. | ||
Description: | ||
Return value: | ||
Public: No | ||
Parameters: | ||
Example(s): | ||
[]call MRH_fnc_MilsimTools_Core_; | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params ["_weight"]; | ||
private ["_weightReal","_units"]; | ||
if (systemOfUnits !=2)then {_weightReal = _weight/22;_units = "Kg."}else {_weightReal = _weight/10;_units = "Lbs."}; | ||
[_weightReal,_units] |
16 changes: 16 additions & 0 deletions
16
Addons/MRHMilsimTools/Functions/CoreFunctions/fn_MilsimTools_Core_canConnectToVehSatCom.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,16 @@ | ||
/* | ||
Function name:MRH_fnc_MilsimTools_Core_ | ||
Author: Mr H. | ||
Description: | ||
Return value: | ||
Public: No | ||
Parameters: | ||
Example(s): | ||
[]call MRH_fnc_MilsimTools_Core_canConnectToVehSatCom; | ||
*/ | ||
#include "MRH_C_Path.hpp" | ||
params ["_unit"]; | ||
private _veh = objectParent _unit; | ||
if (isNull _veh) exitWith {false}; | ||
([_veh]FUNC(vehHasSatcom)) |
Oops, something went wrong.