├── .editorconfig ├── .gitignore ├── Directory.Build.props ├── ING.sln ├── LICENSE.md ├── README.md ├── src ├── Core │ └── Desktop │ │ ├── Directory.Build.props │ │ ├── Sakuno.ING.Launcher │ │ ├── Program.cs │ │ └── Sakuno.ING.Launcher.csproj │ │ ├── Sakuno.ING.Shell.Desktop │ │ ├── MainViewModel.cs │ │ ├── MainWindow.xaml │ │ ├── MainWindow.xaml.cs │ │ ├── Sakuno.ING.Shell.Desktop.csproj │ │ ├── Shell.cs │ │ ├── ShellApp.xaml │ │ └── ShellApp.xaml.cs │ │ └── Sakuno.ING.Views.Desktop.Common │ │ ├── AssemblyAttributes.cs │ │ ├── Controls │ │ ├── AerialProficiencyPresenter.cs │ │ ├── CountdownPresenter.cs │ │ ├── SlotItemIcon.cs │ │ ├── SlotItemImprovementPresenter.cs │ │ ├── SlotPlaneCountPresenter.cs │ │ ├── UseItemIcon.cs │ │ ├── UseItemPresenter.cs │ │ ├── ViewModelViewHost.cs │ │ └── ViewPresenter.cs │ │ ├── DataTemplateBindingHook.cs │ │ ├── Images │ │ ├── SlotItem │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 13.png │ │ │ ├── 14.png │ │ │ ├── 15.png │ │ │ ├── 16.png │ │ │ ├── 17.png │ │ │ ├── 18.png │ │ │ ├── 19.png │ │ │ ├── 2.png │ │ │ ├── 20.png │ │ │ ├── 21.png │ │ │ ├── 22.png │ │ │ ├── 23.png │ │ │ ├── 24.png │ │ │ ├── 25.png │ │ │ ├── 26.png │ │ │ ├── 27.png │ │ │ ├── 28.png │ │ │ ├── 29.png │ │ │ ├── 3.png │ │ │ ├── 30.png │ │ │ ├── 31.png │ │ │ ├── 32.png │ │ │ ├── 33.png │ │ │ ├── 34.png │ │ │ ├── 35.png │ │ │ ├── 36.png │ │ │ ├── 37.png │ │ │ ├── 38.png │ │ │ ├── 39.png │ │ │ ├── 4.png │ │ │ ├── 40.png │ │ │ ├── 41.png │ │ │ ├── 42.png │ │ │ ├── 43.png │ │ │ ├── 44.png │ │ │ ├── 45.png │ │ │ ├── 46.png │ │ │ ├── 47.png │ │ │ ├── 49.png │ │ │ ├── 5.png │ │ │ ├── 6.png │ │ │ ├── 7.png │ │ │ ├── 8.png │ │ │ └── 9.png │ │ └── UseItem │ │ │ ├── 1.png │ │ │ ├── 10.png │ │ │ ├── 11.png │ │ │ ├── 12.png │ │ │ ├── 2.png │ │ │ ├── 3.png │ │ │ ├── 31.png │ │ │ ├── 32.png │ │ │ ├── 33.png │ │ │ ├── 34.png │ │ │ ├── 4.png │ │ │ └── 44.png │ │ ├── Sakuno.ING.Views.Desktop.Common.csproj │ │ └── Themes │ │ ├── Controls │ │ ├── SlotItemImprovementPresenter.xaml │ │ ├── SlotPlaneCountPresenter.xaml │ │ └── UseItemPresenter.xaml │ │ └── Generic.xaml ├── Directory.Build.props ├── Game │ ├── Directory.Build.props │ ├── Sakuno.ING.Game.Models │ │ ├── ITable`2.cs │ │ ├── IUpdatable.cs │ │ ├── IdTableDebuggerProxy.cs │ │ ├── IdTable`4.cs │ │ ├── ModelGenerator.targets │ │ ├── ModelGenerator.xsd │ │ ├── Models │ │ │ ├── AirForceGroup.cs │ │ │ ├── AirForceSquadron.cs │ │ │ ├── ConstructionDock.cs │ │ │ ├── Events │ │ │ │ └── InstantConstructionMaterialUpdate.cs │ │ │ ├── MasterData │ │ │ │ ├── ExpeditionInfo.cs │ │ │ │ ├── MasterData.g.cs │ │ │ │ ├── MasterData.xml │ │ │ │ ├── ShipInfo.cs │ │ │ │ ├── SlotItemInfo.cs │ │ │ │ └── SlotItemTypeInfo.cs │ │ │ ├── MasterDataRoot.cs │ │ │ ├── NavalBase.cs │ │ │ ├── PlayerData.g.cs │ │ │ ├── PlayerData.xml │ │ │ ├── PlayerFleet.cs │ │ │ ├── PlayerShip.cs │ │ │ ├── PlayerShipSlot.cs │ │ │ ├── PlayerSlotItem.cs │ │ │ ├── Quests │ │ │ │ ├── Quest.g.cs │ │ │ │ ├── Quest.xml │ │ │ │ └── QuestManager.cs │ │ │ ├── RepairDock.cs │ │ │ ├── Slot.cs │ │ │ └── UseItemCount.cs │ │ └── Sakuno.ING.Game.Models.csproj │ ├── Sakuno.ING.Game.Provider.SourceGenerator │ │ ├── ApiHandlerGenerator.cs │ │ ├── ApiHandlerReceiver.cs │ │ ├── ApiInfo.cs │ │ ├── EventSubjectReceiver.cs │ │ ├── ProviderEventGenerator.cs │ │ └── Sakuno.ING.Game.Provider.SourceGenerator.csproj │ └── Sakuno.ING.Game.Provider │ │ ├── ApiAttribute.cs │ │ ├── Events │ │ ├── AirForceActionUpdate.cs │ │ ├── AirForceSquadronDeployment.cs │ │ ├── AirForceSquadronSupplied.cs │ │ ├── ConstructionStart.cs │ │ ├── FleetCompositionChange.cs │ │ ├── HomeportMaterialUpdate.cs │ │ ├── IMaterialUpdate.cs │ │ ├── MasterDataUpdate.cs │ │ ├── RepairStart.cs │ │ ├── ShipConstructed.cs │ │ ├── ShipModernization.cs │ │ ├── ShipSupply.cs │ │ ├── ShipsDismantled.cs │ │ ├── SlotItemImproved.cs │ │ └── SlotItemsDeveloped.cs │ │ ├── GameProvider.Extensions.cs │ │ ├── GameProvider.HomeportData.cs │ │ ├── GameProvider.MasterData.cs │ │ ├── GameProvider.Operations.cs │ │ ├── GameProvider.Quest.cs │ │ ├── GameProvider.Sally.cs │ │ ├── GameProvider.cs │ │ ├── IdentifierAttribute.cs │ │ ├── Json │ │ ├── AirForceSquadronDeploymentJson.cs │ │ ├── AirForceSquadronSupplyJson.cs │ │ ├── AnchorageRepairJson.cs │ │ ├── Converters │ │ │ ├── ExpeditionUseItemRewardConverter.cs │ │ │ ├── FleetExpeditionStatusConverter.cs │ │ │ ├── IdentifierConverter.cs │ │ │ ├── IdentifierConverterFactory.cs │ │ │ ├── IntArrayConverterBase.cs │ │ │ ├── IntToBooleanConverter.cs │ │ │ ├── MaterialsConverter.cs │ │ │ ├── ShipModernizationConverter.cs │ │ │ ├── TimeSpanInMinuteConverter.cs │ │ │ ├── TimestampInMillisecondConverter.cs │ │ │ ├── UnequippedSlotItemInfoConverter.cs │ │ │ ├── ValidIdArrayConverter.cs │ │ │ └── ValidIdArrayConverterFactory.cs │ │ ├── HomeportJson.cs │ │ ├── MapInfoJson.cs │ │ ├── MasterDataJson.cs │ │ ├── QuestListJson.cs │ │ ├── Ship3Json.cs │ │ ├── ShipConstructionResultJson.cs │ │ ├── ShipDeckJson.cs │ │ ├── ShipModernizationResultJson.cs │ │ ├── ShipsDismantlingJson.cs │ │ ├── ShipsSupplyJson.cs │ │ ├── SlotItemImprovementJson.cs │ │ ├── SlotItemTransferJson.cs │ │ ├── SlotItemsDevelopedJson.cs │ │ ├── SlotItemsScrappingJson.cs │ │ ├── StartupInfoJson.cs │ │ └── SvData.cs │ │ ├── Models │ │ ├── AdmiralRank.cs │ │ ├── AirForceAction.cs │ │ ├── AirForceGroupId.cs │ │ ├── AirForceSquadronMorale.cs │ │ ├── BasicAdmiral.cs │ │ ├── ClampedValue.cs │ │ ├── CombinedFleetKind.cs │ │ ├── ConstructionDockId.cs │ │ ├── ConstructionDockState.cs │ │ ├── ExpeditionUseItemReward.cs │ │ ├── FireRange.cs │ │ ├── FleetExpeditionState.cs │ │ ├── FleetId.cs │ │ ├── Knowledge │ │ │ ├── KnownLeveling.cs │ │ │ └── KnownUseItem.cs │ │ ├── Leveling.cs │ │ ├── MasterData │ │ │ ├── ExpeditionId.cs │ │ │ ├── MapAreaId.cs │ │ │ ├── MapId.cs │ │ │ ├── RawExpeditionInfo.cs │ │ │ ├── RawExtraSlotSlotItemAllowListJson.cs │ │ │ ├── RawMapArea.cs │ │ │ ├── RawMapBgmInfo.cs │ │ │ ├── RawMapInfo.cs │ │ │ ├── RawShipEquipLimitation.cs │ │ │ ├── RawShipInfo.cs │ │ │ ├── RawShipTypeInfo.cs │ │ │ ├── RawSlotItemInfo.cs │ │ │ ├── RawSlotItemTypeInfo.cs │ │ │ ├── RawUseItem.cs │ │ │ ├── ShipInfoId.cs │ │ │ ├── ShipTypeId.cs │ │ │ ├── SlotItemInfoId.cs │ │ │ ├── SlotItemTypeId.cs │ │ │ └── UseItemId.cs │ │ ├── Materials.cs │ │ ├── QuestId.cs │ │ ├── Quests │ │ │ ├── QuestState.cs │ │ │ └── RawQuest.cs │ │ ├── RawAdmiral.cs │ │ ├── RawAirForceGroup.cs │ │ ├── RawAirForceSquadron.cs │ │ ├── RawConstructionDock.cs │ │ ├── RawFleet.cs │ │ ├── RawFleetExpeditionStatus.cs │ │ ├── RawMap.cs │ │ ├── RawMaterialItem.cs │ │ ├── RawRepairDock.cs │ │ ├── RawShip.cs │ │ ├── RawShipLockInfo.cs │ │ ├── RawSlotItem.cs │ │ ├── RawSlotItemLockInfo.cs │ │ ├── RawUnequippedSlotItemInfo.cs │ │ ├── RawUseItemCount.cs │ │ ├── RecordAdmiral.cs │ │ ├── RepairDockId.cs │ │ ├── RepairDockState.cs │ │ ├── ShipDamageState.cs │ │ ├── ShipHP.cs │ │ ├── ShipId.cs │ │ ├── ShipModernizationStatus.cs │ │ ├── ShipSpeed.cs │ │ ├── SlotItemId.cs │ │ └── Sortie │ │ │ ├── BattleKind.cs │ │ │ ├── RawSortieEvent.cs │ │ │ └── SortieEventKind.cs │ │ └── Sakuno.ING.Game.Provider.csproj ├── Infrastructure │ ├── Directory.Build.props │ ├── Sakuno.ING.Bootstrap │ │ ├── Bootstraper.cs │ │ ├── DryIocCompositor.cs │ │ └── Sakuno.ING.Bootstrap.csproj │ └── Sakuno.ING.Standard │ │ ├── BindableObject.cs │ │ ├── Composition │ │ ├── Compositor.cs │ │ └── ExportAttribute.cs │ │ ├── Http │ │ └── HttpMessage.cs │ │ ├── IBindable.cs │ │ ├── IIdentifiable.cs │ │ ├── IIdentifiable`T.cs │ │ ├── Messaging │ │ ├── ApiMessage.cs │ │ └── IApiMessageSource.cs │ │ ├── NullableReferenceTypeSupportForLowerTFM.cs │ │ ├── Sakuno.ING.Standard.csproj │ │ └── Shell │ │ ├── ExportViewAttribute.cs │ │ ├── IShell.cs │ │ └── IViewContractObservable.cs ├── ViewModels │ ├── Directory.Build.props │ └── Sakuno.ING.ViewModels │ │ ├── Extensions.cs │ │ ├── Homeport │ │ ├── AdmiralViewModel.cs │ │ ├── AirForceGroupViewModel.cs │ │ ├── AirForceSquadronViewModel.cs │ │ ├── ConstructionDockViewModel.cs │ │ ├── ConstructionDocksViewModel.cs │ │ ├── FleetOverviewViewModel.cs │ │ ├── FleetOverviewsViewModel.cs │ │ ├── FleetViewModel.cs │ │ ├── HomeportDetailViewModel.cs │ │ ├── IHomeportTabViewModel.cs │ │ ├── MapAreaViewModel.cs │ │ ├── MaterialsViewModel.cs │ │ ├── OverallViewModel.cs │ │ ├── RepairDockViewModel.cs │ │ ├── RepairDocksViewModel.cs │ │ ├── ShipViewModel.cs │ │ └── SlotViewModel.cs │ │ ├── Quests │ │ ├── ActiveQuestViewModel.cs │ │ └── ActiveQuestsViewModel.cs │ │ └── Sakuno.ING.ViewModels.csproj ├── Views │ └── Sakuno.ING.Views.Desktop │ │ ├── Homeport │ │ ├── ActiveQuestView.xaml │ │ ├── ActiveQuestView.xaml.cs │ │ ├── ActiveQuestsView.xaml │ │ ├── ActiveQuestsView.xaml.cs │ │ ├── AdmiralView.xaml │ │ ├── AdmiralView.xaml.cs │ │ ├── AirForceGroupView.xaml │ │ ├── AirForceGroupView.xaml.cs │ │ ├── AirForceSquadronView.xaml │ │ ├── AirForceSquadronView.xaml.cs │ │ ├── ConstructionDockView.xaml │ │ ├── ConstructionDockView.xaml.cs │ │ ├── ConstructionDocksView.xaml │ │ ├── ConstructionDocksView.xaml.cs │ │ ├── FleetOnExpeditionView.xaml │ │ ├── FleetOnExpeditionView.xaml.cs │ │ ├── FleetOverviewsView.xaml │ │ ├── FleetOverviewsView.xaml.cs │ │ ├── FleetView.xaml │ │ ├── FleetView.xaml.cs │ │ ├── HomeportDetailView.xaml │ │ ├── HomeportDetailView.xaml.cs │ │ ├── IdleFleetView.xaml │ │ ├── IdleFleetView.xaml.cs │ │ ├── LockedConstructionDockView.xaml │ │ ├── LockedConstructionDockView.xaml.cs │ │ ├── LockedRepairDockView.xaml │ │ ├── LockedRepairDockView.xaml.cs │ │ ├── MapAreaView.xaml │ │ ├── MapAreaView.xaml.cs │ │ ├── MaterialsView.xaml │ │ ├── MaterialsView.xaml.cs │ │ ├── OverallView.xaml │ │ ├── OverallView.xaml.cs │ │ ├── RepairDockView.xaml │ │ ├── RepairDockView.xaml.cs │ │ ├── RepairDocksView.xaml │ │ ├── RepairDocksView.xaml.cs │ │ ├── ShipView.xaml │ │ ├── ShipView.xaml.cs │ │ ├── SlotView.xaml │ │ └── SlotView.xaml.cs │ │ └── Sakuno.ING.Views.Desktop.csproj ├── app.ico └── app.manifest └── tests ├── Directory.Build.props └── Sakuno.ING.Game.Models.Tests ├── Data └── Composition │ ├── port.json │ ├── request_append │ ├── request_exchange │ ├── request_flagship_only │ └── request_remove ├── Fixture.cs ├── FleetCompositionTests.cs └── Sakuno.ING.Game.Models.Tests.csproj /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8-bom 6 | end_of_line = crlf 7 | indent_style = space 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.cs] 12 | indent_size = 4 13 | 14 | [*.{md,json}] 15 | charset = utf-8 16 | 17 | [*.json] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /Directory.Build.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | $(MSBuildThisFileDirectory) 6 | 16 7 | 8 | 9 | 10 | 9.0 11 | netstandard2.0 12 | net472 13 | net48 14 | net5.0 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016-2020 Kodama Sakuno 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Intelligent Naval Gun 2 | 3 | A flexible, powerful and lightweight KanColle tool/browser. 4 | 5 | ## Licence 6 | 7 | [MIT License (MIT)](./LICENSE.md) -------------------------------------------------------------------------------- /src/Core/Desktop/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Desktop 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Launcher/Program.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Bootstrap; 2 | using System; 3 | 4 | namespace Sakuno.ING 5 | { 6 | internal class Program 7 | { 8 | [STAThread] 9 | public static void Main(string[] args) 10 | { 11 | Bootstraper.Initialize(new[] 12 | { 13 | "Sakuno.ING.Game.Provider", 14 | "Sakuno.ING.Game.Models", 15 | "Sakuno.ING.Shell.Desktop", 16 | "Sakuno.ING.ViewModels", 17 | "Sakuno.ING.Views.Desktop.Common", 18 | "Sakuno.ING.Views.Desktop", 19 | }); 20 | 21 | Bootstraper.Startup(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Launcher/Sakuno.ING.Launcher.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | WinExe 5 | Sakuno.ING 6 | IntelligentNavalGun 7 | $(BasePath)src\app.ico 8 | $(BasePath)src\app.manifest 9 | true 10 | false 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/MainViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Composition; 3 | 4 | namespace Sakuno.ING.Shell.Desktop 5 | { 6 | [Export] 7 | internal class MainViewModel : ReactiveObject 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/MainWindow.xaml: -------------------------------------------------------------------------------- 1 |  15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/MainWindow.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Composition; 3 | using System.Reactive.Disposables; 4 | 5 | namespace Sakuno.ING.Shell.Desktop 6 | { 7 | [Export] 8 | internal partial class MainWindow 9 | { 10 | public MainWindow(MainViewModel mainViewModel) 11 | { 12 | InitializeComponent(); 13 | 14 | ViewModel = mainViewModel; 15 | 16 | this.WhenActivated(disposable => 17 | { 18 | }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/Sakuno.ING.Shell.Desktop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | true 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/Shell.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Composition; 3 | using Splat; 4 | 5 | namespace Sakuno.ING.Shell.Desktop 6 | { 7 | [Export(typeof(IShell))] 8 | internal class Shell : IShell 9 | { 10 | public void Run() 11 | { 12 | var app = new ShellApp(); 13 | 14 | Locator.CurrentMutable.InitializeReactiveUI(); 15 | 16 | app.Run(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/ShellApp.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Shell.Desktop/ShellApp.xaml.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Composition; 2 | using System.Windows; 3 | 4 | namespace Sakuno.ING.Shell.Desktop 5 | { 6 | internal partial class ShellApp 7 | { 8 | public ShellApp() 9 | { 10 | InitializeComponent(); 11 | } 12 | 13 | protected override void OnStartup(StartupEventArgs e) 14 | { 15 | base.OnStartup(e); 16 | 17 | var mainWindow = Compositor.Default.Resolve(); 18 | 19 | MainWindow = mainWindow; 20 | 21 | mainWindow.Show(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/AssemblyAttributes.cs: -------------------------------------------------------------------------------- 1 | using System.Windows; 2 | 3 | [assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)] 4 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Controls/ViewPresenter.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Composition; 2 | using System.Windows; 3 | using System.Windows.Controls; 4 | 5 | namespace Sakuno.ING.Shell.Desktop 6 | { 7 | public class ViewPresenter : ContentControl 8 | { 9 | private string? _viewId; 10 | public string? ViewId 11 | { 12 | get => _viewId; 13 | set 14 | { 15 | _viewId = value; 16 | Content = Compositor.Default.ResolveViewOrDefault(value); 17 | } 18 | } 19 | 20 | static ViewPresenter() 21 | { 22 | HorizontalContentAlignmentProperty.OverrideMetadata(typeof(ViewPresenter), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch)); 23 | VerticalContentAlignmentProperty.OverrideMetadata(typeof(ViewPresenter), new FrameworkPropertyMetadata(VerticalAlignment.Stretch)); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/1.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/10.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/11.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/12.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/13.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/14.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/15.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/16.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/17.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/18.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/19.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/2.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/20.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/21.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/22.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/23.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/24.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/25.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/26.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/27.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/28.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/29.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/3.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/30.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/31.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/32.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/33.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/34.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/35.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/36.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/37.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/38.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/39.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/4.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/40.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/41.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/42.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/43.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/44.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/45.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/46.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/47.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/49.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/5.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/6.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/7.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/8.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/SlotItem/9.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/1.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/10.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/11.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/12.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/2.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/3.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/31.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/32.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/33.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/34.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/4.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Images/UseItem/44.png -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Sakuno.ING.Views.Desktop.Common.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | true 5 | Sakuno.ING.Views.Desktop 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Themes/Controls/SlotItemImprovementPresenter.xaml: -------------------------------------------------------------------------------- 1 |  4 | 21 | 22 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Themes/Controls/SlotPlaneCountPresenter.xaml: -------------------------------------------------------------------------------- 1 |  4 | 28 | 29 | -------------------------------------------------------------------------------- /src/Core/Desktop/Sakuno.ING.Views.Desktop.Common/Themes/Generic.xaml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /src/Directory.Build.props: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Library 7 | $(BasePath)artifacts\$(MSBuildProjectName)\ 8 | $(BasePath)intermediate\$(MSBuildProjectName)\ 9 | enable 10 | 11 | 12 | 13 | $(PortableFramework) 14 | 15 | 16 | 17 | $(CoreFramework)-windows 18 | $(CoreFramework);$(DesktopFramework) 19 | 20 | 21 | 22 | $(CoreFramework) 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/Game/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Portable 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/ITable`2.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Diagnostics.CodeAnalysis; 5 | 6 | namespace Sakuno.ING.Game 7 | { 8 | public interface ITable : IBindable, IReadOnlyCollection 9 | where TId : struct 10 | { 11 | T this[TId id] { get; } 12 | [MaybeNull] 13 | T this[TId? id] { get; } 14 | T[] this[IReadOnlyCollection ids] { get; } 15 | 16 | IObservable> DefaultViewSource { get; } 17 | 18 | [return: MaybeNull] 19 | T GetValueOrDefault(TId id); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/IUpdatable.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game 2 | { 3 | internal interface IUpdatable : IBindable, IIdentifiable 4 | where TId : struct 5 | { 6 | void Update(TRaw raw); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/IdTableDebuggerProxy.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | 3 | namespace Sakuno.ING.Game 4 | { 5 | internal class IdTableDebuggerProxy 6 | where TId : struct 7 | where T : class, IUpdatable 8 | where TRaw : IIdentifiable 9 | { 10 | private readonly IdTable _origin; 11 | 12 | public IdTableDebuggerProxy(IdTable origin) 13 | { 14 | _origin = origin; 15 | } 16 | 17 | [DebuggerBrowsable(DebuggerBrowsableState.RootHidden)] 18 | public T[] Item => _origin._list.ToArray(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/AirForceGroup.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | public partial class AirForceGroup 6 | { 7 | public MapAreaInfo Area { get; private set; } 8 | 9 | private IdTable _squadrons; 10 | public ITable Squadrons => _squadrons; 11 | 12 | partial void CreateCore() 13 | { 14 | Area = _owner.MasterData.MapAreas[Id.MapArea]; 15 | 16 | _squadrons = new IdTable(_owner); 17 | } 18 | 19 | partial void UpdateCore(RawAirForceGroup raw) 20 | { 21 | _squadrons.BatchUpdate(raw.Squadrons); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/AirForceSquadron.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public partial class AirForceSquadron 4 | { 5 | partial void UpdateCore(RawAirForceSquadron raw) => 6 | SlotItem = _owner.SlotItems[raw.SlotItemId]; 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/ConstructionDock.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public partial class ConstructionDock 4 | { 5 | partial void UpdateCore(RawConstructionDock raw) 6 | { 7 | BuiltShip = _owner.MasterData.ShipInfos[raw.BuiltShipId]; 8 | } 9 | 10 | internal void InstantBuild() 11 | { 12 | State = ConstructionDockState.Completed; 13 | CompletionTime = null; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/Events/InstantConstructionMaterialUpdate.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | 3 | namespace Sakuno.ING.Game.Models.Events 4 | { 5 | internal class InstantConstructionMaterialUpdate : IMaterialUpdate 6 | { 7 | private readonly bool _isLSC; 8 | 9 | public InstantConstructionMaterialUpdate(bool isLSC) 10 | { 11 | _isLSC = isLSC; 12 | } 13 | 14 | public void Apply(Materials materials) => materials.Development -= _isLSC ? 10 : 1; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/MasterData/ExpeditionInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | public partial class ExpeditionInfo 4 | { 5 | partial void UpdateCore(RawExpeditionInfo raw) 6 | { 7 | MapArea = _owner.MapAreas[raw.MapAreaId]; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/MasterData/ShipInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | public partial class ShipInfo 4 | { 5 | partial void UpdateCore(RawShipInfo raw) 6 | { 7 | Type = _owner.ShipTypes[raw.TypeId]; 8 | RemodelTo = _owner.ShipInfos[raw.RemodelTo]; 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/MasterData/SlotItemInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | public partial class SlotItemInfo 4 | { 5 | partial void UpdateCore(RawSlotItemInfo raw) 6 | { 7 | Type = _owner.SlotItemTypes[raw.TypeId]; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/MasterData/SlotItemTypeInfo.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | public partial class SlotItemTypeInfo 4 | { 5 | public bool IsPlane { get; private set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/PlayerShipSlot.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | public sealed class PlayerShipSlot : Slot 6 | { 7 | public PlayerShip Owner { get; } 8 | public int Index { get; } 9 | 10 | public override SlotItem? Item => _slotItem; 11 | 12 | private PlayerSlotItem? _slotItem; 13 | public PlayerSlotItem? PlayerSlotItem 14 | { 15 | get => _slotItem; 16 | internal set 17 | { 18 | Set(ref _slotItem, value); 19 | NotifyPropertyChanged(nameof(Item)); 20 | } 21 | } 22 | 23 | public PlayerShipSlot(PlayerShip owner, int index) 24 | { 25 | Owner = owner; 26 | Index = index; 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/PlayerSlotItem.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public partial class PlayerSlotItem 4 | { 5 | partial void UpdateCore(RawSlotItem raw) 6 | { 7 | Info = _owner.MasterData.SlotItemInfos[raw.SlotItemInfoId]; 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/Quests/Quest.xml: -------------------------------------------------------------------------------- 1 |  2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/Quests/QuestManager.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Composition; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models.Quests 5 | { 6 | [Export] 7 | public sealed class QuestManager 8 | { 9 | private readonly IdTable _quests; 10 | public ITable Quests => _quests; 11 | 12 | public QuestManager(GameProvider provider) 13 | { 14 | _quests = new IdTable(this); 15 | 16 | provider.QuestListUpdated.Subscribe(message => 17 | { 18 | _quests.BatchUpdate(message, removal: false); 19 | }); 20 | 21 | provider.QuestCompleted.Subscribe(message => 22 | { 23 | _quests.Remove(message); 24 | }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/RepairDock.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public partial class RepairDock 4 | { 5 | partial void UpdateCore(RawRepairDock raw) 6 | { 7 | RepairingShip = _owner.Ships[raw.RepairingShipId]; 8 | } 9 | 10 | internal void InstantRepair() 11 | { 12 | State = RepairDockState.Empty; 13 | CompletionTime = null; 14 | RepairingShip = null; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/Slot.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public abstract class Slot : BindableObject 4 | { 5 | public abstract SlotItem? Item { get; } 6 | 7 | private ClampedValue _planeCount; 8 | public ClampedValue PlaneCount 9 | { 10 | get => _planeCount; 11 | internal set => Set(ref _planeCount, value); 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Models/UseItemCount.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public partial class UseItemCount 4 | { 5 | partial void CreateCore() => UseItem = _owner.MasterData.UseItems[Id]; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Models/Sakuno.ING.Game.Models.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sakuno.ING.Game 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider.SourceGenerator/ApiInfo.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using Microsoft.CodeAnalysis.CSharp.Syntax; 3 | using System.Collections.Generic; 4 | 5 | namespace Sakuno.ING.Game.Provider.SourceGenerator 6 | { 7 | internal class ApiInfo 8 | { 9 | public IList Apis { get; } = new List(); 10 | public string MethodName { get; } 11 | 12 | public bool ShouldHandleApi { get; set; } 13 | public bool HasRequest { get; set; } 14 | public ISymbol? ResponseSymbol { get; set; } 15 | 16 | public ApiInfo(string methodName) 17 | { 18 | MethodName = methodName; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider.SourceGenerator/EventSubjectReceiver.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.CodeAnalysis; 2 | using Microsoft.CodeAnalysis.CSharp; 3 | using Microsoft.CodeAnalysis.CSharp.Syntax; 4 | using System.Collections.Generic; 5 | 6 | namespace Sakuno.ING.Game.Provider.SourceGenerator 7 | { 8 | internal class EventSubjectReceiver : ISyntaxContextReceiver 9 | { 10 | private INamedTypeSymbol? _subjectSymbol; 11 | 12 | private readonly List _candidateFields = new(); 13 | public IReadOnlyList CandidateFields => _candidateFields; 14 | 15 | public void OnVisitSyntaxNode(GeneratorSyntaxContext context) 16 | { 17 | _subjectSymbol ??= context.SemanticModel.Compilation.GetTypeByMetadataName("System.Reactive.Subjects.Subject`1")?.ConstructUnboundGenericType(); 18 | 19 | if (_subjectSymbol is null) 20 | return; 21 | 22 | if (context.Node is not FieldDeclarationSyntax { Parent: ClassDeclarationSyntax { Identifier: { Text: "GameProvider" } } } fieldDeclaration) 23 | return; 24 | 25 | if (context.SemanticModel.GetSymbolInfo(fieldDeclaration.Declaration.Type).Symbol is not INamedTypeSymbol { IsGenericType: true } symbol) 26 | return; 27 | 28 | if (SymbolEqualityComparer.Default.Equals(symbol.ConstructUnboundGenericType(), _subjectSymbol)) 29 | _candidateFields.Add(fieldDeclaration); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider.SourceGenerator/Sakuno.ING.Game.Provider.SourceGenerator.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/ApiAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Game 4 | { 5 | [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = true)] 6 | internal sealed class ApiAttribute : Attribute 7 | { 8 | public string Api { get; } 9 | 10 | public ApiAttribute(string api) 11 | { 12 | Api = api; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/AirForceActionUpdate.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | 4 | namespace Sakuno.ING.Game.Events 5 | { 6 | public sealed class AirForceActionUpdate 7 | { 8 | public MapAreaId MapAreaId { get; } 9 | public AirForceGroupId GroupId { get; } 10 | public AirForceAction Action { get; } 11 | 12 | public AirForceActionUpdate(MapAreaId mapAreaId, AirForceGroupId groupId, AirForceAction action) 13 | { 14 | MapAreaId = mapAreaId; 15 | GroupId = groupId; 16 | Action = action; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/AirForceSquadronDeployment.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | using System.Collections.Generic; 4 | 5 | namespace Sakuno.ING.Game.Events 6 | { 7 | public sealed class AirForceSquadronDeployment 8 | { 9 | public MapAreaId MapAreaId { get; } 10 | public AirForceGroupId GroupId { get; } 11 | public int BaseCombatRadius { get; } 12 | public int BonusCombatRadius { get; } 13 | public IReadOnlyCollection Squadrons { get; } 14 | 15 | public AirForceSquadronDeployment(MapAreaId mapAreaId, AirForceGroupId groupId, int baseCombatRadius, int bonusCombatRadius, IReadOnlyCollection updatedSquadrons) 16 | { 17 | MapAreaId = mapAreaId; 18 | GroupId = groupId; 19 | BaseCombatRadius = baseCombatRadius; 20 | BonusCombatRadius = bonusCombatRadius; 21 | Squadrons = updatedSquadrons; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/AirForceSquadronSupplied.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Text; 6 | 7 | namespace Sakuno.ING.Game.Events 8 | { 9 | public sealed class AirForceSquadronSupplied 10 | { 11 | public AirForceSquadronSupplied((MapAreaId, AirForceGroupId) id, RawAirForceSquadron[] squadrons) 12 | { 13 | 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/ConstructionStart.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed class ConstructionStart : IMaterialUpdate 6 | { 7 | public ConstructionDockId DockId { get; } 8 | public bool InstantBuild { get; } 9 | public bool IsLSC { get; } 10 | public Materials Consumption { get; } 11 | 12 | public ConstructionStart(ConstructionDockId dockId, bool instantBuild, bool isLSC, Materials consumption) 13 | { 14 | DockId = dockId; 15 | InstantBuild = instantBuild; 16 | IsLSC = isLSC; 17 | Consumption = consumption; 18 | } 19 | 20 | public void Apply(Materials materials) 21 | { 22 | materials.Fuel -= Consumption.Fuel; 23 | materials.Bullet -= Consumption.Bullet; 24 | materials.Steel -= Consumption.Steel; 25 | materials.Bauxite -= Consumption.Bauxite; 26 | materials.Development -= Consumption.Development; 27 | 28 | if (InstantBuild) 29 | materials.InstantBuild -= IsLSC ? 10 : 1; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/FleetCompositionChange.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed class FleetCompositionChange 6 | { 7 | public FleetId FleetId { get; } 8 | public int? Index { get; } 9 | public ShipId? ShipId { get; } 10 | 11 | public FleetCompositionChange(FleetId fleetId, int? index, ShipId? shipId) 12 | { 13 | FleetId = fleetId; 14 | Index = index; 15 | ShipId = shipId; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/IMaterialUpdate.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public interface IMaterialUpdate 6 | { 7 | void Apply(Materials materials); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/MasterDataUpdate.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System.Collections.Generic; 3 | 4 | namespace Sakuno.ING.Game.Events 5 | { 6 | public sealed class MasterDataUpdate 7 | { 8 | public IReadOnlyCollection ShipInfos { get; } 9 | public IReadOnlyCollection ShipTypes { get; } 10 | public IReadOnlyCollection SlotItemTypes { get; } 11 | public IReadOnlyCollection SlotItemInfos { get; } 12 | public IReadOnlyCollection UseItems { get; } 13 | public IReadOnlyCollection MapAreas { get; } 14 | public IReadOnlyCollection Maps { get; } 15 | public IReadOnlyCollection Expeditions { get; } 16 | 17 | public MasterDataUpdate 18 | ( 19 | IReadOnlyCollection shipInfos, 20 | IReadOnlyCollection shipTypes, 21 | IReadOnlyCollection slotItemInfos, 22 | IReadOnlyCollection slotItemTypes, 23 | IReadOnlyCollection useItems, 24 | IReadOnlyCollection mapAreas, 25 | IReadOnlyCollection maps, 26 | IReadOnlyCollection expeditions 27 | ) 28 | { 29 | ShipInfos = shipInfos; 30 | ShipTypes = shipTypes; 31 | SlotItemTypes = slotItemTypes; 32 | SlotItemInfos = slotItemInfos; 33 | UseItems = useItems; 34 | MapAreas = mapAreas; 35 | Maps = maps; 36 | Expeditions = expeditions; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/RepairStart.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed class RepairStart 6 | { 7 | public bool IsInstantRepair { get; } 8 | public ShipId ShipId { get; } 9 | public RepairDockId DockId { get; } 10 | 11 | public RepairStart(bool instantRepair, ShipId shipId, RepairDockId dockId) 12 | { 13 | IsInstantRepair = instantRepair; 14 | ShipId = shipId; 15 | DockId = dockId; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/ShipConstructed.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed record ShipConstructed(ShipInfoId ShipInfoId) 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/ShipModernization.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using System.Collections.Generic; 3 | 4 | namespace Sakuno.ING.Game.Events 5 | { 6 | #nullable disable 7 | public sealed class ShipModernization 8 | { 9 | public ShipId ShipId { get; } 10 | public IReadOnlyCollection ConsumedShipIds { get; } 11 | 12 | public bool IsSuccess { get; } 13 | 14 | public RawShip NewRawData { get; } 15 | public bool RemoveSlotItems { get; } 16 | 17 | public ShipModernization(ShipId shipId, IReadOnlyCollection consumedShipIds, bool isSuccess, RawShip newRawData, bool removeSlotItems) 18 | { 19 | ShipId = shipId; 20 | ConsumedShipIds = consumedShipIds; 21 | IsSuccess = isSuccess; 22 | NewRawData = newRawData; 23 | RemoveSlotItems = removeSlotItems; 24 | } 25 | } 26 | #nullable enable 27 | } 28 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/ShipSupply.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Events 5 | { 6 | #nullable disable 7 | public sealed class ShipSupply 8 | { 9 | [JsonPropertyName("api_id")] 10 | public ShipId Id { get; set; } 11 | 12 | [JsonPropertyName("api_fuel")] 13 | public int CurrentFuel { get; set; } 14 | [JsonPropertyName("api_bull")] 15 | public int CurrentBullet { get; set; } 16 | } 17 | #nullable enable 18 | } 19 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/ShipsDismantled.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed record ShipsDismantled(ShipId[] ShipIds, bool RemoveSlotItems) 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/SlotItemImproved.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using System.Collections.Generic; 3 | 4 | namespace Sakuno.ING.Game.Events 5 | { 6 | public sealed record SlotItemImproved(SlotItemId SlotItemId, bool IsSuccessful, RawSlotItem NewRawData, IReadOnlyCollection ConsumedSlotItemIds) 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Events/SlotItemsDeveloped.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Events 4 | { 5 | public sealed record SlotItemsDeveloped(bool IsSuccessful, RawSlotItem?[] SlotItems) 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/GameProvider.Extensions.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using System; 3 | using System.Collections.Specialized; 4 | using System.Linq; 5 | using System.Reactive.Linq; 6 | 7 | namespace Sakuno.ING.Game 8 | { 9 | internal static class SvDataObservableExtensions 10 | { 11 | public static int GetInt(this NameValueCollection source, string name) => int.Parse(source[name]); 12 | public static int[] GetInts(this NameValueCollection source, string name) => 13 | source[name]?.Split(',').Select(int.Parse).ToArray() ?? Array.Empty(); 14 | public static bool GetBool(this NameValueCollection source, string name) => source.GetInt(name) != 0; 15 | 16 | public static ShipId[] GetShipIds(this NameValueCollection source, string name) => 17 | source[name]?.Split(',').Select(id => (ShipId)int.Parse(id)).ToArray() ?? Array.Empty(); 18 | public static SlotItemId[] GetSlotItemIds(this NameValueCollection source, string name) => 19 | source[name]?.Split(',').Select(x => (SlotItemId)int.Parse(x)).ToArray() ?? Array.Empty(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/GameProvider.MasterData.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Json; 3 | using System.Reactive.Subjects; 4 | 5 | namespace Sakuno.ING.Game 6 | { 7 | public partial class GameProvider 8 | { 9 | private readonly Subject _masterDataUpdated = new(); 10 | 11 | [Api("api_start2/getData")] 12 | private void HandleMasterData(MasterDataJson response) => 13 | _masterDataUpdated.OnNext(new 14 | ( 15 | shipInfos: response.api_mst_ship, 16 | shipTypes: response.api_mst_stype, 17 | slotItemInfos: response.api_mst_slotitem, 18 | slotItemTypes: response.api_mst_slotitem_equiptype, 19 | useItems: response.api_mst_useitem, 20 | mapAreas: response.api_mst_maparea, 21 | maps: response.api_mst_mapinfo, 22 | expeditions: response.api_mst_mission 23 | )); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/GameProvider.Quest.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json; 2 | using Sakuno.ING.Game.Models; 3 | using Sakuno.ING.Game.Models.Quests; 4 | using System.Collections.Specialized; 5 | using System.Reactive.Subjects; 6 | 7 | namespace Sakuno.ING.Game 8 | { 9 | public partial class GameProvider 10 | { 11 | private readonly Subject _questListUpdated = new(); 12 | private readonly Subject _questCompleted = new(); 13 | 14 | [Api("api_get_member/questlist")] 15 | private void HandleQuestListUpdated(QuestListJson response) => 16 | _questListUpdated.OnNext(response.api_list); 17 | 18 | [Api("api_req_quest/clearitemget")] 19 | private void HandleQuestCompleted(NameValueCollection request) => 20 | _questCompleted.OnNext((QuestId)request.GetInt("api_quest_id")); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/GameProvider.Sally.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json; 2 | using Sakuno.ING.Game.Models; 3 | using Sakuno.ING.Game.Models.Sortie; 4 | using System.Collections.Specialized; 5 | using System.Reactive; 6 | using System.Reactive.Subjects; 7 | 8 | namespace Sakuno.ING.Game 9 | { 10 | public partial class GameProvider 11 | { 12 | private readonly Subject _mapsUpdated = new(); 13 | private readonly Subject _airForceGroupsUpdated = new(); 14 | 15 | [Api("api_get_member/mapinfo")] 16 | private void HandleMapInfoApi(MapInfoJson response) 17 | { 18 | _mapsUpdated.OnNext(response.api_map_info); 19 | _airForceGroupsUpdated.OnNext(response.api_air_base); 20 | } 21 | 22 | private readonly Subject _mapStepped = new(); 23 | private readonly Subject _mapPartUnlocked = new(); 24 | 25 | [Api("api_req_map/start")] 26 | private void HandleSortieStarted(NameValueCollection request, RawSortieEvent response) 27 | { 28 | HandleSortieAdvanced(response); 29 | } 30 | [Api("api_req_map/next")] 31 | private void HandleSortieAdvanced(RawSortieEvent response) 32 | { 33 | _mapStepped.OnNext(response); 34 | 35 | if (response.api_m1) 36 | _mapPartUnlocked.OnNext(Unit.Default); 37 | } 38 | 39 | [Api("api_req_map/anchorage_repair")] 40 | private void HandleAnchorageRepairing(AnchorageRepairJson response) 41 | { 42 | _partialShipsUpdated.OnNext(response.api_ship_data); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/IdentifierAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Game.Json.Converters 4 | { 5 | [AttributeUsage(AttributeTargets.Struct, AllowMultiple = false)] 6 | public sealed class IdentifierAttribute : Attribute 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/AirForceSquadronDeploymentJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json 5 | { 6 | #nullable disable 7 | internal sealed class AirForceSquadronDeploymentJson : IMaterialUpdate 8 | { 9 | public RawAirForceGroup.CombatRadius api_distance { get; set; } 10 | public RawAirForceSquadron[] api_plane_info { get; set; } 11 | public int? api_after_bauxite { get; set; } 12 | 13 | public void Apply(Materials materials) 14 | { 15 | if (api_after_bauxite is int bauxite) 16 | materials.Bauxite = bauxite; 17 | } 18 | } 19 | #nullable enable 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/AirForceSquadronSupplyJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json 5 | { 6 | #nullable disable 7 | internal sealed class AirForceSquadronSupplyJson : IMaterialUpdate 8 | { 9 | public int api_after_fuel { get; set; } 10 | public int api_after_bauxite { get; set; } 11 | 12 | public RawAirForceSquadron[] api_plane_info { get; set; } 13 | 14 | public void Apply(Materials materials) 15 | { 16 | materials.Fuel = api_after_fuel; 17 | materials.Bauxite = api_after_bauxite; 18 | } 19 | } 20 | #nullable enable 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/AnchorageRepairJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class AnchorageRepairJson 7 | { 8 | public RawShip[] api_ship_data { get; set; } 9 | } 10 | #nullable enable 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/ExpeditionUseItemRewardConverter.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using System; 3 | using System.Runtime.CompilerServices; 4 | 5 | namespace Sakuno.ING.Game.Json.Converters 6 | { 7 | internal sealed class ExpeditionUseItemRewardConverter : IntArrayConverterBase 8 | { 9 | protected override int MaxLength => 2; 10 | 11 | protected override ExpeditionUseItemReward? Parse(ReadOnlySpan span) 12 | { 13 | if (span[0] == 0) 14 | return null; 15 | 16 | return Unsafe.As(ref Unsafe.AsRef(span.GetPinnableReference())); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/FleetExpeditionStatusConverter.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | using System; 4 | using System.Text.Json; 5 | using System.Text.Json.Serialization; 6 | 7 | namespace Sakuno.ING.Game.Json.Converters 8 | { 9 | internal sealed class FleetExpeditionStatusConverter : JsonConverter 10 | { 11 | public override RawFleetExpeditionStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 12 | { 13 | if (reader.TokenType != JsonTokenType.StartArray) 14 | throw new NotSupportedException(); 15 | 16 | reader.Read(); 17 | var state = (FleetExpeditionState)reader.GetInt32(); 18 | reader.Read(); 19 | var expeditionId = (ExpeditionId?)reader.GetInt32(); 20 | reader.Read(); 21 | var returnTime = DateTimeOffset.FromUnixTimeMilliseconds(reader.GetInt64()); 22 | reader.Read(); 23 | reader.Read(); 24 | 25 | if (reader.TokenType != JsonTokenType.EndArray) 26 | throw new InvalidOperationException(); 27 | 28 | return new RawFleetExpeditionStatus(state, expeditionId, returnTime); 29 | } 30 | 31 | public override void Write(Utf8JsonWriter writer, RawFleetExpeditionStatus value, JsonSerializerOptions options) => 32 | throw new NotSupportedException(); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/IdentifierConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Buffers; 3 | using System.Buffers.Text; 4 | using System.Runtime.CompilerServices; 5 | using System.Text.Json; 6 | using System.Text.Json.Serialization; 7 | 8 | namespace Sakuno.ING.Game.Json.Converters 9 | { 10 | internal sealed class IdentifierConverter : JsonConverter where T : struct 11 | { 12 | public IdentifierConverter() 13 | { 14 | if (Unsafe.SizeOf() != sizeof(int)) 15 | throw new NotSupportedException(); 16 | } 17 | 18 | public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 19 | { 20 | var value = reader.TokenType switch 21 | { 22 | JsonTokenType.Number => reader.GetInt32(), 23 | JsonTokenType.String => ReadAsInt32(ref reader), 24 | 25 | _ => throw new InvalidOperationException(), 26 | }; 27 | 28 | return Unsafe.As(ref value); 29 | } 30 | 31 | private int ReadAsInt32(ref Utf8JsonReader reader) 32 | { 33 | var span = !reader.HasValueSequence ? reader.ValueSpan : reader.ValueSequence.ToArray(); 34 | 35 | if (!Utf8Parser.TryParse(span, out int value, out int bytesConsumed) || span.Length != bytesConsumed) 36 | throw new InvalidOperationException(); 37 | 38 | return value; 39 | } 40 | 41 | public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) => 42 | throw new NotSupportedException(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/IdentifierConverterFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Text.Json; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace Sakuno.ING.Game.Json.Converters 7 | { 8 | internal sealed class IdentifierConverterFactory : JsonConverterFactory 9 | { 10 | public override bool CanConvert(Type typeToConvert) => 11 | typeToConvert.GetCustomAttribute() != null; 12 | 13 | public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 14 | { 15 | var converterType = typeof(IdentifierConverter<>).MakeGenericType(typeToConvert); 16 | 17 | return (JsonConverter)Activator.CreateInstance(converterType); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/IntArrayConverterBase.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Json.Converters 6 | { 7 | internal abstract class IntArrayConverterBase : JsonConverter 8 | { 9 | public override T Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 10 | { 11 | if (reader.TokenType != JsonTokenType.StartArray) 12 | throw new NotSupportedException(); 13 | 14 | var span = (stackalloc int[MaxLength]); 15 | 16 | var actualLength = 0; 17 | for (var i = 0; reader.Read() && reader.TokenType == JsonTokenType.Number; i++) 18 | if (i < span.Length) 19 | span[actualLength++] = reader.GetInt32(); 20 | 21 | if (reader.TokenType != JsonTokenType.EndArray) 22 | throw new InvalidOperationException(); 23 | 24 | if (actualLength < MinLength) 25 | throw new InvalidOperationException(); 26 | 27 | return Parse(span); 28 | } 29 | 30 | protected abstract int MaxLength { get; } 31 | protected virtual int MinLength => MaxLength; 32 | 33 | protected abstract T Parse(ReadOnlySpan span); 34 | 35 | public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options) => 36 | throw new NotSupportedException(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/IntToBooleanConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Json.Converters 6 | { 7 | internal sealed class IntToBooleanConverter : JsonConverter 8 | { 9 | public override bool Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) => 10 | reader.GetInt32() != 0; 11 | 12 | public override void Write(Utf8JsonWriter writer, bool value, JsonSerializerOptions options) => 13 | throw new NotSupportedException(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/MaterialsConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json.Converters 5 | { 6 | internal sealed class MaterialsConverter : IntArrayConverterBase 7 | { 8 | protected override int MaxLength => 8; 9 | protected override int MinLength => 4; 10 | 11 | protected override Materials Parse(ReadOnlySpan span) => new Materials() 12 | { 13 | Fuel = span[0], 14 | Bullet = span[1], 15 | Steel = span[2], 16 | Bauxite = span[3], 17 | InstantBuild = span[4], 18 | InstantRepair = span[5], 19 | Development = span[6], 20 | Improvement = span[7], 21 | }; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/ShipModernizationConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json.Converters 5 | { 6 | internal sealed class ShipModernizationConverter : IntArrayConverterBase 7 | { 8 | protected override int MaxLength => 2; 9 | 10 | protected override ShipModernizationStatus Parse(ReadOnlySpan span) => new 11 | ( 12 | min: span[0], 13 | max: span[1] 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/TimeSpanInMinuteConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Json.Converters 6 | { 7 | internal sealed class TimeSpanInMinuteConverter : JsonConverter 8 | { 9 | public override TimeSpan Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 10 | { 11 | var minutes = reader.GetInt32(); 12 | 13 | return TimeSpan.FromMinutes(minutes); 14 | } 15 | 16 | public override void Write(Utf8JsonWriter writer, TimeSpan value, JsonSerializerOptions options) => 17 | throw new NotSupportedException(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/TimestampInMillisecondConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Json.Converters 6 | { 7 | internal sealed class TimestampInMillisecondConverter : JsonConverter 8 | { 9 | public override DateTimeOffset? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) 10 | { 11 | var timestamp = reader.GetInt64(); 12 | if (timestamp == 0) 13 | return null; 14 | 15 | return DateTimeOffset.FromUnixTimeMilliseconds(timestamp); 16 | } 17 | 18 | public override void Write(Utf8JsonWriter writer, DateTimeOffset? value, JsonSerializerOptions options) => 19 | throw new NotSupportedException(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Converters/ValidIdArrayConverterFactory.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Text.Json; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace Sakuno.ING.Game.Json.Converters 7 | { 8 | internal sealed class ValidIdArrayConverterFactory : JsonConverterFactory 9 | { 10 | public override bool CanConvert(Type typeToConvert) => 11 | typeToConvert.IsArray && typeToConvert.GetElementType().GetCustomAttribute() != null; 12 | 13 | public override JsonConverter? CreateConverter(Type typeToConvert, JsonSerializerOptions options) 14 | { 15 | var converterType = typeof(ValidIdArrayConverter<>).MakeGenericType(typeToConvert.GetElementType()); 16 | 17 | return (JsonConverter)Activator.CreateInstance(converterType); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/HomeportJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class HomeportJson 7 | { 8 | public RawShip[] api_ship { get; set; } 9 | public BasicAdmiral api_basic { get; set; } 10 | public RawRepairDock[] api_ndock { get; set; } 11 | public RawMaterialItem[] api_material { get; set; } 12 | public RawFleet[] api_deck_port { get; set; } 13 | public CombinedFleetKind api_combined_flag { get; set; } 14 | } 15 | #nullable enable 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/MapInfoJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class MapInfoJson 7 | { 8 | public RawMap[] api_map_info { get; set; } 9 | public RawAirForceGroup[] api_air_base { get; set; } 10 | } 11 | #nullable enable 12 | } 13 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/MasterDataJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class MasterDataJson 7 | { 8 | public RawShipInfo[] api_mst_ship { get; set; } 9 | public RawSlotItemTypeInfo[] api_mst_slotitem_equiptype { get; set; } 10 | public SlotItemInfoId[] api_mst_equip_exslot { get; set; } 11 | public RawExtraSlotSlotItemAllowListJson[] api_mst_equip_exslot_ship { get; set; } 12 | public RawShipTypeInfo[] api_mst_stype { get; set; } 13 | public RawSlotItemInfo[] api_mst_slotitem { get; set; } 14 | public RawUseItem[] api_mst_useitem { get; set; } 15 | public RawMapArea[] api_mst_maparea { get; set; } 16 | public RawMapInfo[] api_mst_mapinfo { get; set; } 17 | public RawMapBgmInfo[] api_mst_mapbgm { get; set; } 18 | public RawExpeditionInfo[] api_mst_mission { get; set; } 19 | public RawShipEquipLimitation[] api_mst_equip_ship { get; set; } 20 | } 21 | #nullable enable 22 | } 23 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/QuestListJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.Quests; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class QuestListJson 7 | { 8 | public RawQuest[] api_list { get; set; } 9 | } 10 | #nullable enable 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/Ship3Json.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class Ship3Json 7 | { 8 | public RawShip[] api_ship_data { get; set; } 9 | public RawFleet[] api_deck_data { get; set; } 10 | public RawUnequippedSlotItemInfo[] api_slot_data { get; set; } 11 | } 12 | #nullable enable 13 | } 14 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/ShipConstructionResultJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class ShipConstructionResultJson 7 | { 8 | public RawConstructionDock[] api_kdock { get; set; } 9 | public RawShip api_ship { get; set; } 10 | public RawSlotItem[] api_slotitem { get; set; } 11 | } 12 | #nullable enable 13 | } 14 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/ShipDeckJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class ShipDeckJson 7 | { 8 | public RawShip[] api_ship_data { get; set; } 9 | public RawFleet[] api_deck_data { get; set; } 10 | } 11 | #nullable enable 12 | } 13 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/ShipModernizationResultJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using Sakuno.ING.Game.Models; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Json 6 | { 7 | #nullable disable 8 | internal sealed class ShipModernizationResultJson 9 | { 10 | [JsonConverter(typeof(IntToBooleanConverter))] 11 | public bool api_powerup_flag { get; set; } 12 | public RawShip api_ship { get; set; } 13 | public RawFleet[] api_deck { get; set; } 14 | } 15 | #nullable enable 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/ShipsDismantlingJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json 5 | { 6 | #nullable disable 7 | internal sealed class ShipsDismantlingJson : IMaterialUpdate 8 | { 9 | public Materials api_material { get; set; } 10 | 11 | public void Apply(Materials materials) 12 | { 13 | materials.Fuel = api_material.Fuel; 14 | materials.Bullet = api_material.Bullet; 15 | materials.Steel = api_material.Steel; 16 | materials.Bauxite = api_material.Bauxite; 17 | } 18 | } 19 | #nullable enable 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/ShipsSupplyJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json 5 | { 6 | #nullable disable 7 | internal sealed class ShipsSupplyJson : IMaterialUpdate 8 | { 9 | public ShipSupply[] api_ship { get; set; } 10 | public Materials api_material { get; set; } 11 | 12 | public void Apply(Materials materials) 13 | { 14 | materials.Fuel = api_material.Fuel; 15 | materials.Bullet = api_material.Bullet; 16 | materials.Steel = api_material.Steel; 17 | materials.Bauxite = api_material.Bauxite; 18 | } 19 | } 20 | #nullable enable 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/SlotItemImprovementJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Json.Converters; 3 | using Sakuno.ING.Game.Models; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace Sakuno.ING.Game.Json 7 | { 8 | #nullable disable 9 | internal sealed class SlotItemImprovementJson : IMaterialUpdate 10 | { 11 | [JsonConverter(typeof(IntToBooleanConverter))] 12 | public bool api_remodel_flag { get; set; } 13 | public Materials api_after_material { get; set; } 14 | public RawSlotItem api_after_slot { get; set; } 15 | public SlotItemId[] api_use_slot_id { get; set; } 16 | 17 | public void Apply(Materials materials) 18 | { 19 | materials.Fuel = api_after_material.Fuel; 20 | materials.Bullet = api_after_material.Bullet; 21 | materials.Steel = api_after_material.Steel; 22 | materials.Bauxite = api_after_material.Bauxite; 23 | materials.InstantBuild = api_after_material.InstantBuild; 24 | materials.InstantRepair = api_after_material.InstantRepair; 25 | materials.Development = api_after_material.Development; 26 | materials.Improvement = api_after_material.Improvement; 27 | } 28 | } 29 | #nullable enable 30 | } 31 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/SlotItemTransferJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | using System.Collections.Generic; 4 | 5 | namespace Sakuno.ING.Game.Json 6 | { 7 | #nullable disable 8 | internal sealed class SlotItemTransferJson : IMaterialUpdate 9 | { 10 | public ShipData api_ship_data { get; set; } 11 | 12 | public int api_bauxite { get; set; } 13 | 14 | public IEnumerable Ships 15 | { 16 | get 17 | { 18 | yield return api_ship_data.api_set_ship; 19 | yield return api_ship_data.api_unset_ship; 20 | } 21 | } 22 | 23 | public class ShipData 24 | { 25 | public RawShip api_set_ship { get; set; } 26 | public RawShip api_unset_ship { get; set; } 27 | } 28 | 29 | public void Apply(Materials materials) => materials.Bauxite = api_bauxite; 30 | } 31 | #nullable enable 32 | } 33 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/SlotItemsDevelopedJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Json.Converters; 3 | using Sakuno.ING.Game.Models; 4 | using System.Text.Json.Serialization; 5 | 6 | namespace Sakuno.ING.Game.Json 7 | { 8 | #nullable disable 9 | internal sealed class SlotItemsDevelopedJson : IMaterialUpdate 10 | { 11 | [JsonConverter(typeof(IntToBooleanConverter))] 12 | public bool api_create_flag { get; set; } 13 | public DevelopedSlotItemJson[] api_get_items { get; set; } 14 | public Materials api_material { get; set; } 15 | 16 | public void Apply(Materials materials) 17 | { 18 | materials.Fuel = api_material.Fuel; 19 | materials.Bullet = api_material.Bullet; 20 | materials.Steel = api_material.Steel; 21 | materials.Bauxite = api_material.Bauxite; 22 | materials.InstantBuild = api_material.InstantBuild; 23 | materials.InstantRepair = api_material.InstantRepair; 24 | materials.Development = api_material.Development; 25 | materials.Improvement = api_material.Improvement; 26 | } 27 | 28 | public sealed class DevelopedSlotItemJson 29 | { 30 | public int api_id { get; set; } 31 | public int api_slotitem_id { get; set; } 32 | } 33 | } 34 | #nullable enable 35 | } 36 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/SlotItemsScrappingJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Events; 2 | using Sakuno.ING.Game.Models; 3 | 4 | namespace Sakuno.ING.Game.Json 5 | { 6 | #nullable disable 7 | internal sealed class SlotItemsScrappingJson : IMaterialUpdate 8 | { 9 | public Materials api_get_material { get; set; } 10 | 11 | public void Apply(Materials materials) 12 | { 13 | materials.Fuel += api_get_material.Fuel; 14 | materials.Bullet += api_get_material.Bullet; 15 | materials.Steel += api_get_material.Steel; 16 | materials.Bauxite += api_get_material.Bauxite; 17 | } 18 | } 19 | #nullable enable 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/StartupInfoJson.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal sealed class StartupInfoJson 7 | { 8 | public RawSlotItem[] api_slot_item { get; set; } 9 | public RawConstructionDock[] api_kdock { get; set; } 10 | public RawUseItemCount[] api_useitem { get; set; } 11 | public RawUnequippedSlotItemInfo[] api_unsetslot { get; set; } 12 | } 13 | #nullable enable 14 | } 15 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Json/SvData.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Specialized; 2 | 3 | namespace Sakuno.ING.Game.Json 4 | { 5 | #nullable disable 6 | internal class SvData 7 | { 8 | public int api_result { get; set; } 9 | public string api_result_msg { get; set; } 10 | } 11 | internal sealed class SvDataRequestOnly : SvData 12 | { 13 | public string Api { get; set; } 14 | public NameValueCollection Request { get; set; } 15 | } 16 | internal sealed class SvData : SvData 17 | { 18 | public T api_data { get; set; } 19 | } 20 | internal sealed class SvDataWithRequest : SvData 21 | { 22 | public NameValueCollection Request { get; set; } 23 | public T api_data { get; set; } 24 | } 25 | #nullable enable 26 | } 27 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/AdmiralRank.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum AdmiralRank 4 | { 5 | /// 6 | /// 元帥 7 | /// 8 | MarshalAdmiral = 1, 9 | /// 10 | /// 大将 11 | /// 12 | Admiral = 2, 13 | /// 14 | /// 中将 15 | /// 16 | ViceAdmiral = 3, 17 | /// 18 | /// 少将 19 | /// 20 | RearAdmiral = 4, 21 | /// 22 | /// 大佐 23 | /// 24 | Captain = 5, 25 | /// 26 | /// 中佐 27 | /// 28 | Commander = 6, 29 | /// 30 | /// 新米中佐 31 | /// 32 | NoviceCommander = 7, 33 | /// 34 | /// 少佐 35 | /// 36 | LieutenantCommander = 8, 37 | /// 38 | /// 中堅少佐 39 | /// 40 | ViceLieutenantCommander = 9, 41 | /// 42 | /// 新米少佐 43 | /// 44 | NoviceLieutenantCommander = 10, 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/AirForceAction.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum AirForceAction 4 | { 5 | Standby = 0, 6 | Sortie = 1, 7 | Defense = 2, 8 | Retreat = 3, 9 | Rest = 4, 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/AirForceGroupId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct AirForceGroupId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public AirForceGroupId(int value) => this.value = value; 11 | 12 | public int CompareTo(AirForceGroupId other) => value - other.value; 13 | public bool Equals(AirForceGroupId other) => value == other.value; 14 | 15 | public static implicit operator int(AirForceGroupId id) => id.value; 16 | public static explicit operator AirForceGroupId(int value) => new AirForceGroupId(value); 17 | 18 | public static bool operator ==(AirForceGroupId left, AirForceGroupId right) => left.value == right.value; 19 | public static bool operator !=(AirForceGroupId left, AirForceGroupId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is AirForceGroupId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/AirForceSquadronMorale.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum AirForceSquadronMorale 4 | { 5 | Normal = 1, 6 | Yellow = 2, 7 | Red = 3, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/BasicAdmiral.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.Knowledge; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | #nullable disable 6 | internal sealed class BasicAdmiral : RawAdmiral 7 | { 8 | public int api_member_id { get; set; } 9 | public override int Id => api_member_id; 10 | 11 | public string api_nickname { get; set; } 12 | public override string Name => api_nickname; 13 | 14 | public int api_level { get; set; } 15 | public int api_experience { get; set; } 16 | public override Leveling Leveling => new Leveling(api_level, 17 | api_experience, 18 | KnownLeveling.GetAdmiralExp(api_level), 19 | KnownLeveling.GetAdmiralExp(api_level + 1), 20 | api_level >= KnownLeveling.MaxAdmiralLevel); 21 | 22 | public AdmiralRank api_rank { get; set; } 23 | public override AdmiralRank Rank => api_rank; 24 | 25 | public int api_max_chara { get; set; } 26 | public override int MaxShipCount => api_max_chara; 27 | 28 | public int api_max_slotitem { get; set; } 29 | public override int MaxSlotItemCount => api_max_slotitem; 30 | 31 | public override int MaxMaterial => api_level * 250 + 750; 32 | } 33 | #nullable enable 34 | } 35 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/CombinedFleetKind.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum CombinedFleetKind 4 | { 5 | None = 0, 6 | /// 空母機動部隊 7 | CarrierTaskForceFleet = 1, 8 | /// 水上打撃部隊 9 | SurfaceTaskForceFleet = 2, 10 | /// 輸送護衛部隊 11 | TransportEscortFleet = 3, 12 | }; 13 | } 14 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ConstructionDockId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct ConstructionDockId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public ConstructionDockId(int value) => this.value = value; 11 | 12 | public int CompareTo(ConstructionDockId other) => value - other.value; 13 | public bool Equals(ConstructionDockId other) => value == other.value; 14 | 15 | public static implicit operator int(ConstructionDockId id) => id.value; 16 | public static explicit operator ConstructionDockId(int value) => new ConstructionDockId(value); 17 | 18 | public static bool operator ==(ConstructionDockId left, ConstructionDockId right) => left.value == right.value; 19 | public static bool operator !=(ConstructionDockId left, ConstructionDockId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is ConstructionDockId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ConstructionDockState.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum ConstructionDockState 4 | { 5 | Locked = -1, 6 | Idle = 0, 7 | Building = 2, 8 | Completed = 3, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ExpeditionUseItemReward.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | public readonly struct ExpeditionUseItemReward 6 | { 7 | public UseItemId ItemId { get; } 8 | public int Count { get; } 9 | 10 | public ExpeditionUseItemReward(UseItemId itemId, int count) 11 | { 12 | ItemId = itemId; 13 | Count = count; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/FireRange.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum FireRange 4 | { 5 | /// 6 | /// 超短 7 | /// 8 | None = 0, 9 | /// 10 | /// 短 11 | /// 12 | Short = 1, 13 | /// 14 | /// 中 15 | /// 16 | Medium = 2, 17 | /// 18 | /// 長 19 | /// 20 | Long = 3, 21 | /// 22 | /// 超長 23 | /// 24 | VeryLong = 4, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/FleetExpeditionState.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum FleetExpeditionState 4 | { 5 | None = 0, 6 | InMission = 1, 7 | Completed = 2, 8 | Recalled = 3, 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/FleetId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct FleetId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public FleetId(int value) => this.value = value; 11 | 12 | public int CompareTo(FleetId other) => value - other.value; 13 | public bool Equals(FleetId other) => value == other.value; 14 | 15 | public static implicit operator int(FleetId id) => id.value; 16 | public static explicit operator FleetId(int value) => new FleetId(value); 17 | 18 | public static bool operator ==(FleetId left, FleetId right) => left.value == right.value; 19 | public static bool operator !=(FleetId left, FleetId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is FleetId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Knowledge/KnownUseItem.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.Knowledge 2 | { 3 | public enum KnownUseItem 4 | { 5 | /// 6 | /// 高速修復材 7 | /// 8 | InstantRepair = 1, 9 | /// 10 | /// 高速建造材 11 | /// 12 | InstantBuild = 2, 13 | /// 14 | /// 開発資材 15 | /// 16 | Development = 3, 17 | /// 18 | /// 改修資材 19 | /// 20 | Improvement = 4, 21 | /// 22 | /// 家具箱(小) 23 | /// 24 | FurnitureSmall = 10, 25 | /// 26 | /// 家具箱(中) 27 | /// 28 | FurnitureMedium = 11, 29 | /// 30 | /// 家具箱(大) 31 | /// 32 | FurnitureLarge = 12, 33 | /// 34 | /// 燃料 35 | /// 36 | Fuel = 31, 37 | /// 38 | /// 弾薬 39 | /// 40 | Bullet = 32, 41 | /// 42 | /// 鋼材 43 | /// 44 | Steel = 33, 45 | /// 46 | /// ボーキサイト 47 | /// 48 | Bauxite = 34, 49 | /// 50 | /// 家具コイン 51 | /// 52 | FurnitureCoin = 44, 53 | /// 54 | /// 改装設計図 55 | /// 56 | Blueprint = 58, 57 | /// 58 | /// 試製甲板カタパルト 59 | /// 60 | FlightDeckCatapult = 65, 61 | /// 62 | /// 戦闘詳報 63 | /// 64 | ActionReport = 78, 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/ExpeditionId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Json.Converters; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct ExpeditionId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public ExpeditionId(int value) => this.value = value; 11 | 12 | public int CompareTo(ExpeditionId other) => value - other.value; 13 | public bool Equals(ExpeditionId other) => value == other.value; 14 | 15 | public static implicit operator int(ExpeditionId id) => id.value; 16 | public static explicit operator ExpeditionId(int value) => new ExpeditionId(value); 17 | 18 | public static bool operator ==(ExpeditionId left, ExpeditionId right) => left.value == right.value; 19 | public static bool operator !=(ExpeditionId left, ExpeditionId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is ExpeditionId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/MapAreaId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct MapAreaId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public MapAreaId(int value) => this.value = value; 11 | 12 | public int CompareTo(MapAreaId other) => value - other.value; 13 | public bool Equals(MapAreaId other) => value == other.value; 14 | 15 | public static implicit operator int(MapAreaId id) => id.value; 16 | public static explicit operator MapAreaId(int value) => new MapAreaId(value); 17 | 18 | public static bool operator ==(MapAreaId left, MapAreaId right) => left.value == right.value; 19 | public static bool operator !=(MapAreaId left, MapAreaId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is MapAreaId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/MapId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Json.Converters; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct MapId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public MapId(int value) => this.value = value; 11 | 12 | public MapAreaId AreaId => (MapAreaId)(value / 10); 13 | public int CategoryNo => value % 10; 14 | 15 | public int CompareTo(MapId other) => value - other.value; 16 | public bool Equals(MapId other) => value == other.value; 17 | 18 | public static implicit operator int(MapId id) => id.value; 19 | public static explicit operator MapId(int value) => new MapId(value); 20 | 21 | public static bool operator ==(MapId left, MapId right) => left.value == right.value; 22 | public static bool operator !=(MapId left, MapId right) => left.value != right.value; 23 | public override bool Equals(object obj) => obj is MapId other && other == this; 24 | public override int GetHashCode() => value; 25 | public override string ToString() 26 | { 27 | var area = Math.DivRem(value, 10, out var category); 28 | 29 | return $"{area}-{category}"; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawExtraSlotSlotItemAllowListJson.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | #nullable disable 4 | public sealed class RawExtraSlotSlotItemAllowListJson 5 | { 6 | public SlotItemInfoId api_slotitem_id { get; set; } 7 | public ShipInfoId[] api_ship_ids { get; set; } 8 | } 9 | #nullable enable 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawMapArea.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | #nullable disable 7 | public sealed class RawMapArea : IIdentifiable 8 | { 9 | [JsonPropertyName("api_id")] 10 | public MapAreaId Id { get; set; } 11 | [JsonPropertyName("api_name")] 12 | public string Name { get; set; } 13 | [JsonPropertyName("api_type")] 14 | [JsonConverter(typeof(IntToBooleanConverter))] 15 | public bool IsEventArea { get; set; } 16 | } 17 | #nullable enable 18 | } 19 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawMapBgmInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.MasterData 4 | { 5 | #nullable disable 6 | public sealed class RawMapBgmInfo 7 | { 8 | [JsonPropertyName("api_id")] 9 | public MapId Id { get; set; } 10 | [JsonPropertyName("api_moving_bgm")] 11 | public int MapBgmId { get; set; } 12 | 13 | public int[] api_map_bgm { get; set; } 14 | public int[] api_boss_bgm { get; set; } 15 | public int NormalBattleDayBgmId => api_map_bgm[0]; 16 | public int NormalBattleNightBgmId => api_map_bgm[1]; 17 | public int BossBattleDayBgmId => api_boss_bgm[0]; 18 | public int BossBattleNightBgmId => api_boss_bgm[1]; 19 | } 20 | #nullable enable 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawMapInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.MasterData 4 | { 5 | #nullable disable 6 | public sealed class RawMapInfo : IIdentifiable 7 | { 8 | [JsonPropertyName("api_id")] 9 | public MapId Id { get; set; } 10 | [JsonPropertyName("api_maparea_id")] 11 | public MapAreaId MapAreaId { get; set; } 12 | [JsonPropertyName("api_no")] 13 | public int CategoryNo { get; set; } 14 | 15 | [JsonPropertyName("api_name")] 16 | public string Name { get; set; } 17 | [JsonPropertyName("api_level")] 18 | public int Difficulty { get; set; } 19 | [JsonPropertyName("api_opetext")] 20 | public string OperationName { get; set; } 21 | [JsonPropertyName("api_infotext")] 22 | public string Description { get; set; } 23 | 24 | [JsonPropertyName("api_item")] 25 | public UseItemId[] ItemRewards { get; set; } 26 | [JsonPropertyName("api_required_defeat_count")] 27 | public int? RequiredDefeatCount { get; set; } 28 | 29 | public int[] api_sally_flag { get; set; } 30 | public bool CanUseNormalFleet => api_sally_flag[0] != 0; 31 | public bool CanUseStrikingForceFleet => api_sally_flag[2] != 0; 32 | public bool CanUseCombinedFleet(CombinedFleetKind type) => 33 | (api_sally_flag[1] & (1 << ((int)type - 1))) != 0; 34 | } 35 | #nullable enable 36 | } 37 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawShipEquipLimitation.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.MasterData 2 | { 3 | #nullable disable 4 | public sealed class RawShipEquipLimitation 5 | { 6 | public ShipInfoId api_ship_id { get; set; } 7 | public SlotItemTypeId[] api_equip_type { get; set; } 8 | } 9 | #nullable enable 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawShipTypeInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.MasterData 4 | { 5 | #nullable disable 6 | public sealed class RawShipTypeInfo : IIdentifiable 7 | { 8 | [JsonPropertyName("api_id")] 9 | public ShipTypeId Id { get; set; } 10 | [JsonPropertyName("api_name")] 11 | public string Name { get; set; } 12 | } 13 | #nullable enable 14 | } 15 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawSlotItemTypeInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.MasterData 4 | { 5 | #nullable disable 6 | 7 | public sealed class RawSlotItemTypeInfo : IIdentifiable 8 | { 9 | [JsonPropertyName("api_id")] 10 | public SlotItemTypeId Id { get; set; } 11 | [JsonPropertyName("api_name")] 12 | public string Name { get; set; } 13 | } 14 | #nullable enable 15 | } 16 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/RawUseItem.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.MasterData 4 | { 5 | #nullable disable 6 | public sealed class RawUseItem : IIdentifiable 7 | { 8 | [JsonPropertyName("api_id")] 9 | public UseItemId Id { get; set; } 10 | [JsonPropertyName("api_name")] 11 | public string Name { get; set; } 12 | } 13 | #nullable enable 14 | } 15 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/ShipInfoId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct ShipInfoId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public ShipInfoId(int value) => this.value = value; 11 | 12 | public int CompareTo(ShipInfoId other) => value - other.value; 13 | public bool Equals(ShipInfoId other) => value == other.value; 14 | 15 | public static implicit operator int(ShipInfoId id) => id.value; 16 | public static explicit operator ShipInfoId(int value) => new ShipInfoId(value); 17 | 18 | public static bool operator ==(ShipInfoId left, ShipInfoId right) => left.value == right.value; 19 | public static bool operator !=(ShipInfoId left, ShipInfoId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is ShipInfoId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/ShipTypeId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct ShipTypeId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public ShipTypeId(int value) => this.value = value; 11 | 12 | public int CompareTo(ShipTypeId other) => value - other.value; 13 | public bool Equals(ShipTypeId other) => value == other.value; 14 | 15 | public static implicit operator int(ShipTypeId id) => id.value; 16 | public static explicit operator ShipTypeId(int value) => new ShipTypeId(value); 17 | 18 | public static bool operator ==(ShipTypeId left, ShipTypeId right) => left.value == right.value; 19 | public static bool operator !=(ShipTypeId left, ShipTypeId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is ShipInfoId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | #nullable enable 25 | } 26 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/SlotItemInfoId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Json.Converters; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct SlotItemInfoId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public SlotItemInfoId(int value) => this.value = value; 11 | 12 | public int CompareTo(SlotItemInfoId other) => value - other.value; 13 | public bool Equals(SlotItemInfoId other) => value == other.value; 14 | 15 | public static implicit operator int(SlotItemInfoId id) => id.value; 16 | public static explicit operator SlotItemInfoId(int value) => new SlotItemInfoId(value); 17 | 18 | public static bool operator ==(SlotItemInfoId left, SlotItemInfoId right) => left.value == right.value; 19 | public static bool operator !=(SlotItemInfoId left, SlotItemInfoId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is SlotItemInfoId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/SlotItemTypeId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct SlotItemTypeId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public SlotItemTypeId(int value) => this.value = value; 11 | 12 | public int CompareTo(SlotItemTypeId other) => value - other.value; 13 | public bool Equals(SlotItemTypeId other) => value == other.value; 14 | 15 | public static implicit operator int(SlotItemTypeId id) => id.value; 16 | public static explicit operator SlotItemTypeId(int value) => new SlotItemTypeId(value); 17 | 18 | public static bool operator ==(SlotItemTypeId left, SlotItemTypeId right) => left.value == right.value; 19 | public static bool operator !=(SlotItemTypeId left, SlotItemTypeId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is SlotItemTypeId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/MasterData/UseItemId.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using Sakuno.ING.Game.Json.Converters; 3 | 4 | namespace Sakuno.ING.Game.Models.MasterData 5 | { 6 | [Identifier] 7 | public readonly struct UseItemId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public UseItemId(int value) => this.value = value; 11 | 12 | public int CompareTo(UseItemId other) => value - other.value; 13 | public bool Equals(UseItemId other) => value == other.value; 14 | 15 | public static implicit operator int(UseItemId id) => id.value; 16 | public static explicit operator UseItemId(int value) => new UseItemId(value); 17 | 18 | public static bool operator ==(UseItemId left, UseItemId right) => left.value == right.value; 19 | public static bool operator !=(UseItemId left, UseItemId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is UseItemId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Materials.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public record Materials 4 | { 5 | /// 6 | /// 燃料 7 | /// 8 | public int Fuel { get; set; } 9 | /// 10 | /// 弾薬 11 | /// 12 | public int Bullet { get; set; } 13 | /// 14 | /// 鋼材 15 | /// 16 | public int Steel { get; set; } 17 | /// 18 | /// ボーキサイト 19 | /// 20 | public int Bauxite { get; set; } 21 | /// 22 | /// 高速建造材 23 | /// 24 | public int InstantBuild { get; set; } 25 | /// 26 | /// 高速修復材 27 | /// 28 | public int InstantRepair { get; set; } 29 | /// 30 | /// 開発資材 31 | /// 32 | public int Development { get; set; } 33 | /// 34 | /// 改修資材 35 | /// 36 | public int Improvement { get; set; } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/QuestId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct QuestId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public QuestId(int value) => this.value = value; 11 | 12 | public int CompareTo(QuestId other) => value - other.value; 13 | public bool Equals(QuestId other) => value == other.value; 14 | 15 | public static implicit operator int(QuestId id) => id.value; 16 | public static explicit operator QuestId(int value) => new QuestId(value); 17 | 18 | public static bool operator ==(QuestId left, QuestId right) => left.value == right.value; 19 | public static bool operator !=(QuestId left, QuestId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is QuestId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Quests/QuestState.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.Quests 2 | { 3 | public enum QuestState 4 | { 5 | Inactive = 1, 6 | Active = 2, 7 | Completed = 3, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Quests/RawQuest.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models.Quests 4 | { 5 | #nullable disable 6 | public sealed class RawQuest : IIdentifiable 7 | { 8 | [JsonPropertyName("api_no")] 9 | public QuestId Id { get; set; } 10 | 11 | [JsonPropertyName("api_title")] 12 | public string Name { get; set; } 13 | 14 | [JsonPropertyName("api_state")] 15 | public QuestState State { get; set; } 16 | } 17 | #nullable enable 18 | } 19 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawAdmiral.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public abstract class RawAdmiral : IIdentifiable 4 | { 5 | private protected RawAdmiral() { } 6 | public abstract int Id { get; } 7 | public abstract string Name { get; } 8 | public abstract Leveling Leveling { get; } 9 | public abstract AdmiralRank Rank { get; } 10 | public abstract int MaxShipCount { get; } 11 | public abstract int MaxSlotItemCount { get; } 12 | public abstract int MaxMaterial { get; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawAirForceGroup.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | #nullable disable 7 | public sealed class RawAirForceGroup : IIdentifiable<(MapAreaId MapArea, AirForceGroupId Group)> 8 | { 9 | [JsonPropertyName("api_rid")] 10 | public AirForceGroupId GroupId { get; set; } 11 | [JsonPropertyName("api_area_id")] 12 | public MapAreaId MapAreaId { get; set; } 13 | public (MapAreaId, AirForceGroupId) Id => (MapAreaId, GroupId); 14 | 15 | [JsonPropertyName("api_name")] 16 | public string Name { get; set; } 17 | 18 | public CombatRadius api_distance { get; set; } 19 | public int BaseCombatRadius => api_distance.api_base; 20 | public int BonusCombatRadius => api_distance.api_bonus; 21 | 22 | [JsonPropertyName("api_action_kind")] 23 | public AirForceAction Action { get; set; } 24 | 25 | [JsonPropertyName("api_plane_info")] 26 | public RawAirForceSquadron[] Squadrons { get; set; } 27 | 28 | public sealed class CombatRadius 29 | { 30 | public int api_base { get; set; } 31 | public int api_bonus { get; set; } 32 | } 33 | } 34 | #nullable enable 35 | } 36 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawAirForceSquadron.cs: -------------------------------------------------------------------------------- 1 | using System.Text.Json.Serialization; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | public sealed class RawAirForceSquadron : IIdentifiable 6 | { 7 | [JsonPropertyName("api_squadron_id")] 8 | public int Id { get; set; } 9 | 10 | [JsonPropertyName("api_slotid")] 11 | public SlotItemId? SlotItemId { get; set; } 12 | 13 | public int api_count { get; set; } 14 | public int api_max_count { get; set; } 15 | public ClampedValue Count => (api_count, api_max_count); 16 | 17 | [JsonPropertyName("api_cond")] 18 | public AirForceSquadronMorale Morale { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawConstructionDock.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Models 6 | { 7 | public sealed class RawConstructionDock : IIdentifiable 8 | { 9 | [JsonPropertyName("api_id")] 10 | public ConstructionDockId Id { get; set; } 11 | 12 | [JsonPropertyName("api_state")] 13 | public ConstructionDockState State { get; set; } 14 | 15 | public int api_item1 { get; set; } 16 | public int api_item2 { get; set; } 17 | public int api_item3 { get; set; } 18 | public int api_item4 { get; set; } 19 | public int api_item5 { get; set; } 20 | public Materials Consumption => new Materials() 21 | { 22 | Fuel = api_item1, 23 | Bullet = api_item2, 24 | Steel = api_item3, 25 | Bauxite = api_item4, 26 | Development = api_item5, 27 | }; 28 | 29 | [JsonPropertyName("api_complete_time")] 30 | public DateTimeOffset? CompletionTime { get; set; } 31 | 32 | [JsonPropertyName("api_created_ship_id")] 33 | public ShipInfoId? BuiltShipId { get; set; } 34 | 35 | public bool IsLSC => api_item1 >= 1000; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawFleet.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | #nullable disable 7 | public sealed class RawFleet : IIdentifiable 8 | { 9 | [JsonPropertyName("api_id")] 10 | public FleetId Id { get; set; } 11 | [JsonPropertyName("api_name")] 12 | public string Name { get; set; } 13 | 14 | [JsonPropertyName("api_mission")] 15 | [JsonConverter(typeof(FleetExpeditionStatusConverter))] 16 | public RawFleetExpeditionStatus ExpeditionStatus { get; set; } 17 | 18 | [JsonPropertyName("api_ship")] 19 | [JsonConverter(typeof(ValidIdArrayConverterFactory))] 20 | public ShipId[] ShipIds { get; set; } 21 | } 22 | #nullable enable 23 | } 24 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawFleetExpeditionStatus.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | public readonly struct RawFleetExpeditionStatus 7 | { 8 | public FleetExpeditionState State { get; } 9 | public ExpeditionId? ExpeditionId { get; } 10 | public DateTimeOffset ReturnTime { get; } 11 | 12 | public RawFleetExpeditionStatus(FleetExpeditionState state, ExpeditionId? expeditionId, DateTimeOffset returnTime) 13 | { 14 | State = state; 15 | ExpeditionId = expeditionId; 16 | ReturnTime = returnTime; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawMap.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Models 6 | { 7 | #nullable disable 8 | public sealed class RawMap : IIdentifiable 9 | { 10 | [JsonPropertyName("api_id")] 11 | public MapId Id { get; set; } 12 | 13 | [JsonPropertyName("api_cleared")] 14 | [JsonConverter(typeof(IntToBooleanConverter))] 15 | public bool IsCleared { get; set; } 16 | 17 | [JsonPropertyName("api_air_base_decks")] 18 | public int AvailableAirForceGroups { get; set; } 19 | 20 | [JsonPropertyName("api_defeat_count")] 21 | public int? DefeatedCount { get; set; } 22 | [JsonPropertyName("api_required_defeat_count")] 23 | public int? RequiredDefeatCount { get; set; } 24 | } 25 | #nullable enable 26 | } 27 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawMaterialItem.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public sealed class RawMaterialItem 4 | { 5 | public int api_id { get; set; } 6 | public int api_value { get; set; } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawRepairDock.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | public sealed class RawRepairDock : IIdentifiable 7 | { 8 | [JsonPropertyName("api_id")] 9 | public RepairDockId Id { get; set; } 10 | 11 | [JsonPropertyName("api_state")] 12 | public RepairDockState State { get; set; } 13 | 14 | [JsonPropertyName("api_ship_id")] 15 | public ShipId? RepairingShipId { get; set; } 16 | 17 | [JsonPropertyName("api_complete_time")] 18 | public DateTimeOffset? CompletionTime { get; set; } 19 | 20 | public int api_item1 { get; set; } 21 | public int api_item3 { get; set; } 22 | public Materials Consumption => new Materials() 23 | { 24 | Fuel = api_item1, 25 | Steel = api_item3, 26 | }; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawShipLockInfo.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | public sealed class RawShipLockInfo 7 | { 8 | [JsonConverter(typeof(IntToBooleanConverter))] 9 | public bool api_locked { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawSlotItem.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using Sakuno.ING.Game.Models.MasterData; 3 | using System.Text.Json.Serialization; 4 | 5 | namespace Sakuno.ING.Game.Models 6 | { 7 | public sealed class RawSlotItem : IIdentifiable 8 | { 9 | [JsonPropertyName("api_id")] 10 | public SlotItemId Id { get; set; } 11 | [JsonPropertyName("api_slotitem_id")] 12 | public SlotItemInfoId SlotItemInfoId { get; set; } 13 | [JsonPropertyName("api_locked")] 14 | [JsonConverter(typeof(IntToBooleanConverter))] 15 | public bool IsLocked { get; set; } 16 | [JsonPropertyName("api_level")] 17 | public int ImprovementLevel { get; set; } 18 | [JsonPropertyName("api_alv")] 19 | public int AerialProficiency { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawSlotItemLockInfo.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | public sealed class RawSlotItemLockInfo 7 | { 8 | [JsonConverter(typeof(IntToBooleanConverter))] 9 | public bool api_locked { get; set; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawUnequippedSlotItemInfo.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | public sealed class RawUnequippedSlotItemInfo 6 | { 7 | public SlotItemTypeId TypeId { get; set; } 8 | public SlotItemId[] SlotItemIds { get; set; } = default!; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RawUseItemCount.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | public sealed class RawUseItemCount : IIdentifiable 7 | { 8 | [JsonPropertyName("api_id")] 9 | public UseItemId Id { get; set; } 10 | [JsonPropertyName("api_count")] 11 | public int Count { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RecordAdmiral.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.Knowledge; 2 | 3 | namespace Sakuno.ING.Game.Models 4 | { 5 | #nullable disable 6 | internal sealed class RecordAdmiral : RawAdmiral 7 | { 8 | public int api_member_id { get; set; } 9 | public override int Id => api_member_id; 10 | 11 | public string api_nickname { get; set; } 12 | public override string Name => api_nickname; 13 | 14 | public int api_level { get; set; } 15 | public int[] api_experience { get; set; } 16 | public override Leveling Leveling => new Leveling(api_level, 17 | api_experience[0], 18 | KnownLeveling.GetAdmiralExp(api_level), 19 | KnownLeveling.GetAdmiralExp(api_level + 1), 20 | api_level >= KnownLeveling.MaxAdmiralLevel); 21 | 22 | public AdmiralRank api_rank { get; set; } 23 | public override AdmiralRank Rank => api_rank; 24 | 25 | public int[] api_ship { get; set; } 26 | public override int MaxShipCount => api_ship[1]; 27 | 28 | public int[] api_slotitem { get; set; } 29 | public override int MaxSlotItemCount => api_slotitem[1]; 30 | 31 | public int api_material_max { get; set; } 32 | public override int MaxMaterial => api_material_max; 33 | } 34 | #nullable enable 35 | } 36 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RepairDockId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct RepairDockId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public RepairDockId(int value) => this.value = value; 11 | 12 | public int CompareTo(RepairDockId other) => value - other.value; 13 | public bool Equals(RepairDockId other) => value == other.value; 14 | 15 | public static implicit operator int(RepairDockId id) => id.value; 16 | public static explicit operator RepairDockId(int value) => new RepairDockId(value); 17 | 18 | public static bool operator ==(RepairDockId left, RepairDockId right) => left.value == right.value; 19 | public static bool operator !=(RepairDockId left, RepairDockId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is RepairDockId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/RepairDockState.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum RepairDockState 4 | { 5 | Locked = -1, 6 | Empty = 0, 7 | Repairing = 1, 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ShipDamageState.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum ShipDamageState 4 | { 5 | FullyHealthy = 0, 6 | Healthy = 1, 7 | LightlyDamaged = 2, 8 | ModeratelyDamaged = 3, 9 | HeavilyDamaged = 4, 10 | Sunk = 5, 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ShipId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct ShipId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public ShipId(int value) => this.value = value; 11 | 12 | public int CompareTo(ShipId other) => value - other.value; 13 | public bool Equals(ShipId other) => value == other.value; 14 | 15 | public static implicit operator int(ShipId id) => id.value; 16 | public static explicit operator ShipId(int value) => new ShipId(value); 17 | 18 | public static bool operator ==(ShipId left, ShipId right) => left.value == right.value; 19 | public static bool operator !=(ShipId left, ShipId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is ShipId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/ShipSpeed.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models 2 | { 3 | public enum ShipSpeed 4 | { 5 | /// 6 | /// 陸上基地 7 | /// 8 | None = 0, 9 | /// 10 | /// 低速 11 | /// 12 | Slow = 5, 13 | /// 14 | /// 高速 15 | /// 16 | Fast = 10, 17 | /// 18 | /// 高速+ 19 | /// 20 | FastPlus = 15, 21 | /// 22 | /// 最速 23 | /// 24 | UltraFast = 20, 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/SlotItemId.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Json.Converters; 2 | using System; 3 | 4 | namespace Sakuno.ING.Game.Models 5 | { 6 | [Identifier] 7 | public readonly struct SlotItemId : IEquatable, IComparable 8 | { 9 | private readonly int value; 10 | public SlotItemId(int value) => this.value = value; 11 | 12 | public int CompareTo(SlotItemId other) => value - other.value; 13 | public bool Equals(SlotItemId other) => value == other.value; 14 | 15 | public static implicit operator int(SlotItemId id) => id.value; 16 | public static explicit operator SlotItemId(int value) => new SlotItemId(value); 17 | 18 | public static bool operator ==(SlotItemId left, SlotItemId right) => left.value == right.value; 19 | public static bool operator !=(SlotItemId left, SlotItemId right) => left.value != right.value; 20 | public override bool Equals(object obj) => obj is SlotItemId other && other == this; 21 | public override int GetHashCode() => value; 22 | public override string ToString() => value.ToString(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Sortie/BattleKind.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.Sortie 2 | { 3 | public enum BattleKind 4 | { 5 | None, 6 | Normal, 7 | NightOnly, 8 | NightFirst, 9 | AerialCombat, 10 | EnemyCombinedFleet, 11 | AerialAttack, 12 | NightToDay, 13 | EnemyAmbush, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Sortie/RawSortieEvent.cs: -------------------------------------------------------------------------------- 1 | using Sakuno.ING.Game.Models.MasterData; 2 | using System.Text.Json.Serialization; 3 | 4 | namespace Sakuno.ING.Game.Models.Sortie 5 | { 6 | #nullable disable 7 | public sealed class RawSortieEvent 8 | { 9 | public int api_maparea_id { get; set; } 10 | public int api_mapinfo_no { get; set; } 11 | public MapId MapId => (MapId)(api_maparea_id * 10 + api_mapinfo_no); 12 | 13 | [JsonPropertyName("api_no")] 14 | public int RouteId { get; set; } 15 | 16 | [JsonPropertyName("api_event_id")] 17 | public SortieEventKind Type { get; set; } 18 | [JsonPropertyName("api_event_kind")] 19 | public BattleKind BattleType { get; set; } 20 | 21 | [JsonPropertyName("api_next")] 22 | public bool CanAdvance { get; set; } 23 | 24 | public bool api_m1 { get; set; } 25 | } 26 | #nullable enable 27 | } 28 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Models/Sortie/SortieEventKind.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Game.Models.Sortie 2 | { 3 | public enum SortieEventKind 4 | { 5 | Initialized, 6 | Unknown, 7 | Reward, 8 | Whirlpool, 9 | NormalBattle, 10 | BossBattle, 11 | NothingHappened, 12 | AviationReconnaissance, 13 | EscortSuccess, 14 | Landing, 15 | AerialAttack, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/Game/Sakuno.ING.Game.Provider/Sakuno.ING.Game.Provider.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sakuno.ING.Game 5 | IDE1006 6 | true 7 | 8 | 9 | 10 | 11 | 12 | Analyzer 13 | false 14 | 15 | 16 | 17 | 18 | 19 | all 20 | runtime; build; native; contentfiles; analyzers; buildtransitive 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /src/Infrastructure/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Portable 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Bootstrap/DryIocCompositor.cs: -------------------------------------------------------------------------------- 1 | using DryIoc; 2 | using Sakuno.ING.Composition; 3 | using System; 4 | using System.Collections.Generic; 5 | 6 | namespace Sakuno.ING.Bootstrap 7 | { 8 | internal sealed class DryIocCompositor : Compositor 9 | { 10 | private readonly IContainer _container; 11 | private readonly IDictionary _registeredViews; 12 | 13 | public DryIocCompositor(Container container, IDictionary registeredViews) 14 | { 15 | _container = container; 16 | _registeredViews = registeredViews; 17 | } 18 | 19 | public override T Resolve(string? serviceKey = null) => _container.Resolve(serviceKey); 20 | public override object Resolve(Type type, string? serviceKey = null) => _container.Resolve(type, serviceKey); 21 | public override T ResolveOrDefault(string? serviceKey = null) => _container.Resolve(serviceKey, IfUnresolved.ReturnDefaultIfNotRegistered); 22 | public override object ResolveOrDefault(Type type, string? serviceKey = null) => _container.Resolve(type, serviceKey, IfUnresolved.ReturnDefaultIfNotRegistered); 23 | 24 | public override object? ResolveViewOrDefault(string? viewId, string? serviceKey = null) => 25 | viewId is not null && _registeredViews.TryGetValue(viewId, out var type) ? Resolve(type, serviceKey) : null; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Bootstrap/Sakuno.ING.Bootstrap.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/BindableObject.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.ComponentModel; 3 | using System.Runtime.CompilerServices; 4 | 5 | namespace Sakuno.ING 6 | { 7 | public abstract class BindableObject : IBindable 8 | { 9 | public event PropertyChangedEventHandler? PropertyChanged; 10 | 11 | protected void NotifyPropertyChanged([CallerMemberName] string? propertyName = null) => 12 | NotifyPropertyChanged(new PropertyChangedEventArgs(propertyName)); 13 | [EditorBrowsable(EditorBrowsableState.Never)] 14 | protected void NotifyPropertyChanged(PropertyChangedEventArgs args) => 15 | PropertyChanged?.Invoke(this, args); 16 | 17 | protected void Set(ref T field, T value, [CallerMemberName] string? propertyName = null) 18 | { 19 | if (EqualityComparer.Default.Equals(field, value)) 20 | return; 21 | 22 | field = value; 23 | NotifyPropertyChanged(propertyName); 24 | } 25 | [EditorBrowsable(EditorBrowsableState.Never)] 26 | protected void Set(ref T field, T value, PropertyChangedEventArgs args) 27 | { 28 | if (EqualityComparer.Default.Equals(field, value)) 29 | return; 30 | 31 | field = value; 32 | NotifyPropertyChanged(args); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Composition/Compositor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Composition 4 | { 5 | public abstract class Compositor 6 | { 7 | private static Compositor? _default; 8 | public static Compositor Default => _default ?? throw new InvalidOperationException("Not initialized"); 9 | 10 | protected Compositor() 11 | { 12 | _default ??= this; 13 | } 14 | 15 | public abstract T Resolve(string? serviceKey = null) where T : class; 16 | public abstract object Resolve(Type type, string? serviceKey = null); 17 | public abstract T ResolveOrDefault(string? serviceKey = null) where T : class; 18 | public abstract object ResolveOrDefault(Type type, string? serviceKey = null); 19 | 20 | public abstract object? ResolveViewOrDefault(string? viewId, string? serviceKey = null); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Composition/ExportAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Composition 4 | { 5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = true, Inherited = false)] 6 | public sealed class ExportAttribute : Attribute 7 | { 8 | public Type? ContractType { get; } 9 | public bool SingleInstance { get; set; } = true; 10 | public bool LazyCreate { get; set; } = true; 11 | 12 | public ExportAttribute() { } 13 | public ExportAttribute(Type contractType) => ContractType = contractType; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Http/HttpMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Text; 4 | 5 | namespace Sakuno.ING.Http 6 | { 7 | public sealed class HttpMessage 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/IBindable.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | 3 | namespace Sakuno.ING 4 | { 5 | public interface IBindable : INotifyPropertyChanged 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/IIdentifiable.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING 2 | { 3 | public interface IIdentifiable : IIdentifiable 4 | { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/IIdentifiable`T.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING 2 | { 3 | public interface IIdentifiable 4 | { 5 | T Id { get; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Messaging/ApiMessage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Messaging 4 | { 5 | public sealed class ApiMessage 6 | { 7 | public string Api { get; } 8 | public ReadOnlyMemory Request { get; } 9 | public ReadOnlyMemory Response { get; } 10 | 11 | public ApiMessage(string api, ReadOnlyMemory request, ReadOnlyMemory response) 12 | { 13 | Api = api; 14 | Request = request; 15 | Response = response; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Messaging/IApiMessageSource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Messaging 4 | { 5 | public interface IApiMessageSource 6 | { 7 | IObservable ApiMessageSource { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Sakuno.ING.Standard.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Sakuno.ING 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Shell/ExportViewAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Shell 4 | { 5 | [AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)] 6 | public sealed class ExportViewAttribute : Attribute 7 | { 8 | public string ViewId { get; } 9 | 10 | public ExportViewAttribute(string viewId) => ViewId = viewId; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Shell/IShell.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.Shell 2 | { 3 | public interface IShell 4 | { 5 | void Run(); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/Infrastructure/Sakuno.ING.Standard/Shell/IViewContractObservable.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Sakuno.ING.Shell 4 | { 5 | public interface IViewContractObservable 6 | { 7 | IObservable ViewContractObservable { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/ViewModels/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Portable 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Extensions.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Game; 4 | using System; 5 | using System.Collections.Generic; 6 | using System.Collections.ObjectModel; 7 | using System.Reactive.Disposables; 8 | using System.Reactive.Linq; 9 | 10 | namespace Sakuno.ING.ViewModels 11 | { 12 | internal static class Extensions 13 | { 14 | public static ReadOnlyObservableCollection Bind(this ITable table, CompositeDisposable? disposables = null) where TId : struct 15 | { 16 | var subscription = table.DefaultViewSource.ObserveOn(RxApp.MainThreadScheduler).Bind(out var result).Subscribe(); 17 | 18 | if (disposables is not null) 19 | subscription.DisposeWith(disposables); 20 | 21 | return result; 22 | } 23 | public static ReadOnlyObservableCollection Bind(this IObservable> source, CompositeDisposable? disposables = null) 24 | { 25 | var subscription = source.ObserveOn(RxApp.MainThreadScheduler).Bind(out var result).Subscribe(); 26 | 27 | if (disposables is not null) 28 | subscription.DisposeWith(disposables); 29 | 30 | return result; 31 | } 32 | public static ReadOnlyObservableCollection Bind(this IObservable> source, CompositeDisposable? disposables = null) where TId : notnull 33 | { 34 | var subscription = source.ObserveOn(RxApp.MainThreadScheduler).Bind(out var result).Subscribe(); 35 | 36 | if (disposables is not null) 37 | subscription.DisposeWith(disposables); 38 | 39 | return result; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/AdmiralViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Composition; 3 | using Sakuno.ING.Game.Models; 4 | using System.Reactive.Linq; 5 | 6 | namespace Sakuno.ING.ViewModels.Homeport 7 | { 8 | [Export] 9 | public sealed class AdmiralViewModel : ReactiveObject 10 | { 11 | private readonly ObservableAsPropertyHelper _name; 12 | public string Name => _name.Value; 13 | 14 | private readonly ObservableAsPropertyHelper _level; 15 | public int Level => _level.Value; 16 | 17 | public AdmiralViewModel(NavalBase navalBase) 18 | { 19 | _name = navalBase.AdmiralUpdated.Select(r => r.Name) 20 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(Name)); 21 | _level = navalBase.AdmiralUpdated.Select(r => r.Leveling.Level) 22 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(Level)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/AirForceGroupViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Game.Models; 4 | using System.Collections.Generic; 5 | using System.Reactive.Linq; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | public sealed class AirForceGroupViewModel : ReactiveObject 10 | { 11 | public IReadOnlyCollection Squadrons { get; } 12 | 13 | private readonly ObservableAsPropertyHelper _combatRadius; 14 | public int CombatRadius => _combatRadius.Value; 15 | 16 | public AirForceGroupViewModel(AirForceGroup airForceGroup) 17 | { 18 | Squadrons = airForceGroup.Squadrons.DefaultViewSource.Transform(r => new AirForceSquadronViewModel(r)).Bind(); 19 | 20 | _combatRadius = airForceGroup.WhenAnyValue(r => r.BaseCombatRadius, r => r.BonusCombatRadius, (x, y) => x + y) 21 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(CombatRadius)); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/AirForceSquadronViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models; 3 | using System.Reactive.Linq; 4 | 5 | namespace Sakuno.ING.ViewModels.Homeport 6 | { 7 | public sealed class AirForceSquadronViewModel : ReactiveObject 8 | { 9 | private readonly ObservableAsPropertyHelper _slotItem; 10 | public SlotItem SlotItem => _slotItem.Value; 11 | 12 | public AirForceSquadronViewModel(AirForceSquadron squadron) 13 | { 14 | _slotItem = squadron.WhenAnyValue(r => r.SlotItem).ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(SlotItem)); 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/ConstructionDocksViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Composition; 4 | using Sakuno.ING.Game.Models; 5 | using System.Collections.Generic; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | [Export] 10 | public class ConstructionDocksViewModel : ReactiveObject 11 | { 12 | public IReadOnlyCollection ConstructionDocks { get; } 13 | 14 | public ConstructionDocksViewModel(NavalBase navalBase) 15 | { 16 | ConstructionDocks = navalBase.ConstructionDocks.DefaultViewSource.Transform(r => new ConstructionDockViewModel(r)).Bind(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/FleetOverviewsViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Composition; 4 | using Sakuno.ING.Game.Models; 5 | using System.Collections.Generic; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | [Export] 10 | public sealed class FleetOverviewsViewModel : ReactiveObject 11 | { 12 | public IReadOnlyCollection Fleets { get; } 13 | 14 | public FleetOverviewsViewModel(NavalBase navalBase) 15 | { 16 | Fleets = navalBase.Fleets.DefaultViewSource.Transform(r => new FleetOverviewViewModel(r)).Bind(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/IHomeportTabViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace Sakuno.ING.ViewModels.Homeport 2 | { 3 | public interface IHomeportTabViewModel : IBindable 4 | { 5 | bool IsSelected { get; set; } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/MapAreaViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Game.Models; 4 | using Sakuno.ING.Game.Models.MasterData; 5 | using System; 6 | using System.Collections.Generic; 7 | 8 | namespace Sakuno.ING.ViewModels.Homeport 9 | { 10 | public sealed class MapAreaViewModel : ReactiveObject, IHomeportTabViewModel 11 | { 12 | public string Name { get; } 13 | 14 | public IReadOnlyCollection Groups { get; } 15 | 16 | private bool _isSelected; 17 | public bool IsSelected 18 | { 19 | get => _isSelected; 20 | set => this.RaiseAndSetIfChanged(ref _isSelected, value); 21 | } 22 | 23 | public MapAreaViewModel(MapAreaInfo mapAreaInfo, IObservable> groups) 24 | { 25 | Name = mapAreaInfo.Name; 26 | 27 | Groups = groups.Transform(r => new AirForceGroupViewModel(r)).Bind(); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/OverallViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData.Aggregation; 2 | using ReactiveUI; 3 | using Sakuno.ING.Composition; 4 | using Sakuno.ING.Game.Models; 5 | using System.Reactive.Linq; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | [Export] 10 | public sealed class OverallViewModel : ReactiveObject 11 | { 12 | private readonly ObservableAsPropertyHelper _shipCount; 13 | public int ShipCount => _shipCount.Value; 14 | 15 | private readonly ObservableAsPropertyHelper _maxShipCount; 16 | public int MaxShipCount => _maxShipCount.Value; 17 | 18 | private readonly ObservableAsPropertyHelper _slotItemCount; 19 | public int SlotItemCount => _slotItemCount.Value; 20 | 21 | private readonly ObservableAsPropertyHelper _maxSlotItemCount; 22 | public int MaxSlotItemCount => _maxSlotItemCount.Value; 23 | 24 | public OverallViewModel(NavalBase navalBase) 25 | { 26 | _shipCount = navalBase.Ships.DefaultViewSource.Count() 27 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(ShipCount)); 28 | _maxShipCount = navalBase.AdmiralUpdated.Select(r => r.MaxShipCount) 29 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(MaxShipCount)); 30 | 31 | _slotItemCount = navalBase.SlotItems.DefaultViewSource.Count() 32 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(SlotItemCount)); 33 | _maxSlotItemCount = navalBase.AdmiralUpdated.Select(r => r.MaxSlotItemCount) 34 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(MaxSlotItemCount)); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/RepairDockViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models; 3 | using Sakuno.ING.Shell; 4 | using System; 5 | using System.Reactive.Linq; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | public class RepairDockViewModel : ReactiveObject, IViewContractObservable 10 | { 11 | public RepairDockId Id { get; } 12 | 13 | public IObservable ViewContractObservable { get; } 14 | 15 | private readonly ObservableAsPropertyHelper _repairingShip; 16 | public PlayerShip RepairingShip => _repairingShip.Value; 17 | 18 | private readonly ObservableAsPropertyHelper _completionTime; 19 | public DateTimeOffset? CompletionTime => _completionTime.Value; 20 | 21 | public RepairDockViewModel(RepairDock repairDock) 22 | { 23 | Id = repairDock.Id; 24 | 25 | ViewContractObservable = repairDock.WhenAnyValue(r => r.State).Select(r => r.ToString()); 26 | 27 | _repairingShip = repairDock.WhenAnyValue(r => r.RepairingShip) 28 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(RepairingShip)); 29 | _completionTime = repairDock.WhenAnyValue(r => r.CompletionTime) 30 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(CompletionTime)); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/RepairDocksViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Composition; 4 | using Sakuno.ING.Game.Models; 5 | using System.Collections.Generic; 6 | 7 | namespace Sakuno.ING.ViewModels.Homeport 8 | { 9 | [Export] 10 | public class RepairDocksViewModel : ReactiveObject 11 | { 12 | public IReadOnlyCollection RepairDocks { get; } 13 | 14 | public RepairDocksViewModel(NavalBase navalBase) 15 | { 16 | RepairDocks = navalBase.RepairDocks.DefaultViewSource.Transform(r => new RepairDockViewModel(r)).Bind(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Homeport/SlotViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models; 3 | using System.Reactive.Linq; 4 | 5 | namespace Sakuno.ING.ViewModels.Homeport 6 | { 7 | public sealed class SlotViewModel : ReactiveObject 8 | { 9 | private readonly ObservableAsPropertyHelper _item; 10 | public SlotItem? Item => _item.Value; 11 | 12 | private readonly ObservableAsPropertyHelper _planeCount; 13 | public ClampedValue PlaneCount => _planeCount.Value; 14 | 15 | private readonly ObservableAsPropertyHelper _isPlaneCountVisible; 16 | public bool IsPlaneCountVisible => _isPlaneCountVisible.Value; 17 | 18 | public SlotViewModel(PlayerShipSlot slot) 19 | { 20 | _item = slot.WhenAnyValue(r => r.Item).ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(Item)); 21 | 22 | var planeCount = slot.WhenAnyValue(r => r.PlaneCount); 23 | 24 | _planeCount = planeCount.ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(PlaneCount)); 25 | _isPlaneCountVisible = planeCount.Select(r => r.Max > 0) 26 | .ObserveOn(RxApp.MainThreadScheduler).ToProperty(this, nameof(IsPlaneCountVisible)); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Quests/ActiveQuestViewModel.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models.Quests; 3 | 4 | namespace Sakuno.ING.ViewModels.Quests 5 | { 6 | public sealed class ActiveQuestViewModel : ReactiveObject 7 | { 8 | public string Name { get; } 9 | 10 | public ActiveQuestViewModel(Quest quest) 11 | { 12 | Name = quest.Name; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Quests/ActiveQuestsViewModel.cs: -------------------------------------------------------------------------------- 1 | using DynamicData; 2 | using ReactiveUI; 3 | using Sakuno.ING.Composition; 4 | using Sakuno.ING.Game.Models.Quests; 5 | using System.Collections.Generic; 6 | 7 | namespace Sakuno.ING.ViewModels.Quests 8 | { 9 | [Export] 10 | public sealed class ActiveQuestsViewModel : ReactiveObject 11 | { 12 | public IReadOnlyCollection Quests { get; } 13 | 14 | public ActiveQuestsViewModel(QuestManager questManager) 15 | { 16 | Quests = questManager.Quests.DefaultViewSource 17 | .AutoRefresh(r => r.State).Filter(r => r.State == QuestState.Active) 18 | .Transform(r => new ActiveQuestViewModel(r)).Bind(); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/ViewModels/Sakuno.ING.ViewModels/Sakuno.ING.ViewModels.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ActiveQuestView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ActiveQuestView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class ActiveQuestView 7 | { 8 | public ActiveQuestView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Name, v => v.QuestName.Text).DisposeWith(disposable); 15 | }); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ActiveQuestsView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ActiveQuestsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Quests; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("ActiveQuests")] 9 | public partial class ActiveQuestsView 10 | { 11 | public ActiveQuestsView(ActiveQuestsViewModel activeQuestsViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = activeQuestsViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.Quests, v => v.Quests.ItemsSource).DisposeWith(disposable); 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AdmiralView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AdmiralView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("Admiral")] 9 | public partial class AdmiralView 10 | { 11 | public AdmiralView(AdmiralViewModel admiralViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = admiralViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.Name, v => v.AdmiralName.Text).DisposeWith(disposable); 20 | this.OneWayBind(ViewModel, vm => vm.Level, v => v.Level.Text).DisposeWith(disposable); 21 | }); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AirForceGroupView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AirForceGroupView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class AirForceGroupView 7 | { 8 | public AirForceGroupView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.CombatRadius, v => v.CombatRadius.Text).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.Squadrons, v => v.Squadrons.ItemsSource).DisposeWith(disposable); 16 | }); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AirForceSquadronView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/AirForceSquadronView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class AirForceSquadronView 7 | { 8 | public AirForceSquadronView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.SlotItem.Info.IconId, v => v.Icon.Id).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.SlotItem.Info.Name, v => v.Plane.Text).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.SlotItem.AerialProficiency, v => v.Proficiency.Proficiency).DisposeWith(disposable); 17 | this.OneWayBind(ViewModel, vm => vm.SlotItem.ImprovementLevel, v => v.Improvement.Level).DisposeWith(disposable); 18 | }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ConstructionDockView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class ConstructionDockView 7 | { 8 | public ConstructionDockView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.BuiltShip.Name, v => v.Ship.Text).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.Consumption.Fuel, v => v.FuelConsumption.Text).DisposeWith(disposable); 17 | this.OneWayBind(ViewModel, vm => vm.Consumption.Bullet, v => v.BulletConsumption.Text).DisposeWith(disposable); 18 | this.OneWayBind(ViewModel, vm => vm.Consumption.Steel, v => v.SteelConsumption.Text).DisposeWith(disposable); 19 | this.OneWayBind(ViewModel, vm => vm.Consumption.Bauxite, v => v.BauxiteConsumption.Text).DisposeWith(disposable); 20 | 21 | this.OneWayBind(ViewModel, vm => vm.IsCompleted, v => v.RemainingTime.Visibility, BooleanToVisibilityHint.Inverse).DisposeWith(disposable); 22 | this.OneWayBind(ViewModel, vm => vm.IsCompleted, v => v.CompletionText.Visibility).DisposeWith(disposable); 23 | this.OneWayBind(ViewModel, vm => vm.CompletionTime, v => v.RemainingTime.Time).DisposeWith(disposable); 24 | }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ConstructionDocksView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ConstructionDocksView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("ConstructionDocks")] 9 | public partial class ConstructionDocksView 10 | { 11 | public ConstructionDocksView(ConstructionDocksViewModel constructionDocksViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = constructionDocksViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.ConstructionDocks, v => v.ConstructionDocks.ItemsSource).DisposeWith(disposable); 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/FleetOnExpeditionView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/FleetOnExpeditionView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | [ViewContract("OnExpedition")] 7 | public partial class FleetOnExpeditionView 8 | { 9 | public FleetOnExpeditionView() 10 | { 11 | InitializeComponent(); 12 | 13 | this.WhenActivated(disposable => 14 | { 15 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.Expedition.Name, v => v.Expedition.Text).DisposeWith(disposable); 17 | this.OneWayBind(ViewModel, vm => vm.CompletionTime, v => v.RemainingTime.Time).DisposeWith(disposable); 18 | }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/FleetOverviewsView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/FleetOverviewsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("FleetOverviews")] 9 | public partial class FleetOverviewView 10 | { 11 | public FleetOverviewView(FleetOverviewsViewModel fleetsViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = fleetsViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.Fleets, v => v.Fleets.ItemsSource).DisposeWith(disposable); 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/FleetView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class FleetView 7 | { 8 | public FleetView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Ships, v => v.Ships.ItemsSource).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.TotalLevel, v => v.TotalLevel.Text).DisposeWith(disposable); 16 | 17 | this.OneWayBind(ViewModel, vm => vm.Speed, v => v.Speed.Text).DisposeWith(disposable); 18 | this.OneWayBind(ViewModel, vm => vm.IsSpeedVisible, v => v.Speed.Visibility).DisposeWith(disposable); 19 | 20 | this.OneWayBind(ViewModel, vm => vm.TotalFirepower, v => v.TotalFirepower.Text).DisposeWith(disposable); 21 | this.OneWayBind(ViewModel, vm => vm.TotalAntiAir, v => v.TotalAntiAir.Text).DisposeWith(disposable); 22 | this.OneWayBind(ViewModel, vm => vm.TotalAntiSubmarine, v => v.TotalAntiSubmarine.Text).DisposeWith(disposable); 23 | this.OneWayBind(ViewModel, vm => vm.TotalLoS, v => v.TotalLoS.Text).DisposeWith(disposable); 24 | }); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/HomeportDetailView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("HomeportDetail")] 9 | public partial class HomeportDetailView 10 | { 11 | public HomeportDetailView(HomeportDetailViewModel homeportDetailViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = homeportDetailViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.Fleets, v => v.Fleets.ItemsSource).DisposeWith(disposable); 20 | this.OneWayBind(ViewModel, vm => vm.Areas, v => v.Areas.ItemsSource).DisposeWith(disposable); 21 | 22 | this.OneWayBind(ViewModel, vm => vm.SelectedTab, v => v.SelectedTab.Content).DisposeWith(disposable); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/IdleFleetView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/IdleFleetView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class IdleFleetView 7 | { 8 | public IdleFleetView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 15 | 16 | this.OneWayBind(ViewModel, vm => vm.ShouldSupply, v => v.ShouldSupplyState.Visibility).DisposeWith(disposable); 17 | this.OneWayBind(ViewModel, vm => vm.ShouldSupply, v => v.IdleState.Visibility, BooleanToVisibilityHint.Inverse).DisposeWith(disposable); 18 | }); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/LockedConstructionDockView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/LockedConstructionDockView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models; 3 | using System.Reactive.Disposables; 4 | 5 | namespace Sakuno.ING.Views.Desktop.Homeport 6 | { 7 | [ViewContract(nameof(ConstructionDockState.Locked))] 8 | public partial class LockedConstructionDockView 9 | { 10 | public LockedConstructionDockView() 11 | { 12 | InitializeComponent(); 13 | 14 | this.WhenActivated(disposable => 15 | { 16 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 17 | }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/LockedRepairDockView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/LockedRepairDockView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Game.Models; 3 | using System.Reactive.Disposables; 4 | 5 | namespace Sakuno.ING.Views.Desktop.Homeport 6 | { 7 | [ViewContract(nameof(RepairDockState.Locked))] 8 | public partial class LockedRepairDockView 9 | { 10 | public LockedRepairDockView() 11 | { 12 | InitializeComponent(); 13 | 14 | this.WhenActivated(disposable => 15 | { 16 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 17 | }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/MapAreaView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/MapAreaView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class MapAreaView 7 | { 8 | public MapAreaView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Groups, v => v.Groups.ItemsSource).DisposeWith(disposable); 15 | }); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/MaterialsView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("Materials")] 9 | public partial class MaterialsView 10 | { 11 | public MaterialsView(MaterialsViewModel materialsViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = materialsViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.Fuel, v => v.Fuel.Amount).DisposeWith(disposable); 20 | this.OneWayBind(ViewModel, vm => vm.Bullet, v => v.Bullet.Amount).DisposeWith(disposable); 21 | this.OneWayBind(ViewModel, vm => vm.Steel, v => v.Steel.Amount).DisposeWith(disposable); 22 | this.OneWayBind(ViewModel, vm => vm.Bauxite, v => v.Bauxite.Amount).DisposeWith(disposable); 23 | this.OneWayBind(ViewModel, vm => vm.InstantRepair, v => v.InstantRepair.Amount).DisposeWith(disposable); 24 | this.OneWayBind(ViewModel, vm => vm.InstantBuild, v => v.InstantBuild.Amount).DisposeWith(disposable); 25 | this.OneWayBind(ViewModel, vm => vm.Development, v => v.Development.Amount).DisposeWith(disposable); 26 | this.OneWayBind(ViewModel, vm => vm.Improvement, v => v.Improvement.Amount).DisposeWith(disposable); 27 | }); 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/OverallView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | 13 | / 14 | 15 | 16 | 17 | / 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/OverallView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("Overall")] 9 | public partial class OverallView 10 | { 11 | public OverallView(OverallViewModel overallViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = overallViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.ShipCount, v => v.ShipCount.Text).DisposeWith(disposable); 20 | this.OneWayBind(ViewModel, vm => vm.MaxShipCount, v => v.MaxShipCount.Text).DisposeWith(disposable); 21 | this.OneWayBind(ViewModel, vm => vm.SlotItemCount, v => v.SlotItemCount.Text).DisposeWith(disposable); 22 | this.OneWayBind(ViewModel, vm => vm.MaxSlotItemCount, v => v.MaxSlotItemCount.Text).DisposeWith(disposable); 23 | }); 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/RepairDockView.xaml: -------------------------------------------------------------------------------- 1 |  11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/RepairDockView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class RepairDockView 7 | { 8 | public RepairDockView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Id, v => v.Id.Text).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.RepairingShip.Info.Name, v => v.Ship.Text).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.CompletionTime, v => v.RemainingTime.Time).DisposeWith(disposable); 17 | }); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/RepairDocksView.xaml: -------------------------------------------------------------------------------- 1 |  10 | 11 | 12 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/RepairDocksView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using Sakuno.ING.Shell; 3 | using Sakuno.ING.ViewModels.Homeport; 4 | using System.Reactive.Disposables; 5 | 6 | namespace Sakuno.ING.Views.Desktop.Homeport 7 | { 8 | [ExportView("RepairDocks")] 9 | public partial class RepairDocksView 10 | { 11 | public RepairDocksView(RepairDocksViewModel repairDocksViewModel) 12 | { 13 | InitializeComponent(); 14 | 15 | ViewModel = repairDocksViewModel; 16 | 17 | this.WhenActivated(disposable => 18 | { 19 | this.OneWayBind(ViewModel, vm => vm.RepairDocks, v => v.RepairDocks.ItemsSource).DisposeWith(disposable); 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/ShipView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class ShipView 7 | { 8 | public ShipView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Info.Name, v => v.ShipName.Text).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.Level, v => v.Level.Text).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.NextExperience, v => v.NextExperience.Text).DisposeWith(disposable); 17 | this.OneWayBind(ViewModel, vm => vm.CurrentHP, v => v.CurrentHP.Text).DisposeWith(disposable); 18 | this.OneWayBind(ViewModel, vm => vm.MaxHP, v => v.MaxHP.Text).DisposeWith(disposable); 19 | this.OneWayBind(ViewModel, vm => vm.Slots, v => v.Slots.ItemsSource).DisposeWith(disposable); 20 | }); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Homeport/SlotView.xaml.cs: -------------------------------------------------------------------------------- 1 | using ReactiveUI; 2 | using System.Reactive.Disposables; 3 | 4 | namespace Sakuno.ING.Views.Desktop.Homeport 5 | { 6 | public partial class SlotView 7 | { 8 | public SlotView() 9 | { 10 | InitializeComponent(); 11 | 12 | this.WhenActivated(disposable => 13 | { 14 | this.OneWayBind(ViewModel, vm => vm.Item!.Info.IconId, v => v.Icon.Id).DisposeWith(disposable); 15 | this.OneWayBind(ViewModel, vm => vm.Item!.AerialProficiency, v => v.Proficiency.Proficiency).DisposeWith(disposable); 16 | this.OneWayBind(ViewModel, vm => vm.Item!.ImprovementLevel, v => v.Improvement.Level).DisposeWith(disposable); 17 | 18 | this.OneWayBind(ViewModel, vm => vm.Item!.Info.PlaneId, v => v.PlaneCount.PlaneId).DisposeWith(disposable); 19 | this.OneWayBind(ViewModel, vm => vm.PlaneCount.Current, v => v.PlaneCount.Current).DisposeWith(disposable); 20 | this.OneWayBind(ViewModel, vm => vm.PlaneCount.Max, v => v.PlaneCount.Maximum).DisposeWith(disposable); 21 | this.OneWayBind(ViewModel, vm => vm.PlaneCount.IsMaximum, v => v.PlaneCount.IsMaximum).DisposeWith(disposable); 22 | }); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Views/Sakuno.ING.Views.Desktop/Sakuno.ING.Views.Desktop.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | $(CoreFramework)-windows;$(DesktopFramework) 5 | true 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/app.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/amatukaze/ing/75d74dbffb80d496beaf4cfe55f3709316724316/src/app.ico -------------------------------------------------------------------------------- /src/app.manifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 7 | A KanColle assisant tool 8 | 9 | 10 | 18 | 19 | 20 | 21 | 22 | true/pm 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /tests/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | $(DesktopFramework);$(CoreFramework) 7 | false 8 | 9 | 10 | 11 | 12 | all 13 | runtime; build; native; contentfiles; analyzers; buildtransitive 14 | 15 | 16 | all 17 | runtime; build; native; contentfiles; analyzers; buildtransitive 18 | 19 | 20 | 21 | 22 | runtime; build; native; contentfiles; analyzers; buildtransitive 23 | all 24 | 25 | 26 | runtime; build; native; contentfiles; analyzers; buildtransitive 27 | all 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /tests/Sakuno.ING.Game.Models.Tests/Data/Composition/request_append: -------------------------------------------------------------------------------- 1 | api_id=1 2 | api_ship_idx=4 3 | api_ship_id=7 4 | -------------------------------------------------------------------------------- /tests/Sakuno.ING.Game.Models.Tests/Data/Composition/request_exchange: -------------------------------------------------------------------------------- 1 | api_id=2 2 | api_ship_idx=0 3 | api_ship_id=2 4 | -------------------------------------------------------------------------------- /tests/Sakuno.ING.Game.Models.Tests/Data/Composition/request_flagship_only: -------------------------------------------------------------------------------- 1 | api_id=1 2 | api_ship_idx=-1 3 | api_ship_id=-2 4 | -------------------------------------------------------------------------------- /tests/Sakuno.ING.Game.Models.Tests/Data/Composition/request_remove: -------------------------------------------------------------------------------- 1 | api_id=1 2 | api_ship_idx=2 3 | api_ship_id=-1 4 | -------------------------------------------------------------------------------- /tests/Sakuno.ING.Game.Models.Tests/Sakuno.ING.Game.Models.Tests.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | enable 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | --------------------------------------------------------------------------------