diff --git a/mods/egocaribautomapmarkers/egocaribautomapmarkers.csproj b/mods/egocaribautomapmarkers/egocaribautomapmarkers.csproj
index 95b2230..64b29ed 100644
--- a/mods/egocaribautomapmarkers/egocaribautomapmarkers.csproj
+++ b/mods/egocaribautomapmarkers/egocaribautomapmarkers.csproj
@@ -17,7 +17,7 @@
true
full
false
- $(ProjectDir)\bin
+ bin\Debug\
..\..\obj\Debug\egocaribautomapmarkers\
DEBUG;TRACE
prompt
@@ -50,6 +50,10 @@
..\..\..\..\..\..\AppData\Roaming\Vintagestory\Lib\cairo-sharp.dll
False
+
+ False
+ ..\..\..\..\..\..\AppData\Roaming\Vintagestory\Lib\Newtonsoft.Json.dll
+
..\..\..\..\..\..\AppData\Roaming\Vintagestory\Lib\protobuf-net.dll
False
@@ -79,10 +83,6 @@
..\..\..\..\..\..\AppData\Roaming\Vintagestory\Mods\VSCreativeMod.dll
False
-
- D:\Program Files\Vintagestory\Lib\Newtonsoft.Json.dll
- False
-
@@ -112,6 +112,7 @@
+
diff --git a/mods/egocaribautomapmarkers/egocaribautomapmarkers.dll b/mods/egocaribautomapmarkers/egocaribautomapmarkers.dll
index 406c9a9..b545047 100644
Binary files a/mods/egocaribautomapmarkers/egocaribautomapmarkers.dll and b/mods/egocaribautomapmarkers/egocaribautomapmarkers.dll differ
diff --git a/mods/egocaribautomapmarkers/egocaribautomapmarkers.pdb b/mods/egocaribautomapmarkers/egocaribautomapmarkers.pdb
index 2d32bf5..0947b64 100644
Binary files a/mods/egocaribautomapmarkers/egocaribautomapmarkers.pdb and b/mods/egocaribautomapmarkers/egocaribautomapmarkers.pdb differ
diff --git a/mods/egocaribautomapmarkers/modinfo.json b/mods/egocaribautomapmarkers/modinfo.json
index e654800..fb89fd4 100644
--- a/mods/egocaribautomapmarkers/modinfo.json
+++ b/mods/egocaribautomapmarkers/modinfo.json
@@ -4,10 +4,10 @@
"name": "Auto Map Markers",
"authors": [ "egocarib" ],
"description": "Automatically adds map markers to your map when you interact with certain objects. Fully configurable.",
- "version": "2.5.0",
+ "version": "2.6.0",
"requiredOnServer": true,
"requiredOnClient": true,
"dependencies": {
- "game": "1.18.0"
+ "game": "1.18.6-rc.2"
}
}
diff --git a/mods/egocaribautomapmarkers/src/GUI/MapMarkerGUI.cs b/mods/egocaribautomapmarkers/src/GUI/MapMarkerGUI.cs
index 8e36196..33ac08a 100644
--- a/mods/egocaribautomapmarkers/src/GUI/MapMarkerGUI.cs
+++ b/mods/egocaribautomapmarkers/src/GUI/MapMarkerGUI.cs
@@ -29,6 +29,9 @@ public class MapMarkerGUI : GuiDialog
public int DynamicDrawColor;
private Action RegisterCustomHotkeys;
private Action RegisterDeleteHotkey;
+ public string[] iconsPrefixed;
+ public string[] icons;
+ public string[] iconsVTML;
public override string ToggleKeyCombinationCode { get { return HotkeyCode; } }
@@ -54,6 +57,7 @@ public override void OnGuiOpened()
{
ModSettings = MapMarkerConfig.GetSettings(capi);
AutoMapMarkerSettings = ModSettings.GetMapMarkerSettingCollection();
+ LoadIconStrings();
SetupDialog();
}
catch (Exception e)
@@ -63,15 +67,38 @@ public override void OnGuiOpened()
base.OnGuiOpened();
}
+ ///
+ /// Loads all the world map waypoint icons, which typically are loaded from the following directory:
+ /// %appdata%\Roaming\Vintagestory\assets\survival\textures\icons\worldmap
+ ///
+ private void LoadIconStrings()
+ {
+ iconsPrefixed = capi.Gui.Icons.CustomIcons.Keys
+ .Where(k => k.Substring(0,2) == "wp" && k != "wpCross" && k.Length > 2)
+ .ToArray();
+ List tmpStrings = new List();
+ foreach (string icon in iconsPrefixed)
+ {
+ //example: wpBee -> bee
+ string s = icon.Substring(2, 1).ToLower() + (icon.Length > 3 ? icon.Substring(3) : "");
+ tmpStrings.Add(s);
+ }
+ icons = tmpStrings.ToArray();
+ tmpStrings.Clear();
+ foreach (string icon in iconsPrefixed)
+ {
+ //example: wpBee ->
+ string s = $"";
+ tmpStrings.Add(s);
+ }
+ iconsVTML = tmpStrings.ToArray();
+ }
+
///
/// Composes or re-composes the GUI. Called each time the menu tab changes or an option is toggled off/on
///
private void SetupDialog()
{
- // Icon info
- string[] icons = MapMarkerConfig.Settings.Icons.Split(',');
- string[] iconsVTML = MapMarkerConfig.Settings.IconsVTML.Split(',');
-
CairoFont headerFont = CairoFont.WhiteSmallishText().Clone().WithWeight(Cairo.FontWeight.Bold);
headerFont.Color[3] = 0.6; // Adjust transparency
CairoFont disabledFont = CairoFont.WhiteSmallishText().Clone().WithSlant(FontSlant.Italic);
diff --git a/mods/egocaribautomapmarkers/src/Settings/MapMarkerConfig.cs b/mods/egocaribautomapmarkers/src/Settings/MapMarkerConfig.cs
index 6449192..f477dd4 100644
--- a/mods/egocaribautomapmarkers/src/Settings/MapMarkerConfig.cs
+++ b/mods/egocaribautomapmarkers/src/Settings/MapMarkerConfig.cs
@@ -21,8 +21,6 @@ public static class MapMarkerConfig
public class Settings
{
private OrderedDictionary> _MapMarkerSettingsCollection = null;
- public const string Icons = "circle,bee,cave,home,ladder,pick,rocks,ruins,spiral,star1,star2,trader,vessel";
- public const string IconsVTML = ",,,,,,,,,,,,";
[ProtoMember(1, IsRequired = true)]
public bool ChatNotifyOnWaypointCreation = false;