bounty boards

This commit is contained in:
iAmAsval
2021-12-06 23:03:25 +01:00
parent 9d2181b260
commit 354401a24a
2 changed files with 15 additions and 15 deletions

View File

@@ -89,11 +89,11 @@ namespace FModel.ViewModels
set => SetProperty(ref _brVendingMachines, value, "ApolloGameplay_VendingMachines");
}
private bool _brFireflies;
public bool BrFireflies
private bool _brBountyBoards;
public bool BrBountyBoards
{
get => _brFireflies;
set => SetProperty(ref _brFireflies, value, "ApolloGameplay_Fireflies");
get => _brBountyBoards;
set => SetProperty(ref _brBountyBoards, value, "ApolloGameplay_BountyBoards");
}
private bool _prLandmarks;
@@ -267,8 +267,8 @@ namespace FModel.ViewModels
case "ApolloGameplay_VendingMachines":
await LoadBrVendingMachines();
break;
case "ApolloGameplay_Fireflies":
await LoadFireflies();
case "ApolloGameplay_BountyBoards":
await LoadBountyBoards();
break;
case "PapayaGameplay_CannonballGame":
await LoadCannonballGame();
@@ -808,19 +808,19 @@ namespace FModel.ViewModels
});
}
private async Task LoadFireflies()
private async Task LoadBountyBoards()
{
await _threadWorkerView.Begin(_ =>
{
_fillPaint.StrokeWidth = 5;
var firefliesBitmap = new SKBitmap(_widthHeight, _widthHeight, SKColorType.Rgba8888, SKAlphaType.Premul);
using var c = new SKCanvas(firefliesBitmap);
var bountyBoardsBitmap = new SKBitmap(_widthHeight, _widthHeight, SKColorType.Rgba8888, SKAlphaType.Premul);
using var c = new SKCanvas(bountyBoardsBitmap);
var exports = Utils.LoadExports("FortniteGame/Content/Athena/Apollo/Maps/Special/ItemCollections/Apollo_Item_Fireflies");
var exports = Utils.LoadExports("Bounties/Maps/BB_Overlay_S19_ServiceStations.umap");
foreach (var export in exports)
{
if (!export.ExportType.Equals("BP_BGACSpawner_Fireflies_C", StringComparison.OrdinalIgnoreCase)) continue;
var displayName = $"FF_{export.Name["BP_BGACSpawnerFireFlies".Length..]}";
if (!export.ExportType.Equals("B_Bounties_Spawner_BountyBoard_C", StringComparison.OrdinalIgnoreCase)) continue;
var displayName = $"BountyBoard_{export.Name["BP_BountyBoard_C_".Length..]}";
if (!export.TryGetValue(out FPackageIndex rootComponent, "RootComponent") ||
!Utils.TryGetPackageIndexExport(rootComponent, out UObject uObject) ||
@@ -832,7 +832,7 @@ namespace FModel.ViewModels
c.DrawText(displayName, vector.X, vector.Y - 12.5F, _textPaint);
}
_bitmaps[0]["ApolloGameplay_Fireflies"] = new MapLayer {Layer = firefliesBitmap, IsEnabled = false};
_bitmaps[0]["ApolloGameplay_BountyBoards"] = new MapLayer {Layer = bountyBoardsBitmap, IsEnabled = false};
});
}

View File

@@ -37,8 +37,8 @@
<!-- DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.MapViewer}}}" IsEnabled="{Binding IsReady}" /> -->
<CheckBox Content="Weapon-o-matic/Mending Machines" Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" IsChecked="{Binding MapViewer.BrVendingMachines}"
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.MapViewer}}}" IsEnabled="{Binding IsReady}" />
<!-- <CheckBox Content="Fireflies" Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" IsChecked="{Binding MapViewer.BrFireflies}" -->
<!-- DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.MapViewer}}}" IsEnabled="{Binding IsReady}" /> -->
<CheckBox Content="Bounty Boards" Style="{DynamicResource {x:Static adonisUi:Styles.ToggleSwitch}}" IsChecked="{Binding MapViewer.BrBountyBoards}"
DataContext="{Binding DataContext, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:Views.MapViewer}}}" IsEnabled="{Binding IsReady}" />
</StackPanel>
</DataTemplate>
<DataTemplate x:Key="PrTemplate">