add dotnet-format as pre-commit hook
This commit is contained in:
parent
e6c56e5bce
commit
3c6822aa64
7
.githooks/pre-commit
Executable file
7
.githooks/pre-commit
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Use with:
|
||||
#
|
||||
# $> git config core.hooksPath .githooks
|
||||
#
|
||||
dotnet format --exclude vendor/
|
@ -14,7 +14,7 @@ namespace Pal.Client
|
||||
{
|
||||
private static readonly JsonSerializerOptions _jsonSerializerOptions = new JsonSerializerOptions { IncludeFields = true };
|
||||
private static readonly int _currentVersion = 3;
|
||||
|
||||
|
||||
public uint TerritoryType { get; set; }
|
||||
public ConcurrentBag<Marker> Markers { get; set; } = new();
|
||||
|
||||
|
@ -14,8 +14,8 @@ namespace Pal.Client.Net
|
||||
_name = name;
|
||||
}
|
||||
|
||||
public IDisposable BeginScope<TState>(TState state)
|
||||
where TState: notnull
|
||||
public IDisposable BeginScope<TState>(TState state)
|
||||
where TState : notnull
|
||||
=> NullScope.Instance;
|
||||
|
||||
public bool IsEnabled(LogLevel logLevel) => logLevel != LogLevel.None;
|
||||
|
@ -190,7 +190,7 @@ namespace Pal.Client
|
||||
{
|
||||
Splatoon.RemoveDynamicElements(SPLATOON_TRAP_HOARD);
|
||||
Splatoon.RemoveDynamicElements(SPLATOON_REGULAR_COFFERS);
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
// destroyed on territory change either way
|
||||
@ -335,7 +335,7 @@ namespace Pal.Client
|
||||
// markers discovered afterwards are automatically marked seen.
|
||||
if (accountId != null && knownMarker.NetworkId != null && !knownMarker.RemoteSeenRequested && !knownMarker.RemoteSeenOn.Contains(accountId.Value))
|
||||
updateSeenMarkers = true;
|
||||
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -667,7 +667,7 @@ namespace Pal.Client
|
||||
case 2009504:
|
||||
result.Add(new Marker(Marker.EType.Trap, obj.Position) { Seen = true });
|
||||
break;
|
||||
|
||||
|
||||
case 2007542:
|
||||
case 2007543:
|
||||
result.Add(new Marker(Marker.EType.Hoard, obj.Position) { Seen = true });
|
||||
@ -683,11 +683,11 @@ namespace Pal.Client
|
||||
}
|
||||
|
||||
internal bool IsInDeepDungeon() =>
|
||||
Service.ClientState.IsLoggedIn
|
||||
Service.ClientState.IsLoggedIn
|
||||
&& Service.Condition[ConditionFlag.InDeepDungeon]
|
||||
&& typeof(ETerritoryType).IsEnumDefined(Service.ClientState.TerritoryType);
|
||||
|
||||
internal static Element CreateSplatoonElement(Marker.EType type, Vector3 pos, Vector4 color, bool fill = false)
|
||||
internal static Element CreateSplatoonElement(Marker.EType type, Vector3 pos, Vector4 color, bool fill = false)
|
||||
=> CreateSplatoonElement(type, pos, ImGui.ColorConvertFloat4ToU32(color), fill);
|
||||
|
||||
internal static Element CreateSplatoonElement(Marker.EType type, Vector3 pos, uint color, bool fill = false)
|
||||
|
@ -74,7 +74,7 @@ namespace Pal.Client.Windows
|
||||
territoryStatistics.TrapCount = null;
|
||||
territoryStatistics.HoardCofferCount = null;
|
||||
}
|
||||
|
||||
|
||||
foreach (var floor in floorStatistics)
|
||||
{
|
||||
if (_territoryStatistics.TryGetValue((ETerritoryType)floor.TerritoryType, out TerritoryStatistics? territoryStatistics))
|
||||
|
Loading…
Reference in New Issue
Block a user