Promote VFX markers to proper traps

rendering v2.9
Liza 2023-02-08 20:41:45 +01:00
parent 7122a07a28
commit 11197c7bef
8 changed files with 8 additions and 21 deletions

View File

@ -62,7 +62,7 @@ namespace Pal.Client
localState = new LocalState(territoryType)
{
Markers = new ConcurrentBag<Marker>(save.Markers.Where(o => o.Type != Marker.EType.Debug)),
Markers = new ConcurrentBag<Marker>(save.Markers.Where(o => o.Type == Marker.EType.Trap || o.Type == Marker.EType.Hoard)),
};
version = save.Version;
}

View File

@ -88,7 +88,7 @@ namespace Pal.Client
}
public bool IsPermanent() => Type == EType.Trap || Type == EType.Hoard || Type == EType.Debug;
public bool IsPermanent() => Type == EType.Trap || Type == EType.Hoard;
public enum EType
{
@ -97,7 +97,9 @@ namespace Pal.Client
#region Permanent Markers
Trap = ObjectType.Trap,
Hoard = ObjectType.Hoard,
Debug = ObjectType.Debug,
[Obsolete]
Debug = 3,
#endregion
# region Markers that only show up if they're currently visible

View File

@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<LangVersion>11.0</LangVersion>
<Version>2.8</Version>
<Version>2.9</Version>
<Nullable>enable</Nullable>
</PropertyGroup>

View File

@ -167,10 +167,6 @@ namespace Pal.Client
DebugNearest(m => m.Type == Marker.EType.Hoard);
break;
case "dnear":
DebugNearest(m => m.Type == Marker.EType.Debug);
break;
default:
Service.Chat.PrintError($"[Palace Pal] Unknown sub-command '{arguments}' for '{command}'.");
break;
@ -402,10 +398,6 @@ namespace Pal.Client
{
CreateRenderElement(marker, elements, DetermineColor(marker, visibleMarkers));
}
else if (marker.Type == Marker.EType.Debug && Service.Configuration.BetaKey == "VFX")
{
CreateRenderElement(marker, elements, DetermineColor(marker, visibleMarkers));
}
}
}
@ -626,7 +618,7 @@ namespace Pal.Client
{
var obj = Service.ObjectTable.FirstOrDefault(x => x.Address == address);
if (obj != null && obj.Position.Length() > 0.1)
result.Add(new Marker(Marker.EType.Debug, obj.Position) { Seen = true });
result.Add(new Marker(Marker.EType.Trap, obj.Position) { Seen = true });
}
return result;

View File

@ -10,7 +10,6 @@ namespace Pal.Client.Rendering
{ Marker.EType.Trap, new MarkerConfig { Radius = 1.7f } },
{ Marker.EType.Hoard, new MarkerConfig { Radius = 1.7f, OffsetY = -0.03f } },
{ Marker.EType.SilverCoffer, new MarkerConfig { Radius = 1f } },
{ Marker.EType.Debug, new MarkerConfig { Radius = 1.7f, OffsetY = 0.1f } },
};
public float OffsetY { get; set; } = 0;

View File

@ -126,7 +126,6 @@ namespace Pal.Client.Rendering
goto case Marker.EType.Trap;
case Marker.EType.Trap:
case Marker.EType.Debug:
var playerPos = Service.ClientState.LocalPlayer?.Position;
if (playerPos == null)
return;

View File

@ -336,11 +336,6 @@ namespace Pal.Client.Windows
int silverCoffers = plugin.EphemeralMarkers.Count(x => x.Type == Marker.EType.SilverCoffer);
ImGui.Text($"{silverCoffers} silver coffer{(silverCoffers == 1 ? "" : "s")} visible on current floor");
}
if (Service.Configuration.BetaKey == "VFX")
{
int debugMarkers = currentFloor.Markers.Count(x => x.Type == Marker.EType.Debug);
ImGui.Text($"{debugMarkers} debug marker{(debugMarkers == 1 ? "" : "s")}");
}
ImGui.Text($"Pomander of Sight: {plugin.PomanderOfSight}");
ImGui.Text($"Pomander of Intuition: {plugin.PomanderOfIntuition}");

View File

@ -68,5 +68,5 @@ enum ObjectType {
// Objects only really used for debugging, may not return any objects at any point in time.
// Semi-Permanent: Not saved locally, but saved on the server.
OBJECT_TYPE_DEBUG = 3;
reserved 3;
}