-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
若干のリファクタリング
- Loading branch information
Showing
29 changed files
with
876 additions
and
484 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,24 @@ | ||
# TUSB ProgressViewer | ||
# TUSB ProgressViewer | ||
|
||
The Unusual SkyBlockという配布ワールドの攻略進捗等を確認できるツールです | ||
|
||
![](https://user-images.githubusercontent.com/25514849/78503623-cadb5300-77a2-11ea-9552-c48ea654ef3a.png) | ||
|
||
## 動作確認済みTUSBバージョン | ||
|
||
- v12.0.9 | ||
- v12.0.8 | ||
|
||
## 機能 | ||
|
||
- どの島を攻略したかの可視化 | ||
- エンドの未破壊スポナーの可視化 | ||
- プレイヤーの各職業レベルの確認 | ||
|
||
## 使い方 | ||
|
||
右上のTUSBアイコンが付いたボタンからTUSBのワールドフォルダを選択すると、ワールドが読み込まれ情報が表示されます | ||
|
||
## ライセンス | ||
|
||
[MIT](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
<UserControl | ||
x:Class="TUSB_ProgressViewer.Controls.DataViewer" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:model="clr-namespace:TUSB_ProgressViewer.Models" | ||
xmlns:vm="clr-namespace:TUSB_ProgressViewer.ViewModels"> | ||
<UserControl.DataContext> | ||
<vm:DataViewerViewModel/> | ||
</UserControl.DataContext> | ||
<Grid> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="300"/> | ||
<ColumnDefinition/> | ||
</Grid.ColumnDefinitions> | ||
<ListBox | ||
ItemsSource="{Binding Source={x:Static model:ScoreData.Players}}" | ||
SelectedItem="{Binding SelectedPlayer.Value}" | ||
Style="{StaticResource PlayersListStyle}"> | ||
<ListBox.ItemTemplate> | ||
<DataTemplate> | ||
<Border> | ||
<TextBlock Text="{Binding Name}"/> | ||
</Border> | ||
</DataTemplate> | ||
</ListBox.ItemTemplate> | ||
</ListBox> | ||
<UniformGrid Grid.Column="1" Columns="1"> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/iron_sword.png" Width="64"/> | ||
<TextBlock Text="Knight" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.KnightLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/snowball.png" Width="64"/> | ||
<TextBlock Text="Ninja" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.NinjaLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/bow.png" Width="64"/> | ||
<TextBlock Text="Archer" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.ArcherLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/carrot_on_a_stick.png" Width="64"/> | ||
<TextBlock Text="White Mage" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.WhiteMageLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/book.png" Width="64"/> | ||
<TextBlock Text="Black Mage" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.BlackMageLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
<UniformGrid Rows="1"> | ||
<Image Source="../Resources/wolf_spawn_egg.png" Width="64"/> | ||
<TextBlock Text="Summoner" Style="{StaticResource JobText}"/> | ||
<TextBlock Text="{Binding SelectedPlayer.Value.SummonerLevel, StringFormat=Lv.{0}}" Style="{StaticResource JobText}"/> | ||
</UniformGrid> | ||
</UniformGrid> | ||
</Grid> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using System.Windows.Data; | ||
using System.Windows.Documents; | ||
using System.Windows.Input; | ||
using System.Windows.Media; | ||
using System.Windows.Media.Imaging; | ||
using System.Windows.Navigation; | ||
using System.Windows.Shapes; | ||
|
||
namespace TUSB_ProgressViewer.Controls | ||
{ | ||
/// <summary> | ||
/// DataViewer.xaml の相互作用ロジック | ||
/// </summary> | ||
public partial class DataViewer : UserControl | ||
{ | ||
public DataViewer() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
using Reactive.Bindings; | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using TUSB_ProgressViewer.Controls; | ||
using TUSB_ProgressViewer.Util; | ||
|
||
namespace TUSB_ProgressViewer.Models | ||
{ | ||
public static class IslandsData | ||
{ | ||
/// <summary> | ||
/// 島リスト | ||
/// </summary> | ||
public static ReactiveCollection<IslandPointer> Islands { get; } = new ReactiveCollection<IslandPointer>(); | ||
|
||
/// <summary> | ||
/// 島攻略数カウント | ||
/// </summary> | ||
public static ReactiveProperty<int> CompletionCount { get; } = new ReactiveProperty<int>(); | ||
|
||
/// <summary> | ||
/// 島攻略率 | ||
/// </summary> | ||
public static ReactiveProperty<double> CompletionRate { get; } = new ReactiveProperty<double>(); | ||
|
||
/// <summary> | ||
/// 島の数 | ||
/// </summary> | ||
private const int islandCount = 50; | ||
|
||
/// <summary> | ||
/// 島読み込み | ||
/// </summary> | ||
/// <param name="count"></param> | ||
public static void Load(ref int count) | ||
{ | ||
try | ||
{ | ||
Islands.ClearOnScheduler(); | ||
foreach (IslandType type in Enum.GetValues(typeof(IslandType))) | ||
{ | ||
var island = new Island(type, World.WorldData); | ||
|
||
// 実際の座標と画像のピクセル数から画像上の島(エンドポータルフレーム)の位置を計算 | ||
// 画像のサイズが変わると壊れます() | ||
var X = (island.IslandType.GetCoordinate().X + 221) / 512.0; | ||
var Z = (island.IslandType.GetCoordinate().Z + 237) / 512.0; | ||
|
||
// 別ディメンションは特殊な位置なので個別指定 | ||
switch (island.IslandType) | ||
{ | ||
case IslandType.TheUnderworld: | ||
X = 47 / 256.0; | ||
Z = 234 / 256.0; | ||
break; | ||
case IslandType.TheNether: | ||
X = 128 / 256.0; | ||
Z = 234 / 256.0; | ||
break; | ||
case IslandType.GulliversLand: | ||
X = 183 / 256.0; | ||
Z = 234 / 256.0; | ||
break; | ||
case IslandType.Cloudia: | ||
X = 43 / 256.0; | ||
Z = 246 / 256.0; | ||
break; | ||
case IslandType.TableMountain: | ||
X = 82 / 256.0; | ||
Z = 246 / 256.0; | ||
break; | ||
case IslandType.TocultColde: | ||
X = 157 / 256.0; | ||
Z = 246 / 256.0; | ||
break; | ||
case IslandType.TheEnd: | ||
X = 218 / 256.0; | ||
Z = 246 / 256.0; | ||
break; | ||
} | ||
|
||
Application.Current.Dispatcher.Invoke(() => | ||
{ | ||
Islands.Add(new IslandPointer() | ||
{ | ||
IslandName = island.IslandType.GetName(), | ||
Center = new Point(X, Z), | ||
IsComplete = island.IsComplete | ||
}); | ||
|
||
CompletionCount.Value = Islands.Where(x => x.IsComplete).Count(); | ||
CompletionRate.Value = (CompletionCount.Value / (double)islandCount) * 100; | ||
}); | ||
|
||
World.LoadingProgress.Value = (++count / 297.0) * 100; | ||
} | ||
} | ||
catch | ||
{ | ||
Reset(); | ||
throw; | ||
} | ||
} | ||
|
||
/// <summary> | ||
/// データをリセット | ||
/// </summary> | ||
public static void Reset() | ||
{ | ||
Islands.ClearOnScheduler(); | ||
CompletionCount.Value = 0; | ||
CompletionRate.Value = 0; | ||
} | ||
} | ||
} |
Oops, something went wrong.