Skip to content

Commit

Permalink
Merge branch 'master' into release
Browse files Browse the repository at this point in the history
  • Loading branch information
Timi007 committed Apr 24, 2022
2 parents 02ea680 + 432e2a9 commit 952718b
Show file tree
Hide file tree
Showing 25 changed files with 156 additions and 1,739 deletions.
59 changes: 42 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

# Metis Enhanced
A collection of useful components to enhance the MilSim gameplay experience for ArmA 3.
<p align="center">
<img src="https://i.imgur.com/lFqEVib.png" width="1024">
</p>

<p align="center">
<a href="https://github.com/Metis-Team/mts_enhanced/releases/latest">
<img src="https://img.shields.io/badge/Version-1.4.1-blue.svg?style=flat-square" alt="Metis Enhanced Version">
<img src="https://img.shields.io/badge/Version-1.4.2-blue.svg?style=flat-square" alt="Metis Enhanced Version">
</a>
<a href="https://github.com/Metis-Team/mts_enhanced/releases/latest">
<img src="https://img.shields.io/github/downloads/Metis-Team/mts_enhanced/total.svg?style=flat-square&label=Downloads" alt="Metis Enhanced Downloads">
Expand All @@ -24,22 +24,21 @@ A collection of useful components to enhance the MilSim gameplay experience for
</sup></strong>
</p>

**Metis Enhanced** is a collection of useful items and features to enhance the MilSim gameplay experience for Arma 3.

## Components:
- Armory
- Common
- Cords
- Database
- Drill
- Engineer
- Items
- Main
- Map
- Remove Snakes
- Whistle
- Zeus
- **Armory**: Allows you to save and load loadouts from a database across all server and missions.
- **Common**: Grass cutter ACE action and chat commands for logged in admins.
- **Cords**: Cords for PBW uniforms (BW Kleiderkammer).
- **Drill**: Animation and actions for exercise.
- **Engineer**: Equipment for engineers like a Mine Clearing Line Charge (MICLIC).
- **Items**: Flags in different colors and markers/signs which are carryable and placable.
- **Map**: Actions for the player to place his current map on the ground and on vehicles for others to look into.
- **Remove Snakes**: Removes snakes from all maps.
- **Whistle**: Adds a FOX 40 whistle.
- **Zeus**: Various useful modules and shortcuts for Zeus.

All relevant information about the content of each component can be found in our [Wiki](https://github.com/Metis-Team/mts_enhanced/wiki).
Further information about the content of each component can be found in our [Wiki](https://github.com/Metis-Team/mts_enhanced/wiki).

## FAQ
- Q: Does the mod have to be run on the server?
Expand All @@ -63,3 +62,29 @@ This mod is build in a modular fashion and can be used as such. It's your own di

## License
Metis Enhanced is licensed under Arma Public License No Derivatives ([APL-ND](https://github.com/Metis-Team/mts_enhanced/blob/master/LICENSE)).

## Images
<p align="center">
<img src="https://i.imgur.com/fjsH1mo.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/YvDLs7j.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/Iljz0dA.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/l7Akefb.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/LoO29mq.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/TIyLWuG.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/DhSDMXb.jpg" width="1024">
</p>
<p align="center">
<img src="https://i.imgur.com/IE6MkcQ.jpg" width="1024">
</p>
16 changes: 8 additions & 8 deletions addons/cords/functions/fnc_addCordsToACE.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

CHECK(!GVAR(enabled) || !hasinterface);

private _cordCondition = {(uniform player) in ["PBW_Uniform1_fleck","PBW_Uniform1H_fleck","PBW_Uniform1_tropen","PBW_Uniform1H_tropen","PBW_Uniform2_fleck","PBW_Uniform2_tropen","PBW_Uniform3K_fleck","PBW_Uniform3K_tropen","PBW_Uniform3_fleck","PBW_Uniform3_tropen","PBW_Uniform4K_fleck","PBW_Uniform4K_tropen","PBW_Uniform4_fleck","PBW_Uniform4_tropen"]};
private _cordCondition = {(uniform ACE_player) in ["PBW_Uniform1_fleck","PBW_Uniform1H_fleck","PBW_Uniform1_tropen","PBW_Uniform1H_tropen","PBW_Uniform2_fleck","PBW_Uniform2_tropen","PBW_Uniform3K_fleck","PBW_Uniform3K_tropen","PBW_Uniform3_fleck","PBW_Uniform3_tropen","PBW_Uniform4K_fleck","PBW_Uniform4K_tropen","PBW_Uniform4_fleck","PBW_Uniform4_tropen"]};

private _cordAction = [
QGVAR(cordAction),
Expand All @@ -27,7 +27,7 @@ private _cordAction = [
{},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions"], _cordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions"], _cordAction] call ace_interact_menu_fnc_addActionToClass;

private _infCordAction = [
QGVAR(infCordAction),
Expand All @@ -39,7 +39,7 @@ private _infCordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction)], _infCordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction)], _infCordAction] call ace_interact_menu_fnc_addActionToClass;

private _faCordAction = [
QGVAR(faCordAction),
Expand All @@ -51,7 +51,7 @@ private _faCordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(infCordAction)], _faCordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(infCordAction)], _faCordAction] call ace_interact_menu_fnc_addActionToClass;

private _oaCordAction = [
QGVAR(oaCordAction),
Expand All @@ -63,7 +63,7 @@ private _oaCordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(infCordAction)], _oaCordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(infCordAction)], _oaCordAction] call ace_interact_menu_fnc_addActionToClass;

private _pzCordAction = [
QGVAR(pzCordAction),
Expand All @@ -75,7 +75,7 @@ private _pzCordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction)], _pzCordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction)], _pzCordAction] call ace_interact_menu_fnc_addActionToClass;

private _pzFACordAction = [
QGVAR(pzFACordAction),
Expand All @@ -87,7 +87,7 @@ private _pzFACordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(pzCordAction)], _pzFACordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(pzCordAction)], _pzFACordAction] call ace_interact_menu_fnc_addActionToClass;

private _pzOACordAction = [
QGVAR(pzOACordAction),
Expand All @@ -99,4 +99,4 @@ private _pzOACordAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(pzCordAction)], _pzOACordAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", QGVAR(cordAction), QGVAR(pzCordAction)], _pzOACordAction] call ace_interact_menu_fnc_addActionToClass;
4 changes: 2 additions & 2 deletions addons/cords/functions/fnc_addMajorToACE.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ private _playerIDs = parseSimpleArray GVAR(playerIDs);

CHECKRET(!(_playerIDs isEqualType []), ERROR("Wrong data type in CBA Settings. Expected ARRAY of STRINGS with player IDs"));

CHECK(!((getPlayerUID player) in _playerIDs));
CHECK(!((getPlayerUID ACE_player) in _playerIDs));

private _cordCondition = {
params ["", "_player"];
Expand All @@ -41,4 +41,4 @@ private _majorRankAction = [
},
_cordCondition
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment"], _majorRankAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment"], _majorRankAction] call ace_interact_menu_fnc_addActionToClass;
10 changes: 5 additions & 5 deletions addons/drill/functions/fnc_playAnimation.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

params ["_animName"];

private _currAnimState = animationState player;
private _currAnimState = animationState ACE_player;
private _doAnimation = "";
private _doAnimationTwo = "";
TRACE_2("",_animName,_currAnimState);
Expand Down Expand Up @@ -104,10 +104,10 @@ if (_animName isEqualTo QGVAR(Salute)) then {
};


if !(_doAnimation isEqualTo "") then {
[player,_doAnimation,2] call ace_common_fnc_doAnimation;
if (_doAnimation isNotEqualTo "") then {
[ACE_player, _doAnimation, 2] call ace_common_fnc_doAnimation;
};

if !(_doAnimationTwo isEqualTo "") then {
[player,_doAnimationTwo,0] call ace_common_fnc_doAnimation;
if (_doAnimationTwo isNotEqualTo "") then {
[ACE_player, _doAnimationTwo, 0] call ace_common_fnc_doAnimation;
};
8 changes: 4 additions & 4 deletions addons/items/functions/fnc_addFlagACEActions.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private _flagAction = [
)
}
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment"], _flagAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment"], _flagAction] call ace_interact_menu_fnc_addActionToClass;

private _furlFlagAction = [
QGVAR(furlFlagAction),
Expand All @@ -54,7 +54,7 @@ private _furlFlagAction = [
!((getForcedFlagTexture _player) isEqualTo "")
}
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _furlFlagAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _furlFlagAction] call ace_interact_menu_fnc_addActionToClass;

{
private _color = toLower _x;
Expand All @@ -78,7 +78,7 @@ private _furlFlagAction = [
{},
_color
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _carryFlagAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _carryFlagAction] call ace_interact_menu_fnc_addActionToClass;
} forEach ["Red", "Blue", "Green", "Yellow"];

{
Expand Down Expand Up @@ -137,5 +137,5 @@ private _furlFlagAction = [
{},
[_color, _displayName]
] call ace_interact_menu_fnc_createAction;
[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _placeFlagAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment", QGVAR(flagAction)], _placeFlagAction] call ace_interact_menu_fnc_addActionToClass;
} forEach ["Red", "Blue", "Green", "Yellow"];
18 changes: 9 additions & 9 deletions addons/items/functions/fnc_carryFlag.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,30 @@ _color = toLower _color;

if (_color in ["red", "blue", "green", "yellow"]) then {
//arma need a flag proxy & some modded uniforms don't have them so we use a trick
private _loadout = getUnitLoadout player;
player forceAddUniform "U_B_CombatUniform_mcam";
private _loadout = getUnitLoadout ACE_player;
ACE_player forceAddUniform "U_B_CombatUniform_mcam";

if (_color isEqualTo "yellow") then {
player forceFlagTexture QPATHTOF(data\Flag_yellow_co.paa);
ACE_player forceFlagTexture QPATHTOF(data\Flag_yellow_co.paa);
} else {
player forceFlagTexture format ["\A3\Data_F\Flags\Flag_%1_co.paa", _color];
ACE_player forceFlagTexture format ["\A3\Data_F\Flags\Flag_%1_co.paa", _color];
};

//execute it in the next frame otherwise it will not work
[{
params ["_loadout", "_color"];

player setUnitLoadout _loadout;
player removeItem format [QGVAR(%1), _color];
ACE_player setUnitLoadout _loadout;
ACE_player removeItem format [QGVAR(%1), _color];
}, [_loadout, _color]] call CBA_fnc_execNextFrame;
} else {
//remove carried flag
private _flagTexture = getForcedFlagTexture player;
private _flagTexture = getForcedFlagTexture ACE_player;
if !(_flagTexture isEqualTo "") then {
player forceFlagTexture "";
ACE_player forceFlagTexture "";
private _flagColorPath = _flagTexture splitString "_";
reverse _flagColorPath;
private _flagColor = _flagColorPath select 1;
player addItem format [QGVAR(%1), _flagColor];
ACE_player addItem format [QGVAR(%1), _flagColor];
};
};
6 changes: 3 additions & 3 deletions addons/items/functions/fnc_pickupItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ private _pickupItem = [
params ["_obj", "", "_ACEargs"];
_ACEargs params ["_userCode", "_args"];

player playAction "PutDown";
ACE_player playAction "PutDown";

[{((animationState player) select [25,7]) isEqualTo "putdown"}, {
[{((animationState ACE_player) select [25,7]) isEqualTo "putdown"}, {
params ["_obj", "_userCode", "_args"];

// Call custom code
if !(isNil "_userCode") then {
[_obj, player, _args] call _userCode;
[_obj, ACE_player, _args] call _userCode;
};

// Remove the object
Expand Down
22 changes: 11 additions & 11 deletions addons/items/functions/fnc_placeItem.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ CHECK(_classname isEqualTo "");

// Create local object
private _obj = _classname createVehicleLocal [0, 0, 0];
_obj disableCollisionWith player;
_obj disableCollisionWith ACE_player;

// Set object start height
GVAR(objectHeight) = _startHeight;

// Call custom code
if !(isNil "_beforeCode") then {
[_obj, player, _args] call _beforeCode;
[_obj, ACE_player, _args] call _beforeCode;
};

GVAR(isPlacing) = PLACE_WAITING;
Expand All @@ -68,7 +68,7 @@ if (_objName isEqualTo "") then {
private _placeItemText = format [LLSTRING(placeItem), _objName];
[_placeItemText, LLSTRING(cancel), LLSTRING(adjustHeight)] call ace_interaction_fnc_showMouseHint;

private _mouseClickID = [player, "DefaultAction", {GVAR(isPlacing) isEqualTo PLACE_WAITING}, {GVAR(isPlacing) = PLACE_APPROVE}] call ace_common_fnc_addActionEventHandler;
private _mouseClickID = [ACE_player, "DefaultAction", {GVAR(isPlacing) isEqualTo PLACE_WAITING}, {GVAR(isPlacing) = PLACE_APPROVE}] call ace_common_fnc_addActionEventHandler;

// Leave index 0 free for global object
private _pickupArgs = [objNull, _objName, _pickupCode, _args, _pickupIcon, _pickupAcPos, _pickupAcRad];
Expand All @@ -77,22 +77,22 @@ private _pickupArgs = [objNull, _objName, _pickupCode, _args, _pickupIcon, _pick
params ["_PFHArgs", "_PFHID"];
_PFHArgs params ["_obj", "_classname", "_afterCode", "_mouseClickID", "_pickupArgs"];

if ((isNull _obj) || {!([player, _obj] call ace_common_fnc_canInteractWith)}) then {
if ((isNull _obj) || {!([ACE_player, _obj] call ace_common_fnc_canInteractWith)}) then {
GVAR(isPlacing) = PLACE_CANCEL;
};

if !(GVAR(isPlacing) isEqualTo PLACE_WAITING) exitWith {
[_PFHID] call CBA_fnc_removePerFrameHandler;
call ace_interaction_fnc_hideMouseHint;
[player, "DefaultAction", _mouseClickID] call ace_common_removeActionEventHandler;
[ACE_player, "DefaultAction", _mouseClickID] call ace_common_removeActionEventHandler;

if (GVAR(isPlacing) isEqualTo PLACE_APPROVE) then {
GVAR(isPlacing) = PLACE_CANCEL;

// End position of the object
player playAction "putdown";
ACE_player playAction "putdown";

[{(animationState player select [25, 7]) isEqualTo "putdown"}, {
[{(animationState ACE_player select [25, 7]) isEqualTo "putdown"}, {
params ["_obj", "_classname", "_afterCode", "_pickupArgs"];

// Save positon and direction
Expand All @@ -105,7 +105,7 @@ private _pickupArgs = [objNull, _objName, _pickupCode, _args, _pickupIcon, _pick
// Call custom code
if !(isNil "_afterCode") then {
private _args = _pickupArgs select 3;
[_globalObj, player, _args] call _afterCode;
[_globalObj, ACE_player, _args] call _afterCode;
};

// Apply same positon and direction as local object
Expand All @@ -123,10 +123,10 @@ private _pickupArgs = [objNull, _objName, _pickupCode, _args, _pickupIcon, _pick
};

// Alternativ to "player getRelPos [MAX_DISTANCE, 0]" because flag wasn't in the center of the view
private _pos = ((eyePos player) vectorAdd ((getCameraViewDirection player) vectorMultiply MAX_DISTANCE));
private _pos = ((eyePos ACE_player) vectorAdd ((getCameraViewDirection ACE_player) vectorMultiply MAX_DISTANCE));
// Adjust height of flag with the scroll wheel
_pos set [2, ((getPosWorld player) select 2) + GVAR(objectHeight)];
_pos set [2, ((getPosWorld ACE_player) select 2) + GVAR(objectHeight)];

_obj setPosWorld _pos;
_obj setDir (getDir player);
_obj setDir (getDir ACE_player);
}, 0, [_obj, _classname, _afterCode, _mouseClickID, _pickupArgs]] call CBA_fnc_addPerFrameHandler;
4 changes: 2 additions & 2 deletions addons/main/script_version.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MAJOR 1
#define MINOR 4
#define PATCHLVL 1
#define BUILD 220327
#define PATCHLVL 2
#define BUILD 220424
2 changes: 1 addition & 1 deletion addons/map/XEH_postInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if (!isNull (configFile >> "CfgVehicles" >> _worldMap)) then {
["visibleMap", {
params ["_unit", "_isMapShown"];

if (player isEqualTo _unit && !_isMapShown && !isNull GVAR(map)) then {
if (ACE_player isEqualTo _unit && !_isMapShown && !isNull GVAR(map)) then {
if (!GVAR(hasMap)) then {
[_unit] call FUNC(removeMap);
};
Expand Down
2 changes: 1 addition & 1 deletion addons/map/functions/fnc_addPlaceMapAction.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,4 @@ private _placeMapAction = [
}
] call ace_interact_menu_fnc_createAction;

[(typeOf player), 1, ["ACE_SelfActions", "ACE_Equipment"], _placeMapAction] call ace_interact_menu_fnc_addActionToClass;
[(typeOf ACE_player), 1, ["ACE_SelfActions", "ACE_Equipment"], _placeMapAction] call ace_interact_menu_fnc_addActionToClass;
10 changes: 7 additions & 3 deletions addons/whistle/functions/fnc_blowWhistle.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@
* Nothing.
*
* Example:
* call mts_whistle_fnc_blowWhistle
* [player] call mts_whistle_fnc_blowWhistle
*
*/

if (QGVAR(FOX40) in ([player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems) && {!GVAR(soundIsPlaying)}) then {
params [["_player", objNull, [objNull]]];

CHECK(isNull _player);

if (QGVAR(FOX40) in ([_player, false, true, true, true, false] call CBA_fnc_uniqueUnitItems) && {!GVAR(soundIsPlaying)}) then {
GVAR(soundIsPlaying) = true;

[player, [QGVAR(FOX40Sound), 300]] remoteExecCall ["say3D"];
[_player, [QGVAR(FOX40Sound), 300]] remoteExecCall ["say3D"];

[{
GVAR(soundIsPlaying) = false;
Expand Down
Loading

0 comments on commit 952718b

Please sign in to comment.