Skip to content

Commit

Permalink
Coalition fixes
Browse files Browse the repository at this point in the history
ClearText hints
Removed Jump highlight from pochven systems on the universe map
Added the basic highsec/lowsec/nullsec colourings to the universe map
  • Loading branch information
BitBaboonSteve committed Oct 12, 2022
1 parent 27de8b6 commit fd0793a
Show file tree
Hide file tree
Showing 10 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion ESI.net/ESI.NET/ESI.NET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<Version>2021.12.12</Version>
<Authors>Psianna Archeia</Authors>
<Company>Sukebe Corporation</Company>
Expand Down
1 change: 1 addition & 0 deletions EVEData/EVEData.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>net6.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 2 additions & 0 deletions EVEData/EveManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public EveManager(string version)
NameToSystem = new Dictionary<string, System>();

ServerInfo = new EVEData.Server();
Coalitions = new List<Coalition>();

}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion EVEData/Navigation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public static List<string> GetSystemsWithinXLYFrom(string start, double LY, bool
shouldAdd = false;
}

if(sys.Pochven &! includePochvenSystems)
if(sys.Pochven & !includePochvenSystems)
{
shouldAdd = false;
}
Expand Down
8 changes: 4 additions & 4 deletions SMT/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

x:Class="SMT.MainWindow"
mc:Ignorable="d"
Title="SMT" Height="850" Width="1124" Icon="smt_bomb_icon.ico" ResizeMode="CanResizeWithGrip">
Title="SMT" Height="850" Width="1124" Icon="smt_bomb_icon.ico" ResizeMode="CanResizeWithGrip" TextOptions.TextFormattingMode="Display" RenderOptions.ClearTypeHint="Enabled">

<Window.Resources>

Expand Down Expand Up @@ -111,7 +111,7 @@
<xcadl:LayoutAnchorSide>
<xcadl:LayoutAnchorGroup>

<xcadl:LayoutAnchorable Title="Local" CanClose="False" CanAutoHide="True" CanHide="False" ContentId="LocalContentID" AutoHideMinHeight="200" AutoHideMinWidth="280" >
<!-- <xcadl:LayoutAnchorable Title="Local" CanClose="False" CanAutoHide="True" CanHide="False" ContentId="LocalContentID" AutoHideMinHeight="200" AutoHideMinWidth="280" >
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="50" />
Expand All @@ -131,8 +131,8 @@
</Grid>
</xcadl:LayoutAnchorable>

</xcadl:LayoutAnchorable>
-->

<xcadl:LayoutAnchorable Title="Anoms" CanClose="False" CanAutoHide="True" CanHide="False" ContentId="AnomsContentID" AutoHideMinHeight="200" AutoHideMinWidth="280" x:Name="avlpAnoms">
<Grid x:Name="MainAnomGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
Expand Down
10 changes: 7 additions & 3 deletions SMT/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1978,7 +1978,7 @@ struct LocalScanCharacterInfo
private async void localScanInput_TextChanged(object sender, TextChangedEventArgs e)
{
// look up every character
string[] characterNameArray = localScanInput.Text.Split("\n", StringSplitOptions.RemoveEmptyEntries); ;
/* string[] characterNameArray = localScanInput.Text.Split("\n", StringSplitOptions.RemoveEmptyEntries); ;
List<ESI.NET.Models.Universe.ResolvedInfo> parseResults = new List<ESI.NET.Models.Universe.ResolvedInfo>();
Expand Down Expand Up @@ -2158,25 +2158,29 @@ await Task.Run(async () =>
}
}
*/
}




private void btnClearLocal_Click(object sender, RoutedEventArgs e)
{
localScanResults.Items.Clear();
/* localScanResults.Items.Clear();
localScanInput.Text = "";
*/
}

private void localScanResults_MouseDoubleClick(object sender, MouseButtonEventArgs e)
{
if (localScanResults.SelectedItem is LocalScanCharacterInfo lcsi)
/* if (localScanResults.SelectedItem is LocalScanCharacterInfo lcsi)
{
string KillURL = "https://zkillboard.com/character/" + lcsi.ID + "/";
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(KillURL) { UseShellExecute = true });
}
*/
}
}

Expand Down
2 changes: 1 addition & 1 deletion SMT/MapConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -862,7 +862,7 @@ public void SetDefaultColours()
FleetMemberTextColour = Colors.White,

JumpRangeInColour = Color.FromRgb(255, 165, 0),
JumpRangeInColourHighlight = Color.FromArgb(20, 82, 135, 155),
JumpRangeInColourHighlight = Color.FromArgb(20, 82, 135, 125),
JumpRangeOverlapHighlight = Colors.DarkBlue,

ActiveIncursionColour = Color.FromRgb(110, 82, 77),
Expand Down
2 changes: 1 addition & 1 deletion SMT/SMT.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<PropertyGroup>
<SignManifests>false</SignManifests>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>
<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<RunAnalyzersDuringLiveAnalysis>True</RunAnalyzersDuringLiveAnalysis>
<AnalysisLevel>latest-all</AnalysisLevel>
<PlatformTarget>x64</PlatformTarget>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
Expand Down
41 changes: 39 additions & 2 deletions SMT/UniverseControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ private void SetJumpRange_Click(object sender, RoutedEventArgs e)
double Distance = EM.GetRangeBetweenSystems(kvp.Key, es.Name);
Distance = Distance / 9460730472580800.0;

if (Distance < kvp.Value && Distance > 0.0 && es.TrueSec <= 0.45)
if (Distance < kvp.Value && Distance > 0.0 && es.TrueSec <= 0.45 && es.Region != "Pochven")
{
if (inRange == true)
{
Expand Down Expand Up @@ -696,12 +696,18 @@ private void UniverseControl_PropertyChanged(object sender, PropertyChangedEvent
}

private Brush SystemColourBrush;
private Brush SystemColourHiSecBrush;
private Brush SystemColourLowSecBrush;
private Brush SystemColourNullSecBrush;
private Brush SystemColourOutlineBrush;

private Brush ConstellationColourBrush;
private Brush SystemTextColourBrush;
private Brush RegionTextColourBrush;
private Brush RegionTextZoomedOutColourBrush;
private Brush GateColourBrush;
private Brush RegionGateColourBrush;
private Brush PochvenGateColourBrush;
private Brush JumpBridgeColourBrush;
private Brush DataColourBrush;
private Brush BackgroundColourBrush;
Expand All @@ -723,6 +729,11 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas
if (FullRedraw)
{
SystemColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.UniverseSystemColour);
SystemColourHiSecBrush = new SolidColorBrush(MapColours.GetSecStatusColour(1.0, false));
SystemColourLowSecBrush = new SolidColorBrush(MapColours.GetSecStatusColour(0.4, false));
SystemColourNullSecBrush = new SolidColorBrush(MapColours.GetSecStatusColour(-0.5, true));
SystemColourOutlineBrush = new SolidColorBrush(Colors.Black);

ConstellationColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.UniverseConstellationGateColour);
SystemTextColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.UniverseSystemTextColour);
RegionTextColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.RegionMarkerTextColour);
Expand All @@ -732,6 +743,7 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas
DataColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.ESIOverlayColour);
BackgroundColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.UniverseMapBackgroundColour);
RegionGateColourBrush = new SolidColorBrush(MapConf.ActiveColourScheme.UniverseRegionGateColour);
PochvenGateColourBrush = new SolidColorBrush(Colors.DimGray);

Color RegionShapeFillCol = MapConf.ActiveColourScheme.UniverseMapBackgroundColour;
RegionShapeFillCol.R = (Byte)(RegionShapeFillCol.R * 0.9);
Expand All @@ -741,7 +753,13 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas
RegionShapeColourBrush = new SolidColorBrush(RegionShapeFillCol);

SystemColourBrush.Freeze();
SystemColourHiSecBrush.Freeze();
SystemColourLowSecBrush.Freeze();
SystemColourNullSecBrush.Freeze();
SystemColourOutlineBrush.Freeze();

ConstellationColourBrush.Freeze();

SystemTextColourBrush.Freeze();
RegionTextColourBrush.Freeze();
GateColourBrush.Freeze();
Expand Down Expand Up @@ -780,6 +798,8 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas
Pen GatePen = new Pen(GateColourBrush, 0.6);
Pen ConstGatePen = new Pen(ConstellationColourBrush, 0.6);
Pen RegionGatePen = new Pen(RegionGateColourBrush, 0.8);
Pen SysOutlinePen = new Pen(SystemColourOutlineBrush, 0.3);
Pen PochvenGatePen = new Pen(PochvenGateColourBrush, 0.3);

System.Windows.Media.DrawingVisual gatesDrawingVisual = new System.Windows.Media.DrawingVisual();
DrawingContext gatesDrawingContext = gatesDrawingVisual.RenderOpen();
Expand All @@ -803,6 +823,11 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas
p = RegionGatePen;
}

if(gh.from.Region == "Pochven")
{
p = PochvenGatePen;
}

gatesDrawingContext.DrawLine(p, new Point(X1, Y1), new Point(X2, Y2));
}

Expand Down Expand Up @@ -856,7 +881,19 @@ public void ReDrawMap(bool FullRedraw = false, bool DataRedraw = false, bool Fas

// Create a rectangle and draw it in the DrawingContext.
Rect rect = new Rect(X - 2, Z - 2, 4, 4);
drawingContext.DrawRectangle(SystemColourBrush, null, rect);


Brush sysbrush = SystemColourNullSecBrush;
if (sys.TrueSec >= 0.45)
{
sysbrush = SystemColourHiSecBrush;
}
else if (sys.TrueSec > 0.0)
{
sysbrush = SystemColourLowSecBrush;
}

drawingContext.DrawRectangle(sysbrush, SysOutlinePen, rect);

// Persist the drawing content.
drawingContext.Close();
Expand Down
2 changes: 2 additions & 0 deletions Utils/Utils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<EnforceCodeStyleInBuild>True</EnforceCodeStyleInBuild>
<RunAnalyzersDuringBuild>False</RunAnalyzersDuringBuild>

</PropertyGroup>

Expand Down

0 comments on commit fd0793a

Please sign in to comment.