From c1d793503759934fd809effd7c1c9bd697d2ed88 Mon Sep 17 00:00:00 2001 From: eraser1 Date: Mon, 11 Jul 2016 17:19:05 -0500 Subject: [PATCH] Potato! --- @ExileServer/addons/a3_dms/config.sqf | 1 + .../addons/a3_dms/fn_DMS_postInit.sqf | 45 +++++++++++----- .../addons/a3_dms/scripts/fn_CreateMarker.sqf | 54 ++++++++++++++----- README.md | 7 +++ 4 files changed, 80 insertions(+), 27 deletions(-) diff --git a/@ExileServer/addons/a3_dms/config.sqf b/@ExileServer/addons/a3_dms/config.sqf index b0caba2..f607d95 100644 --- a/@ExileServer/addons/a3_dms/config.sqf +++ b/@ExileServer/addons/a3_dms/config.sqf @@ -79,6 +79,7 @@ DMS_SpawnMissions_Scheduled = false; // Whether or not to spawn missions in a sc /*Mission Marker settings*/ DMS_ShowDifficultyColorLegend = true; // Whether or not to show a "color legend" at the bottom left of the map that shows which color corresponds to which difficulty. I know it's not very pretty, meh. + DMS_ShowMarkerCircle = false; // Whether or not to show the colored "circle" around a mission marker. DMS_MarkerText_ShowMissionPrefix = true; // Whether or not to place a prefix before the mission marker text. Enable this if your players get confused by the marker names :P DMS_MarkerText_MissionPrefix = "Mission:"; // The text displayed before the mission name in the mission marker. DMS_MarkerText_ShowAICount = true; // Whether or not to display the number of remaining AI in the marker name. diff --git a/@ExileServer/addons/a3_dms/fn_DMS_postInit.sqf b/@ExileServer/addons/a3_dms/fn_DMS_postInit.sqf index d7c7e54..5960882 100644 --- a/@ExileServer/addons/a3_dms/fn_DMS_postInit.sqf +++ b/@ExileServer/addons/a3_dms/fn_DMS_postInit.sqf @@ -165,27 +165,44 @@ if (DMS_ShowDifficultyColorLegend) then _title setMarkerType "mil_dot"; _title setMarkerAlpha 0.5; { - private ["_difficulty", "_color", "_num", "_pos", "_circle", "_dot"]; + private _difficulty = _x; + + private _color = "ColorGreen"; + private _markerType = "ExileMissionEasyIcon"; + - _difficulty = _x; switch (_difficulty) do { - case "easy": {_color = "ColorGreen";}; - case "moderate": {_color = "ColorYellow";}; - case "difficult": {_color = "ColorRed";}; - case "hardcore" : {_color = "ColorBlack";}; + case "moderate": + { + _color = "ColorYellow"; + _marker = "ExileMissionModerateIcon"; + }; + case "difficult": + { + _color = "ColorRed"; + _marker = "ExileMissionDifficultIcon"; + }; + case "hardcore": + { + _color = "ColorBlack"; + _marker = "ExileMissionHardcoreIcon"; + }; }; - _num = -200 * (_forEachIndex - 0.5); - _pos = [100,_num]; + private _num = -200 * (_forEachIndex - 0.5); + private _pos = [100,_num]; - _circle = createMarker [format ["DMS_MissionMarker_DifficultyColor_%1",_color], _pos]; - _circle setMarkerColor _color; - _circle setMarkerShape "ELLIPSE"; - _circle setMarkerBrush "Solid"; - _circle setMarkerSize [100,100]; + if (DMS_ShowMarkerCircle) then + { + private _circle = createMarker [format ["DMS_MissionMarker_DifficultyColor_%1",_color], _pos]; + _circle setMarkerColor _color; + _circle setMarkerShape "ELLIPSE"; + _circle setMarkerBrush "Solid"; + _circle setMarkerSize [100,100]; + }; - _dot = createMarker [format ["DMS_MissionMarker_Difficulty_%1",_difficulty],_pos]; + private _dot = createMarker [format ["DMS_MissionMarker_Difficulty_%1",_difficulty],_pos]; _dot setMarkerColor "ColorWhite"; _dot setMarkerType "mil_dot"; _dot setMarkerAlpha 0.5; diff --git a/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf b/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf index 47e09fa..92ddfc6 100644 --- a/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf +++ b/@ExileServer/addons/a3_dms/scripts/fn_CreateMarker.sqf @@ -45,18 +45,42 @@ private _randomMarker = private _num = DMS_MissionCount; -private _color = - switch (_difficulty) do +private _color = "ColorGreen"; +private _markerType = "mil_dot"; + + +switch (toLower _difficulty) do +{ + case "easy": { - case "easy": {"ColorGreen";}; - case "moderate": {"ColorYellow";}; - case "difficult": {"ColorRed";}; - case "hardcore" : {"ColorBlack";}; - default {_difficulty;}; + _color = "ColorGreen"; + _markerType = "ExileMissionEasyIcon"; + }; + case "moderate": + { + _color = "ColorYellow"; + _marker = "ExileMissionModerateIcon"; + }; + case "difficult": + { + _color = "ColorRed"; + _marker = "ExileMissionDifficultIcon"; + }; + case "hardcore": + { + _color = "ColorBlack"; + _marker = "ExileMissionHardcoreIcon"; }; + default + { + _color = _difficulty; + _marker = "mil_dot"; + }; +}; + /* -// Don't think this is really needed +// Don't think this is really needed, ArmA gives you an error anyways. if !((toLower _color) in DMS_A3_AllMarkerColors) then { diag_log format ["DMS ERROR :: Color ""%1"" is not a valid marker color! Switching to ""ColorRed""",_color]; @@ -65,14 +89,18 @@ if !((toLower _color) in DMS_A3_AllMarkerColors) then */ private _circle = createMarker [format ["DMS_MissionMarkerCircle%1_%2",_num,round(time)], _pos]; -_circle setMarkerColor _color; -_circle setMarkerShape "ELLIPSE"; -_circle setMarkerBrush "Solid"; -_circle setMarkerSize [150,150]; + +if (DMS_ShowMarkerCircle) then +{ + _circle setMarkerColor _color; + _circle setMarkerShape "ELLIPSE"; + _circle setMarkerBrush "Solid"; + _circle setMarkerSize [150,150]; +}; private _dot = createMarker [format ["DMS_MissionMarkerDot%1_%2",_num,round(time)], _pos]; _dot setMarkerColor "ColorBlack"; -_dot setMarkerType "mil_dot"; +_dot setMarkerType _markerType; _dot setMarkerText _text; missionNamespace setVariable [format ["%1_pos",_dot], _pos]; diff --git a/README.md b/README.md index b3a8ac5..c227675 100644 --- a/README.md +++ b/README.md @@ -154,6 +154,13 @@ ___ # Changelog: ### Main Branch +### July 11, 2016 (5:20 PM CST-America): +* **NEW CONFIG VALUE** + + DMS_ShowMarkerCircle +* DMS now uses the new marker icons added in Exile v1.0.0 + + ### July 9, 2016 (8:40 PM CST-America): * **NEW CONFIG VALUES**