Skip to content

Commit a3fe530

Browse files
committed
Merge draft placement with existing markers
1 parent 0f0a4e6 commit a3fe530

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

WaymarkStudio/WaymarkManager.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,11 +237,16 @@ or ContentType.VCDungeonFinder
237237
return PlacementUnsafeReason.Safe;
238238
}
239239

240-
public void SafePlacePreset(WaymarkPreset preset, bool clearPlaceholder = true)
240+
public void SafePlacePreset(WaymarkPreset preset, bool clearPlaceholder = true, bool mergeNative = false)
241241
{
242242
if (preset.MarkerPositions.Count > 0)
243243
if (IsSafeToDirectPlacePreset())
244244
{
245+
if (mergeNative)
246+
foreach ((Waymark w, Vector3 p) in Plugin.WaymarkManager.Waymarks)
247+
if (!preset.MarkerPositions.ContainsKey(w))
248+
preset.MarkerPositions.Add(w, p);
249+
245250
UnsafeNativePlacePreset(preset.ToGamePreset());
246251
if (clearPlaceholder) Plugin.WaymarkManager.ClearPlaceholders();
247252
}

WaymarkStudio/Windows/StudioWindow.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ internal void DrawDraftSection()
154154
{
155155
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.MapMarkedAlt, "Place Draft"))
156156
{
157-
Plugin.WaymarkManager.SafePlacePreset(Plugin.WaymarkManager.DraftPreset);
157+
Plugin.WaymarkManager.SafePlacePreset(Plugin.WaymarkManager.DraftPreset, mergeNative: true);
158158
}
159-
HoverTooltip("Replace draft markers with real markers\nTBD how existing waymarks should be treated");
159+
HoverTooltip("Replace draft markers with real markers");
160160
}
161161
}
162162

0 commit comments

Comments
 (0)