diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7a8f405 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,11 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Launch and Debug Standalone Blazor WebAssembly App", + "type": "blazorwasm", + "request": "launch", + "cwd": "${workspaceFolder}/IGP" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..35353de --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,41 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/IGP/IGP.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/IGP/IGP.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "--project", + "${workspaceFolder}/IGP/IGP.csproj" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Components/Display/CodeComponent.razor b/Components/Display/CodeComponent.razor index 0e278f6..1d7f2f3 100644 --- a/Components/Display/CodeComponent.razor +++ b/Components/Display/CodeComponent.razor @@ -22,6 +22,6 @@ @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; } \ No newline at end of file diff --git a/Components/Display/DevOnlyComponent.razor b/Components/Display/DevOnlyComponent.razor index dbff751..a87e1f6 100644 --- a/Components/Display/DevOnlyComponent.razor +++ b/Components/Display/DevOnlyComponent.razor @@ -1,4 +1,4 @@ -@if (IsOnDev) { +@if (isOnDev) {
@@ -58,15 +58,15 @@ @code { [Inject] - NavigationManager NavigationManager { get; set; } + NavigationManager NavigationManager { get; set; } = default!; [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; - bool IsOnDev; + bool isOnDev; protected override void OnInitialized() { - IsOnDev = NavigationManager.BaseUri.Contains("https://localhost"); + isOnDev = NavigationManager.BaseUri.Contains("https://localhost"); } } \ No newline at end of file diff --git a/Components/Display/EntityDisplayComponent.razor b/Components/Display/EntityDisplayComponent.razor index a6515cd..caaad8c 100644 --- a/Components/Display/EntityDisplayComponent.razor +++ b/Components/Display/EntityDisplayComponent.razor @@ -70,9 +70,9 @@ @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; [Parameter] - public string Title { get; set; } + public string Title { get; set; } = default!; } \ No newline at end of file diff --git a/Components/Display/InfoTooltipComponent.razor b/Components/Display/InfoTooltipComponent.razor index 7e94dc4..04bbc83 100644 --- a/Components/Display/InfoTooltipComponent.razor +++ b/Components/Display/InfoTooltipComponent.razor @@ -50,15 +50,16 @@ margin-bottom: 20px; position: absolute; } + } @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; [Parameter] - public string InfoText { get; set; } + public string InfoText { get; set; } = default!; [Parameter] public int? Margin { get; set; } diff --git a/Components/Display/MakingOfComponent.razor b/Components/Display/MakingOfComponent.razor index 793c69e..99d361f 100644 --- a/Components/Display/MakingOfComponent.razor +++ b/Components/Display/MakingOfComponent.razor @@ -98,19 +98,19 @@ @code { [Parameter] - public RenderFragment Title { get; set; } + public RenderFragment Title { get; set; } = default!; [Parameter] - public RenderFragment Description { get; set; } + public RenderFragment Description { get; set; } = default!; [Parameter] - public RenderFragment Example { get; set; } + public RenderFragment Example { get; set; } = default!; [Parameter] - public RenderFragment Usage { get; set; } + public RenderFragment Usage { get; set; } = default!; [Parameter] - public RenderFragment Code { get; set; } + public RenderFragment Code { get; set; } = default!; } \ No newline at end of file diff --git a/Components/Display/MakingOfSectionComponent.razor b/Components/Display/MakingOfSectionComponent.razor index bb4d37b..c05e0ce 100644 --- a/Components/Display/MakingOfSectionComponent.razor +++ b/Components/Display/MakingOfSectionComponent.razor @@ -23,10 +23,10 @@ @code { [Parameter] - public string Title { get; set; } + public string Title { get; set; } = default!; [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; } \ No newline at end of file diff --git a/Components/Display/PaperComponent.razor b/Components/Display/PaperComponent.razor index daa46fb..967e161 100644 --- a/Components/Display/PaperComponent.razor +++ b/Components/Display/PaperComponent.razor @@ -1,29 +1,27 @@ -
+
@ChildContent
@code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; [Parameter] - public string Title { get; set; } + public string Title { get; set; } = default!; } \ No newline at end of file diff --git a/Components/Form/FormDisplayComponent.razor b/Components/Form/FormDisplayComponent.razor index f0314e2..d0bb951 100644 --- a/Components/Form/FormDisplayComponent.razor +++ b/Components/Form/FormDisplayComponent.razor @@ -35,10 +35,10 @@ @code { //TODO Clean up [Parameter] - public string Label { get; set; } + public string Label { get; set; } = default!; [Parameter] - public string Info { get; set; } + public string Info { get; set; } = default!; [Parameter] public RenderFragment? Display { get; set; } diff --git a/Components/Form/FormEscapeCodeComponent.razor b/Components/Form/FormEscapeCodeComponent.razor index 4212ece..c7326d1 100644 --- a/Components/Form/FormEscapeCodeComponent.razor +++ b/Components/Form/FormEscapeCodeComponent.razor @@ -21,8 +21,8 @@ string Output = ""; public void OnChange(ChangeEventArgs changeEventArgs) { - var encoded = HttpUtility.HtmlEncode(changeEventArgs.Value.ToString()); - Output = encoded.Replace("@", "@@"); + var encoded = HttpUtility.HtmlEncode(changeEventArgs.Value!.ToString()); + Output = encoded?.Replace("@", "@@")!; Output = Output.Replace("\n", "
"); } diff --git a/Components/Form/FormGuessComponent.razor b/Components/Form/FormGuessComponent.razor index c6351b1..b24718c 100644 --- a/Components/Form/FormGuessComponent.razor +++ b/Components/Form/FormGuessComponent.razor @@ -1,6 +1,6 @@ @using Services @using Services.Immortal -@using Model.Immortal.MemoryTester +@using Model.MemoryTester @implements IDisposable @inject IMemoryTesterService MemoryTesterService @@ -13,7 +13,7 @@ }
OnChange { get; set; } + public EventCallback OnChange { get; set; } = default!; [Parameter] - public MemoryQuestionModel MemoryQuestion { get; set; } + public MemoryQuestionModel MemoryQuestion { get; set; } = default!; [Parameter] public bool IsSubmitted { get; set; } - private string guess { get; set; } = ""; + private string? guess = ""; private string labelId = ""; @@ -142,7 +142,7 @@ } void OnGuessChanged(ChangeEventArgs changeEventArgs) { - guess = changeEventArgs.Value.ToString(); + guess = changeEventArgs.Value!.ToString()!; OnChange.InvokeAsync(new AnswerEventArgs { Name = MemoryQuestion.Name, diff --git a/Components/Inputs/ButtonComponent.razor b/Components/Inputs/ButtonComponent.razor index c6a1261..a59f0d0 100644 --- a/Components/Inputs/ButtonComponent.razor +++ b/Components/Inputs/ButtonComponent.razor @@ -37,13 +37,13 @@ @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; [Parameter] - public EventCallback OnClick { get; set; } + public EventCallback OnClick { get; set; } = default!; [Parameter] - public ButtonType ButtonType { get; set; } + public ButtonType ButtonType { get; set; } = default!; private void ButtonClicked(EventArgs eventArgs) { OnClick.InvokeAsync(eventArgs); diff --git a/Components/Inputs/ButtonGroupComponent.razor b/Components/Inputs/ButtonGroupComponent.razor index 00be2d2..4d3beb0 100644 --- a/Components/Inputs/ButtonGroupComponent.razor +++ b/Components/Inputs/ButtonGroupComponent.razor @@ -68,10 +68,10 @@ @code { [Parameter] - public string Choice { get; set; } + public string Choice { get; set; } = default!; [Parameter] - public List Choices { get; set; } + public List Choices { get; set; } = default!; [Parameter] public EventCallback OnClick { get; set; } diff --git a/Components/Inputs/EntityLabelComponent.razor b/Components/Inputs/EntityLabelComponent.razor index c2e166b..ae888b3 100644 --- a/Components/Inputs/EntityLabelComponent.razor +++ b/Components/Inputs/EntityLabelComponent.razor @@ -1,7 +1,7 @@ -@using Model.Immortal.Entity +@using Model.Entity @using Services.Website @using System.ComponentModel.DataAnnotations -@using Model.Immortal.Entity.Data +@using Model.Entity.Data @using Services @inject IEntityDialogService entityDialogService @@ -18,7 +18,7 @@ else @code { - [Parameter] public string EntityId { get; set; } + [Parameter] public string EntityId { get; set; } = default!; private EntityModel Entity => DATA.Get()[EntityId]; diff --git a/Components/Layout/LayoutWithSidebarComponent.razor b/Components/Layout/LayoutWithSidebarComponent.razor new file mode 100644 index 0000000..f74328a --- /dev/null +++ b/Components/Layout/LayoutWithSidebarComponent.razor @@ -0,0 +1,58 @@ + +
+
+ @Sidebar +
+
+ @Content +
+
+ + + +@code { + [Parameter] + public RenderFragment Sidebar { get; set; } = default!; + + [Parameter] + public RenderFragment Content { get; set; } = default!; +} \ No newline at end of file diff --git a/Components/Layout/PageContainerComponent.razor b/Components/Layout/PageContainerComponent.razor index 43378d2..c7285fe 100644 --- a/Components/Layout/PageContainerComponent.razor +++ b/Components/Layout/PageContainerComponent.razor @@ -25,6 +25,6 @@ @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; } \ No newline at end of file diff --git a/Components/MarkdownContent/MarkdownContent.razor b/Components/MarkdownContent/MarkdownContent.razor index 8a9da76..c995789 100644 --- a/Components/MarkdownContent/MarkdownContent.razor +++ b/Components/MarkdownContent/MarkdownContent.razor @@ -1,22 +1,15 @@ -@if (Markdown == null) { -
Loading...
-} -else { - @((MarkupString)Markdown) -} +@((MarkupString)MarkdownText) @code { - [Inject] - protected HttpClient Http { get; set; } + protected HttpClient Http { get; set; } = default!; [Parameter] - public string MarkdownFileName { get; set; } + public string MarkdownFileName { get; set; } = default!; - public string Markdown { get; set; } + private string MarkdownText { get; set; } = ""; protected override async Task OnInitializedAsync() { - Markdown = Markdig.Markdown.ToHtml(await Http.GetStringAsync($"markdown/{MarkdownFileName}.md")); + MarkdownText = Markdig.Markdown.ToHtml(await Http.GetStringAsync($"markdown/{MarkdownFileName}.md")); } - } \ No newline at end of file diff --git a/Components/Navigation/DesktopNavComponent.razor b/Components/Navigation/DesktopNavComponent.razor index 963921b..af3cf08 100644 --- a/Components/Navigation/DesktopNavComponent.razor +++ b/Components/Navigation/DesktopNavComponent.razor @@ -100,17 +100,17 @@ #if NO_SQL [Parameter] - public List WebSections { get; set; } + public List WebSections { get; set; } = default!; [Parameter] - public List WebPages { get; set; } + public List WebPages { get; set; } = default!; #else [Parameter] - public DbSet WebSections { get; set; } + public DbSet WebSections { get; set; } = default!; [Parameter] - public DbSet WebPages { get; set; } + public DbSet WebPages { get; set; } = default!; #endif protected override void OnInitialized() { diff --git a/Components/Navigation/MobileNavComponent.razor b/Components/Navigation/MobileNavComponent.razor index b6e5efe..654bde0 100644 --- a/Components/Navigation/MobileNavComponent.razor +++ b/Components/Navigation/MobileNavComponent.razor @@ -4,10 +4,10 @@ @using Microsoft.EntityFrameworkCore
- @foreach (var _section in WebSections) { -
+ @foreach (var webSection in WebSections) { +
- @_section.Name + @webSection?.Name
} @@ -17,18 +17,18 @@
@if (selectedSection != null) { - var pages = (from page in WebPages + List webPages = (from page in WebPages where page.WebSectionModelId == selectedSection.Id - select page).ToList(); + select page).ToList()!;
- @foreach (var _page in pages) { - if (_page.IsPrivate.Equals("True")) { + @foreach (var webPage in webPages) { + if (webPage!.IsPrivate.Equals("True")) { continue; } -
+
- @_page.Name + @webPage.Name
} @@ -38,7 +38,7 @@ @code { - #if NO_SQL +#if NO_SQL #else [Inject] diff --git a/IGP/Database.db b/IGP/Database.db index af8a622..1d15675 100644 Binary files a/IGP/Database.db and b/IGP/Database.db differ diff --git a/IGP/Dialog/EntityDialogComponent.razor b/IGP/Dialog/EntityDialogComponent.razor index 971e479..5890b19 100644 --- a/IGP/Dialog/EntityDialogComponent.razor +++ b/IGP/Dialog/EntityDialogComponent.razor @@ -3,9 +3,9 @@
-
+
@if (entity == null) {
Entity is null
@@ -26,26 +26,26 @@
- - - - - - - - - - - - - + + + + + + + + + + + + +
}
- +
@code { - - EntityModel entity = null; + + EntityModel entity = default!; private int refresh = 0; protected override void OnInitialized() { - entity = DATA.Get()[entityDialogService.GetEntityId()]; - + entity = DATA.Get()[entityDialogService.GetEntityId() ?? string.Empty]; + entityDialogService.Subscribe(OnUpdate); } - - public void Dispose() { + + public void Dispose() + { entityDialogService.Unsubscribe(OnUpdate); } @@ -157,11 +158,10 @@ Console.WriteLine("OnUpdate()"); StateHasChanged(); } - + public void CloseDialog() { entityDialogService.CloseDialog(); } -} - +} \ No newline at end of file diff --git a/IGP/IGP.csproj b/IGP/IGP.csproj index 4b9967f..6f93fb9 100644 --- a/IGP/IGP.csproj +++ b/IGP/IGP.csproj @@ -8,32 +8,37 @@ - TRACE;NO_SQL + TRACE;NO_SQL - TRACE;NO_SQL + TRACE;NO_SQL - - - + + + + --> - + - - - - + + + + + + + + + diff --git a/IGP/Index.razor b/IGP/Index.razor index a681dc2..f44683f 100644 --- a/IGP/Index.razor +++ b/IGP/Index.razor @@ -2,4 +2,8 @@ @layout PageLayout + + + + \ No newline at end of file diff --git a/IGP/PageLayout.razor b/IGP/PageLayout.razor index c3cfb2c..6e7d106 100644 --- a/IGP/PageLayout.razor +++ b/IGP/PageLayout.razor @@ -1,26 +1,26 @@ @inherits LayoutComponentBase; -@inject IWebsiteService WebService; +@inject IWebsiteService webService; @implements IDisposable; -
- @if (!WebService.IsLoaded()) { - - } else { +
+ @if (!webService.IsLoaded()) + { + + } + else + {
@Body
- - - - - - + + + }
@@ -32,32 +32,29 @@ [Inject] DatabaseContext Database { get; set; } #endif - - bool NavOpen = true; - void OnPageClicked(EventArgs eventArgs) { - NavOpen = false; - } - protected override void OnInitialized() { - WebService.Subscribe(HasChanged); + protected override void OnInitialized() + { + webService.Subscribe(HasChanged); } - protected override async Task OnInitializedAsync() { - + protected override async Task OnInitializedAsync() + { #if NO_SQL - await WebService.Load(); + await webService.Load(); #else await WebService.Load(Database); #endif - } - void IDisposable.Dispose() { - WebService.Unsubscribe(HasChanged); + void IDisposable.Dispose() + { + webService.Unsubscribe(HasChanged); } - void HasChanged() { + void HasChanged() + { StateHasChanged(); } diff --git a/IGP/Pages/Agile/AgilePage.razor b/IGP/Pages/Agile/AgilePage.razor index c129072..c0c8ef0 100644 --- a/IGP/Pages/Agile/AgilePage.razor +++ b/IGP/Pages/Agile/AgilePage.razor @@ -5,34 +5,39 @@ @page "/agile" -@if (AgileService.IsLoaded()) { +@if (AgileService.IsLoaded()) +{ Agile
- @foreach (var sprint in AgileService.SprintModels.OrderBy(e => e.EndDate).Reverse()) { + @foreach (var sprint in AgileService.AgileSprintModels!.OrderBy(e => e.EndDate).Reverse()) + {
@sprint.Name
- @if (sprint.StartDate != null) - { - Start: @sprint.StartDate.Value.ToString("dd/MM/yyyy") - } + @if (sprint.StartDate != null) + { + Start: + @sprint.StartDate.Value.ToString("dd/MM/yyyy") + }
@if (sprint.EndDate != null) - { - End: @sprint.EndDate.Value.ToString("dd/MM/yyyy") - } + { + End: + @sprint.EndDate.Value.ToString("dd/MM/yyyy") + }
- + +
} @@ -49,29 +54,31 @@ - - What is Agile? - - Agile is a work methodology for determing task assignment and release deadlines. -

- My agile practice will be creating tasks in a backlog. Assigning them to weekly sprints. And completing all tasks in the allotted time frame. -

- Any unfinished tasks are moved into the next sprint, or the sprint will be extended by a week. -
-
+ + + + What is Agile? + + Agile is a work methodology for determing task assignment and release deadlines. +

+ My agile practice will be creating tasks in a backlog. Assigning them to weekly sprints. And completing all tasks in the allotted time frame. +

+ Any unfinished tasks are moved into the next sprint, or the sprint will be extended by a week. +
+
+
} -else { - - +else +{ + } @code { #if NO_SQL - public List Tasks => AgileService.TaskModels; - public List Sprints => AgileService.SprintModels; + #else [Inject] DatabaseContext Database { get; set; } @@ -83,21 +90,26 @@ else { public DbSet Sprints { get; set; } #endif - private readonly List backlog = new(); + private readonly List backlog = new(); - protected override void OnInitialized() { + protected override void OnInitialized() + { AgileService.Subscribe(HasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { AgileService.Unsubscribe(HasChanged); } - void HasChanged() { + void HasChanged() + { backlog.Clear(); - foreach (var task in Tasks) { - if (task.SprintModelId == null) { + foreach (var task in AgileService.AgileTaskModels!) + { + if (task.AgileSprintModelId == null) + { backlog.Add(task); } } @@ -105,7 +117,8 @@ else { StateHasChanged(); } - protected override async Task OnInitializedAsync() { + protected override async Task OnInitializedAsync() + { #if NO_SQL await AgileService.Load(); #else diff --git a/IGP/Pages/Agile/AgilePage.razor.css b/IGP/Pages/Agile/AgilePage.razor.css index 7a88c67..40ececc 100644 --- a/IGP/Pages/Agile/AgilePage.razor.css +++ b/IGP/Pages/Agile/AgilePage.razor.css @@ -7,7 +7,7 @@ .sprintDisplayContainer { border: 4px solid var(--paper); - box-shadow: 0px 2px 12px rgba(0,0,0,0.2); + box-shadow: 0px 2px 12px rgba(0, 0, 0, 0.2); border-radius: 2px; padding: 25px; margin: auto; diff --git a/IGP/Pages/Agile/Parts/BacklogComponent.razor b/IGP/Pages/Agile/Parts/BacklogComponent.razor index 4fd1512..0e292da 100644 --- a/IGP/Pages/Agile/Parts/BacklogComponent.razor +++ b/IGP/Pages/Agile/Parts/BacklogComponent.razor @@ -1,6 +1,7 @@ 
- @foreach (var task in Backlog) { + @foreach (var task in Backlog) + {
@task.Name
@@ -17,7 +18,8 @@
- @if (task.Finished != null) { + @if (task.Finished != null) + {
Finished: @task.Finished
@@ -49,19 +51,6 @@ padding-top: 16px; } - .sprintDescription { - grid-area: description; - } - - .sprintStartDate { - } - - .sprintEndDate { - } - - .sprintNotes { - } - @@media only screen and (max-width: 1025px) { .sprintContainer { @@ -73,14 +62,6 @@ box-shadow: none; padding: 8px; } - - .sprintStartDate { - text-align: left; - } - - .sprintEndDate { - text-align: left; - } } .tasksContainer { @@ -197,6 +178,6 @@ @code { [Parameter] - public List Backlog { get; set; } + public List Backlog { get; set; } = default!; } \ No newline at end of file diff --git a/IGP/Pages/Agile/Parts/SprintComponent.razor b/IGP/Pages/Agile/Parts/SprintComponent.razor index edb6fcb..c7e44e5 100644 --- a/IGP/Pages/Agile/Parts/SprintComponent.razor +++ b/IGP/Pages/Agile/Parts/SprintComponent.razor @@ -1,16 +1,18 @@ 
- Status: @Sprint.GetSprintType() + Status: @AgileSprint.GetSprintType()
- Description: @Sprint.Description + Description: @AgileSprint.Description
- Notes: @Sprint.Notes + Notes: @AgileSprint.Notes
- @if (selectedTasks.Count > 0) { - @foreach (var task in selectedTasks) { + @if (AgileSprint.AgileTaskModels.Count > 0) + { + @foreach (var task in AgileSprint.AgileTaskModels) + {
@task.Name
@@ -28,13 +30,14 @@ - @if (task.Finished != null) { + @if (task.Finished != null) + {
Finished: @task.Finished.Value.ToString("dd/MM/yyyy")
}
- Created: @task.Created.Value.ToString("dd/MM/yyyy") + Created: @task.Created!.Value.ToString("dd/MM/yyyy")
@@ -48,7 +51,8 @@
} } - else { + else + {
Add Tasks...
}
@@ -66,14 +70,6 @@ grid-area: description; } - .sprintStartDate { - } - - .sprintEndDate { - } - - .sprintNotes { - } @@media only screen and (max-width: 1025px) { @@ -221,23 +217,7 @@ @code { -#if NO_SQL [Parameter] - public List Tasks { get; set; } -#else - [Parameter] - public DbSet Tasks { get; set; } -#endif - - [Parameter] - public SprintModel Sprint { get; set; } - - private List selectedTasks { get; set; } - - protected override void OnInitialized() { - selectedTasks = (from task in Tasks - where task.SprintModelId == Sprint.Id - select task).OrderBy(x => x.Created).OrderBy(x => x.Finished).Reverse().OrderBy(x => x.Status).ToList(); - } + public AgileSprintModel AgileSprint { get; set; } = default!; } \ No newline at end of file diff --git a/IGP/Pages/BuildCalculator/BuildCalculatorPage.razor b/IGP/Pages/BuildCalculator/BuildCalculatorPage.razor index 33e38c6..3597b6f 100644 --- a/IGP/Pages/BuildCalculator/BuildCalculatorPage.razor +++ b/IGP/Pages/BuildCalculator/BuildCalculatorPage.razor @@ -2,6 +2,12 @@ @layout PageLayout +@inject IKeyService keyService +@inject IImmortalSelectionService filterService +@inject IBuildOrderService buildOrderService +@inject IEconomyService economyService +@inject ITimingService timingService + @page "/build-calculator" @@ -20,19 +26,15 @@
- +
- @if (true) { + @if (true) + {
@@ -70,18 +72,15 @@
- +
- @if (false) { + @if (false) + {
@@ -216,72 +215,59 @@ Additionally, more entities will appear as you build the required technology. Yo @code { - - [Inject] - IKeyService KeyService { get; set; } - - [Inject] - IImmortalSelectionService FilterService { get; set; } - - [Inject] - IBuildOrderService BuildOrderService { get; set; } - - [Inject] - IEconomyService EconomyService { get; set; } - - [Inject] - ITimingService TimingService { get; set; } - - Dictionary> completedEntities = new(); - - List entities = EntityModel.GetListOnlyHotkey(); - - protected override void OnInitialized() { - KeyService.Subscribe(HandleClick); - FilterService.Subscribe(StateHasChanged); - EconomyService.Subscribe(StateHasChanged); - TimingService.Subscribe(HandleTimingChanged); - EconomyService.Calculate(BuildOrderService, TimingService, 0); + protected override void OnInitialized() + { + keyService.Subscribe(HandleClick); + filterService.Subscribe(StateHasChanged); + economyService.Subscribe(StateHasChanged); + timingService.Subscribe(HandleTimingChanged); + economyService.Calculate(buildOrderService, timingService, 0); } - void IDisposable.Dispose() { - KeyService.Unsubscribe(HandleClick); - FilterService.Unsubscribe(StateHasChanged); - TimingService.Unsubscribe(StateHasChanged); - EconomyService.Unsubscribe(StateHasChanged); + void IDisposable.Dispose() + { + keyService.Unsubscribe(HandleClick); + filterService.Unsubscribe(StateHasChanged); + timingService.Unsubscribe(StateHasChanged); + economyService.Unsubscribe(StateHasChanged); } - - protected void HandleTimingChanged() { - EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); + private void HandleTimingChanged() + { + economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval()); } - protected void HandleClick() { - var hotkey = KeyService.GetHotkey(); + private void HandleClick() + { + var hotkey = keyService.GetHotkey(); - if (hotkey == "") { + if (hotkey == "") + { return; } - if (hotkey == "`") { - BuildOrderService.RemoveLast(); - EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); + if (hotkey == "`") + { + buildOrderService.RemoveLast(); + economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval()); StateHasChanged(); return; } - var hotkeyGroup = KeyService.GetHotkeyGroup(); - var isHoldSpace = KeyService.IsHoldingSpace(); - var faction = FilterService.GetFactionType(); - var immortal = FilterService.GetImmortalType(); + var hotkeyGroup = keyService.GetHotkeyGroup(); + var isHoldSpace = keyService.IsHoldingSpace(); + var faction = filterService.GetFactionType(); + var immortal = filterService.GetImmortalType(); var entity = EntityModel.GetFrom(hotkey, hotkeyGroup, isHoldSpace, faction, immortal); - if (entity == null) { + if (entity == null) + { return; } - if (BuildOrderService.Add(entity, EconomyService)) { - EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); + if (buildOrderService.Add(entity, economyService)) + { + economyService.Calculate(buildOrderService, timingService, buildOrderService.GetLastRequestInterval()); } } diff --git a/IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor b/IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor index edf6982..77445eb 100644 --- a/IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor @@ -2,12 +2,13 @@ - @LastInterval | T @Interval.ToTime(LastInterval) + @lastInterval | T @Interval.ToTime(lastInterval)
- @foreach (var unit in armyCount) { + @foreach (var unit in armyCount) + {
@unit.Value.ToString()x
@unit.Key
@@ -22,38 +23,46 @@ @code { [Inject] - public IBuildOrderService BuildOrder { get; set; } + public IBuildOrderService BuildOrder { get; set; } = default!; - int LastInterval; + private int lastInterval; readonly Dictionary armyCount = new(); List army = new(); - protected override void OnInitialized() { + protected override void OnInitialized() + { BuildOrder.Subscribe(OnBuildOrderChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { BuildOrder.Unsubscribe(OnBuildOrderChanged); } - void OnBuildOrderChanged() { + void OnBuildOrderChanged() + { armyCount.Clear(); - LastInterval = 0; + lastInterval = 0; var entitiesOverTime = BuildOrder.GetOrders(); - foreach (var entitiesAtTime in entitiesOverTime) { - foreach (var entity in entitiesAtTime.Value) { - if (entity.EntityType == EntityType.Army) { - if (!armyCount.TryAdd(entity.Info().Name, 1)) { + foreach (var entitiesAtTime in entitiesOverTime) + { + foreach (var entity in entitiesAtTime.Value) + { + if (entity.EntityType == EntityType.Army) + { + if (!armyCount.TryAdd(entity.Info().Name, 1)) + { armyCount[entity.Info().Name]++; } - if (entity.Production() != null && entity.Production().BuildTime + entitiesAtTime.Key > LastInterval) { - LastInterval = entity.Production().BuildTime + entitiesAtTime.Key; + if (entity.Production() != null && entity.Production().BuildTime + entitiesAtTime.Key > lastInterval) + { + lastInterval = entity.Production().BuildTime + entitiesAtTime.Key; } } } diff --git a/IGP/Pages/BuildCalculator/Parts/BankComponent.razor b/IGP/Pages/BuildCalculator/Parts/BankComponent.razor index d6f0288..84aa0c9 100644 --- a/IGP/Pages/BuildCalculator/Parts/BankComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/BankComponent.razor @@ -23,27 +23,30 @@ @code { [Inject] - IBuildOrderService BuildOrderService { get; set; } + IBuildOrderService BuildOrderService { get; set; } = default!; [Inject] - IEconomyService EconomyService { get; set; } + IEconomyService EconomyService { get; set; } = default!; EconomyModel economy = new(); int supplyGranted; int supplyTaken; int extraBuildings; - protected override void OnInitialized() { + protected override void OnInitialized() + { BuildOrderService.Subscribe(OnBuildOrderChanged); EconomyService.Subscribe(OnBuildOrderChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { BuildOrderService.Unsubscribe(OnBuildOrderChanged); EconomyService.Subscribe(OnBuildOrderChanged); } - void OnBuildOrderChanged() { + void OnBuildOrderChanged() + { economy = EconomyService.GetEconomy(BuildOrderService.GetLastRequestInterval()); var ordersOverTime = BuildOrderService.GetOrders(); @@ -61,7 +64,8 @@ select order.Supply().Grants).Sum(); extraBuildings = 0; - if (supplyGranted > 160) { + if (supplyGranted > 160) + { extraBuildings = (supplyGranted - 160) / 16; supplyGranted = 160; } diff --git a/IGP/Pages/BuildCalculator/Parts/BuildOrderComponent.razor b/IGP/Pages/BuildCalculator/Parts/BuildOrderComponent.razor index be81228..2241d86 100644 --- a/IGP/Pages/BuildCalculator/Parts/BuildOrderComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/BuildOrderComponent.razor @@ -1,23 +1,24 @@ -@implements IDisposable +@inject IBuildOrderService buildOrderService + +@implements IDisposable + Value="@buildOrderService.AsJson()"> @code { - [Inject] - IBuildOrderService BuildOrderService { get; set; } - - protected override void OnInitialized() { - BuildOrderService.Subscribe(StateHasChanged); + protected override void OnInitialized() + { + buildOrderService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { - BuildOrderService.Unsubscribe(StateHasChanged); + void IDisposable.Dispose() + { + buildOrderService.Unsubscribe(StateHasChanged); } } \ No newline at end of file diff --git a/IGP/Pages/BuildCalculator/Parts/ChartComponent.razor b/IGP/Pages/BuildCalculator/Parts/ChartComponent.razor index ae0b3ba..305ea18 100644 --- a/IGP/Pages/BuildCalculator/Parts/ChartComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/ChartComponent.razor @@ -1,10 +1,12 @@ @implements IDisposable
- @foreach (var chart in charts) { + @foreach (var chart in charts) + {
- @foreach (var point in chart.Points) { + @foreach (var point in chart.Points) + {
0) { + if (interval > 0) + { alloyPoint.TempValue += alloyChart.Points.Last().TempValue; etherPoint.Value += etherChart.Points.Last().Value; pyrePoint.Value = pyreChart.Points.Last().Value + 1; diff --git a/IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor b/IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor index 845e78a..303de14 100644 --- a/IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor @@ -1,35 +1,39 @@ @implements IDisposable
- @if (Entity != null) { + @if (entity != null) + { }
@code { - EntityModel Entity; + private EntityModel entity = default!; [Inject] - IKeyService KeyService { get; set; } + IKeyService KeyService { get; set; } = default!; [Inject] - IImmortalSelectionService FilterService { get; set; } + IImmortalSelectionService FilterService { get; set; } = default!; [Inject] - IBuildOrderService BuildOrderService { get; set; } + IBuildOrderService BuildOrderService { get; set; } = default!; - protected override void OnInitialized() { + protected override void OnInitialized() + { KeyService.Subscribe(HandleClick); BuildOrderService.Subscribe(OnBuildOrderChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { KeyService.Unsubscribe(HandleClick); BuildOrderService.Unsubscribe(OnBuildOrderChanged); } - protected void HandleClick() { + protected void HandleClick() + { var hotkey = KeyService.GetHotkey(); var hotkeyGroup = KeyService.GetHotkeyGroup(); var isHoldSpace = KeyService.IsHoldingSpace(); @@ -38,13 +42,15 @@ var foundEntity = EntityModel.GetFrom(hotkey, hotkeyGroup, isHoldSpace, faction, immortal); - if (foundEntity != null) { - Entity = foundEntity; + if (foundEntity != null) + { + entity = foundEntity; StateHasChanged(); } } - void OnBuildOrderChanged() { + void OnBuildOrderChanged() + { StateHasChanged(); } diff --git a/IGP/Pages/BuildCalculator/Parts/FilterComponent.razor b/IGP/Pages/BuildCalculator/Parts/FilterComponent.razor index e51392d..ae229e7 100644 --- a/IGP/Pages/BuildCalculator/Parts/FilterComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/FilterComponent.razor @@ -10,11 +10,13 @@ Immortal - @if (FilterService.GetFactionType() == FactionType.QRath) { + @if (FilterService.GetFactionType() == FactionType.QRath) + { } - @if (FilterService.GetFactionType() == FactionType.Aru) { + @if (FilterService.GetFactionType() == FactionType.Aru) + { } @@ -25,14 +27,16 @@ @code { [Inject] - public IImmortalSelectionService FilterService { get; set; } + public IImmortalSelectionService FilterService { get; set; } = default!; - void OnFactionChanged(ChangeEventArgs e) { - FilterService.SelectFactionType(e.Value.ToString()); + void OnFactionChanged(ChangeEventArgs e) + { + FilterService.SelectFactionType(e.Value!.ToString()!); } - void OnImmortalChanged(ChangeEventArgs e) { - FilterService.SelectImmortalType(e.Value.ToString()); + void OnImmortalChanged(ChangeEventArgs e) + { + FilterService.SelectImmortalType(e.Value!.ToString()!); } } \ No newline at end of file diff --git a/IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor b/IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor index f2db775..aef1294 100644 --- a/IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/HighlightsComponent.razor @@ -4,9 +4,12 @@
Requested
- @for (var i = TimingService.GetTiming() - 1; i >= 0; i--) { - @foreach (var order in BuildOrderService.GetOrdersAt(i)) { - if (order.EntityType == EntityType.Worker) { + @for (var i = TimingService.GetTiming() - 1; i >= 0; i--) + { + @foreach (var order in BuildOrderService.GetOrdersAt(i)) + { + if (order.EntityType == EntityType.Worker) + { continue; }
@@ -22,9 +25,12 @@
Finished
- @for (var i = TimingService.GetTiming() - 1; i >= 0; i--) { - @foreach (var order in BuildOrderService.GetCompletedAt(i)) { - if (order.EntityType == EntityType.Worker) { + @for (var i = TimingService.GetTiming() - 1; i >= 0; i--) + { + @foreach (var order in BuildOrderService.GetCompletedAt(i)) + { + if (order.EntityType == EntityType.Worker) + { continue; }
@@ -54,20 +60,22 @@ @code { [Inject] - IEconomyService EconomyService { get; set; } + IEconomyService EconomyService { get; set; } = default!; [Inject] - IBuildOrderService BuildOrderService { get; set; } + IBuildOrderService BuildOrderService { get; set; } = default!; [Inject] - ITimingService TimingService { get; set; } + ITimingService TimingService { get; set; } = default!; - protected override void OnInitialized() { + protected override void OnInitialized() + { EconomyService.Subscribe(StateHasChanged); BuildOrderService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { EconomyService.Unsubscribe(StateHasChanged); BuildOrderService.Unsubscribe(StateHasChanged); } diff --git a/IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor b/IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor index aac2e80..8b3feb2 100644 --- a/IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor @@ -2,8 +2,10 @@
- @foreach (var hotkey in hotkeys) { - if (hotkey.IsHidden) { + @foreach (var hotkey in hotkeys) + { + if (hotkey.IsHidden) + { continue; } @@ -14,14 +16,17 @@ var y = hotkey.PositionY * Size; var border = "1px solid black"; - if (hotkey.KeyText.Equals(_key)) { + if (hotkey.KeyText.Equals(_key)) + { border = "5px solid black"; } - if (hotkey.KeyText.Equals(_controlGroup)) { + if (hotkey.KeyText.Equals(_controlGroup)) + { border = "5px solid green"; } - if (hotkey.KeyText.Equals("SPACE") && KeyService.IsHoldingSpace()) { + if (hotkey.KeyText.Equals("SPACE") && KeyService.IsHoldingSpace()) + { border = "5px solid green"; } @@ -39,16 +44,20 @@ overflow: hidden; padding: 4px;"> @hotkey.KeyText - @foreach (var entity in data.Values) { - if (!BuildOrderService.MeetsRequirements(entity, 9000)) { + @foreach (var entity in data.Values) + { + if (!BuildOrderService.MeetsRequirements(entity, 9000)) + { continue; } - if (InvalidKey(entity, hotkey) || InvalidKeyGroup(entity, hotkey) || InvalidHoldSpace(entity)) { + if (InvalidKey(entity, hotkey) || InvalidKeyGroup(entity, hotkey) || InvalidHoldSpace(entity)) + { continue; } - if (InvalidFaction(entity) || InvalidVanguard(entity) || InvalidNonVanguard(entity)) { + if (InvalidFaction(entity) || InvalidVanguard(entity) || InvalidNonVanguard(entity)) + { continue; } @@ -77,7 +86,7 @@ @@media only screen and (max-width: 1025px) { .keyContainer { transform: scale(0.85) translateX(-20px); - background-color: none; + background-color: transparent; outline: none; } } @@ -89,13 +98,13 @@ public int Size { get; set; } = 100; [Inject] - public IKeyService KeyService { get; set; } + public IKeyService KeyService { get; set; } = default!; [Inject] - public IBuildOrderService BuildOrderService { get; set; } + public IBuildOrderService BuildOrderService { get; set; } = default!; [Inject] - public IImmortalSelectionService FilterService { get; set; } + public IImmortalSelectionService FilterService { get; set; } = default!; readonly Dictionary data = EntityModel.GetDictionary(); readonly List hotkeys = HotkeyModel.GetAll(); @@ -103,21 +112,25 @@ public string _controlGroup = "C"; public string _key = ""; - protected override void OnInitialized() { + protected override void OnInitialized() + { base.OnInitialized(); KeyService.Subscribe(OnKeyPressed); FilterService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { KeyService.Unsubscribe(OnKeyPressed); FilterService.Unsubscribe(StateHasChanged); } // Move to Filter Service - bool InvalidFaction(EntityModel entity) { - if (entity.Faction() != null && entity.Faction()?.Faction != FilterService.GetFactionType() && FilterService.GetFactionType() != FactionType.Any) { + bool InvalidFaction(EntityModel entity) + { + if (entity.Faction() != null && entity.Faction()?.Faction != FilterService.GetFactionType() && FilterService.GetFactionType() != FactionType.Any) + { return true; } @@ -125,8 +138,10 @@ } // Move to Filter Service - bool InvalidVanguard(EntityModel entity) { - if (entity.VanguardAdded() != null && entity.VanguardAdded()?.ImmortalId != FilterService.GetImmortalType() && FilterService.GetImmortalType() != ImmortalType.Any) { + bool InvalidVanguard(EntityModel entity) + { + if (entity.VanguardAdded() != null && entity.VanguardAdded()?.ImmortalId != FilterService.GetImmortalType() && FilterService.GetImmortalType() != ImmortalType.Any) + { return true; } @@ -134,16 +149,21 @@ } // Move to Filter Service - bool InvalidNonVanguard(EntityModel entity) { - if (entity.Replaceds().Count > 0) { + bool InvalidNonVanguard(EntityModel entity) + { + if (entity.Replaceds().Count > 0) + { var isReplaced = false; - foreach (var replaced in entity.Replaceds()) { - if (FilterService.GetImmortalType() == replaced.ImmortalId) { + foreach (var replaced in entity.Replaceds()) + { + if (FilterService.GetImmortalType() == replaced.ImmortalId) + { isReplaced = true; break; } } - if (isReplaced) { + if (isReplaced) + { return true; } } @@ -151,75 +171,96 @@ return false; } - bool InvalidRequirements(EntityModel entity) { + bool InvalidRequirements(EntityModel entity) + { return !BuildOrderService.MeetsRequirements(entity, 9000); } - bool InvalidKey(EntityModel entity, HotkeyModel key) { - if (entity.Hotkey()?.Hotkey == key.KeyText) { + bool InvalidKey(EntityModel entity, HotkeyModel key) + { + if (entity.Hotkey()?.Hotkey == key.KeyText) + { return false; } return true; } - bool InvalidKeyGroup(EntityModel entity, HotkeyModel key) { - if (entity.Hotkey()?.HotkeyGroup == _controlGroup) { + bool InvalidKeyGroup(EntityModel entity, HotkeyModel key) + { + if (entity.Hotkey()?.HotkeyGroup == _controlGroup) + { return false; } return true; } - bool InvalidKey(EntityModel entity) { - if (entity.Hotkey()?.Hotkey == _key) { + bool InvalidKey(EntityModel entity) + { + if (entity.Hotkey()?.Hotkey == _key) + { return false; } return true; } - bool InvalidKeyGroup(EntityModel entity) { - if (entity.Hotkey()?.HotkeyGroup == _controlGroup) { + bool InvalidKeyGroup(EntityModel entity) + { + if (entity.Hotkey()?.HotkeyGroup == _controlGroup) + { return false; } return true; } - bool InvalidHoldSpace(EntityModel entity) { - if (entity.Hotkey()?.HoldSpace == KeyService.IsHoldingSpace()) { + bool InvalidHoldSpace(EntityModel entity) + { + if (entity.Hotkey()?.HoldSpace == KeyService.IsHoldingSpace()) + { return false; } return true; } - void OnKeyPressed() { - if (KeyService.GetAllPressedKeys().Contains("Z")) { + void OnKeyPressed() + { + if (KeyService.GetAllPressedKeys().Contains("Z")) + { _controlGroup = "Z"; } - if (KeyService.GetAllPressedKeys().Contains("TAB")) { + if (KeyService.GetAllPressedKeys().Contains("TAB")) + { _controlGroup = "TAB"; } - if (KeyService.GetAllPressedKeys().Contains("C")) { + if (KeyService.GetAllPressedKeys().Contains("C")) + { _controlGroup = "C"; } - if (KeyService.GetAllPressedKeys().Contains("D")) { + if (KeyService.GetAllPressedKeys().Contains("D")) + { _controlGroup = "D"; } - if (KeyService.GetAllPressedKeys().Contains("1")) { + if (KeyService.GetAllPressedKeys().Contains("1")) + { _controlGroup = "1"; } //TODO This could be better. Duplicated code - if (KeyService.GetAllPressedKeys().Contains("2")) { + if (KeyService.GetAllPressedKeys().Contains("2")) + { _controlGroup = "2"; } - if (KeyService.GetAllPressedKeys().Contains("SHIFT")) { + if (KeyService.GetAllPressedKeys().Contains("SHIFT")) + { _controlGroup = "SHIFT"; } - if (KeyService.GetAllPressedKeys().Contains("CONTROL")) { + if (KeyService.GetAllPressedKeys().Contains("CONTROL")) + { _controlGroup = "CONTROL"; } - if (KeyService.GetAllPressedKeys().Count > 0) { + if (KeyService.GetAllPressedKeys().Count > 0) + { _key = KeyService.GetAllPressedKeys().First(); } diff --git a/IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor b/IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor index 37b612b..5b856a3 100644 --- a/IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor @@ -10,16 +10,18 @@ @code { [Parameter] - public RenderFragment ChildContent { get; set; } + public RenderFragment ChildContent { get; set; } = default!; [Inject] - public IKeyService KeyService { get; set; } + public IKeyService KeyService { get; set; } = default!; - private void HandleKeyDown(KeyboardEventArgs e) { + private void HandleKeyDown(KeyboardEventArgs e) + { KeyService.AddPressedKey(e.Key); } - private void HandleKeyUp(KeyboardEventArgs e) { + private void HandleKeyUp(KeyboardEventArgs e) + { KeyService.RemovePressedKey(e.Key); } diff --git a/IGP/Pages/BuildCalculator/Parts/TimelineComponent.razor b/IGP/Pages/BuildCalculator/Parts/TimelineComponent.razor index 4fa5d47..97ae903 100644 --- a/IGP/Pages/BuildCalculator/Parts/TimelineComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/TimelineComponent.razor @@ -24,12 +24,14 @@
- @foreach (var order in BuildOrderService.GetOrdersAt(economyAtSecond.Interval)) { + @foreach (var order in BuildOrderService.GetOrdersAt(economyAtSecond.Interval)) + {
Requested: @order.Info().Name
} - @foreach (var order in BuildOrderService.GetCompletedAt(economyAtSecond.Interval)) { + @foreach (var order in BuildOrderService.GetCompletedAt(economyAtSecond.Interval)) + {
New: @order.Info().Name
@@ -42,17 +44,19 @@ @code { [Inject] - IEconomyService EconomyService { get; set; } + IEconomyService EconomyService { get; set; } = default!; [Inject] - IBuildOrderService BuildOrderService { get; set; } + IBuildOrderService BuildOrderService { get; set; } = default!; - protected override void OnInitialized() { + protected override void OnInitialized() + { EconomyService.Subscribe(StateHasChanged); BuildOrderService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { EconomyService.Unsubscribe(StateHasChanged); BuildOrderService.Unsubscribe(StateHasChanged); } diff --git a/IGP/Pages/BuildCalculator/Parts/TimingComponent.razor b/IGP/Pages/BuildCalculator/Parts/TimingComponent.razor index 9f71075..86d59ff 100644 --- a/IGP/Pages/BuildCalculator/Parts/TimingComponent.razor +++ b/IGP/Pages/BuildCalculator/Parts/TimingComponent.razor @@ -20,31 +20,36 @@ @code { [Inject] - public ITimingService TimingService { get; set; } + public ITimingService TimingService { get; set; } = default!; [Inject] - public IBuildOrderService BuildOrderService { get; set; } + public IBuildOrderService BuildOrderService { get; set; } = default!; - void OnTimingChanged(ChangeEventArgs changeEventArgs) { - TimingService.SetTiming(int.Parse(changeEventArgs.Value.ToString())); + void OnTimingChanged(ChangeEventArgs changeEventArgs) + { + TimingService.SetTiming(int.Parse(changeEventArgs.Value!.ToString()!)); } - void OnTimingChanged(int value) { + void OnTimingChanged(int value) + { TimingService.SetTiming(value); } - void OnNameChanged(ChangeEventArgs changeEventArgs) { - BuildOrderService.SetName(changeEventArgs.Value.ToString()); + void OnNameChanged(ChangeEventArgs changeEventArgs) + { + BuildOrderService.SetName(changeEventArgs.Value!.ToString()!); } - void OnColorChanged(ChangeEventArgs changeEventArgs) { - BuildOrderService.SetColor(changeEventArgs.Value.ToString()); + void OnColorChanged(ChangeEventArgs changeEventArgs) + { + BuildOrderService.SetColor(changeEventArgs.Value!.ToString()!); } - void OnNotesChanged(ChangeEventArgs changeEventArgs) { - BuildOrderService.SetNotes(changeEventArgs.Value.ToString()); + void OnNotesChanged(ChangeEventArgs changeEventArgs) + { + BuildOrderService.SetNotes(changeEventArgs.Value!.ToString()!); } } \ No newline at end of file diff --git a/IGP/Pages/ChangeLogPage.razor b/IGP/Pages/ChangeLogPage.razor index d7dcc9c..f1fa089 100644 --- a/IGP/Pages/ChangeLogPage.razor +++ b/IGP/Pages/ChangeLogPage.razor @@ -5,7 +5,8 @@ @layout PageLayout -@if (GitService.IsLoaded()) { +@if (GitService.IsLoaded()) +{ Change Log @@ -20,8 +21,10 @@ - @foreach (var patch in Patches.OrderBy(x => x.Date).Reverse()) { - @if (!patch.Important.Equals("True") && isViewImportant) { + @foreach (var patch in Patches.OrderBy(x => x.Date).Reverse()) + { + @if (!patch.Important.Equals("True") && isViewImportant) + { continue; } @@ -33,21 +36,26 @@ @patch.Name
- @if (daysAgo == 0) { + @if (daysAgo == 0) + { Today } - else if (daysAgo < 8) { + else if (daysAgo < 8) + { @daysAgo days ago } - else { + else + { @patch.Date.ToString("dd/MM/yyyy") }
- @foreach (var change in Changes.FindAll(e => e.PatchModelId == patch.Id)) { - @if (!change.Important.Equals("True") && isViewImportant) { + @foreach (var change in Changes.FindAll(e => e.GitPatchModelId == patch.Id)) + { + @if (!change.Important.Equals("True") && isViewImportant) + { continue; } @@ -57,7 +65,8 @@ - @change.Name - @if (change.Commit != CommitType.None) { + @if (change.Commit != CommitType.None) + { (@change.Commit) } : @@ -68,23 +77,23 @@ }
- } } -else { - +else +{ + } @code { #if NO_SQL - public List Patches => GitService.PatchModels; + public List Patches => GitService.GitPatchModels; - public List Changes => GitService.ChangeModels; + public List Changes => GitService.GitChangeModels; #else [Inject] DatabaseContext Database { get; set; } @@ -99,24 +108,29 @@ else { private bool isViewImportant = true; - protected override void OnInitialized() { + protected override void OnInitialized() + { GitService.Subscribe(HasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { GitService.Unsubscribe(HasChanged); } - void OnChangeClicked(ChangeEventArgs changeEventArgs) { - isViewImportant = (bool)changeEventArgs.Value; + void OnChangeClicked(ChangeEventArgs changeEventArgs) + { + isViewImportant = (bool)changeEventArgs.Value!; } - void HasChanged() { + void HasChanged() + { StateHasChanged(); } - protected override async Task OnInitializedAsync() { + protected override async Task OnInitializedAsync() + { #if NO_SQL GitService.Load(); #else diff --git a/IGP/Pages/Comparision/ComparisionPage.razor b/IGP/Pages/Comparision/ComparisionPage.razor index 5ed0e54..a65ed8b 100644 --- a/IGP/Pages/Comparision/ComparisionPage.razor +++ b/IGP/Pages/Comparision/ComparisionPage.razor @@ -28,19 +28,19 @@ grid-template-areas: 'loader sand compare compare' ;"> @code { [Inject] - IKeyService KeyService { get; set; } + IKeyService KeyService { get; set; } = default!; [Inject] - IImmortalSelectionService FilterService { get; set; } + IImmortalSelectionService FilterService { get; set; } = default!; [Inject] - IBuildOrderService BuildOrderService { get; set; } + IBuildOrderService BuildOrderService { get; set; } = default!; [Inject] - IEconomyService EconomyService { get; set; } + IEconomyService EconomyService { get; set; } = default!; [Inject] - ITimingService TimingService { get; set; } + ITimingService TimingService { get; set; } = default!; Dictionary> completedEntities = new(); @@ -48,7 +48,8 @@ grid-template-areas: 'loader sand compare compare' ;"> List entities = EntityModel.GetListOnlyHotkey(); - protected override void OnInitialized() { + protected override void OnInitialized() + { KeyService.Subscribe(HandleClick); FilterService.Subscribe(StateHasChanged); EconomyService.Subscribe(StateHasChanged); @@ -56,7 +57,8 @@ grid-template-areas: 'loader sand compare compare' ;"> EconomyService.Calculate(BuildOrderService, TimingService, 0); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { KeyService.Unsubscribe(HandleClick); FilterService.Unsubscribe(StateHasChanged); TimingService.Unsubscribe(StateHasChanged); @@ -64,18 +66,21 @@ grid-template-areas: 'loader sand compare compare' ;"> } - protected void HandleTimingChanged() { + protected void HandleTimingChanged() + { EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); } - protected void HandleClick() { + protected void HandleClick() + { var hotkey = KeyService.GetHotkey(); var hotkeyGroup = KeyService.GetHotkeyGroup(); var isHoldSpace = KeyService.IsHoldingSpace(); var faction = FilterService.GetFactionType(); var immortal = FilterService.GetImmortalType(); - if (hotkey == "`") { + if (hotkey == "`") + { BuildOrderService.RemoveLast(); EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); StateHasChanged(); @@ -83,10 +88,12 @@ grid-template-areas: 'loader sand compare compare' ;"> } var entity = EntityModel.GetFrom(hotkey, hotkeyGroup, isHoldSpace, faction, immortal); - if (entity == null) { + if (entity == null) + { return; } - if (BuildOrderService.Add(entity, EconomyService)) { + if (BuildOrderService.Add(entity, EconomyService)) + { EconomyService.Calculate(BuildOrderService, TimingService, BuildOrderService.GetLastRequestInterval()); } } diff --git a/IGP/Pages/Comparision/Parts/BuildLoaderComponent.razor b/IGP/Pages/Comparision/Parts/BuildLoaderComponent.razor index 01769b5..0c222f6 100644 --- a/IGP/Pages/Comparision/Parts/BuildLoaderComponent.razor +++ b/IGP/Pages/Comparision/Parts/BuildLoaderComponent.razor @@ -16,17 +16,20 @@ string buildData = ""; [Inject] - IBuildComparisonService BuildComparisionService { get; set; } + IBuildComparisonService BuildComparisionService { get; set; } = default!; - protected override void OnInitialized() { + protected override void OnInitialized() + { BuildComparisionService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { BuildComparisionService.Unsubscribe(StateHasChanged); } - void OnLoad() { + void OnLoad() + { BuildComparisionService.LoadJson(buildData); } diff --git a/IGP/Pages/Comparision/Parts/SandComponent.razor b/IGP/Pages/Comparision/Parts/SandComponent.razor index 70b9585..1dae56d 100644 --- a/IGP/Pages/Comparision/Parts/SandComponent.razor +++ b/IGP/Pages/Comparision/Parts/SandComponent.razor @@ -9,13 +9,15 @@ @code { [Inject] - IBuildComparisonService BuildComparisonService { get; set; } + IBuildComparisonService BuildComparisonService { get; set; } = default!; - protected override void OnInitialized() { + protected override void OnInitialized() + { BuildComparisonService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { BuildComparisonService.Unsubscribe(StateHasChanged); } diff --git a/IGP/Pages/ContactPage.razor b/IGP/Pages/ContactPage.razor index 2b86c9b..862a328 100644 --- a/IGP/Pages/ContactPage.razor +++ b/IGP/Pages/ContactPage.razor @@ -11,7 +11,7 @@ How do I contact you for feature requests and bug reports? - You can direct message me at Iremirror#3544 on the IGP Fan Reference discord. + You can message me at JonathanMcCaffrey#3544 on my Discord channel. diff --git a/IGP/Pages/Database/DatabasePage.razor b/IGP/Pages/Database/DatabasePage.razor index 4aaeaec..5a0b4b0 100644 --- a/IGP/Pages/Database/DatabasePage.razor +++ b/IGP/Pages/Database/DatabasePage.razor @@ -10,27 +10,29 @@ Database - - - Game Patch: @EntityModel.GameVersion - - + + + Game Patch: @EntityModel.GameVersion + + - +
- -
- + +
+ - @if (searches != null) { + @if (searches != null) + {
- @foreach (var entity in searches) { + @foreach (var entity in searches) + { - + }
@@ -112,16 +114,16 @@ @code { [Inject] - public IEntityFilterService EntityFilterService { get; set; } + public IEntityFilterService EntityFilterService { get; set; } = default!; readonly List defaults = (from entity in EntityModel.GetList() where entity.IsSpeculative == false select entity).ToList(); - List factions; - List immortals; - List entities; - List searches; + List factions = default!; + List immortals = default!; + List entities = default!; + List searches = default!; string selectedFactionType = FactionType.Any; @@ -129,44 +131,54 @@ string selectedEntityType = EntityType.Army; string searchText = ""; - protected override void OnInitialized() { + protected override void OnInitialized() + { RefreshFactionSearch(); EntityFilterService.Subscribe(OnChange); entityDisplayService.Subscribe(StateHasChanged); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { EntityFilterService.Unsubscribe(OnChange); entityDisplayService.Unsubscribe(StateHasChanged); } - void OnChange(EntityFilterEvent filterEntityEvent) { - if (filterEntityEvent == EntityFilterEvent.OnRefreshFaction) { + void OnChange(EntityFilterEvent filterEntityEvent) + { + if (filterEntityEvent == EntityFilterEvent.OnRefreshFaction) + { RefreshFactionSearch(); } - if (filterEntityEvent == EntityFilterEvent.OnRefreshImmortal) { + if (filterEntityEvent == EntityFilterEvent.OnRefreshImmortal) + { RefreshImmortalSearch(); } - if (filterEntityEvent == EntityFilterEvent.OnRefreshEntity) { + if (filterEntityEvent == EntityFilterEvent.OnRefreshEntity) + { RefreshEntitySearch(); } - if (filterEntityEvent == EntityFilterEvent.OnRefreshSearch) { + if (filterEntityEvent == EntityFilterEvent.OnRefreshSearch) + { RefreshTextSearch(); } } - void RefreshFactionSearch() { + void RefreshFactionSearch() + { selectedFactionType = EntityFilterService.GetFactionType(); - if (selectedFactionType == FactionType.Any) { + if (selectedFactionType == FactionType.Any) + { factions = defaults.ToList(); } - else { + else + { factions = (from entity in defaults where entity.Faction() != null && entity.Faction().Faction == selectedFactionType select entity).ToList(); @@ -176,18 +188,22 @@ } - void OnImmortalChanged(ChangeEventArgs e) { - selectedImmortalType = e.Value.ToString(); + void OnImmortalChanged(ChangeEventArgs e) + { + selectedImmortalType = e.Value!.ToString()!; RefreshImmortalSearch(); } - void RefreshImmortalSearch() { + void RefreshImmortalSearch() + { selectedImmortalType = EntityFilterService.GetImmortalType(); - if (selectedImmortalType == ImmortalType.Any) { + if (selectedImmortalType == ImmortalType.Any) + { immortals = factions.ToList(); } - else { + else + { immortals = (from entity in factions where entity.VanguardAdded() == null || entity.VanguardAdded().ImmortalId == selectedImmortalType select entity).ToList(); @@ -196,18 +212,22 @@ RefreshEntitySearch(); } - void OnEntityChanged(ChangeEventArgs e) { - selectedEntityType = e.Value.ToString(); + void OnEntityChanged(ChangeEventArgs e) + { + selectedEntityType = e.Value!.ToString()!; RefreshEntitySearch(); } - void RefreshEntitySearch() { + void RefreshEntitySearch() + { selectedEntityType = EntityFilterService.GetEntityType(); - if (selectedEntityType == EntityType.Any) { + if (selectedEntityType == EntityType.Any) + { entities = immortals.ToList(); } - else { + else + { entities = (from entity in immortals where entity.EntityType == selectedEntityType select entity).ToList(); @@ -216,18 +236,22 @@ RefreshTextSearch(); } - void OnSearchTextChanged(ChangeEventArgs e) { - searchText = e.Value.ToString(); + void OnSearchTextChanged(ChangeEventArgs e) + { + searchText = e.Value!.ToString()!; RefreshTextSearch(); } - void RefreshTextSearch() { + void RefreshTextSearch() + { searchText = EntityFilterService.GetSearchText(); - if (searchText.Trim() == "") { + if (searchText.Trim() == "") + { searches = entities.ToList(); } - else { + else + { searches = (from entity in entities where entity.Info().Name.ToLower().Contains(searchText.ToLower()) select entity).ToList(); diff --git a/IGP/Pages/Database/DatabaseSinglePage.razor b/IGP/Pages/Database/DatabaseSinglePage.razor index d36da4a..6acd557 100644 --- a/IGP/Pages/Database/DatabaseSinglePage.razor +++ b/IGP/Pages/Database/DatabaseSinglePage.razor @@ -7,7 +7,7 @@ @implements IDisposable - + @@ -15,18 +15,19 @@ - +
- +
- - @if(Text.Trim().ToLower().Equals("walter")) + + @if (Text!.Trim().ToLower().Equals("walter")) { - Unhandled Exception: EXCEPTION_MEMORY_SIZE_VIOLATION + + Unhandled Exception: EXCEPTION_MEMORY_SIZE_VIOLATION UNIT_WALTER too powerful to be displayed. - + This SHOULD NEVER HAPPEN! @@ -37,36 +38,35 @@
Invalid entity name entered: @Text
No such entity. Did you mean "Throne"?
- } - + } + else { - + - + } - - + @code { + [Parameter] public string? Text { get; set; } - private EntityModel? entity = null; - + private EntityModel? entity; + protected override void OnInitialized() { - entityDisplayService.Subscribe(StateHasChanged); - + foreach (var e in DATA.Get().Values) { if (e.Info().Name.Equals(Text)) @@ -76,8 +76,9 @@ } } } - - void IDisposable.Dispose() { + + void IDisposable.Dispose() + { entityDisplayService.Unsubscribe(StateHasChanged); } diff --git a/IGP/Pages/Database/Entity/EntityViewComponent.razor b/IGP/Pages/Database/Entity/EntityViewComponent.razor index 1edaf8e..3685aa4 100644 --- a/IGP/Pages/Database/Entity/EntityViewComponent.razor +++ b/IGP/Pages/Database/Entity/EntityViewComponent.razor @@ -1,4 +1,5 @@ -@if (Entity != null) { +@if (Entity != null) +{ var isVanguard = Entity.VanguardAdded() != null ? " vanguard" : "";
@@ -47,9 +48,11 @@ @code { + [CascadingParameter] public EntityModel? Entity { get; set; } - + [CascadingParameter] public string? StyleType { get; set; } + } \ No newline at end of file diff --git a/IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor index 4355cff..bf0e5e5 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor @@ -1,7 +1,9 @@ -@if (Entity.IdAbilities().Count > 0) { +@if (Entity!.IdAbilities().Count > 0) +{ @if (StyleType.Equals("Plain")) { - @foreach (var idAbility in Entity.IdAbilities()) { + @foreach (var idAbility in Entity.IdAbilities()) + { var spell = EntityModel.Get(idAbility.Id); var info = spell.Info(); @@ -14,26 +16,31 @@
- Description: @((MarkupString)info.Description)
- - @if (!info.Notes.Trim().Equals("")) { + + @if (!info.Notes.Trim().Equals("")) + {
- Notes: @((MarkupString)info.Notes) -
+
} - +
- @if (production != null) { - if (production.Energy != 0) { + @if (production != null) + { + if (production.Energy != 0) + {
- Energy: @production.Energy
} - if (production.BuildTime != 0) { + if (production.BuildTime != 0) + {
- - BuildTime: @production.BuildTime + - BuildTime: @production.BuildTime
} - if (production.Cooldown != 0) { + if (production.Cooldown != 0) + {
- Cooldown: @production.Cooldown
@@ -42,13 +49,12 @@
} - } else { - - @foreach (var idAbility in Entity.IdAbilities()) { + @foreach (var idAbility in Entity.IdAbilities()) + { var spell = EntityModel.Get(idAbility.Id); var info = spell.Info(); @@ -61,26 +67,31 @@
Description: @((MarkupString)info.Description)
- - @if (!info.Notes.Trim().Equals("")) { + + @if (!info.Notes.Trim().Equals("")) + {
Notes: @((MarkupString)info.Notes) -
+
} - +
- @if (production != null) { - if (production.Energy != 0) { + @if (production != null) + { + if (production.Energy != 0) + {
Energy: @production.Energy
} - if (production.BuildTime != 0) { + if (production.BuildTime != 0) + {
- BuildTime: @production.BuildTime + BuildTime: @production.BuildTime
} - if (production.Cooldown != 0) { + if (production.Cooldown != 0) + {
Cooldown: @production.Cooldown
@@ -89,19 +100,18 @@
} - + } - } @code { [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; [CascadingParameter] public string StyleType { get; set; } = "Detailed"; - + } \ No newline at end of file diff --git a/IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor index f33ef3a..6719ac0 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor @@ -1,11 +1,12 @@ @if (StyleType.Equals("Plain")) { -
@Entity?.Info().Name - @if (Entity?.Info().Descriptive != DescriptiveType.None) - { - , @Entity?.Info().Descriptive.Replace("_", " ") - } -
+
+ @Entity?.Info().Name + @if (Entity?.Info().Descriptive != DescriptiveType.None) + { + , @Entity?.Info().Descriptive.Replace("_", " ") + } +
} else { @@ -18,7 +19,7 @@ else @if (Entity?.Info().Descriptive != DescriptiveType.None) { - : @Entity.Info().Descriptive.Replace("_", " ") + : @Entity!.Info().Descriptive.Replace("_", " ") }
@@ -53,9 +54,9 @@ else @code { [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; + - [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor index 5835fb3..f018e43 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor @@ -1,34 +1,38 @@ - -@if (StyleType.Equals("Plain")) +@if (StyleType.Equals("Plain")) { - @if (Entity.Info().Description != "") { + @if (Entity!.Info().Description != "") + {
Description: @((MarkupString)Entity.Info().Description)
} - @if (Entity.Info().Notes != "") { + @if (Entity.Info().Notes != "") + {
Notes: @((MarkupString)Entity.Info().Notes)
} - +
- @if (Entity.Faction() != null) { + @if (Entity.Faction() != null) + {
Faction: @Entity.Faction().Faction
} - @if (Entity.Tier() != null) { + @if (Entity.Tier() != null) + {
Tier: @Entity.Tier().Tier
}
- @if (Entity.Hotkey() != null) { + @if (Entity.Hotkey() != null) + {
Hotkey Group: @Entity.Hotkey().HotkeyGroup @@ -46,34 +50,39 @@ else { - @if (Entity.Info().Description != "") { + @if (Entity!.Info().Description != "") + {
Description: @((MarkupString)Entity.Info().Description)
} - @if (Entity.Info().Notes != "") { + @if (Entity.Info().Notes != "") + {
Notes: @((MarkupString)Entity.Info().Notes)
} - +
- @if (Entity.Faction() != null) { + @if (Entity.Faction() != null) + {
Faction: @Entity.Faction().Faction
} - @if (Entity.Tier() != null) { + @if (Entity.Tier() != null) + {
Tier: @Entity.Tier().Tier
}
- @if (Entity.Hotkey() != null) { + @if (Entity.Hotkey() != null) + {
Hotkey Group: @Entity.Hotkey().HotkeyGroup @@ -101,7 +110,7 @@ else gap: 4px; } } - + } @@ -109,7 +118,7 @@ else @code { [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor index f7a68ef..a3ac575 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor @@ -1,7 +1,9 @@ -@if (Entity.Mechanics().Count > 0) { +@if (Entity!.Mechanics().Count > 0) +{
- @foreach (var data in Entity.Mechanics()) { + @foreach (var data in Entity.Mechanics()) + {
@@ -22,8 +24,8 @@ @code { [CascadingParameter] - public EntityModel? Entity { get; set; } - + public EntityModel? Entity { get; set; } = default!; + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor index a441760..c8b86b1 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor @@ -1,100 +1,106 @@ -@if (Entity.IdPassives().Count > 0) { +@if (Entity!.IdPassives().Count > 0) +{ @if (StyleType.Equals("Plain")) { - @foreach (var idPassive in Entity.IdPassives()) { + @foreach (var idPassive in Entity.IdPassives()) + { var passive = EntityModel.Get(idPassive.Id); var info = passive.Info(); - + var production = passive.Production();
- Name: @info.Name + Name: @info.Name
- Description: @((MarkupString)info.Description)
- - @if (!info.Notes.Trim().Equals("")) { - + + @if (!info.Notes.Trim().Equals("")) + {
- Description: @((MarkupString)info.Notes) -
+
}
- - @if (production != null) { + + @if (production != null) + {
- @if (production.Pyre != 0) { + @if (production.Pyre != 0) + {
- Pyre: @production.Pyre -
+
} - @if (production.Cooldown != 0) { + @if (production.Cooldown != 0) + {
- Cooldown: @production.Cooldown.ToString()s -
+
}
} } - } else { - - @foreach (var idPassive in Entity.IdPassives()) { + @foreach (var idPassive in Entity.IdPassives()) + { var passive = EntityModel.Get(idPassive.Id); var info = passive.Info(); - + var production = passive.Production();
- Name: + Name:
Description: @((MarkupString)info.Description)
- - @if (!info.Notes.Trim().Equals("")) { - + + @if (!info.Notes.Trim().Equals("")) + {
Description: @((MarkupString)info.Notes) -
+
}
- - @if (production != null) { + + @if (production != null) + {
- @if (production.Pyre != 0) { + @if (production.Pyre != 0) + {
Pyre: @production.Pyre -
+
} - @if (production.Cooldown != 0) { + @if (production.Cooldown != 0) + {
Cooldown: @production.Cooldown.ToString()s -
+
}
} } -
+ } - } @code { [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; + - [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor index 205b64c..379f041 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor @@ -1,16 +1,103 @@ -@if (Production != null || Supply != null || Requirements.Count > 0) { - +@if (Production != null || Supply != null || Requirements.Count > 0) +{ @if (StyleType.Equals("Plain")) { - @if (Requirements.Count() > 0) { + @if (Requirements.Count() > 0) + { +
+ @foreach (var requirement in Requirements) + { + var replaced = DATA.Get()[requirement.DataType]; +
+ + + @requirement.Requirement.Replace("_", " "): @replaced.Info().Name + +
+ } +
+ } + + @if (Production != null && (!Production.Alloy.Equals(0) + || !Production.Ether.Equals(0) + || !Production.BuildTime.Equals(0) + || !Production.Cooldown.Equals(0))) + { +
+ @if (!Production.Alloy.Equals(0)) + { +
+ Alloy: @Production.Alloy +
+ } + @if (!Production.Ether.Equals(0)) + { +
+ Ether: @Production.Ether +
+ } + @if (!Production.Pyre.Equals(0)) + { +
+ Pyre: @Production.Pyre +
+ } + + @if (!Production.BuildTime.Equals(0)) + { +
+ Build Time: @Production.BuildTime.ToString()s +
+ } + + @if (!Production.Energy.Equals(0)) + { +
+ Energy: @Production.Energy +
+ } + + + @if (!Production.Cooldown.Equals(0)) + { +
+ Cooldown: @Production.Cooldown.ToString()s +
+ } +
+ } + @if (Supply != null) + { +
+ @if (!Supply.Grants.Equals(0)) + { +
+ Grants: @Supply.Grants +
+ } + @if (!Supply.Takes.Equals(0)) + { +
+ Takes: @Supply.Takes Supply +
+ } +
+ } + } + + else + { + +
+ @if (Requirements.Count() > 0) + {
@foreach (var requirement in Requirements) { - var replaced = DATA.Get()[requirement.DataType];
- @requirement.Requirement.Replace("_", " "): @replaced.Info().Name + @requirement.Requirement.Replace("_", " "):
} @@ -20,127 +107,62 @@ @if (Production != null && (!Production.Alloy.Equals(0) || !Production.Ether.Equals(0) || !Production.BuildTime.Equals(0) - || !Production.Cooldown.Equals(0))) { -
- @if (!Production.Alloy.Equals(0)) { -
- Alloy: @Production.Alloy -
- } - @if (!Production.Ether.Equals(0)) { -
- Ether: @Production.Ether -
- } - @if (!Production.Pyre.Equals(0)) { -
- Pyre: @Production.Pyre -
- } - - @if (!Production.BuildTime.Equals(0)) { -
- Build Time: @Production.BuildTime.ToString()s -
- } - - @if (!Production.Energy.Equals(0)) { -
- Energy: @Production.Energy -
- } - - - @if (!Production.Cooldown.Equals(0)) { -
- Cooldown: @Production.Cooldown.ToString()s -
- } -
- } - @if (Supply != null) { + || !Production.Cooldown.Equals(0))) + {
- @if (!Supply.Grants.Equals(0)) { + @if (!Production.Alloy.Equals(0)) + {
- Grants: @Supply.Grants + Alloy: @Production.Alloy
} - @if (!Supply.Takes.Equals(0)) { + @if (!Production.Ether.Equals(0)) + {
- Takes: @Supply.Takes Supply + Ether: @Production.Ether +
+ } + @if (!Production.Pyre.Equals(0)) + { +
+ Pyre: @Production.Pyre
} -
- } - } - else - { - - -
- @if (Requirements.Count() > 0) { -
- @foreach (var requirement in Requirements) { + @if (!Production.BuildTime.Equals(0)) + {
+ Build Time: @Production.BuildTime.ToString()s +
+ } - - @requirement.Requirement.Replace("_", " "): - + @if (!Production.Energy.Equals(0)) + { +
+ Energy: @Production.Energy +
+ } + + + @if (!Production.Cooldown.Equals(0)) + { +
+ Cooldown: @Production.Cooldown.ToString()s
}
} - - @if (Production != null && (!Production.Alloy.Equals(0) - || !Production.Ether.Equals(0) - || !Production.BuildTime.Equals(0) - || !Production.Cooldown.Equals(0))) { -
- @if (!Production.Alloy.Equals(0)) { -
- Alloy: @Production.Alloy -
- } - @if (!Production.Ether.Equals(0)) { -
- Ether: @Production.Ether -
- } - @if (!Production.Pyre.Equals(0)) { -
- Pyre: @Production.Pyre -
- } - - @if (!Production.BuildTime.Equals(0)) { -
- Build Time: @Production.BuildTime.ToString()s -
- } - - @if (!Production.Energy.Equals(0)) { -
- Energy: @Production.Energy -
- } - - - @if (!Production.Cooldown.Equals(0)) { -
- Cooldown: @Production.Cooldown.ToString()s -
- } -
- } - @if (Supply != null) { + @if (Supply != null) + {
- @if (!Supply.Grants.Equals(0)) { + @if (!Supply.Grants.Equals(0)) + {
Grants: @Supply.Grants
} - @if (!Supply.Takes.Equals(0)) { + @if (!Supply.Takes.Equals(0)) + {
Takes: @Supply.Takes Supply
@@ -149,8 +171,8 @@ }
- - + + - } } @@ -173,14 +194,14 @@ [CascadingParameter] public EntityModel? Entity { get; set; } - + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; - private EntityProductionModel Production => Entity.Production(); - private List Requirements => Entity.Requirements(); - private EntitySupplyModel Supply => Entity.Supply(); + private EntityProductionModel Production => Entity!.Production(); + private List Requirements => Entity!.Requirements(); + private EntitySupplyModel Supply => Entity!.Supply(); protected override void OnParametersSet() diff --git a/IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor index 55fd5db..ed27673 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor @@ -1,8 +1,9 @@ -@if (Entity.IdPyreSpells().Count > 0) +@if (Entity!.IdPyreSpells().Count > 0) { @if (StyleType.Equals("Plain")) { - @foreach (var pyreSpell in Entity.IdPyreSpells()) { + @foreach (var pyreSpell in Entity.IdPyreSpells()) + { var spell = EntityModel.Get(pyreSpell.Id); var info = spell.Info(); @@ -16,16 +17,20 @@ - Description: @((MarkupString)info.Description)
- @if (production != null) { - if (production.Pyre != 0) { + @if (production != null) + { + if (production.Pyre != 0) + { - Pyre: @production.Pyre } - if (production.BuildTime != 0) { + if (production.BuildTime != 0) + { - BuildTime: @production.BuildTime } - if (production.Cooldown != 0) { + if (production.Cooldown != 0) + { - Cooldown: @production.Cooldown } @@ -33,12 +38,12 @@
} - } else { - @foreach (var pyreSpell in Entity.IdPyreSpells()) { + @foreach (var pyreSpell in Entity.IdPyreSpells()) + { var spell = EntityModel.Get(pyreSpell.Id); var info = spell.Info(); @@ -52,16 +57,20 @@ Description: @((MarkupString)info.Description)
- @if (production != null) { - if (production.Pyre != 0) { + @if (production != null) + { + if (production.Pyre != 0) + { Pyre: @production.Pyre } - if (production.BuildTime != 0) { + if (production.BuildTime != 0) + { BuildTime: @production.BuildTime } - if (production.Cooldown != 0) { + if (production.Cooldown != 0) + { Cooldown: @production.Cooldown } @@ -70,7 +79,6 @@
}
- } } @@ -78,9 +86,9 @@ @code { [CascadingParameter] - public EntityModel? Entity { get; set; } - - + public EntityModel? Entity { get; set; } = default!; + + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor index 65c5cca..e6d8907 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor @@ -1,97 +1,112 @@ - -@if (Vitality != null || Movement != null) { +@if (Vitality != null || Movement != null) +{ @if (StyleType.Equals("Plain")) { - @if (Vitality != null) { + @if (Vitality != null) + { +
+ @if (!Vitality.DefenseLayer.Equals(0)) + {
- @if (!Vitality.DefenseLayer.Equals(0)) { -
- Shield: @Vitality.DefenseLayer -
- } - @if (!Vitality.Health.Equals(0)) { -
- Health: @Vitality.Health -
- } - @if (!Vitality.Energy.Equals(0)) { -
- Energy: @Vitality.Energy -
- } - @if (Vitality.Armor != "") { -
- Armor: @Vitality.Armor -
- } + Shield: @Vitality.DefenseLayer +
+ } + @if (!Vitality.Health.Equals(0)) + { +
+ Health: @Vitality.Health +
+ } + @if (!Vitality.Energy.Equals(0)) + { +
+ Energy: @Vitality.Energy +
+ } + @if (Vitality.Armor != "") + { +
+ Armor: @Vitality.Armor +
+ } - @if (Vitality.IsEtheric) { -
- + Etheric -
- } - @if (Vitality.IsStructure) { -
- + Structure -
- } + @if (Vitality.IsEtheric) + { +
+ + Etheric +
+ } + @if (Vitality.IsStructure) + { +
+ + Structure
} +
+ } - @if (Movement != null) { + @if (Movement != null) + { +
+ @if (!Movement.Speed.Equals(0)) + {
- @if (!Movement.Speed.Equals(0)) { -
- Speed: @Movement.Speed -
- } - else { -
- Speed: Immobile -
- } -
- Move Type: @Movement.Movement -
+ Speed: @Movement.Speed +
+ } + else + { +
+ Speed: Immobile
} +
+ Move Type: @Movement.Movement +
+
+ } } else { - -
- @if (Vitality != null) { + @if (Vitality != null) + {
- @if (!Vitality.DefenseLayer.Equals(0)) { + @if (!Vitality.DefenseLayer.Equals(0)) + {
Shield: @Vitality.DefenseLayer
} - @if (!Vitality.Health.Equals(0)) { + @if (!Vitality.Health.Equals(0)) + {
Health: @Vitality.Health
} - @if (!Vitality.Energy.Equals(0)) { + @if (!Vitality.Energy.Equals(0)) + {
Energy: @Vitality.Energy
} - @if (Vitality.Armor != "") { + @if (Vitality.Armor != "") + {
Armor: @Vitality.Armor
} - @if (Vitality.IsEtheric) { + @if (Vitality.IsEtheric) + {
+ Etheric
} - @if (Vitality.IsStructure) { + @if (Vitality.IsStructure) + {
+ Structure
@@ -100,14 +115,17 @@ } - @if (Movement != null) { + @if (Movement != null) + {
- @if (!Movement.Speed.Equals(0)) { + @if (!Movement.Speed.Equals(0)) + {
Speed: @Movement.Speed
} - else { + else + {
Speed: Immobile
@@ -132,21 +150,20 @@ } } - - } } @code { + [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; + - [CascadingParameter] public string StyleType { get; set; } = "Detailed"; - - private EntityVitalityModel Vitality => Entity.Vitality(); - private EntityMovementModel Movement => Entity.Movement(); + + private EntityVitalityModel Vitality => Entity!.Vitality(); + private EntityMovementModel Movement => Entity!.Movement(); } \ No newline at end of file diff --git a/IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor index 7199fbe..5ef061a 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor @@ -1,7 +1,9 @@ -@if (Entity.IdUpgrades().Count > 0) { +@if (Entity!.IdUpgrades().Count > 0) +{ @if (StyleType.Equals("Plain")) { - @foreach (var upgradeId in Entity.IdUpgrades()) { + @foreach (var upgradeId in Entity.IdUpgrades()) + { var entity = EntityModel.Get(upgradeId.Id);
@@ -12,13 +14,13 @@
} - } else {
- @foreach (var upgradeId in Entity.IdUpgrades()) { + @foreach (var upgradeId in Entity.IdUpgrades()) + { var entity = EntityModel.Get(upgradeId.Id);
@@ -30,9 +32,9 @@
}
- - - + + + } - } @code { [CascadingParameter] - public EntityModel? Entity { get; set; } + public EntityModel? Entity { get; set; } = default!; + - [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor index 5f02bf2..dff48f3 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor @@ -1,17 +1,19 @@ -@if (Vanguard != null) { +@if (Vanguard != null) +{ var immortalId = Vanguard.ImmortalId; var immortal = DATA.Get()[immortalId]; - + var replaced = DATA.Get()[Vanguard.ReplaceId]; - + @if (StyleType.Equals("Plain")) {
Immortal: @immortal.Info().Name
- @if (!Vanguard.ReplaceId.Equals("")) { + @if (!Vanguard.ReplaceId.Equals("")) + {
- Replaces: @replaced.Info().Name + Replaces: @replaced.Info().Name
} } @@ -22,25 +24,27 @@
Immortal:
- @if (!Vanguard.ReplaceId.Equals("")) { + @if (!Vanguard.ReplaceId.Equals("")) + {
- Replaces: + Replaces:
}
-
+ } } @code { + [CascadingParameter] - public EntityModel? Entity { get; set; } - + public EntityModel? Entity { get; set; } = default!; + private EntityVanguardAddedModel? Vanguard => Entity?.VanguardAdded(); - + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; - - + + } \ No newline at end of file diff --git a/IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor index aa8747f..54538ba 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor @@ -1,7 +1,9 @@ -@if (Entity.IdVanguards().Count > 0) { +@if (Entity!.IdVanguards().Count > 0) +{ @if (StyleType.Equals("Plain")) { - @foreach (var data in Entity.IdVanguards()) { + @foreach (var data in Entity.IdVanguards()) + { var entity = EntityModel.Get(data.Id); var requirements = entity.Requirements(); @@ -9,7 +11,7 @@ var replaced = DATA.Get()[vanguardAdded.ReplaceId]; var immortal = DATA.Get()[vanguardAdded.ImmortalId]; - + var productionBuilding = (from building in requirements where building.Requirement == RequirementType.Production_Building select building).First().DataType; @@ -22,7 +24,7 @@ - Replaces: @replaced.Info().Name
- - Built From: @immortal.Info().Name + - Built From: @immortal.Info().Name
} @@ -30,7 +32,8 @@ else { - @foreach (var data in Entity.IdVanguards()) { + @foreach (var data in Entity.IdVanguards()) + { var entity = EntityModel.Get(data.Id); var requirements = entity.Requirements(); @@ -44,7 +47,7 @@ Name:
- Replaces: + Replaces:
Built From: @@ -52,17 +55,15 @@
}
- } - } @code { [CascadingParameter] - public EntityModel? Entity { get; set; } - - + public EntityModel? Entity { get; set; } = default!; + + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor b/IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor index bd70d1d..4d6e9dd 100644 --- a/IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor +++ b/IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor @@ -1,205 +1,204 @@ -@if (Entity.Weapons().Count > 0) +@if (Entity!.Weapons().Count > 0) { @if (StyleType.Equals("Plain")) { - int index = 0; - + var index = 0; + foreach (var data in Entity.Weapons()) { index++; - + +
-
-
-
- Weapon @index -
- -
- - Damage: @data.Damage -
- @if (data.LightDamage != 0) - { -
- - vs Light: @data.LightDamage  -
- } - @if (data.MediumDamage != 0) - { -
- - vs Medium: @data.MediumDamage  -
- } - @if (data.HeavyDamage != 0) - { -
- - vs Heavy: @data.HeavyDamage  -
- } - @if (data.EthericDamageBonus != 0) - { -
- - vs Etheric +@data.EthericDamageBonus  -
- } - @if (data.StructureDamageBonus != 0) - { -
- - vs Structure: +@data.StructureDamageBonus  -
- } -
-
-
- - Range: @data.Range -
- @if (data.SecondsBetweenAttacks > 0) - { -
- - AttacksPerSecond: @(1 / data.SecondsBetweenAttacks) -
+
- - (or SecondsBetweenAttacks: @data.SecondsBetweenAttacks) -
- } - else if (data.AttacksPerSecond > 0) - { -
- - AttacksPerSecond: @data.AttacksPerSecond + Weapon @index
+
- - (or SecondsBetweenAttacks: @(1 / data.AttacksPerSecond)) + - Damage: @data.Damage
- } - -
- - Targets: @data.Targets -
- @if (data.AttacksPerSecond != 0) - { - - - DPS: @(Math.Round(data.Damage * data.AttacksPerSecond))  - @if (data.LightDamage != 0) { - - - Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))  - +
+ - vs Light: @data.LightDamage  +
} @if (data.MediumDamage != 0) { - - - Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))  - +
+ - vs Medium: @data.MediumDamage  +
} @if (data.HeavyDamage != 0) { - - - Heavy DPS: @(Math.Round(data.HeavyDamage * data.AttacksPerSecond))  - +
+ - vs Heavy: @data.HeavyDamage  +
+ } + @if (data.EthericDamageBonus != 0) + { +
+ - vs Etheric +@data.EthericDamageBonus  +
} - } + @if (data.StructureDamageBonus != 0) + { +
+ - vs Structure: +@data.StructureDamageBonus  +
+ } +
- } - } - else - { - - -
- @foreach (var data in Entity.Weapons()) - {
+ - Range: @data.Range +
+ @if (data.SecondsBetweenAttacks > 0) + {
-
-
- Damage: @data.Damage -
- @if (data.LightDamage != 0) - { -
- vs Light: @data.LightDamage  -
- } - @if (data.MediumDamage != 0) - { -
- vs Medium: @data.MediumDamage  -
- } - @if (data.HeavyDamage != 0) - { -
- vs Heavy: @data.HeavyDamage  -
- } - @if (data.EthericDamageBonus != 0) - { -
- vs Etheric +@data.EthericDamageBonus  -
- } - @if (data.StructureDamageBonus != 0) - { -
- vs Structure: +@data.StructureDamageBonus  -
- } -
+ - AttacksPerSecond: @(1 / data.SecondsBetweenAttacks) +
+
+ - (or SecondsBetweenAttacks: @data.SecondsBetweenAttacks)
+ } + else if (data.AttacksPerSecond > 0) + {
- Range: @data.Range + - AttacksPerSecond: @data.AttacksPerSecond
- @if (data.SecondsBetweenAttacks > 0) +
+ - (or SecondsBetweenAttacks: @(1 / data.AttacksPerSecond)) +
+ } + +
+ - Targets: @data.Targets +
+ @if (data.AttacksPerSecond != 0) + { + + - DPS: @(Math.Round(data.Damage * data.AttacksPerSecond))  + + @if (data.LightDamage != 0) { -
- AttacksPerSecond: @(1 / data.SecondsBetweenAttacks) -
-
- (or SecondsBetweenAttacks: @data.SecondsBetweenAttacks) -
+ + - Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))  + } - else if (data.AttacksPerSecond > 0) + @if (data.MediumDamage != 0) { -
- AttacksPerSecond: @data.AttacksPerSecond -
-
- (or SecondsBetweenAttacks: @(1 / data.AttacksPerSecond)) -
+ + - Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))  + } - -
- Targets: @data.Targets -
- @if (data.AttacksPerSecond != 0) + @if (data.HeavyDamage != 0) { + + - Heavy DPS: @(Math.Round(data.HeavyDamage * data.AttacksPerSecond))  + + } + } +
+ } + } + else + { + +
+ @foreach (var data in Entity.Weapons()) + { +
- DPS: @(Math.Round(data.Damage * data.AttacksPerSecond))  +
+
+ Damage: @data.Damage +
+ @if (data.LightDamage != 0) + { +
+ vs Light: @data.LightDamage  +
+ } + @if (data.MediumDamage != 0) + { +
+ vs Medium: @data.MediumDamage  +
+ } + @if (data.HeavyDamage != 0) + { +
+ vs Heavy: @data.HeavyDamage  +
+ } + @if (data.EthericDamageBonus != 0) + { +
+ vs Etheric +@data.EthericDamageBonus  +
+ } + @if (data.StructureDamageBonus != 0) + { +
+ vs Structure: +@data.StructureDamageBonus  +
+ } +
- @if (data.LightDamage != 0) +
+ Range: @data.Range +
+ @if (data.SecondsBetweenAttacks > 0) {
- Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))  + AttacksPerSecond: @(1 / data.SecondsBetweenAttacks) +
+
+ (or SecondsBetweenAttacks: @data.SecondsBetweenAttacks)
} - @if (data.MediumDamage != 0) + else if (data.AttacksPerSecond > 0) {
- Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))  + AttacksPerSecond: @data.AttacksPerSecond +
+
+ (or SecondsBetweenAttacks: @(1 / data.AttacksPerSecond))
} - @if (data.HeavyDamage != 0) + +
+ Targets: @data.Targets +
+ @if (data.AttacksPerSecond != 0) {
- Heavy DPS: @(Math.Round(data.HeavyDamage * data.AttacksPerSecond))  + DPS: @(Math.Round(data.Damage * data.AttacksPerSecond)) 
+ @if (data.LightDamage != 0) + { +
+ Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))  +
+ } + @if (data.MediumDamage != 0) + { +
+ Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))  +
+ } + @if (data.HeavyDamage != 0) + { +
+ Heavy DPS: @(Math.Round(data.HeavyDamage * data.AttacksPerSecond))  +
+ } } - } -
- } -
-
+
+ } +
+ - -} + } } @code { [CascadingParameter] - public EntityModel? Entity { get; set; } - - + public EntityModel? Entity { get; set; } = default!; + + [CascadingParameter] public string StyleType { get; set; } = "Detailed"; diff --git a/IGP/Pages/Database/Parts/EntityFilterComponent.razor b/IGP/Pages/Database/Parts/EntityFilterComponent.razor index 8586689..e6cb2cb 100644 --- a/IGP/Pages/Database/Parts/EntityFilterComponent.razor +++ b/IGP/Pages/Database/Parts/EntityFilterComponent.razor @@ -2,23 +2,27 @@
- @foreach (var choice in EntityFilterService.GetFactionChoices()) { + @foreach (var choice in EntityFilterService.GetFactionChoices()) + { var styleClass = ""; - if (choice.Equals(EntityFilterService.GetFactionType())) { + if (choice.Equals(EntityFilterService.GetFactionType())) + { styleClass = "selected"; } }
- @if (EntityFilterService.GetFactionType() != "Any" && EntityFilterService.GetFactionType() != "None") { + @if (EntityFilterService.GetFactionType() != "Any" && EntityFilterService.GetFactionType() != "None") + {
@foreach (var choice in EntityFilterService.GetImmortalChoices()) { var name = DATA.Get()[choice].Info().Name; - + var styleClass = ""; - if (choice.Equals(EntityFilterService.GetImmortalType())) { + if (choice.Equals(EntityFilterService.GetImmortalType())) + { styleClass = "selected"; } @@ -27,16 +31,18 @@ }
- @foreach (var choice in EntityFilterService.GetEntityChoices()) { + @foreach (var choice in EntityFilterService.GetEntityChoices()) + { var styleClass = ""; - if (choice.Equals(EntityFilterService.GetEntityType())) { + if (choice.Equals(EntityFilterService.GetEntityType())) + { styleClass = "selected"; } }
- +
@@ -199,40 +205,49 @@ @code { [Inject] - public IEntityFilterService EntityFilterService { get; set; } + public IEntityFilterService EntityFilterService { get; set; } = default!; - protected override void OnInitialized() { } + protected override void OnInitialized() + { + } - void OnChangeFaction(string clickedFaction) { + void OnChangeFaction(string clickedFaction) + { EntityFilterService.SelectFactionType(clickedFaction); StateHasChanged(); } - void OnChangeImmortal(string clickedImmortal) { + void OnChangeImmortal(string clickedImmortal) + { EntityFilterService.SelectImmortalType(clickedImmortal); } - void OnChangeEntity(string clickedEntity) { + void OnChangeEntity(string clickedEntity) + { EntityFilterService.SelectEntityType(clickedEntity); } - void OnFactionChanged(ChangeEventArgs e) { - EntityFilterService.SelectFactionType(e.Value.ToString()); + void OnFactionChanged(ChangeEventArgs e) + { + EntityFilterService.SelectFactionType(e.Value!.ToString()!); } - void OnImmortalChanged(ChangeEventArgs e) { - EntityFilterService.SelectImmortalType(e.Value.ToString()); + void OnImmortalChanged(ChangeEventArgs e) + { + EntityFilterService.SelectImmortalType(e.Value!.ToString()!); } - void OnEntityChanged(ChangeEventArgs e) { - EntityFilterService.SelectEntityType(e.Value.ToString()); + void OnEntityChanged(ChangeEventArgs e) + { + EntityFilterService.SelectEntityType(e.Value!.ToString()!); } - void OnSearchTextChanged(ChangeEventArgs e) { - EntityFilterService.EnterSearchText(e.Value.ToString()); + void OnSearchTextChanged(ChangeEventArgs e) + { + EntityFilterService.EnterSearchText(e.Value!.ToString()!); } } \ No newline at end of file diff --git a/IGP/Pages/Documentation/DocumentationIndexPage.razor b/IGP/Pages/Documentation/DocumentationIndexPage.razor new file mode 100644 index 0000000..5a20e9f --- /dev/null +++ b/IGP/Pages/Documentation/DocumentationIndexPage.razor @@ -0,0 +1,115 @@ +@layout PageLayout + +@inject IDocumentationService documentationService +@implements IDisposable + +@page "/docs" + +@if (!documentationService.IsLoaded()) +{ + +} +else +{ + + + @foreach (var docSection in documentationService.DocSectionModels) + { +
+
@docSection.Name
+
+ @foreach (var docContent in docSection.DocumentationModels) + { + +
@docContent.Name
+
@docContent.Description
+
+ } +
+
+ } +
+
+} + + + + +@code { + + [Parameter] + public string? Text { get; set; } + + protected override void OnInitialized() + { + documentationService.Subscribe(StateHasChanged); + + documentationService.Load(); + } + + public void Dispose() + { + documentationService.Unsubscribe(StateHasChanged); + } + +} \ No newline at end of file diff --git a/IGP/Pages/Documentation/DocumentationPage.razor b/IGP/Pages/Documentation/DocumentationPage.razor index fce7ce2..215aca8 100644 --- a/IGP/Pages/Documentation/DocumentationPage.razor +++ b/IGP/Pages/Documentation/DocumentationPage.razor @@ -1,69 +1,40 @@ @layout PageLayout -@inject IDocumentationService DocumentationService -@using Markdig -@implements IDisposable +@inject IDocumentationService documentationService -@page "/docs/{text?}" +@implements IDisposable +@page "/docs/{href1}/{href2?}/{href3?}/{href4?}/{href5?}" -@if (!DocumentationService.IsLoaded()) +@if (!documentationService.IsLoaded()) { - + } else { - - Documentation - -
-
Section:
-
- -
- -
- @foreach (var doc in DocumentationService.DocumentationModels) { - if (selectedSection != "All" && doc.Section != selectedSection) { - continue; + + + + + + + @foreach (var doc in documentationService.DocContentModels) + { + if (!doc.Href.Equals(Href)) + { + continue; + } + } - -
- @doc.Section -
- Last Updated on @doc.UpdatedDate.ToString("MM/dd/yyyy") -
-
-
@doc.Name
-
@((MarkupString)Markdown.ToHtml(doc.Description))
-
-
- } -
-
- + + + } + + +@code { + + [Parameter] + public DocContentModel DocContentModel { get; set; } = default!; + +} \ No newline at end of file diff --git a/IGP/Pages/Documentation/Parts/DocumentInnerNavComponent.razor b/IGP/Pages/Documentation/Parts/DocumentInnerNavComponent.razor new file mode 100644 index 0000000..6c46cf9 --- /dev/null +++ b/IGP/Pages/Documentation/Parts/DocumentInnerNavComponent.razor @@ -0,0 +1,70 @@ +@if (Document!.DocumentationModels.Count > 0) +{ +
+ @foreach (var innerDoc in Document.DocumentationModels) + { + var linkStyle = $"docInnerNavButton inner_{Layers}"; + @innerDoc.Name + + } +
+} + + + +@code { + + [Parameter] + public DocContentModel? Document { get; set; } = default!; + + [Parameter] + public int Layers { get; set; } = 1; + + public int IncrementLayers() + { + return Layers + 1; + } + + + private string GetLink(DocContentModel doc) + { + return $"docs/{doc.Href}"; + } + +} \ No newline at end of file diff --git a/IGP/Pages/Documentation/Parts/DocumentNavComponent.razor b/IGP/Pages/Documentation/Parts/DocumentNavComponent.razor new file mode 100644 index 0000000..ab7cd70 --- /dev/null +++ b/IGP/Pages/Documentation/Parts/DocumentNavComponent.razor @@ -0,0 +1,46 @@ +
+ @foreach (var doc in Documents) + { + if (doc.Parent == null) + { + @doc.Name + + } + } +
+ + + +@code { + + [Parameter] + public List Documents { get; set; } = default!; + + [Parameter] + public List Connections { get; set; } = default!; + + private string GetLink(DocContentModel doc) + { + return $"docs/{doc.Href}"; + } + +} \ No newline at end of file diff --git a/IGP/Pages/HarassCalculatorPage.razor b/IGP/Pages/HarassCalculatorPage.razor index f819d04..6fb6083 100644 --- a/IGP/Pages/HarassCalculatorPage.razor +++ b/IGP/Pages/HarassCalculatorPage.razor @@ -31,19 +31,19 @@ + OnChange="@(e => { NumberOfWorkersLostToHarass = int.Parse(e.Value!.ToString()!); Calculate();})"> Number of workers lost to harass + OnChange="@(e => { NumberOfTownHallsExisting = int.Parse(e.Value!.ToString()!); Calculate();})"> Number of townhalls existing + OnChange="@(e => { TravelTime = int.Parse(e.Value!.ToString()!); Calculate();})"> Travel time @@ -230,42 +230,51 @@ float NumberOfWorkersLostToHarass = 1; float NumberOfTownHallsExisting = 1; - float SimultaneousProductionFloor() { - if (NumberOfTownHallsExisting <= 0 || NumberOfWorkersLostToHarass <= 0) { + float SimultaneousProductionFloor() + { + if (NumberOfTownHallsExisting <= 0 || NumberOfWorkersLostToHarass <= 0) + { return 0; } return (float)Math.Floor(NumberOfWorkersLostToHarass / Math.Min(NumberOfTownHallsExisting, NumberOfWorkersLostToHarass)); } - float LeftOverWorkersToProduceCount() { + float LeftOverWorkersToProduceCount() + { return NumberOfWorkersLostToHarass % Math.Min(NumberOfTownHallsExisting, NumberOfWorkersLostToHarass); } - float WorkerReplacementCost() { + float WorkerReplacementCost() + { return CostOfWorker * NumberOfWorkersLostToHarass; } - float DelayedMiningCost() { + float DelayedMiningCost() + { return TotalAlloyHarassment - WorkerReplacementCost(); } - void Calculate() { + void Calculate() + { TotalAlloyHarassment = WorkerReplacementCost(); - for (var workerProductionIndex = 0; workerProductionIndex < SimultaneousProductionFloor(); workerProductionIndex++) { + for (var workerProductionIndex = 0; workerProductionIndex < SimultaneousProductionFloor(); workerProductionIndex++) + { TotalAlloyHarassment += AlloyMinedPerSecondByWorker * (TimeToProduceWorker + TravelTime) * (workerProductionIndex + 1); } TotalAlloyHarassment += LeftOverWorkersToProduceCount() * (TimeToProduceWorker + TravelTime) * AlloyMinedPerSecondByWorker; } - protected override void OnInitialized() { + protected override void OnInitialized() + { Calculate(); } - void ValueChanged(float test) { + void ValueChanged(float test) + { Calculate(); } diff --git a/IGP/Pages/Home/HomePage.razor b/IGP/Pages/Home/HomePage.razor new file mode 100644 index 0000000..379a116 --- /dev/null +++ b/IGP/Pages/Home/HomePage.razor @@ -0,0 +1,82 @@ +@layout PageLayout; + +@page "/immortal-home" + + + +
+
+ Fan Reference +
+ +
+ Refer to various aspects of "IMMORTAL: Gates of Pyre" from this external reference! +
+
+
+ + + + +
+ + + + + + + + +
+
+ + + + + Under Construction + Website is still being made. Check out Road Map for future plans, Agile for present tasks, and Change Log for past changes. + + + +
+ + \ No newline at end of file diff --git a/IGP/Pages/Home/Parts/ContentHighlightComponent.razor b/IGP/Pages/Home/Parts/ContentHighlightComponent.razor new file mode 100644 index 0000000..3f33b2f --- /dev/null +++ b/IGP/Pages/Home/Parts/ContentHighlightComponent.razor @@ -0,0 +1,76 @@ + +
+ @Title +
+ @Title +
+ @Description +
+
+ + + + +@code { + + [Parameter] + public string Href { get; set; } = default!; + + [Parameter] + public string Title { get; set; } = default!; + + [Parameter] + public string Description { get; set; } = default!; + + [Parameter] + public string ImageHref { get; set; } = default!; + + +} \ No newline at end of file diff --git a/IGP/Pages/HomePage.razor b/IGP/Pages/HomePage.razor deleted file mode 100644 index 5ecc2ab..0000000 --- a/IGP/Pages/HomePage.razor +++ /dev/null @@ -1,149 +0,0 @@ -@layout PageLayout; - -@page "/immortal-home" - - -
-
- Fan Reference -
- -
- Refer to various aspects of "IMMORTAL: Gates of Pyre" from this external reference! -
-
- - - -
-
-
- Database -
- - - Review the units! - -
- - -
-
- Build Calculator -
- - - Make a build! - -
- - -
-
- Notes -
- - - Read some notes! - -
- - -
-
- Streams -
- - - Watch live development! - -
- -
- - - - - Under Construction - Website is still being made. Check out Road Map for future plans, Agile for present tasks, and Change Log for past changes. - - - -
- - \ No newline at end of file diff --git a/IGP/Pages/MakingOf/Parts/MakingOfColours.razor b/IGP/Pages/MakingOf/Parts/MakingOfColours.razor index b46b8f4..07a662a 100644 --- a/IGP/Pages/MakingOf/Parts/MakingOfColours.razor +++ b/IGP/Pages/MakingOf/Parts/MakingOfColours.razor @@ -16,60 +16,60 @@ --info: @info; --info-border: @info_border; -
+
Accent
- Base: + Base:
Primary
- Base: + Base:
- Border: + Border:
- Hover Base: + Hover Base:
- Hover Border: + Hover Border:
Secondary
- Base: + Base:
- Hover Base: + Hover Base:
- Hover Border: + Hover Border:
Paper
- Base: + Base:
- Border: + Border:
Background
- Base: + Base:
Info
- Base: + Base:
diff --git a/IGP/Pages/MakingOf/Parts/MakingOfDialogs.razor b/IGP/Pages/MakingOf/Parts/MakingOfDialogs.razor index 049c456..57a017f 100644 --- a/IGP/Pages/MakingOf/Parts/MakingOfDialogs.razor +++ b/IGP/Pages/MakingOf/Parts/MakingOfDialogs.razor @@ -2,7 +2,6 @@ Dialog ... - //TODO @@ -12,7 +11,6 @@ - @code { } \ No newline at end of file diff --git a/IGP/Pages/MakingOf/Parts/MakingOfDisplays.razor b/IGP/Pages/MakingOf/Parts/MakingOfDisplays.razor index cc815e5..5e1772d 100644 --- a/IGP/Pages/MakingOf/Parts/MakingOfDisplays.razor +++ b/IGP/Pages/MakingOf/Parts/MakingOfDisplays.razor @@ -12,7 +12,8 @@ Example Entity Content
- @for (var i = 0; i < 1; i++) { + @for (var i = 0; i < 1; i++) + {
-@i Example Entity Content
@@ -27,7 +28,8 @@ Example Entity Content
- @for (var i = 0; i < 2; i++) { + @for (var i = 0; i < 2; i++) + {
-@i Example Entity Content
@@ -42,7 +44,8 @@ Example Entity Content
- @for (var i = 0; i < 1; i++) { + @for (var i = 0; i < 1; i++) + {
-@i Example Entity Content
diff --git a/IGP/Pages/MakingOf/Parts/MakingOfFeedback.razor b/IGP/Pages/MakingOf/Parts/MakingOfFeedback.razor index 16f3e39..e89f031 100644 --- a/IGP/Pages/MakingOf/Parts/MakingOfFeedback.razor +++ b/IGP/Pages/MakingOf/Parts/MakingOfFeedback.razor @@ -12,7 +12,7 @@
- +
diff --git a/IGP/Pages/MemoryTester/Parts/UnitMemory.razor b/IGP/Pages/MemoryTester/Parts/UnitMemory.razor index b13fe1f..b146c56 100644 --- a/IGP/Pages/MemoryTester/Parts/UnitMemory.razor +++ b/IGP/Pages/MemoryTester/Parts/UnitMemory.razor @@ -7,14 +7,16 @@ @EntityMemory.Name - @foreach (var question in questions) { + @foreach (var question in questions) + { var questionWrong = hasBeenSubmitted && !question.IsRevealed && question.Guess != question.Answer; - @if (questionWrong) { + @if (questionWrong) + {
The correct answer was @question.Answer
} } @@ -48,9 +50,9 @@ @code { [Parameter] - public MemoryEntityModel EntityMemory { get; set; } + public MemoryEntityModel EntityMemory { get; set; } = default!; - private List questions { get; set; } + private List questions { get; set; } = default!; private bool hasBeenSubmitted = false; private bool isCorrect = false; @@ -58,40 +60,49 @@ public int Guess { get; set; } - protected override void OnInitialized() { + protected override void OnInitialized() + { MemoryTesterService.Subscribe(OnMemoryEvent); OnRefresh(); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { MemoryTesterService.Unsubscribe(OnMemoryEvent); } - void OnMemoryEvent(MemoryTesterEvent memoryTesterEvent) { - if (memoryTesterEvent == MemoryTesterEvent.OnVerify) { + void OnMemoryEvent(MemoryTesterEvent memoryTesterEvent) + { + if (memoryTesterEvent == MemoryTesterEvent.OnVerify) + { OnVerify(); } - if (memoryTesterEvent == MemoryTesterEvent.OnRefresh) { + if (memoryTesterEvent == MemoryTesterEvent.OnRefresh) + { OnRefresh(); } } - public void OnAnswerEntered(AnswerEventArgs answerEventArgs, MemoryQuestionModel question) { + public void OnAnswerEntered(AnswerEventArgs answerEventArgs, MemoryQuestionModel question) + { question.Guess = answerEventArgs.Guess; MemoryTesterService.Update(question); } - void OnVerify() { + void OnVerify() + { hasBeenSubmitted = true; isCorrect = true; - foreach (var question in questions) { - if (question.Answer != question.Guess) { + foreach (var question in questions) + { + if (question.Answer != question.Guess) + { isCorrect = false; isWrong = true; return; @@ -101,7 +112,8 @@ StateHasChanged(); } - void OnRefresh() { + void OnRefresh() + { hasBeenSubmitted = false; isCorrect = false; isWrong = false; diff --git a/IGP/Pages/MemoryTester/Parts/UnitMemoryManager.razor b/IGP/Pages/MemoryTester/Parts/UnitMemoryManager.razor index 2cce707..525abea 100644 --- a/IGP/Pages/MemoryTester/Parts/UnitMemoryManager.razor +++ b/IGP/Pages/MemoryTester/Parts/UnitMemoryManager.razor @@ -4,8 +4,10 @@
- @if (entities != null && questions != null) { - @foreach (var entityMemory in entities) { + @if (entities != null && questions != null) + { + @foreach (var entityMemory in entities) + { } } @@ -57,25 +59,30 @@ @code { - private List entities; - private List questions; + private List entities = null!; + private List questions = null!; - protected override void OnInitialized() { + protected override void OnInitialized() + { MemoryTesterService.Subscribe(OnMemoryEvent); MemoryTesterService.GenerateQuiz(); } - void IDisposable.Dispose() { + void IDisposable.Dispose() + { MemoryTesterService.Unsubscribe(OnMemoryEvent); } - void OnMemoryEvent(MemoryTesterEvent memoryTesterEvent) { - if (memoryTesterEvent == MemoryTesterEvent.OnVerify) { + void OnMemoryEvent(MemoryTesterEvent memoryTesterEvent) + { + if (memoryTesterEvent == MemoryTesterEvent.OnVerify) + { StateHasChanged(); } - if (memoryTesterEvent == MemoryTesterEvent.OnRefresh) { + if (memoryTesterEvent == MemoryTesterEvent.OnRefresh) + { entities = MemoryTesterService.GetEntities(); questions = MemoryTesterService.GetQuestions(); @@ -83,11 +90,13 @@ } } - void OnSubmitQuiz(EventArgs eventArgs) { + void OnSubmitQuiz(EventArgs eventArgs) + { MemoryTesterService.Verify(); } - void OnRefreshQuiz(EventArgs eventArgs) { + void OnRefreshQuiz(EventArgs eventArgs) + { MemoryTesterService.GenerateQuiz(); } diff --git a/IGP/Pages/Notes/NotesIndexPage.razor b/IGP/Pages/Notes/NotesIndexPage.razor new file mode 100644 index 0000000..15ee30a --- /dev/null +++ b/IGP/Pages/Notes/NotesIndexPage.razor @@ -0,0 +1,140 @@ +@layout PageLayout + +@inject INoteService noteService +@implements IDisposable + +@page "/notes" + + +@if (!noteService.IsLoaded()) +{ + +} +else +{ + + + + @foreach (var noteSection in noteService.NoteSectionModels) + { +
+
@noteSection.Name
+
+ @foreach (var noteContent in noteSection.NoteContentModels) + { + +
@noteContent.Name
+
@noteContent.Description
+
+ } +
+
+ } +
+
+} + + +@code { + + [Parameter] + public string? Href1 { get; set; } + + [Parameter] + public string? Href2 { get; set; } + + [Parameter] + public string? Href3 { get; set; } + + [Parameter] + public string? Href4 { get; set; } + + [Parameter] + public string? Href5 { get; set; } + + private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? ""; + + string selectedSection = "All"; + + protected override void OnInitialized() + { + noteService.Subscribe(StateHasChanged); + + noteService.Load(); + } + + + public void Dispose() + { + noteService.Unsubscribe(StateHasChanged); + } + + + void OnSectionChanged(ChangeEventArgs e) + { + selectedSection = e.Value!.ToString()!; + StateHasChanged(); + } + +} \ No newline at end of file diff --git a/IGP/Pages/Notes/NotesPage.razor b/IGP/Pages/Notes/NotesPage.razor index abb23a5..ac7d2a2 100644 --- a/IGP/Pages/Notes/NotesPage.razor +++ b/IGP/Pages/Notes/NotesPage.razor @@ -1,109 +1,71 @@ @layout PageLayout -@inject INoteService NoteService +@inject INoteService noteService @implements IDisposable -@page "/notes" +@page "/notes/{href1}/{href2?}/{href3?}/{href4?}/{href5?}" -@if (!NoteService.IsLoaded()) +@if (!noteService.IsLoaded()) { - + } else { - - Notes - -
-
Section:
-
- -
- -
- @foreach (var note in NoteService.NoteModels) { - if (note.IsHidden) { - continue; + + + + + + + @foreach (var note in noteService.NoteContentModels) + { + if (!note.Href.Equals(Href)) + { + continue; + } + } - if (selectedSection != "All" && note.Section != selectedSection) { - continue; - } - @if (note.IsPreAlpha) { - - Pre Alpha - This note refers to content that is in pre-alpha. It won't be accurate in future updates to IGP. - - } - -
- @note.Section -
- Last Updated on @note.LastUpdated -
-
-
@note.Name
- -
@((MarkupString)note.Description)
-
-
- } -
-
- + + + } - @code { - string selectedSection = "All"; + [Parameter] + public string? Href1 { get; set; } + + [Parameter] + public string? Href2 { get; set; } + + [Parameter] + public string? Href3 { get; set; } + + [Parameter] + public string? Href4 { get; set; } + + [Parameter] + public string? Href5 { get; set; } + + private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? ""; protected override void OnInitialized() { - NoteService.Subscribe(StateHasChanged); - - NoteService.Load(); + noteService.Subscribe(StateHasChanged); + + noteService.Load(); } - - + public void Dispose() { - NoteService.Unsubscribe(StateHasChanged); - + noteService.Unsubscribe(StateHasChanged); } - - void OnSectionChanged(ChangeEventArgs e) { - selectedSection = e.Value.ToString(); - StateHasChanged(); - } } \ No newline at end of file diff --git a/IGP/Pages/Notes/Parts/NoteComponent.razor b/IGP/Pages/Notes/Parts/NoteComponent.razor new file mode 100644 index 0000000..7413e23 --- /dev/null +++ b/IGP/Pages/Notes/Parts/NoteComponent.razor @@ -0,0 +1,35 @@ +
+
+
@NoteContentModel.Name
+ +
+
Updated: @NoteContentModel.UpdatedDate.ToString("MM/dd/yyyy")
+
Created: @NoteContentModel.CreatedDate.ToString("MM/dd/yyyy")
+
+
+
@((MarkupString)Markdown.ToHtml(NoteContentModel.Content))
+
+ + + +@code { + + [Parameter] + public NoteContentModel NoteContentModel { get; set; } = default!; + +} \ No newline at end of file diff --git a/IGP/Pages/Notes/Parts/NoteInnerNavComponent.razor b/IGP/Pages/Notes/Parts/NoteInnerNavComponent.razor new file mode 100644 index 0000000..cdeedc3 --- /dev/null +++ b/IGP/Pages/Notes/Parts/NoteInnerNavComponent.razor @@ -0,0 +1,75 @@ +@if (Note!.NoteContentModels.Count > 0) +{ +
+ @foreach (var innerNote in Note.NoteContentModels) + { + var linkStyle = $"noteInnerNavButton inner_{Layers}"; + @innerNote.Name + + } +
+} + + + +@code { + + [Parameter] + public NoteContentModel? Note { get; set; } = default!; + + [Parameter] + public int Layers { get; set; } = 1; + + public int IncrementLayers() + { + return Layers + 1; + } + + + private string GetLink(NoteContentModel note) + { + return $"notes/{note.Href}"; + } + +} \ No newline at end of file diff --git a/IGP/Pages/Notes/Parts/NoteNavComponent.razor b/IGP/Pages/Notes/Parts/NoteNavComponent.razor new file mode 100644 index 0000000..7244f57 --- /dev/null +++ b/IGP/Pages/Notes/Parts/NoteNavComponent.razor @@ -0,0 +1,43 @@ +
+ @foreach (var note in Notes) + { + if (note.Parent == null) + { + @note.Name + + } + } +
+ + + +@code { + + [Parameter] + public List Notes { get; set; } = default!; + + [Parameter] + public List Connections { get; set; } = default!; + +} \ No newline at end of file diff --git a/IGP/Pages/RoadMap/Parts/RoadMapComponent.razor b/IGP/Pages/RoadMap/Parts/RoadMapComponent.razor index 2247c39..da87517 100644 --- a/IGP/Pages/RoadMap/Parts/RoadMapComponent.razor +++ b/IGP/Pages/RoadMap/Parts/RoadMapComponent.razor @@ -1,4 +1,4 @@ -
+
@RoadMap.Name
Priority: @RoadMap.Priority.Replace("_", " ") @@ -53,6 +53,7 @@ @code { + [Parameter] public ImmortalRoadMapModel? RoadMap { get; set; } diff --git a/IGP/Pages/RoadMap/RoadMapPage.razor b/IGP/Pages/RoadMap/RoadMapPage.razor index 2cdea45..52bb9f1 100644 --- a/IGP/Pages/RoadMap/RoadMapPage.razor +++ b/IGP/Pages/RoadMap/RoadMapPage.razor @@ -6,7 +6,8 @@ Road Map
- @foreach (var roadMap in data) { + @foreach (var roadMap in data) + { }
diff --git a/IGP/Pages/SandboxPage.razor b/IGP/Pages/SandboxPage.razor deleted file mode 100644 index 3d719bd..0000000 --- a/IGP/Pages/SandboxPage.razor +++ /dev/null @@ -1,229 +0,0 @@ -@layout PageLayout -@page "/sandbox" -@inject IJSRuntime JS - - - Sandbox - -
- Generic Page of Testing In Progress code -
- - - - - - - - - - - - - - - - - - -
- - -@code { - readonly List entities = EntityModel.GetList(); - - List infos = new(); - - string infoText = ""; - string weaponText = ""; - - readonly List changes = new(); - readonly List patches = new(); - - private async Task DownloadFile(Type type) { - var fileName = $"{type.ToString().Split(".").Last()}s.csv"; - - var objectData = - type == typeof(PatchModel) ? new List(patches) - : type == typeof(ChangeModel) ? new List(changes) - : new List(); - - await JS.InvokeVoidAsync("download", fileName, Generate(type, objectData)); - } - - void GenerateEntityModels() { - var properties = typeof(EntityInfoModel).GetProperties(); - - infoText += "Id,Name,Descriptive,Description,Notes\n"; - - var id = 1; - foreach (var entity in entities) { - infoText += $"{id++},{entity.Info().Name},{entity.Info().Descriptive},{entity.Info().Description},{entity.Info().Notes}\n"; - } - } - - string Generate(Type type, List dataList) { - var properties = type.GetProperties(); - - var generatedText = ""; - - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - - if (property.GetAccessors().First().IsVirtual) { - continue; - } - - var attributes = property.GetCustomAttributes().OfType(); - if (attributes.Count() > 0) { - continue; - } - - generatedText += property.Name; - if (index != properties.Count() - 1) { - generatedText += ","; - } - } - - generatedText = generatedText.Trim(); - if (generatedText.EndsWith(",")) { - generatedText = generatedText.Remove(generatedText.Length - 1); - } - - - generatedText += "\n"; - - foreach (var data in dataList) { - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - - if (property.GetAccessors().First().IsVirtual) { - continue; - } - - var attributes = property.GetCustomAttributes().OfType(); - if (attributes.Count() > 0) { - continue; - } - - - if (property.GetValue(data) != null) { - generatedText += "\"" + property.GetValue(data).ToString().Replace("\"", "\"\"") + "\""; - if (index != properties.Count() - 1) { - generatedText += ","; - } - } - else { - generatedText += "\"" + " " + "\""; - if (index != properties.Count() - 1) { - generatedText += ","; - } - } - } - - generatedText = generatedText.Trim(); - if (generatedText.EndsWith(",")) { - generatedText = generatedText.Remove(generatedText.Length - 1); - } - - generatedText += "\n"; - } - - - return generatedText; - } - - - void GenerateWeapons() { - var properties = typeof(EntityWeaponModel).GetProperties(); - - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - - if (property.GetAccessors().First().IsVirtual) { - continue; - } - - var attributes = property.GetCustomAttributes().OfType - (); - if (attributes.Count() > 0) { - continue; - } - - weaponText += property.Name; - if (index != properties.Count() - 1) { - weaponText += ","; - } - } - - weaponText += "\n"; - - foreach (var entity in entities) { - foreach (var weapon in entity.Weapons()) { - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - - if (property.GetAccessors().First().IsVirtual) { - continue; - } - - - var attributes = property.GetCustomAttributes().OfType - (); - if (attributes.Count() > 0) { - continue; - } - - - weaponText += property.GetValue(weapon); - if (index != properties.Count() - 1) { - weaponText += ","; - } - } - - weaponText += "\n"; - } - } - } - - void GenerateExample() { - var properties = typeof(EntityInfoModel).GetProperties(); - - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - infoText += property.Name; - if (index != properties.Count() - 1) { - infoText += ","; - } - } - - infoText += "\n"; - - foreach (var entity in entities) { - if (entity.Info() != null) { - for (var index = 0; index < properties.Count(); index++) { - var property = properties[index]; - infoText += property.GetValue(entity.Info()); - if (index != properties.Count() - 1) { - infoText += ","; - } - } - - infoText += "\n"; - } - } - } - -} \ No newline at end of file diff --git a/IGP/Portals/EntityDialogPortal.razor b/IGP/Portals/EntityDialogPortal.razor index 85f74c5..4c4aae0 100644 --- a/IGP/Portals/EntityDialogPortal.razor +++ b/IGP/Portals/EntityDialogPortal.razor @@ -9,12 +9,14 @@ @code { + protected override void OnInitialized() { entityDialogService.Subscribe(OnUpdate); } - - public void Dispose() { + + public void Dispose() + { entityDialogService.Unsubscribe(OnUpdate); } @@ -23,5 +25,4 @@ StateHasChanged(); } -} - \ No newline at end of file +} \ No newline at end of file diff --git a/IGP/Program.cs b/IGP/Program.cs index bcdd9f9..c88cc30 100644 --- a/IGP/Program.cs +++ b/IGP/Program.cs @@ -1,20 +1,16 @@ - using IGP; using Microsoft.AspNetCore.Components.Web; +using Services; +using Services.Development; +using Services.Immortal; +using Services.Website; #if NO_SQL - #else using Contexts; using Microsoft.EntityFrameworkCore; #endif -using Services; -using Services.Immortal; -using Services.Website; -using Services.Development; -using IEntityDisplayService = Services.IEntityDisplayService; - var builder = WebAssemblyHostBuilder.CreateDefault(args); builder.Logging.SetMinimumLevel(LogLevel.Warning); @@ -37,7 +33,8 @@ builder.Services.AddSingleton(); builder.Services.AddSingleton(); -builder.Services.AddSingleton(new HttpClient { +builder.Services.AddSingleton(new HttpClient +{ BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) }); diff --git a/IGP/_Imports.razor b/IGP/_Imports.razor index f24cf19..bd9720c 100644 --- a/IGP/_Imports.razor +++ b/IGP/_Imports.razor @@ -1,6 +1,4 @@ - - -@using Components.Display +@using Components.Display @using Components.Feedback @using Components.Form @using Components.Info @@ -9,17 +7,26 @@ @using Components.Navigation @using Components.Shared @using Components.Utils -@using IGP.Portals -@using IGP.Pages @using IGP.Dialog +@using IGP.Pages @using IGP.Pages.Agile.Parts @using IGP.Pages.BuildCalculator.Parts +@using IGP.Pages.Comparision +@using IGP.Pages.Comparision.Parts @using IGP.Pages.Database.Entity @using IGP.Pages.Database.Entity.Parts @using IGP.Pages.Database.Parts +@using IGP.Pages.Documentation +@using IGP.Pages.Documentation.Parts +@using IGP.Pages.Home +@using IGP.Pages.Home.Parts @using IGP.Pages.MakingOf.Parts @using IGP.Pages.MemoryTester.Parts @using IGP.Pages.RoadMap.Parts +@using IGP.Pages.Notes +@using IGP.Pages.Notes.Parts +@using IGP.Portals +@using Markdig @using Microsoft.AspNetCore.Components.Forms @using Microsoft.AspNetCore.Components.Routing @using Microsoft.AspNetCore.Components.Web @@ -27,21 +34,20 @@ @using Microsoft.AspNetCore.Components.WebAssembly.Http @using Microsoft.EntityFrameworkCore @using Microsoft.JSInterop -@using Model.Immortal.Chart -@using Model.Immortal.Economy -@using Model.Immortal.Entity -@using Model.Immortal.Entity.Data -@using Model.Immortal.Entity.Parts -@using Model.Immortal.Hotkeys -@using Model.Immortal.MemoryTester -@using Model.Immortal.MemoryTester -@using Model.Immortal.Notes -@using Model.Immortal.RoadMap -@using Model.Immortal.RoadMap -@using Model.Immortal.RoadMap.Enums -@using Model.Immortal.Types +@using Model.Chart +@using Model.Development.Git +@using Model.Doc +@using Model.Economy +@using Model.Entity +@using Model.Entity.Data +@using Model.Entity.Parts +@using Model.Hotkeys +@using Model.MemoryTester +@using Model.Notes +@using Model.RoadMap +@using Model.RoadMap.Enums +@using Model.Types @using Model.Website -@using Model.Work.Git @using Model.Work.Tasks @using Model.Work.Tasks.Enums @using Services diff --git a/IGP/wwwroot/css/app.css b/IGP/wwwroot/css/app.css index 896c7ec..975b4d5 100644 --- a/IGP/wwwroot/css/app.css +++ b/IGP/wwwroot/css/app.css @@ -15,9 +15,13 @@ --secondary-border-hover: #a168ff; --paper: #252526; --paper-border: #151516; + + --paper-hover: #52366f; + --paper-border-hover: #653497; + --info: #451376; --info-border: #210b36; - + --dialog-border-color: black; --dialog-border-width: 2px; --dialog-radius: 6px; diff --git a/IGP/wwwroot/generated/AgileSprintModels.json b/IGP/wwwroot/generated/AgileSprintModels.json new file mode 100644 index 0000000..cdf5836 --- /dev/null +++ b/IGP/wwwroot/generated/AgileSprintModels.json @@ -0,0 +1 @@ +[{"Id":1,"Name":"Agile Sprint","Description":"Changelogs and sprint views were going to be pushed till later, but I am feeling inspired by the IGP Content Creators\u0027 minimum weekly lifecycle requirement. So I am going to focus on agile-related tasks, and handle roadmap tasks after this initial sprint. All weekly sprints will release on Sunday, starting next Sunday.","StartDate":"2022-02-14T00:00:00","EndDate":"2022-02-20T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":2,"Name":"SQL Update","Description":"The SQL update is big enough to be a full sprint in of itself, and I spent less time this week for development. Will just extend sprint by 2 week, and remove all non SQL tasks from the sprint.","StartDate":"2022-02-20T00:00:00","EndDate":"2022-03-27T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":3,"Name":"Database Page","Description":"Improvements to the Database page","StartDate":"2022-03-27T00:00:00","EndDate":"2022-04-03T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":4,"Name":"Branding","Description":"Improve streaming branding around the website","StartDate":"2022-04-03T00:00:00","EndDate":"2022-04-10T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":5,"Name":"Calculators","Description":"Improve Calculators","StartDate":"2022-04-10T00:00:00","EndDate":"2022-04-24T00:00:00","Notes":null,"AgileTaskModels":[]},{"Id":6,"Name":"Infrastructure","Description":"Localization, Analytics, and Test Automation","StartDate":"2022-04-24T00:00:00","EndDate":"2022-05-08T00:00:00","Notes":null,"AgileTaskModels":[]}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/AgileTaskModels.json b/IGP/wwwroot/generated/AgileTaskModels.json new file mode 100644 index 0000000..14d8018 --- /dev/null +++ b/IGP/wwwroot/generated/AgileTaskModels.json @@ -0,0 +1 @@ +[{"Id":1,"AgileSprintModelId":null,"Name":"Support Safari","Description":"Consider other web browsers.","Notes":"Added","Status":"Todo","Priority":"Low","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":2,"AgileSprintModelId":2,"Name":"Filter Patch Notes","Description":"You should be showing people what they really want to see in the patch notes.","Notes":"Added","Status":"Done","Priority":"Blocker","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":3,"AgileSprintModelId":null,"Name":"Consider Pyre","Description":"Add Pyre Income. Make it so you can take Pyre Camps and Pyre Miners","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":4,"AgileSprintModelId":null,"Name":"Optimizations","Description":"Build Calculator should be usable.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":5,"AgileSprintModelId":null,"Name":"Change Attack Timing Interval","Description":"Be able to sett attack timing.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":6,"AgileSprintModelId":null,"Name":"Add Pyre Spells","Description":"Make Pyre Spells castable and consume Pyre on build order","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":7,"AgileSprintModelId":null,"Name":"Default builds (Rush Thrones)","Description":"Add a dropdown list of default builds.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":8,"AgileSprintModelId":null,"Name":"Load older builds","Description":"Be able to load older builds. How are you going to handle auto correct to current patch?","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":9,"AgileSprintModelId":null,"Name":"How to use Build Calculator step by step","Description":"Need docs","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":10,"AgileSprintModelId":null,"Name":"Compare Health and Damage","Description":"Refer to community example spreadsheet.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":11,"AgileSprintModelId":null,"Name":"Compare Unit\u0027s Damage with it\u0027s own costs","Description":"Refer to community example spreadsheet.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":12,"AgileSprintModelId":4,"Name":"View one unit stats from a link. Make YAML copy and paste","Description":"Design so people can easily copy and paste data into discord","Notes":"Ended up not using exact Yaml. Button in Database controls Detailed vs Plain display ","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":13,"AgileSprintModelId":2,"Name":"Look into SQL","Description":"You really should be using SQL.","Notes":"Agile and Change log pages now use SQL","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-20T00:00:00","Finished":null},{"Id":14,"AgileSprintModelId":1,"Name":"Mobile Menu","Description":"You need a real mobile menu. Viewers don\u0027t scroll below the fold, so no one is going to know what happens when you click a button on phones.","Notes":"Added smaller menus for tablets and phones.","Status":"Done","Priority":"High","Task":"Feature","Created":"2022-02-18T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":15,"AgileSprintModelId":2,"Name":"Acropolis Consume Mote","Description":"The Mote is suppose to be consumed when making a Town Hall.","Notes":"Fixed","Status":"Done","Priority":"High","Task":"Bug","Created":"2022-02-18T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":16,"AgileSprintModelId":null,"Name":"Multiple Travel Time in Calculator","Description":"Travel time should be based on the amount of bases used. 3 bases is 3 travel times.","Notes":"Add notes...","Status":"Todo","Priority":"Low","Task":"Feature","Created":"2022-02-18T00:00:00","Finished":null},{"Id":17,"AgileSprintModelId":1,"Name":"Update Database to 0.0.6.8375a","Description":"Xacal tech change, and Hallower damage change. Update Godhead text.","Notes":"Done","Status":"Done","Priority":"None","Task":"Feature","Created":"2022-02-18T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":18,"AgileSprintModelId":null,"Name":"Patch History Viewer","Description":"Add an ability to compare patches, to see all nerfs and buffs made between them.","Notes":"Inspired by Zkay\u0027s post on discord, where he details a possible \u0027patch history viewer\u0027 implementation.","Status":"Fun_Idea","Priority":"None","Task":"Feature","Created":"2022-02-16T00:00:00","Finished":null},{"Id":19,"AgileSprintModelId":1,"Name":"Twitch Page","Description":"Did a ~3 hour test stream, and was personal quite happy with the quality. Make Twitch page, and stream patch, sprint planning and development on Sunday.","Notes":"Page added under General, and named \u0022Streams\u0022.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-16T00:00:00","Finished":"2022-02-16T00:00:00"},{"Id":20,"AgileSprintModelId":1,"Name":"Finish the database","Description":"Add more descriptions for everything. Reduce any data duplication with ids. Add upgrade connections. Add ability connections. Add passives and passives connections.","Notes":"Good enough for now","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-11T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":21,"AgileSprintModelId":1,"Name":"Change Log View","Description":"Add a log to view last changes.","Notes":"Added changelog page. Shows Today, X Days Ago, or exact date if patch is over a week old.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-14T00:00:00","Finished":"2022-02-14T00:00:00"},{"Id":22,"AgileSprintModelId":1,"Name":"Agile View","Description":"Add the agile view.","Notes":"Finished.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-11T00:00:00","Finished":"2022-02-17T00:00:00"},{"Id":23,"AgileSprintModelId":1,"Name":"GUID for Ids","Description":"Stop using enums for ids, and start using guids. Enums are just too limited, I lose out on component and inheritance design with them. Replace all your enums with guids, rip off the bandaid.","Notes":"Add notes...","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-11T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":24,"AgileSprintModelId":1,"Name":"Co-op overview","Description":"Write some sort of blog on co-op gameplay so you have something the feels very content-ish. Maybe make it a video.","Notes":"Finished and released early.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-11T00:00:00","Finished":"2022-02-12T00:00:00"},{"Id":25,"AgileSprintModelId":1,"Name":"Mobile UI","Description":"Make website work on mobile.","Notes":"Should be good. Will test on phone later.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-15T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":26,"AgileSprintModelId":1,"Name":"Add Making Of View","Description":"View to reference UI designs. Nicely encourages the pratice of making the UI code a lot cleaner.","Notes":"Good enough for now","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-02-11T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":27,"AgileSprintModelId":3,"Name":"Close Nav Menu on Navigation","Description":"Close Nav Menu on Navigation","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":28,"AgileSprintModelId":3,"Name":"Add Passive Descriptions and Passive","Description":"Have to guess on a bunch of passives","Notes":null,"Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-03-31T00:00:00"},{"Id":29,"AgileSprintModelId":3,"Name":"Tooltips that show referenced units","Description":"I should see any referenced unit by hovering over it","Notes":"Links can now go to links which can go to links.","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-04-01T00:00:00"},{"Id":30,"AgileSprintModelId":null,"Name":"Update Logo for Website","Description":"After color scheme is picked","Notes":null,"Status":"Todo","Priority":"Low","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":null},{"Id":31,"AgileSprintModelId":3,"Name":"Documentation page","Description":"Add documents on how to maintain website","Notes":"Added start of documents","Status":"Done","Priority":"Low","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":32,"AgileSprintModelId":null,"Name":"Test Automation","Description":"Selenium Tests","Notes":"Start adding IDs to everything","Status":"Todo","Priority":"Low","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":null},{"Id":33,"AgileSprintModelId":null,"Name":"Unit Test","Description":"Add some unit tests","Notes":null,"Status":"Todo","Priority":"Low","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":null},{"Id":34,"AgileSprintModelId":null,"Name":"Fully Transfer everything to SQL","Description":"Need to regenerate the database once everthing is fully transfered","Notes":null,"Status":"Todo","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":null},{"Id":35,"AgileSprintModelId":3,"Name":"Adding a loading Component","Description":"For JSON loading","Notes":"Added loading component to Agile and Changelog screens","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":36,"AgileSprintModelId":3,"Name":"Optimize Loading of Data","Description":"Currently loading non Agile stuff on Agile page","Notes":"Moved SQL database injection to app root","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":37,"AgileSprintModelId":3,"Name":"Convert Notes to Markdown","Description":"Using Markdown and generating the Note pages seems like a better solution to SQL or hardcoding data","Notes":null,"Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-03-27T00:00:00","Finished":"2022-04-01T00:00:00"},{"Id":38,"AgileSprintModelId":3,"Name":"Improve Entity Filter Options","Description":"The options I give you is strange, given it filers on Faction type","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Created":"2022-04-01T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":39,"AgileSprintModelId":4,"Name":"Refresh Database Bug","Description":"Database dialog UI isn\u0027t refreshing enough","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Created":"2022-04-03T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":40,"AgileSprintModelId":4,"Name":"Branding Stuff","Description":"Add a schedule, improving branding, etc, ","Notes":"Only improved Twitch overlays","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-04-03T00:00:00","Finished":"2022-04-10T00:00:00"},{"Id":41,"AgileSprintModelId":4,"Name":"Improve Documents/Notes UI","Description":"Should have a left navigation menu. And prev/next buttons","Notes":"Updated UI. Will added prev/next and breadcrumbs later","Status":"Done","Priority":"Medium","Task":"Feature","Created":"2022-04-05T00:00:00","Finished":"2022-04-10T00:00:00"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/ChangeModels.json b/IGP/wwwroot/generated/ChangeModels.json deleted file mode 100644 index e56da0e..0000000 --- a/IGP/wwwroot/generated/ChangeModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"PatchModelId":1,"Name":"Shrink Header Navigation","Description":"The full header navigation is now only visible on desktop when hovered.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":2,"PatchModelId":1,"Name":"Database UX Update","Description":"Desktop Database Filter UI has been updated. It\u0027s now always visible.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":3,"PatchModelId":2,"Name":"Fixing Thrum Stats","Description":"Speed was too low. Health and Shields ratio is slightly different.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":4,"PatchModelId":3,"Name":"Memory Tester","Description":"Fun quick feature added while I rewrite my database. Tests memory of units ranges and speeds.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":5,"PatchModelId":3,"Name":"Privacy Policy Removed","Description":"Removed cringe privacy policy. It misses the issue. Will eventually add operational analytics and cookies, and add a more applicable Privacy Policy if needed. Not a priority though.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":6,"PatchModelId":3,"Name":"Input Tripling","Description":"Fixed a bug where inputs could get tripled on the Build Calculator.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":7,"PatchModelId":3,"Name":"Agile Changes","Description":"Updated Agile log to indicate the next 2 weeks will be spent on SQL","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":8,"PatchModelId":4,"Name":"Hiding WIP Pyre Feature","Description":"Whoops, WIP Pyre feature accidentally got committed to production. Now hidden.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":9,"PatchModelId":5,"Name":"Build Calc Optimization","Description":"Improved speeds","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":10,"PatchModelId":5,"Name":"Change Log Filter","Description":"Change log now defaults to showing only important patches","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":11,"PatchModelId":5,"Name":"Motes Consumed","Description":"Motes now consumed in the build calculator when making a townhall.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":12,"PatchModelId":6,"Name":"Agile UI Tweaks","Description":"Making the agile text look a bit better before stream.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":13,"PatchModelId":7,"Name":"Database Armor","Description":"Added missing armor display to database.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":14,"PatchModelId":8,"Name":"Home Page","Description":"Added a quick placeholder-ish homepage.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":15,"PatchModelId":8,"Name":"Database Army Default","Description":"Database UI now defaults to Army selection. Given most people are probably going to want to view the units.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":16,"PatchModelId":9,"Name":"Mobile Menu Back","Description":"You can now click the page after selecting a Section, to go back to Section nav.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":17,"PatchModelId":10,"Name":"Mobile Menu Fixed","Description":"Fixed the mobile menu not actually being positioned to the bottom of the screen on phones.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":18,"PatchModelId":11,"Name":"Tablet Menu","Description":"Added a hamburger nav menu for tablets.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":19,"PatchModelId":11,"Name":"Mobile Menu","Description":"Added a bottom nav menu for phones.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":20,"PatchModelId":12,"Name":"0.0.6.8375a","Description":"Database updated to 0.0.6.8375a","Commit":"Game Patch","Date":"2022-03-26T20:32:02","Important":"True"},{"Id":21,"PatchModelId":12,"Name":"Database Descriptions","Description":"Added more text descriptions to buildings and etc..","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":22,"PatchModelId":12,"Name":"Guids","Description":"Now using Guids and strings over enums. View in /raw-database page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":23,"PatchModelId":12,"Name":"Mobile UI","Description":"Additional mobile UI improvements. Harass calculator now has fewer inputs that don\u0027t matter.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":24,"PatchModelId":12,"Name":"Bug Tasks","Description":"Added feature/bug task indicator to agile view. Added consume mote bug in build calculator to next sprint. (Calculator not consuming motes on Town Hall building)","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":25,"PatchModelId":12,"Name":"Entity Display UI","Description":"Display UI improved. Build Calculator now uses the same Entity display UI as the Database.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":26,"PatchModelId":13,"Name":"Removed Embedded YouTube","Description":"Having embedded videos makes my privacy policy look completely untrue. Removed the video (it\u0027s now a link) and added a message on the privacy policy to point out that the error occured.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":27,"PatchModelId":13,"Name":"Agile View Backlog","Description":"Added backlog rendering to the Agile View Page. Added priority level to better indicate what tasks have high or zero priority.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":28,"PatchModelId":14,"Name":"Privacy Policy Page","Description":"The privacy policy is now a page rather than a blurb on the About page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":29,"PatchModelId":14,"Name":"Privacy Policy Update","Description":"I added information on how I use personal data. And a disclaimer that privacy can never be guaranteed.","Commit":"Privacy Policy","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":30,"PatchModelId":14,"Name":"Minor Tweaks","Description":"Minor UI changes and text fixes.","Commit":"None","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":31,"PatchModelId":15,"Name":"Homepage","Description":"Making Of page no longer shows on the homepage","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":32,"PatchModelId":15,"Name":"DevOnly Component","Description":"Added a DevOnly component to wrap UI content that should not be released to production. I.e. the Homepage bug.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":33,"PatchModelId":16,"Name":"Agile View","Description":"Add an agile page to show current activities.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":34,"PatchModelId":16,"Name":"Rendering Entire Database","Description":"I can now render the database without lag. Not sure what fixed it.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":35,"PatchModelId":16,"Name":"Database Data","Description":"Added a ton of data to the database. Such as various descriptions. More work is still to be done.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":36,"PatchModelId":16,"Name":"Database Ids","Description":"Database has less duplicated content. Army entities now link to their Upgrades and Abilities. More work is still to be done.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":37,"PatchModelId":16,"Name":"Blades of the Godhead Requirement","Description":"Fixed the requirement incorrectly being the Eye of Aros. Now is properly Bearer of the Crown.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":38,"PatchModelId":16,"Name":"UI Changes","Description":"Various UI changes and tweaks","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":39,"PatchModelId":16,"Name":"Streams","Description":"Added a Streams page. It mentions plans to do Twitch streams on Sunday.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":40,"PatchModelId":16,"Name":"IMMORTAL","Description":"Fixed \u0022IMMORTAL: Gates of Pyre\u0022 game title. Will no longer refer to it as \u0022Immortal: Gates of Pyre\u0022.","Commit":"Typo","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":41,"PatchModelId":16,"Name":"Mobile Support","Description":"All the pages should now work on phones.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":42,"PatchModelId":17,"Name":"Form Text","Description":"Fixed search bar in database, name and colour in build calculator, from not rendering \uD83D\uDE10","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":43,"PatchModelId":17,"Name":"UI Test Automation Road Map","Description":"Adding test automation to the roadmap","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":44,"PatchModelId":18,"Name":"Build Calculator Interval","Description":"600 is too laggy. Reducing to 360 until optimizations are done.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":45,"PatchModelId":18,"Name":"Changelog Patch Date","Description":"Fixed date on previous patch in changelog. Should be one day earlier.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":46,"PatchModelId":19,"Name":"UI Overhaul","Description":"Cleaned up and restyled a lot of UI. Like Page Containers, Alerts, Forms, Nav Buttons, and more.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":47,"PatchModelId":19,"Name":"Separate Pages","Description":"Navigation now uses different pages, instead of loading content onto the main page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":48,"PatchModelId":19,"Name":"Making Of","Description":"Adding Making Of page for design reference.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":49,"PatchModelId":19,"Name":"Change Log","Description":"Adding Change Log page for viewing update history.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":50,"PatchModelId":19,"Name":"Mobile Priority","Description":"Changed mobile support priority in roadmap from low and possible to high and planned, and updated description.","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":51,"PatchModelId":20,"Name":"Purple Colours","Description":"Added placeholder-ish purple color scheme.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":52,"PatchModelId":20,"Name":"SQL","Description":"Agile and Change Log pages now use JSON made from SQL","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":53,"PatchModelId":21,"Name":"Discord Link","Description":"Made a discord for the website, and added invite link to contact page","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":54,"PatchModelId":21,"Name":"Loading Improvemnts","Description":"Agile and Change Log loading improved","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":55,"PatchModelId":21,"Name":"Desktop Nav closing","Description":"Desktop nav menu now closes when a page link is clicked","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":56,"PatchModelId":22,"Name":"0.0.6.8900a","Description":"Database updated to 0.0.6.8900a","Commit":"Game Patch","Date":"2022-03-26T20:32:02","Important":"True"},{"Id":57,"PatchModelId":23,"Name":"Database Links","Description":"Various entity references in the database now link to the entity via a dialog interface","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":58,"PatchModelId":24,"Name":"Documentation Page","Description":"Added a docs page with some starter setup information","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":59,"PatchModelId":24,"Name":"Database Filters","Description":"Fixed filter defaults. Removed unimportant filter types","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":60,"PatchModelId":25,"Name":"Database Fixes","Description":"Various fixes to bad data. Added some missing entities","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":61,"PatchModelId":25,"Name":"Plain View","Description":"Database can now change to plain view for easy copy and pasting","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":62,"PatchModelId":25,"Name":"Direct Links","Description":"Database now supports direct links. database/Throne to see just Throne","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocConnectionModels.json b/IGP/wwwroot/generated/DocConnectionModels.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/IGP/wwwroot/generated/DocConnectionModels.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocContentModels.json b/IGP/wwwroot/generated/DocContentModels.json new file mode 100644 index 0000000..d860ca6 --- /dev/null +++ b/IGP/wwwroot/generated/DocContentModels.json @@ -0,0 +1 @@ +[{"Id":1,"ParentId":1,"DocSectionModelId":1,"Href":"setup","DocumentationModels":[],"Parent":null,"PageOrder":0,"CreatedDate":"2022-03-30T00:00:00","UpdatedDate":"2022-04-07T00:00:00","Name":"Development Setup","Description":"Get set up on developing this web project.","Content":"# Overview\n\nThis document will contain general setup notes for the project.\n\n## Prerequisite\n\nTo understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio.\n\n- [GitHub Documentation](https://docs.github.com/en/get-started)\n\n- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/)\n\nTo make updates to this website, it is recommended to understand HTML/CSS and C#.\n\n- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/)\n- [Mozilla\u0027s HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started)\n- [W3SCHOOLS\u0027 HTML Documentation](https://www.w3schools.com/html/)\n\nFurther, you should understand the product and clients this website is for. So it is recommended to play \u0022Immortal: Gates of Pyre\u0022.\n\n- [IGP Website](https://gatesofpyre.com/)\n - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access.\n\n## Installation\n\nDownload and install Visual Studio preview.\n\n**Note:** Visual Studio Preview currently doesn\u0027t work on Mac for this project. Use a PC, or Rider.\n\n[https://visualstudio.microsoft.com/vs/preview/](https://visualstudio.microsoft.com/vs/preview/)\n\nWhen installing, ensure you have selected \u0022Workloads | **ASP.NET and web development**\u0022 and \u0022Individual components | **.NET WebAssembly build tools**\u0022.\n\n## Download Project\n\nGet this project from GitHub.\n\n\u0060\u0060\u0060bash\ngit clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git\n\u0060\u0060\u0060\n\n## Project Tree\n\n\u0060\u0060\u0060\nC:.\n\u251C\u2500\u2500\u2500.github\n\u2502 \u2514\u2500\u2500\u2500workflows # Workflows to deploy website\n\u251C\u2500\u2500\u2500Components # Components used be website\n\u251C\u2500\u2500\u2500Contexts\n\u251C\u2500\u2500\u2500IGP\n\u2502 \u251C\u2500\u2500\u2500Pages # Website pages\n\u2502 \u2514\u2500\u2500\u2500wwwroot\n\u2502 \u251C\u2500\u2500\u2500css\n\u2502 \u251C\u2500\u2500\u2500generated # Files generated by IGP_Convert. Do not edit\n\u2502 \u251C\u2500\u2500\u2500image\n\u2502 \u2514\u2500\u2500\u2500javascript\n\u251C\u2500\u2500\u2500IGP_Convert # Converts SQL into JSON for Blazor Wasm\n\u251C\u2500\u2500\u2500Model # Data models\n\u2514\u2500\u2500\u2500Services # Web services\n\u0060\u0060\u0060\n\n## Running\n\n- Open \u0060IGP/IGP.sln\u0060.\n- Click the green RUN button in Visual Studio.\n- A local copy of the IGP Website should have launched on your machine.\n\n## Publishing\n\nCode committed to the \u0060main\u0060 branch will automatically be deployed to [production](https://www.igpfanreference.com/).\n\nCode committed to the \u0060develop\u0060 branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/).\n\n_This is handle via the files in \u0060.github/workflow\u0060. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works._\n\n## Troubleshooting\n\n\nNothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [Discord](https://discord.gg/uMq8bMGeeN)."}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocSectionModels.json b/IGP/wwwroot/generated/DocSectionModels.json new file mode 100644 index 0000000..5b15e8d --- /dev/null +++ b/IGP/wwwroot/generated/DocSectionModels.json @@ -0,0 +1 @@ +[{"Id":1,"Name":"Start","DocumentationModels":[]}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/DocumentationModels.json b/IGP/wwwroot/generated/DocumentationModels.json deleted file mode 100644 index c3055a9..0000000 --- a/IGP/wwwroot/generated/DocumentationModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"CreatedDate":"2022-03-30T00:00:00","UpdatedDate":"2022-03-30T00:00:00","Name":"Setup","Section":"Getting Started","Description":"# Setup\n\nThis document will contain general setup notes for the project.\n\n## Prerequisite\n\nTo understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio.\n\n- [GitHub Documentation](https://docs.github.com/en/get-started)\n\n- [Visual Studio Documentation](https://visualstudio.microsoft.com/vs/getting-started/)\n\nTo make updates to this website, it is recommended to understand HTML/CSS and C#.\n\n- [C# Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/)\n- [Mozilla\u0027s HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started)\n- [W3SCHOOLS\u0027 HTML Documentation](https://www.w3schools.com/html/)\n\nFurther, you should understand the product and clients this website is for. So it is recommended to play \u0022Immortal: Gates of Pyre\u0022.\n- [IGP Website](https://gatesofpyre.com/) \n - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access.\n\n\n## Installation\n\nDownload and install Visual Studio preview.\n\n**Note:** Visual Studio Preview currently doesn\u0027t work on Mac for this project. Use a PC, or Rider.\n\nhttps://visualstudio.microsoft.com/vs/preview/\n\nWhen installing, ensure you have selected \u0022Workloads | **ASP.NET and web development**\u0022 and \u0022Individual components | **.NET WebAssembly build tools**\u0022.\n\n## Download Project\n\nGet this project from GitHub. \n\n\u0060\u0060\u0060bash\ngit clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git\n\u0060\u0060\u0060\n\n## Project Tree\n\u0060\u0060\u0060\nC:.\n\u251C\u2500\u2500\u2500.github\n\u2502 \u2514\u2500\u2500\u2500workflows # Workflows to deploy website\n\u251C\u2500\u2500\u2500Components # Components used be website\n\u251C\u2500\u2500\u2500Contexts\n\u251C\u2500\u2500\u2500IGP\n\u2502 \u251C\u2500\u2500\u2500Pages # Website pages\n\u2502 \u2514\u2500\u2500\u2500wwwroot \n\u2502 \u251C\u2500\u2500\u2500css\n\u2502 \u251C\u2500\u2500\u2500generated # Files generated by IGP_Convert. Do not edit\n\u2502 \u251C\u2500\u2500\u2500image\n\u2502 \u251C\u2500\u2500\u2500javascript\n\u2502 \u2514\u2500\u2500\u2500markdown\n\u2502 \u2514\u2500\u2500\u2500documentation # Documentation files\n\u251C\u2500\u2500\u2500IGP_Convert # Converts SQL into JSON for Blazor Wasm\n\u251C\u2500\u2500\u2500Model # Data models\n\u2514\u2500\u2500\u2500Services # Web services\n\u0060\u0060\u0060\n\n## Running\n\n- Open \u0060IGP/IGP.sln\u0060. \n- Click the green RUN button in Visual Studio.\n- A local copy of the IGP Website should have launched on your machine.\n\n\n## Publishing\n\nCode committed to the \u0060main\u0060 branch will automatically be deployed to [production](https://www.igpfanreference.com/).\n\nCode committed to the \u0060develop\u0060 branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/).\n\n*This is handle via the files in \u0060.github/workflow\u0060. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works.*\n\n\n## Troubleshooting\n\nNothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [IGP Fan Reference](https://discord.gg/uMq8bMGeeN) Discord.\n\n"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/GitChangeModels.json b/IGP/wwwroot/generated/GitChangeModels.json new file mode 100644 index 0000000..9f2acd9 --- /dev/null +++ b/IGP/wwwroot/generated/GitChangeModels.json @@ -0,0 +1 @@ +[{"Id":1,"GitPatchModelId":1,"Name":"Shrink Header Navigation","Description":"The full header navigation is now only visible on desktop when hovered.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":2,"GitPatchModelId":1,"Name":"Database UX Update","Description":"Desktop Database Filter UI has been updated. It\u0027s now always visible.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":3,"GitPatchModelId":2,"Name":"Fixing Thrum Stats","Description":"Speed was too low. Health and Shields ratio is slightly different.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":4,"GitPatchModelId":3,"Name":"Memory Tester","Description":"Fun quick feature added while I rewrite my database. Tests memory of units ranges and speeds.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":5,"GitPatchModelId":3,"Name":"Privacy Policy Removed","Description":"Removed cringe privacy policy. It misses the issue. Will eventually add operational analytics and cookies, and add a more applicable Privacy Policy if needed. Not a priority though.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":6,"GitPatchModelId":3,"Name":"Input Tripling","Description":"Fixed a bug where inputs could get tripled on the Build Calculator.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":7,"GitPatchModelId":3,"Name":"Agile Changes","Description":"Updated Agile log to indicate the next 2 weeks will be spent on SQL","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":8,"GitPatchModelId":4,"Name":"Hiding WIP Pyre Feature","Description":"Whoops, WIP Pyre feature accidentally got committed to production. Now hidden.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":9,"GitPatchModelId":5,"Name":"Build Calc Optimization","Description":"Improved speeds","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":10,"GitPatchModelId":5,"Name":"Change Log Filter","Description":"Change log now defaults to showing only important patches","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":11,"GitPatchModelId":5,"Name":"Motes Consumed","Description":"Motes now consumed in the build calculator when making a townhall.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":12,"GitPatchModelId":6,"Name":"Agile UI Tweaks","Description":"Making the agile text look a bit better before stream.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":13,"GitPatchModelId":7,"Name":"Database Armor","Description":"Added missing armor display to database.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":14,"GitPatchModelId":8,"Name":"Home Page","Description":"Added a quick placeholder-ish homepage.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":15,"GitPatchModelId":8,"Name":"Database Army Default","Description":"Database UI now defaults to Army selection. Given most people are probably going to want to view the units.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":16,"GitPatchModelId":9,"Name":"Mobile Menu Back","Description":"You can now click the page after selecting a Section, to go back to Section nav.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":17,"GitPatchModelId":10,"Name":"Mobile Menu Fixed","Description":"Fixed the mobile menu not actually being positioned to the bottom of the screen on phones.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":18,"GitPatchModelId":11,"Name":"Tablet Menu","Description":"Added a hamburger nav menu for tablets.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":19,"GitPatchModelId":11,"Name":"Mobile Menu","Description":"Added a bottom nav menu for phones.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":20,"GitPatchModelId":12,"Name":"0.0.6.8375a","Description":"Database updated to 0.0.6.8375a","Commit":"Game Patch","Date":"2022-03-26T20:32:02","Important":"True"},{"Id":21,"GitPatchModelId":12,"Name":"Database Descriptions","Description":"Added more text descriptions to buildings and etc..","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":22,"GitPatchModelId":12,"Name":"Guids","Description":"Now using Guids and strings over enums. View in /raw-database page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":23,"GitPatchModelId":12,"Name":"Mobile UI","Description":"Additional mobile UI improvements. Harass calculator now has fewer inputs that don\u0027t matter.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":24,"GitPatchModelId":12,"Name":"Bug Tasks","Description":"Added feature/bug task indicator to agile view. Added consume mote bug in build calculator to next sprint. (Calculator not consuming motes on Town Hall building)","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":25,"GitPatchModelId":12,"Name":"Entity Display UI","Description":"Display UI improved. Build Calculator now uses the same Entity display UI as the Database.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":26,"GitPatchModelId":13,"Name":"Removed Embedded YouTube","Description":"Having embedded videos makes my privacy policy look completely untrue. Removed the video (it\u0027s now a link) and added a message on the privacy policy to point out that the error occured.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":27,"GitPatchModelId":13,"Name":"Agile View Backlog","Description":"Added backlog rendering to the Agile View Page. Added priority level to better indicate what tasks have high or zero priority.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":28,"GitPatchModelId":14,"Name":"Privacy Policy Page","Description":"The privacy policy is now a page rather than a blurb on the About page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":29,"GitPatchModelId":14,"Name":"Privacy Policy Update","Description":"I added information on how I use personal data. And a disclaimer that privacy can never be guaranteed.","Commit":"Privacy Policy","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":30,"GitPatchModelId":14,"Name":"Minor Tweaks","Description":"Minor UI changes and text fixes.","Commit":"None","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":31,"GitPatchModelId":15,"Name":"Homepage","Description":"Making Of page no longer shows on the homepage","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":32,"GitPatchModelId":15,"Name":"DevOnly Component","Description":"Added a DevOnly component to wrap UI content that should not be released to production. I.e. the Homepage bug.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":33,"GitPatchModelId":16,"Name":"Agile View","Description":"Add an agile page to show current activities.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":34,"GitPatchModelId":16,"Name":"Rendering Entire Database","Description":"I can now render the database without lag. Not sure what fixed it.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":35,"GitPatchModelId":16,"Name":"Database Data","Description":"Added a ton of data to the database. Such as various descriptions. More work is still to be done.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":36,"GitPatchModelId":16,"Name":"Database Ids","Description":"Database has less duplicated content. Army entities now link to their Upgrades and Abilities. More work is still to be done.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":37,"GitPatchModelId":16,"Name":"Blades of the Godhead Requirement","Description":"Fixed the requirement incorrectly being the Eye of Aros. Now is properly Bearer of the Crown.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":38,"GitPatchModelId":16,"Name":"UI Changes","Description":"Various UI changes and tweaks","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":39,"GitPatchModelId":16,"Name":"Streams","Description":"Added a Streams page. It mentions plans to do Twitch streams on Sunday.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":40,"GitPatchModelId":16,"Name":"IMMORTAL","Description":"Fixed \u0022IMMORTAL: Gates of Pyre\u0022 game title. Will no longer refer to it as \u0022Immortal: Gates of Pyre\u0022.","Commit":"Typo","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":41,"GitPatchModelId":16,"Name":"Mobile Support","Description":"All the pages should now work on phones.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":42,"GitPatchModelId":17,"Name":"Form Text","Description":"Fixed search bar in database, name and colour in build calculator, from not rendering \uD83D\uDE10","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":43,"GitPatchModelId":17,"Name":"UI Test Automation Road Map","Description":"Adding test automation to the roadmap","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":44,"GitPatchModelId":18,"Name":"Build Calculator Interval","Description":"600 is too laggy. Reducing to 360 until optimizations are done.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":45,"GitPatchModelId":18,"Name":"Changelog Patch Date","Description":"Fixed date on previous patch in changelog. Should be one day earlier.","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":46,"GitPatchModelId":19,"Name":"UI Overhaul","Description":"Cleaned up and restyled a lot of UI. Like Page Containers, Alerts, Forms, Nav Buttons, and more.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":47,"GitPatchModelId":19,"Name":"Separate Pages","Description":"Navigation now uses different pages, instead of loading content onto the main page.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":48,"GitPatchModelId":19,"Name":"Making Of","Description":"Adding Making Of page for design reference.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":49,"GitPatchModelId":19,"Name":"Change Log","Description":"Adding Change Log page for viewing update history.","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":50,"GitPatchModelId":19,"Name":"Mobile Priority","Description":"Changed mobile support priority in roadmap from low and possible to high and planned, and updated description.","Commit":"Planning","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":51,"GitPatchModelId":20,"Name":"Purple Colours","Description":"Added placeholder-ish purple color scheme.","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":52,"GitPatchModelId":20,"Name":"SQL","Description":"Agile and Change Log pages now use JSON made from SQL","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":53,"GitPatchModelId":21,"Name":"Discord Link","Description":"Made a discord for the website, and added invite link to contact page","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":54,"GitPatchModelId":21,"Name":"Loading Improvemnts","Description":"Agile and Change Log loading improved","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":55,"GitPatchModelId":21,"Name":"Desktop Nav closing","Description":"Desktop nav menu now closes when a page link is clicked","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":56,"GitPatchModelId":22,"Name":"0.0.6.8900a","Description":"Database updated to 0.0.6.8900a","Commit":"Game Patch","Date":"2022-03-26T20:32:02","Important":"True"},{"Id":57,"GitPatchModelId":23,"Name":"Database Links","Description":"Various entity references in the database now link to the entity via a dialog interface","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":58,"GitPatchModelId":24,"Name":"Documentation Page","Description":"Added a docs page with some starter setup information","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":59,"GitPatchModelId":24,"Name":"Database Filters","Description":"Fixed filter defaults. Removed unimportant filter types","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":60,"GitPatchModelId":25,"Name":"Database Fixes","Description":"Various fixes to bad data. Added some missing entities","Commit":"Fix","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":61,"GitPatchModelId":25,"Name":"Plain View","Description":"Database can now change to plain view for easy copy and pasting","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":62,"GitPatchModelId":25,"Name":"Direct Links","Description":"Database now supports direct links. database/Throne to see just Throne","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":63,"GitPatchModelId":26,"Name":"Better Navigation","Description":"Documentational pages now use a more logical navigation format, with sections, and parent-child documents","Commit":"Feature","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":64,"GitPatchModelId":26,"Name":"Style Improvements","Description":"Improved home page styling on website highlighted content","Commit":"Style","Date":"2022-03-26T20:32:02","Important":"False"},{"Id":65,"GitPatchModelId":26,"Name":"Warning Cleanup","Description":"Removed a bunch of development code warnings","Commit":"Chore","Date":"2022-03-26T20:32:02","Important":"False"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/GitPatchModels.json b/IGP/wwwroot/generated/GitPatchModels.json new file mode 100644 index 0000000..c671fc9 --- /dev/null +++ b/IGP/wwwroot/generated/GitPatchModels.json @@ -0,0 +1 @@ +[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","GitChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","GitChangeModels":[],"Important":"False"},{"Id":26,"Name":"Notes/Docs Patch","Date":"2022-04-10T00:00:00","GitChangeModels":[],"Important":"False"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/NoteConnectionModels.json b/IGP/wwwroot/generated/NoteConnectionModels.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/IGP/wwwroot/generated/NoteConnectionModels.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/IGP/wwwroot/generated/NoteContentModels.json b/IGP/wwwroot/generated/NoteContentModels.json new file mode 100644 index 0000000..f081d4c --- /dev/null +++ b/IGP/wwwroot/generated/NoteContentModels.json @@ -0,0 +1 @@ +[{"Id":1,"ParentId":null,"NoteSectionModelId":1,"Href":"holdout","CreatedDate":"2022-02-18T00:00:00","UpdatedDate":"2022-02-18T00:00:00","Name":"Coop Holdout, Some distant place (Nuath)","Description":"First coop test map in pre-alpha.","Content":"Information contained in this note is based on this \u003Ca href=\u0022https://www.youtube.com/watch?v=XkAgOCIz3DE\u0022\u003EYouTube, Reference Video\u003C/a\u003E.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/OpenBases.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EOpen Bases\u003C/b\u003E\u003C/div\u003E\n\nOn this map, you start with around 500 alloy and 100 ether. You are probably going to want to expand to the bases in the marked order, given the density of defending enemies shown on the minimap.\n\nYou should know that these are all standard bases that will mine out in 10 minutes. Giving a total of 18,000 alloy and 7,200 ether. Plus an additional 6,000 alloy from the starting Bastion. In the late game, you will have zero income, aside from pyre.\n\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/EnemySpawns.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EEnemy Spawn Areas\u003C/b\u003E\u003C/div\u003E\n\nThe first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and won\u0027t be a threat until the 15-minute mark.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/DefendPoints.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Towers\u003C/b\u003E\u003C/div\u003E\n\nYou have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers.\n\nThe spawn size post the 15-minute mark does become rather large. You may be tempted to fall back and abandon forward bases, but the waves will stack if not dealt with. Eventually, more units than the game can handle, so ensure outer pyre towers are held. Try to take them back if you lose them.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Pyre.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Camps\u003C/b\u003E\u003C/div\u003E\n\nWhen you have the time you are also going to need to take the 4 pyre camps spread around the map. It will probably be ideal to split your army in half, to protect your two outer towers, and just have a small force of Ichors or Dervishes to clear the camps quickly.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Multipliers.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EMultipliers\u003C/b\u003E\u003C/div\u003E\n\nIf you have additional free time, you can take out the Altar of the Worthys on the edges of the map to double your current more multiplier: 2, 4, 8, to the max of 16. Amber Wombs will also spawn, with a pack of enemies to defend them. Killing an Amber Womb will increase your score, but also spawn random friendly and enemy units. With this spawning, it\u0027s possible to go past the supply cap.\n\n\nBut really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as possible.","IsHidden":"False","IsPreAlpha":"True","NoteContentModels":[],"Parent":null,"PageOrder":0}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/NoteModels.json b/IGP/wwwroot/generated/NoteModels.json deleted file mode 100644 index 1a6c390..0000000 --- a/IGP/wwwroot/generated/NoteModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"LastUpdated":"2022-02-18T00:00:00","Name":"Coop Holdout, Some distant place (Nuath)","Section":"Coop","Description":"Information contained in this note is based on this \u003Ca href=\u0022https://www.youtube.com/watch?v=XkAgOCIz3DE\u0022\u003EYouTube, Reference Video\u003C/a\u003E.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/OpenBases.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EOpen Bases\u003C/b\u003E\u003C/div\u003E\n\nOn this map, you start with around 500 alloy and 100 ether. You are probably going to want to expand to the bases in the marked order, given the density of defending enemies shown on the minimap.\n\nYou should know that these are all standard bases that will mine out in 10 minutes. Giving a total of 18,000 alloy and 7,200 ether. Plus an additional 6,000 alloy from the starting Bastion. In the late game, you will have zero income, aside from pyre.\n\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/EnemySpawns.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EEnemy Spawn Areas\u003C/b\u003E\u003C/div\u003E\n\nThe first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and won\u0027t be a threat until the 15-minute mark.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/DefendPoints.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Towers\u003C/b\u003E\u003C/div\u003E\n\nYou have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers.\n\nThe spawn size post the 15-minute mark does become rather large. You may be tempted to fall back and abandon forward bases, but the waves will stack if not dealt with. Eventually, more units than the game can handle, so ensure outer pyre towers are held. Try to take them back if you lose them.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Pyre.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EPyre Camps\u003C/b\u003E\u003C/div\u003E\n\nWhen you have the time you are also going to need to take the 4 pyre camps spread around the map. It will probably be ideal to split your army in half, to protect your two outer towers, and just have a small force of Ichors or Dervishes to clear the camps quickly.\n\n\u003Cimg width=\u0022420\u0022 style=\u0022margin: auto; border:2px solid black;\u0022 src=\u0022image/notes/coop-holdout/Multipliers.png\u0022 /\u003E\n\u003Cdiv style=\u0022margin: auto; text-align:center;\u0022\u003E\u003Cb\u003EMultipliers\u003C/b\u003E\u003C/div\u003E\n\nIf you have additional free time, you can take out the Altar of the Worthys on the edges of the map to double your current more multiplier: 2, 4, 8, to the max of 16. Amber Wombs will also spawn, with a pack of enemies to defend them. Killing an Amber Womb will increase your score, but also spawn random friendly and enemy units. With this spawning, it\u0027s possible to go past the supply cap.\n\n\nBut really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as possible.","IsHidden":false,"IsPreAlpha":false}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/NoteSectionModels.json b/IGP/wwwroot/generated/NoteSectionModels.json new file mode 100644 index 0000000..0be209d --- /dev/null +++ b/IGP/wwwroot/generated/NoteSectionModels.json @@ -0,0 +1 @@ +[{"Id":1,"Name":"PVE Content","NoteContentModels":[]}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/PatchModels.json b/IGP/wwwroot/generated/PatchModels.json deleted file mode 100644 index c6b35a0..0000000 --- a/IGP/wwwroot/generated/PatchModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"Name":"Database UX Patch","Date":"2022-03-13T00:00:00","ChangeModels":[],"Important":"False"},{"Id":2,"Name":"Thrum Stats Hotfix","Date":"2022-03-12T00:00:00","ChangeModels":[],"Important":"False"},{"Id":3,"Name":"Memory Tester Patch","Date":"2022-03-01T00:00:00","ChangeModels":[],"Important":"False"},{"Id":4,"Name":"Hide Pyre Hotfix","Date":"2022-02-20T00:00:00","ChangeModels":[],"Important":"False"},{"Id":5,"Name":"Stream Patch","Date":"2022-02-20T00:00:00","ChangeModels":[],"Important":"False"},{"Id":6,"Name":"Agile UI Hotfix","Date":"2022-02-20T00:00:00","ChangeModels":[],"Important":"False"},{"Id":7,"Name":"Armor Patch","Date":"2022-02-19T00:00:00","ChangeModels":[],"Important":"False"},{"Id":8,"Name":"Home Page Patch","Date":"2022-02-19T00:00:00","ChangeModels":[],"Important":"False"},{"Id":9,"Name":"Mobile Menu Hotfix 2","Date":"2022-02-19T00:00:00","ChangeModels":[],"Important":"False"},{"Id":10,"Name":"Mobile Menu Hotfix","Date":"2022-02-19T00:00:00","ChangeModels":[],"Important":"False"},{"Id":11,"Name":"Mobile Menu Patch","Date":"2022-02-19T00:00:00","ChangeModels":[],"Important":"False"},{"Id":12,"Name":"0.0.6.8375a Patch","Date":"2022-02-18T00:00:00","ChangeModels":[],"Important":"True"},{"Id":13,"Name":"Google Tracking Hotfix","Date":"2022-02-18T00:00:00","ChangeModels":[],"Important":"False"},{"Id":14,"Name":"Privacy Policy Patch","Date":"2022-02-17T00:00:00","ChangeModels":[],"Important":"False"},{"Id":15,"Name":"Home Page Quick Hotfix","Date":"2022-02-16T00:00:00","ChangeModels":[],"Important":"False"},{"Id":16,"Name":"Early Agile Patch","Date":"2022-02-16T00:00:00","ChangeModels":[],"Important":"False"},{"Id":17,"Name":"Form Text Rendering Hotfix","Date":"2022-02-15T00:00:00","ChangeModels":[],"Important":"False"},{"Id":18,"Name":"Reducing Timing Interval Hotfix","Date":"2022-02-15T00:00:00","ChangeModels":[],"Important":"False"},{"Id":19,"Name":"Changelog Patch","Date":"2022-02-14T00:00:00","ChangeModels":[],"Important":"False"},{"Id":20,"Name":"SQL Patch","Date":"2022-03-26T00:00:00","ChangeModels":[],"Important":"False"},{"Id":21,"Name":"Stream Patch","Date":"2022-03-30T00:00:00","ChangeModels":[],"Important":"False"},{"Id":22,"Name":"0.0.6.8900a Patch","Date":"2022-03-30T00:00:00","ChangeModels":[],"Important":"True"},{"Id":23,"Name":"Database Links Patch","Date":"2022-04-01T00:00:00","ChangeModels":[],"Important":"False"},{"Id":24,"Name":"Open Source Patch","Date":"2022-04-03T00:00:00","ChangeModels":[],"Important":"False"},{"Id":25,"Name":"Stream Patch","Date":"2022-04-03T00:00:00","ChangeModels":[],"Important":"False"}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/SprintModels.json b/IGP/wwwroot/generated/SprintModels.json deleted file mode 100644 index 9f46454..0000000 --- a/IGP/wwwroot/generated/SprintModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"Name":"Agile Sprint","Description":"Changelogs and sprint views were going to be pushed till later, but I am feeling inspired by the IGP Content Creators\u0027 minimum weekly lifecycle requirement. So I am going to focus on agile-related tasks, and handle roadmap tasks after this initial sprint. All weekly sprints will release on Sunday, starting next Sunday.","StartDate":"2022-02-14T00:00:00","EndDate":"2022-02-20T00:00:00","Notes":null},{"Id":2,"Name":"SQL Update","Description":"The SQL update is big enough to be a full sprint in of itself, and I spent less time this week for development. Will just extend sprint by 2 week, and remove all non SQL tasks from the sprint.","StartDate":"2022-02-20T00:00:00","EndDate":"2022-03-27T00:00:00","Notes":null},{"Id":3,"Name":"Database Page","Description":"Improvements to the Database page","StartDate":"2022-03-27T00:00:00","EndDate":"2022-04-03T00:00:00","Notes":null},{"Id":4,"Name":"Branding","Description":"Improve streaming branding around the website","StartDate":"2022-04-03T00:00:00","EndDate":"2022-04-10T00:00:00","Notes":null}] \ No newline at end of file diff --git a/IGP/wwwroot/generated/TaskModels.json b/IGP/wwwroot/generated/TaskModels.json deleted file mode 100644 index 6599171..0000000 --- a/IGP/wwwroot/generated/TaskModels.json +++ /dev/null @@ -1 +0,0 @@ -[{"Id":1,"SprintModelId":null,"Name":"Support Safari","Description":"Consider other web browsers.","Notes":"Added","Status":"Todo","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":2,"SprintModelId":2,"Name":"Filter Patch Notes","Description":"You should be showing people what they really want to see in the patch notes.","Notes":"Added","Status":"Done","Priority":"Blocker","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":3,"SprintModelId":null,"Name":"Consider Pyre","Description":"Add Pyre Income. Make it so you can take Pyre Camps and Pyre Miners","Notes":"Add notes...","Status":"In_Progress","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":4,"SprintModelId":null,"Name":"Optimizations","Description":"Build Calculator should be usable.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":5,"SprintModelId":null,"Name":"Change Attack Timing Interval","Description":"Be able to sett attack timing.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":6,"SprintModelId":null,"Name":"Add Pyre Spells","Description":"Make Pyre Spells castable and consume Pyre on build order","Notes":"Add notes...","Status":"In_Progress","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":7,"SprintModelId":null,"Name":"Default builds (Rush Thrones)","Description":"Add a dropdown list of default builds.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":8,"SprintModelId":null,"Name":"Load older builds","Description":"Be able to load older builds. How are you going to handle auto correct to current patch?","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":9,"SprintModelId":null,"Name":"How to use Build Calculator step by step","Description":"Need docs","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":10,"SprintModelId":null,"Name":"Compare Health and Damage","Description":"Refer to community example spreadsheet.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":11,"SprintModelId":null,"Name":"Compare Unit\u0027s Damage with it\u0027s own costs","Description":"Refer to community example spreadsheet.","Notes":"Add notes...","Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":12,"SprintModelId":4,"Name":"View one unit stats from a link. Make YAML copy and paste","Description":"Design so people can easily copy and paste data into discord","Notes":"Ended up not using exact Yaml. Button in Database controls Detailed vs Plain display ","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":13,"SprintModelId":2,"Name":"Look into SQL","Description":"You really should be using SQL.","Notes":"Agile and Change log pages now use SQL","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-20T00:00:00","Finished":null},{"Id":14,"SprintModelId":1,"Name":"Mobile Menu","Description":"You need a real mobile menu. Viewers don\u0027t scroll below the fold, so no one is going to know what happens when you click a button on phones.","Notes":"Added smaller menus for tablets and phones.","Status":"Done","Priority":"High","Task":"Feature","Project":"Management","Created":"2022-02-18T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":15,"SprintModelId":2,"Name":"Acropolis Consume Mote","Description":"The Mote is suppose to be consumed when making a Town Hall.","Notes":"Fixed","Status":"Done","Priority":"High","Task":"Bug","Project":"Management","Created":"2022-02-18T00:00:00","Finished":"2022-02-20T00:00:00"},{"Id":16,"SprintModelId":null,"Name":"Multiple Travel Time in Calculator","Description":"Travel time should be based on the amount of bases used. 3 bases is 3 travel times.","Notes":"Add notes...","Status":"Todo","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-02-18T00:00:00","Finished":null},{"Id":17,"SprintModelId":1,"Name":"Update Database to 0.0.6.8375a","Description":"Xacal tech change, and Hallower damage change. Update Godhead text.","Notes":"Done","Status":"Done","Priority":"None","Task":"Feature","Project":"Management","Created":"2022-02-18T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":18,"SprintModelId":null,"Name":"Patch History Viewer","Description":"Add an ability to compare patches, to see all nerfs and buffs made between them.","Notes":"Inspired by Zkay\u0027s post on discord, where he details a possible \u0027patch history viewer\u0027 implementation.","Status":"Fun_Idea","Priority":"None","Task":"Feature","Project":"Management","Created":"2022-02-16T00:00:00","Finished":null},{"Id":19,"SprintModelId":1,"Name":"Twitch Page","Description":"Did a ~3 hour test stream, and was personal quite happy with the quality. Make Twitch page, and stream patch, sprint planning and development on Sunday.","Notes":"Page added under General, and named \u0022Streams\u0022.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-16T00:00:00","Finished":"2022-02-16T00:00:00"},{"Id":20,"SprintModelId":1,"Name":"Finish the database","Description":"Add more descriptions for everything. Reduce any data duplication with ids. Add upgrade connections. Add ability connections. Add passives and passives connections.","Notes":"Good enough for now","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-11T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":21,"SprintModelId":1,"Name":"Change Log View","Description":"Add a log to view last changes.","Notes":"Added changelog page. Shows Today, X Days Ago, or exact date if patch is over a week old.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-14T00:00:00","Finished":"2022-02-14T00:00:00"},{"Id":22,"SprintModelId":1,"Name":"Agile View","Description":"Add the agile view.","Notes":"Finished.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-11T00:00:00","Finished":"2022-02-17T00:00:00"},{"Id":23,"SprintModelId":1,"Name":"GUID for Ids","Description":"Stop using enums for ids, and start using guids. Enums are just too limited, I lose out on component and inheritance design with them. Replace all your enums with guids, rip off the bandaid.","Notes":"Add notes...","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-11T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":24,"SprintModelId":1,"Name":"Co-op overview","Description":"Write some sort of blog on co-op gameplay so you have something the feels very content-ish. Maybe make it a video.","Notes":"Finished and released early.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-11T00:00:00","Finished":"2022-02-12T00:00:00"},{"Id":25,"SprintModelId":1,"Name":"Mobile UI","Description":"Make website work on mobile.","Notes":"Should be good. Will test on phone later.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-15T00:00:00","Finished":"2022-02-18T00:00:00"},{"Id":26,"SprintModelId":1,"Name":"Add Making Of View","Description":"View to reference UI designs. Nicely encourages the pratice of making the UI code a lot cleaner.","Notes":"Good enough for now","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-02-11T00:00:00","Finished":"2022-02-19T00:00:00"},{"Id":27,"SprintModelId":3,"Name":"Close Nav Menu on Navigation","Description":"Close Nav Menu on Navigation","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":28,"SprintModelId":3,"Name":"Add Passive Descriptions and Passive","Description":"Have to guess on a bunch of passives","Notes":null,"Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-03-31T00:00:00"},{"Id":29,"SprintModelId":3,"Name":"Tooltips that show referenced units","Description":"I should see any referenced unit by hovering over it","Notes":"Links can now go to links which can go to links.","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-04-01T00:00:00"},{"Id":30,"SprintModelId":null,"Name":"Update Logo for Website","Description":"After color scheme is picked","Notes":null,"Status":"Todo","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":null},{"Id":31,"SprintModelId":3,"Name":"Documentation page","Description":"Add documents on how to maintain website","Notes":"Added start of documents","Status":"Done","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":32,"SprintModelId":null,"Name":"Test Automation","Description":"Selenium Tests","Notes":"Start adding IDs to everything","Status":"Todo","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":null},{"Id":33,"SprintModelId":null,"Name":"Unit Test","Description":"Add some unit tests","Notes":null,"Status":"Todo","Priority":"Low","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":null},{"Id":34,"SprintModelId":null,"Name":"Fully Transfer everything to SQL","Description":"Need to regenerate the database once everthing is fully transfered","Notes":null,"Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":null},{"Id":35,"SprintModelId":3,"Name":"Adding a loading Component","Description":"For JSON loading","Notes":"Added loading component to Agile and Changelog screens","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":36,"SprintModelId":3,"Name":"Optimize Loading of Data","Description":"Currently loading non Agile stuff on Agile page","Notes":"Moved SQL database injection to app root","Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-03-27T00:00:00"},{"Id":37,"SprintModelId":3,"Name":"Convert Notes to Markdown","Description":"Using Markdown and generating the Note pages seems like a better solution to SQL or hardcoding data","Notes":null,"Status":"Done","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-03-27T00:00:00","Finished":"2022-04-01T00:00:00"},{"Id":38,"SprintModelId":3,"Name":"Improve Entity Filter Options","Description":"The options I give you is strange, given it filers on Faction type","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Project":"Management","Created":"2022-04-01T00:00:00","Finished":"2022-04-03T00:00:00"},{"Id":39,"SprintModelId":4,"Name":"Refresh Database Bug","Description":"Database dialog UI isn\u0027t refreshing enough","Notes":null,"Status":"Done","Priority":"High","Task":"Bug","Project":"Management","Created":"2022-04-03T00:00:00","Finished":null},{"Id":40,"SprintModelId":4,"Name":"Branding Stuff","Description":"Add a schedule, improving branding, etc, ","Notes":null,"Status":"Todo","Priority":"Medium","Task":"Feature","Project":"Management","Created":"2022-04-03T00:00:00","Finished":null}] \ No newline at end of file diff --git a/IGP/wwwroot/markdown/documentation/setup.md b/IGP/wwwroot/markdown/documentation/setup.md index e8ae1bb..eace30a 100644 --- a/IGP/wwwroot/markdown/documentation/setup.md +++ b/IGP/wwwroot/markdown/documentation/setup.md @@ -4,7 +4,8 @@ This document will contain general setup notes for the project. ## Prerequisite -To understand content in this document, it is recommended to have some software development experience. Particularly using GitHub and Visual Studio. +To understand content in this document, it is recommended to have some software development experience. Particularly +using GitHub and Visual Studio. - [GitHub Documentation](https://docs.github.com/en/get-started) @@ -16,10 +17,13 @@ To make updates to this website, it is recommended to understand HTML/CSS and C# - [Mozilla's HTML Documentation](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Getting_started) - [W3SCHOOLS' HTML Documentation](https://www.w3schools.com/html/) -Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal: Gates of Pyre". -- [IGP Website](https://gatesofpyre.com/) - - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps of getting access. +Further, you should understand the product and clients this website is for. So it is recommended to play "Immortal: +Gates of Pyre". +- [IGP Website](https://gatesofpyre.com/) + - **Please Note:** This product currently has restricted access with it is in a pre-alpha state. If you are not + aware or interested in IGP, I recommend to wait for product release. Otherwise, check out their discord for steps + of getting access. ## Installation @@ -27,17 +31,19 @@ Download and install Visual Studio preview. https://visualstudio.microsoft.com/vs/preview/ -When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | **.NET WebAssembly build tools**". +When installing, ensure you have selected "Workloads | **ASP.NET and web development**" and "Individual components | ** +.NET WebAssembly build tools**". ## Download Project -Get this project from GitHub. +Get this project from GitHub. ```bash git clone https://github.com/JonathanMcCaffrey/IGP-Fan-Reference.git ``` ## Project Tree + ``` C:. ├───.github @@ -60,24 +66,25 @@ C:. ## Running -- Open `IGP/IGP.sln`. +- Open `IGP/IGP.sln`. - Click the green RUN button in Visual Studio. - A local copy of the IGP Website should have launched on your machine. - ## Publishing -**Important:** publishing new version of the website will not occur until issue [39528](https://github.com/dotnet/aspnetcore/issues/39528) in dotnet/aspnetcore is resolved. - +**Important:** publishing new version of the website will not occur until +issue [39528](https://github.com/dotnet/aspnetcore/issues/39528) in dotnet/aspnetcore is resolved. Code committed to the `main` branch will automatically be deployed to [production](https://www.igpfanreference.com/). -Code committed to the `develop` branch will automatically be deployed to [development](https://calm-mud-04916b210.1.azurestaticapps.net/). - -*This is handle via the files in `.github/workflow`. Look into these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works.* +Code committed to the `develop` branch will automatically be deployed +to [development](https://calm-mud-04916b210.1.azurestaticapps.net/). +*This is handle via the files in `.github/workflow`. Look into +these [GitHub Actions Documents](https://docs.github.com/en/actions) if curious about how this CI system works.* ## Troubleshooting -Nothing that some good internet searches cannot resolved. But you can also contact the project maintainer on [IGP Fan Reference](https://discord.gg/uMq8bMGeeN) Discord. +Nothing that some good internet searches cannot resolved. But you can also contact the project maintainer +on [IGP Fan Reference](https://discord.gg/uMq8bMGeeN) Discord. diff --git a/IGP/wwwroot/markdown/notes/coop.md b/IGP/wwwroot/markdown/notes/coop.md index 1f999d7..ba66919 100644 --- a/IGP/wwwroot/markdown/notes/coop.md +++ b/IGP/wwwroot/markdown/notes/coop.md @@ -1,42 +1,54 @@ --- -LastUpdated: 2022-02-18 -Section: "Coop" +LastUpdated: 2022-02-18 Section: "Coop" Name: "Coop Holdout, Some distant place (Nuath)" IsPreAlpha: true --- -Information contained in this note is based on this YouTube, Reference Video. +Information contained in this note is based on this YouTube, +Reference Video.
Open Bases
-On this map, you start with around 500 alloy and 100 ether. You are probably going to want to expand to the bases in the marked order, given the density of defending enemies shown on the minimap. +On this map, you start with around 500 alloy and 100 ether. You are probably going to want to expand to the bases in the +marked order, given the density of defending enemies shown on the minimap. -You should know that these are all standard bases that will mine out in 10 minutes. Giving a total of 18,000 alloy and 7,200 ether. Plus an additional 6,000 alloy from the starting Bastion. In the late game, you will have zero income, aside from pyre. +You should know that these are all standard bases that will mine out in 10 minutes. Giving a total of 18,000 alloy and +7,200 ether. Plus an additional 6,000 alloy from the starting Bastion. In the late game, you will have zero income, +aside from pyre.
Enemy Spawn Areas
-The first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and won't be a threat until the 15-minute mark. +The first enemy wave will spawn at 1 minute, and every 2 minutes after will spawn a new wave. These waves are small, and +won't be a threat until the 15-minute mark.
Pyre Towers
You have till then to take all 5 of your bases, and set a defensive line at the outer Pyre towers. -The spawn size post the 15-minute mark does become rather large. You may be tempted to fall back and abandon forward bases, but the waves will stack if not dealt with. Eventually, more units than the game can handle, so ensure outer pyre towers are held. Try to take them back if you lose them. +The spawn size post the 15-minute mark does become rather large. You may be tempted to fall back and abandon forward +bases, but the waves will stack if not dealt with. Eventually, more units than the game can handle, so ensure outer pyre +towers are held. Try to take them back if you lose them.
Pyre Camps
-When you have the time you are also going to need to take the 4 pyre camps spread around the map. It will probably be ideal to split your army in half, to protect your two outer towers, and just have a small force of Ichors or Dervishes to clear the camps quickly. +When you have the time you are also going to need to take the 4 pyre camps spread around the map. It will probably be +ideal to split your army in half, to protect your two outer towers, and just have a small force of Ichors or Dervishes +to clear the camps quickly.
Multipliers
-If you have additional free time, you can take out the Altar of the Worthys on the edges of the map to double your current more multiplier: 2, 4, 8, to the max of 16. Amber Wombs will also spawn, with a pack of enemies to defend them. Killing an Amber Womb will increase your score, but also spawn random friendly and enemy units. With this spawning, it's possible to go past the supply cap. +If you have additional free time, you can take out the Altar of the Worthys on the edges of the map to double your +current more multiplier: 2, 4, 8, to the max of 16. Amber Wombs will also spawn, with a pack of enemies to defend them. +Killing an Amber Womb will increase your score, but also spawn random friendly and enemy units. With this spawning, it's +possible to go past the supply cap. -But really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as possible. \ No newline at end of file +But really, these optional objectives can be completely ignored, so you can just focus on surviving for as long as +possible. \ No newline at end of file diff --git a/IGP_Convert/Program.cs b/IGP_Convert/Program.cs index dcb18d4..b97cab2 100644 --- a/IGP_Convert/Program.cs +++ b/IGP_Convert/Program.cs @@ -12,14 +12,18 @@ options.UseSqlite($"Filename={projectPath}/{webProjectName}/Database.db"); // Load our database using (var db = new DatabaseContext(options.Options)) { // And save data in format Blazor Wasm can use - File.WriteAllTextAsync($"{webPath}/PatchModels.json", JsonSerializer.Serialize(db.PatchModels)); - File.WriteAllTextAsync($"{webPath}/ChangeModels.json", JsonSerializer.Serialize(db.ChangeModels)); - File.WriteAllTextAsync($"{webPath}/SprintModels.json", JsonSerializer.Serialize(db.SprintModels)); - File.WriteAllTextAsync($"{webPath}/TaskModels.json", JsonSerializer.Serialize(db.TaskModels)); + File.WriteAllTextAsync($"{webPath}/GitPatchModels.json", JsonSerializer.Serialize(db.GitPatchModels)); + File.WriteAllTextAsync($"{webPath}/GitChangeModels.json", JsonSerializer.Serialize(db.GitChangeModels)); + File.WriteAllTextAsync($"{webPath}/AgileSprintModels.json", JsonSerializer.Serialize(db.AgileSprintModels)); + File.WriteAllTextAsync($"{webPath}/AgileTaskModels.json", JsonSerializer.Serialize(db.AgileTaskModels)); File.WriteAllTextAsync($"{webPath}/WebSectionModels.json", JsonSerializer.Serialize(db.WebSectionModels)); File.WriteAllTextAsync($"{webPath}/WebPageModels.json", JsonSerializer.Serialize(db.WebPageModels)); + File.WriteAllTextAsync($"{webPath}/DocContentModels.json", JsonSerializer.Serialize(db.DocContentModels)); + File.WriteAllTextAsync($"{webPath}/DocConnectionModels.json", JsonSerializer.Serialize(db.DocConnectionModels)); + File.WriteAllTextAsync($"{webPath}/DocSectionModels.json", JsonSerializer.Serialize(db.DocSectionModels)); - File.WriteAllTextAsync($"{webPath}/DocumentationModels.json", JsonSerializer.Serialize(db.DocumentationModels)); - File.WriteAllTextAsync($"{webPath}/NoteModels.json", JsonSerializer.Serialize(db.NoteModels)); + File.WriteAllTextAsync($"{webPath}/NoteContentModels.json", JsonSerializer.Serialize(db.NoteContentModels)); + File.WriteAllTextAsync($"{webPath}/NoteConnectionModels.json", JsonSerializer.Serialize(db.NoteConnectionModels)); + File.WriteAllTextAsync($"{webPath}/NoteSectionModels.json", JsonSerializer.Serialize(db.NoteSectionModels)); } \ No newline at end of file diff --git a/Model/Development/Tasks/SprintModel.cs b/Model/Agile/AgileSprintModel.cs similarity index 72% rename from Model/Development/Tasks/SprintModel.cs rename to Model/Agile/AgileSprintModel.cs index b978c2e..deb2ade 100644 --- a/Model/Development/Tasks/SprintModel.cs +++ b/Model/Agile/AgileSprintModel.cs @@ -1,33 +1,31 @@ using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; using Model.Work.Tasks.Enums; namespace Model.Work.Tasks; -public class SprintModel { - private static int id = 1; - - public SprintModel() { - Id = id++; - } - +public class AgileSprintModel +{ public int Id { get; set; } public string Name { get; set; } = "Add name..."; public string Description { get; set; } = "Add description..."; - + public DateTime? StartDate { get; set; } = null; public DateTime? EndDate { get; set; } = null; public string Notes { get; set; } = "Add notes..."; - public string GetSprintType() { - var now = DateTime.Now; + [NotMapped] public virtual ICollection AgileTaskModels { get; set; } = new List(); - if (StartDate == null || EndDate == null) return SprintType.Planned; + public string GetSprintType() + { + var now = DateTime.Now; + if (StartDate == null || EndDate == null) return SprintType.Planned; if (DateTime.Compare(now, EndDate.GetValueOrDefault()) > 0) return SprintType.Completed; - if (DateTime.Compare(now, StartDate.GetValueOrDefault()) >= 0) return SprintType.Current; return SprintType.Planned; diff --git a/Model/Agile/AgileTaskModel.cs b/Model/Agile/AgileTaskModel.cs new file mode 100644 index 0000000..cab38f7 --- /dev/null +++ b/Model/Agile/AgileTaskModel.cs @@ -0,0 +1,19 @@ +using System; +using Model.Work.Tasks.Enums; + +namespace Model.Work.Tasks; + +public class AgileTaskModel +{ + public int Id { get; set; } = 1; + public int? AgileSprintModelId { get; set; } = null; + public string Name { get; set; } = "Add name..."; + public string Description { get; set; } = "Add description..."; + public string Notes { get; set; } = "Add notes..."; + public string Status { get; set; } = StatusType.Fun_Idea; + public string Priority { get; set; } = PriorityType.Medium; + public string Task { get; set; } = TaskType.Feature; + + public DateTime? Created { get; set; } = null; + public DateTime? Finished { get; set; } = null; +} \ No newline at end of file diff --git a/Model/Development/Tasks/Enums/PriorityType.cs b/Model/Agile/Enums/PriorityType.cs similarity index 89% rename from Model/Development/Tasks/Enums/PriorityType.cs rename to Model/Agile/Enums/PriorityType.cs index 2007b2b..dd9c9de 100644 --- a/Model/Development/Tasks/Enums/PriorityType.cs +++ b/Model/Agile/Enums/PriorityType.cs @@ -1,6 +1,7 @@ namespace Model.Work.Tasks.Enums; -public class PriorityType { +public class PriorityType +{ public const string Blocker = "Blocker"; public const string High = "High"; public const string Medium = "Medium"; diff --git a/Model/Development/Tasks/Enums/ProjectType.cs b/Model/Agile/Enums/ProjectType.cs similarity index 93% rename from Model/Development/Tasks/Enums/ProjectType.cs rename to Model/Agile/Enums/ProjectType.cs index 9e27e05..f69e8a1 100644 --- a/Model/Development/Tasks/Enums/ProjectType.cs +++ b/Model/Agile/Enums/ProjectType.cs @@ -1,6 +1,7 @@ namespace Model.Work.Tasks.Enums; -public class ProjectType { +public class ProjectType +{ public const string Management = "Management"; public const string Immortal = "Management"; public const string Food = "Management"; diff --git a/Model/Development/Tasks/Enums/SprintType.cs b/Model/Agile/Enums/SprintType.cs similarity index 86% rename from Model/Development/Tasks/Enums/SprintType.cs rename to Model/Agile/Enums/SprintType.cs index 1e041ea..08ce807 100644 --- a/Model/Development/Tasks/Enums/SprintType.cs +++ b/Model/Agile/Enums/SprintType.cs @@ -1,6 +1,7 @@ namespace Model.Work.Tasks.Enums; -public class SprintType { +public class SprintType +{ public const string Current = "Current"; public const string Planned = "Planned"; public const string Completed = "Completed"; diff --git a/Model/Development/Tasks/Enums/StatusType.cs b/Model/Agile/Enums/StatusType.cs similarity index 91% rename from Model/Development/Tasks/Enums/StatusType.cs rename to Model/Agile/Enums/StatusType.cs index 9de525a..1e8f961 100644 --- a/Model/Development/Tasks/Enums/StatusType.cs +++ b/Model/Agile/Enums/StatusType.cs @@ -1,6 +1,7 @@ namespace Model.Work.Tasks.Enums; -public class StatusType { +public class StatusType +{ public const string In_Progress = "In_Progress"; public const string Todo = "Todo"; public const string To_Test = "To_Test"; diff --git a/Model/Development/Tasks/Enums/TaskType.cs b/Model/Agile/Enums/TaskType.cs similarity index 82% rename from Model/Development/Tasks/Enums/TaskType.cs rename to Model/Agile/Enums/TaskType.cs index 13fa997..374a9c0 100644 --- a/Model/Development/Tasks/Enums/TaskType.cs +++ b/Model/Agile/Enums/TaskType.cs @@ -1,6 +1,7 @@ namespace Model.Work.Tasks.Enums; -public class TaskType { +public class TaskType +{ public const string Feature = "Feature"; public const string Bug = "Bug"; } \ No newline at end of file diff --git a/Model/BuildOrders/BuildComparisonModel.cs b/Model/BuildOrders/BuildComparisonModel.cs index dd56cea..5497166 100644 --- a/Model/BuildOrders/BuildComparisonModel.cs +++ b/Model/BuildOrders/BuildComparisonModel.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; -namespace Model.Immortal.BuildOrders; +namespace Model.BuildOrders; -public class BuildComparisonModel { - public List Builds { get; set; } = new() { +public class BuildComparisonModel +{ + public List Builds { get; set; } = new() + { new BuildOrderModel(), new BuildOrderModel(), new BuildOrderModel() diff --git a/Model/BuildOrders/BuildOrderModel.cs b/Model/BuildOrders/BuildOrderModel.cs index f9af18f..c16990c 100644 --- a/Model/BuildOrders/BuildOrderModel.cs +++ b/Model/BuildOrders/BuildOrderModel.cs @@ -1,18 +1,21 @@ using System.Collections.Generic; using System.Linq; -using Model.Immortal.Entity; -using Model.Immortal.Entity.Data; +using Model.Entity; +using Model.Entity.Data; -namespace Model.Immortal.BuildOrders; +namespace Model.BuildOrders; -public class BuildOrderModel { +public class BuildOrderModel +{ public string Name { get; set; } = ""; public string Color { get; set; } = "red"; - public Dictionary> Orders { get; set; } = new() { + public Dictionary> Orders { get; set; } = new() + { { 0, - new List { + new List + { EntityModel.Get(DataType.STARTING_Bastion), EntityModel.Get(DataType.STARTING_TownHall_Aru) } @@ -24,28 +27,32 @@ public class BuildOrderModel { public List BuildTypes { get; set; } = new(); - public List GetOrdersAt(int interval) { + public List GetOrdersAt(int interval) + { return (from ordersAtTime in Orders from orders in ordersAtTime.Value where ordersAtTime.Key == interval select orders).ToList(); } - public List GetCompletedAt(int interval) { + public List GetCompletedAt(int interval) + { return (from ordersAtTime in Orders from orders in ordersAtTime.Value where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) == interval select orders).ToList(); } - public List GetCompletedBefore(int interval) { + public List GetCompletedBefore(int interval) + { return (from ordersAtTime in Orders from orders in ordersAtTime.Value where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) <= interval select orders).ToList(); } - public List GetHarvestersCompletedBefore(int interval) { + public List GetHarvestersCompletedBefore(int interval) + { return (from ordersAtTime in Orders from orders in ordersAtTime.Value where ordersAtTime.Key + (orders.Production() == null ? 0 : orders.Production().BuildTime) <= interval diff --git a/Model/Chart/ChartModel.cs b/Model/Chart/ChartModel.cs index 9f6c1bc..b72ced5 100644 --- a/Model/Chart/ChartModel.cs +++ b/Model/Chart/ChartModel.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; -using Model.Immortal.Chart.Enums; +using Model.Chart.Enums; -namespace Model.Immortal.Chart; +namespace Model.Chart; -public class ChartModel { +public class ChartModel +{ public List Points { get; set; } = new(); public string ChartColor { get; set; } = ChartColorType.Red.ToString(); @@ -14,10 +15,12 @@ public class ChartModel { public float HighestIntervalPoint { get; set; } = 5000; public float HighestValuePoint { get; set; } = 5000; - public static List GetAll() { + public static List GetAll() + { var cs = new List(); - var c1 = new ChartModel { + var c1 = new ChartModel + { IntervalDisplayMax = 1000, ValueDisplayMax = 300, ChartColor = "Orange", diff --git a/Model/Chart/Enums/ChartColourType.cs b/Model/Chart/Enums/ChartColourType.cs index 2b89a1d..eae7e68 100644 --- a/Model/Chart/Enums/ChartColourType.cs +++ b/Model/Chart/Enums/ChartColourType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Chart.Enums; +namespace Model.Chart.Enums; -public enum ChartColorType { +public enum ChartColorType +{ Red, LightGreen, Cyan, diff --git a/Model/Chart/PointModel.cs b/Model/Chart/PointModel.cs index 5f6c48f..60d64b7 100644 --- a/Model/Chart/PointModel.cs +++ b/Model/Chart/PointModel.cs @@ -1,16 +1,19 @@ -namespace Model.Immortal.Chart; +namespace Model.Chart; -public class PointModel { +public class PointModel +{ public float Interval { get; set; } = 0; public float Value { get; set; } = 0; public float TempValue { get; set; } = 0; - public string GetInterval(float highestInterval, float displayScale) { + public string GetInterval(float highestInterval, float displayScale) + { var display = Interval / highestInterval * displayScale; return ((int)display).ToString(); } - public string GetValue(float highestValue, float displayScale) { + public string GetValue(float highestValue, float displayScale) + { var display = Value / highestValue * displayScale; return ((int)display).ToString(); } diff --git a/Model/Development/Git/PatchModel.cs b/Model/Development/Git/PatchModel.cs deleted file mode 100644 index d0a1243..0000000 --- a/Model/Development/Git/PatchModel.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Model.Work.Git; - -public class PatchModel { - public static int id; - - public static List exampleData = new() { new PatchModel { ChangeModels = ChangeModel.exampleData } }; - - public PatchModel() { - Id = id++; - } - - public int Id { get; set; } = 1; - public string Name { get; set; } = "Add name..."; - public DateTime Date { get; set; } = DateTime.Now; - public virtual ICollection ChangeModels { get; set; } = new List(); - - public string Important { get; set; } = "False"; - - public PatchModel AddChange(ChangeModel changeModel) { - if (ChangeModels == null) ChangeModels = new List(); - - changeModel.PatchModelId = Id; - ChangeModels.Add(changeModel); - return this; - } - - public PatchModel ConnectChildren() { - foreach (var change in ChangeModels) change.PatchModelId = Id; - return this; - } -} \ No newline at end of file diff --git a/Model/Development/Tasks/TaskModel.cs b/Model/Development/Tasks/TaskModel.cs deleted file mode 100644 index 272356d..0000000 --- a/Model/Development/Tasks/TaskModel.cs +++ /dev/null @@ -1,47 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Model.Work.Tasks.Enums; - -namespace Model.Work.Tasks; - -public class TaskModel { - private static int id = 1; - - public TaskModel() { - Id = id++; - } - - public int Id { get; set; } = 1; - public int? SprintModelId { get; set; } = null; - public string Name { get; set; } = "Add name..."; - public string Description { get; set; } = "Add description..."; - public string Notes { get; set; } = "Add notes..."; - public string Status { get; set; } = StatusType.Fun_Idea; - public string Priority { get; set; } = PriorityType.Medium; - public string Task { get; set; } = TaskType.Feature; - - public string Project { get; set; } - - public DateTime? Created { get; set; } = null; - public DateTime? Finished { get; set; } = null; - - public string StatusColor() { - return Status == StatusType.Fun_Idea ? "gray" - : Status == StatusType.In_Progress ? "#3be330" - : Status == StatusType.To_Test ? "cyan" - : Status == StatusType.Todo ? "yellow" - : Status == StatusType.Done ? "orange" - : "white"; - } - - public static List Statuses(List Data) { - return (from task in Data - select task.Status).Distinct().ToList(); - } - - public static List Projects(List Data) { - return (from task in Data - select task.Project).Distinct().ToList(); - } -} \ No newline at end of file diff --git a/Model/Doc/DocConnectionModel.cs b/Model/Doc/DocConnectionModel.cs new file mode 100644 index 0000000..48fa445 --- /dev/null +++ b/Model/Doc/DocConnectionModel.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +namespace Model.Doc; + +public class DocConnectionModel +{ + [Key] public int Id { get; set; } = 1; + public int ParentId { get; set; } = 1; + public int ChildId { get; set; } = 1; +} \ No newline at end of file diff --git a/Model/Doc/DocContentModel.cs b/Model/Doc/DocContentModel.cs new file mode 100644 index 0000000..9bf55cf --- /dev/null +++ b/Model/Doc/DocContentModel.cs @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Model.Doc; + +public class DocContentModel +{ + [Key] public int Id { get; set; } = 1; + + public int? ParentId { get; set; } = null; + public int? DocSectionModelId { get; set; } = null; + public string Href { get; set; } + [NotMapped] public virtual ICollection DocumentationModels { get; set; } = new List(); + [NotMapped] public virtual DocContentModel Parent { get; set; } + [NotMapped] public virtual int PageOrder { get; set; } + public DateTime CreatedDate { get; set; } + public DateTime UpdatedDate { get; set; } + public string Name { get; set; } = ""; + public string Description { get; set; } = null; + public string Content { get; set; } = ""; + + private string GetLink() + { + var link = Href; + + if (Parent != null) link = $"{Parent.GetLink()}/" + link; + + return link; + } + + public string GetDocLink() + { + return $"docs/{GetLink()}"; + } +} \ No newline at end of file diff --git a/Model/Doc/DocSectionModel.cs b/Model/Doc/DocSectionModel.cs new file mode 100644 index 0000000..28022ff --- /dev/null +++ b/Model/Doc/DocSectionModel.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Model.Doc; + +public class DocSectionModel +{ + [Key] public int Id { get; set; } + + public string Name { get; set; } + + [NotMapped] + public virtual ICollection DocumentationModels { get; set; } = new List(); +} \ No newline at end of file diff --git a/Model/Documentation/DocumentationModel.cs b/Model/Documentation/DocumentationModel.cs deleted file mode 100644 index bfe5352..0000000 --- a/Model/Documentation/DocumentationModel.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace Model.Documentation; - -public class DocumentationModel -{ - public int Id { get; set; } - public DateTime CreatedDate { get; set; } - public DateTime UpdatedDate { get; set; } - public string Name { get; set; } - public string Section { get; set; } - public string Description { get; set; } -} \ No newline at end of file diff --git a/Model/Economy/EconomyModel.cs b/Model/Economy/EconomyModel.cs index 19bd4fd..b017184 100644 --- a/Model/Economy/EconomyModel.cs +++ b/Model/Economy/EconomyModel.cs @@ -1,9 +1,10 @@ using System.Collections.Generic; -using Model.Immortal.Entity; +using Model.Entity; -namespace Model.Immortal.Economy; +namespace Model.Economy; -public class EconomyModel { +public class EconomyModel +{ public int Interval { get; set; } = 0; public float Alloy { get; set; } = 0; public float Ether { get; set; } = 0; diff --git a/Model/Economy/EconomyOverTimeModel.cs b/Model/Economy/EconomyOverTimeModel.cs index c0f6221..c7bfcf7 100644 --- a/Model/Economy/EconomyOverTimeModel.cs +++ b/Model/Economy/EconomyOverTimeModel.cs @@ -1,17 +1,20 @@ using System; using System.Collections.Generic; using System.Linq; -using Model.Immortal.BuildOrders; -using Model.Immortal.Entity; -using Model.Immortal.Types; +using Model.BuildOrders; +using Model.Entity; +using Model.Types; -namespace Model.Immortal.Economy; +namespace Model.Economy; -public class EconomyOverTimeModel { +public class EconomyOverTimeModel +{ public List EconomyOverTime { get; set; } = new(); - public void Calculate(BuildOrderModel buildOrder, int timing, int fromInterval) { - if (EconomyOverTime == null) { + public void Calculate(BuildOrderModel buildOrder, int timing, int fromInterval) + { + if (EconomyOverTime == null) + { EconomyOverTime = new List(); for (var interval = 0; interval < timing; interval++) EconomyOverTime.Add(new EconomyModel { Interval = interval }); @@ -22,9 +25,11 @@ public class EconomyOverTimeModel { while (EconomyOverTime.Count < timing) EconomyOverTime.Add(new EconomyModel { Interval = EconomyOverTime.Count - 1 }); - for (var interval = fromInterval; interval < timing; interval++) { + for (var interval = fromInterval; interval < timing; interval++) + { var economyAtSecond = EconomyOverTime[interval]; - if (interval > 0) { + if (interval > 0) + { economyAtSecond.Alloy = EconomyOverTime[interval - 1].Alloy; economyAtSecond.Ether = EconomyOverTime[interval - 1].Ether; economyAtSecond.WorkerCount = EconomyOverTime[interval - 1].WorkerCount; @@ -45,10 +50,12 @@ public class EconomyOverTimeModel { select harvester).ToList(); // Add funds - foreach (var entity in economyAtSecond.Harvesters) { + foreach (var entity in economyAtSecond.Harvesters) + { var harvester = entity.Harvest(); if (harvester.RequiresWorker) - if (harvester.Resource == ResourceType.Alloy) { + if (harvester.Resource == ResourceType.Alloy) + { var usedWorkers = Math.Min(harvester.Slots, freeWorkers); economyAtSecond.Alloy += harvester.HarvestedPerInterval * usedWorkers; freeWorkers -= usedWorkers; @@ -56,7 +63,8 @@ public class EconomyOverTimeModel { if (usedWorkers < harvester.Slots) workersNeeded += 1; } - if (harvester.RequiresWorker == false) { + if (harvester.RequiresWorker == false) + { if (harvester.Resource == ResourceType.Ether) economyAtSecond.Ether += harvester.HarvestedPerInterval * harvester.Slots; @@ -68,20 +76,24 @@ public class EconomyOverTimeModel { // Create new worker if (economyAtSecond.CreatingWorkerCount > 0) for (var i = 0; i < economyAtSecond.CreatingWorkerDelays.Count; i++) - if (economyAtSecond.CreatingWorkerDelays[i] > 0) { - if (economyAtSecond.Alloy > 2.5f) { + if (economyAtSecond.CreatingWorkerDelays[i] > 0) + { + if (economyAtSecond.Alloy > 2.5f) + { economyAtSecond.Alloy -= 2.5f; economyAtSecond.CreatingWorkerDelays[i]--; } } - else { + else + { economyAtSecond.CreatingWorkerCount -= 1; economyAtSecond.WorkerCount += 1; economyAtSecond.CreatingWorkerDelays.Remove(i); i--; } - if (workersNeeded > economyAtSecond.CreatingWorkerCount) { + if (workersNeeded > economyAtSecond.CreatingWorkerCount) + { economyAtSecond.CreatingWorkerCount += 1; economyAtSecond.CreatingWorkerDelays.Add(50); } @@ -89,11 +101,13 @@ public class EconomyOverTimeModel { // Remove Funds from Build Order var ordersAtTime = buildOrder.GetOrdersAt(interval); - foreach (var order in ordersAtTime) { + foreach (var order in ordersAtTime) + { var foundEntity = EntityModel.GetDictionary()[order.DataType]; var production = foundEntity.Production(); - if (production != null) { + if (production != null) + { economyAtSecond.Alloy -= production.Alloy; economyAtSecond.Ether -= production.Ether; var finishedAt = interval + production.BuildTime; @@ -104,7 +118,8 @@ public class EconomyOverTimeModel { // Handle new entities var completedAtInterval = buildOrder.GetCompletedAt(interval); - foreach (var newEntity in completedAtInterval) { + foreach (var newEntity in completedAtInterval) + { var harvest = newEntity; if (harvest != null) economyAtSecond.Harvesters.Add(harvest); diff --git a/Model/Economy/Enums/HarvesterType.cs b/Model/Economy/Enums/HarvesterType.cs index e79c4f5..e01145d 100644 --- a/Model/Economy/Enums/HarvesterType.cs +++ b/Model/Economy/Enums/HarvesterType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Economy.Enums; +namespace Model.Economy.Enums; -public enum HarvesterType { +public enum HarvesterType +{ Worker, EtherExtractor, Bastion diff --git a/Model/Economy/Enums/RequestType.cs b/Model/Economy/Enums/RequestType.cs index c4ff555..4ac36fe 100644 --- a/Model/Economy/Enums/RequestType.cs +++ b/Model/Economy/Enums/RequestType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Economy.Enums; +namespace Model.Economy.Enums; -public enum RequestType { +public enum RequestType +{ Unit, Building } \ No newline at end of file diff --git a/Model/Economy/Enums/WorkerStateType.cs b/Model/Economy/Enums/WorkerStateType.cs index d8212e5..df6d7b9 100644 --- a/Model/Economy/Enums/WorkerStateType.cs +++ b/Model/Economy/Enums/WorkerStateType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Economy.Enums; +namespace Model.Economy.Enums; -public enum WorkerStateType { +public enum WorkerStateType +{ Building, Unit } \ No newline at end of file diff --git a/Model/Entity/Data/DATA.cs b/Model/Entity/Data/DATA.cs index 569e0b7..45ac578 100644 --- a/Model/Entity/Data/DATA.cs +++ b/Model/Entity/Data/DATA.cs @@ -1,19 +1,22 @@ using System.Collections.Generic; -using System.Security.Cryptography; -using Model.Immortal.Entity.Parts; -using Model.Immortal.Types; +using Model.Entity.Parts; +using Model.Types; using Newtonsoft.Json; -namespace Model.Immortal.Entity.Data; +namespace Model.Entity.Data; -public class DATA { - public static string AsJson() { +public class DATA +{ + public static string AsJson() + { var json = JsonConvert.SerializeObject(Get(), Formatting.Indented); return json; } - public static Dictionary Get() { - return new Dictionary { + public static Dictionary Get() + { + return new Dictionary + { // Neutrals // Pyre Events @@ -22,13 +25,15 @@ public class DATA { .AddPart(new EntityInfoModel { Name = "Pyre Camp", Description = "Provides 25 when taken." }) .AddPart(new EntityPyreRewardModel { BaseReward = 25 }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "2" }) - }, { + }, + { DataType.PYREEVENT_MinerTaken, new EntityModel(DataType.PYREEVENT_MinerTaken, EntityType.Pyre_Event) .AddPart(new EntityInfoModel { Name = "Pyre Camp", Description = "Provides 90 when taken." }) .AddPart(new EntityPyreRewardModel { BaseReward = 0, OverTimeRewardDuration = 90, OverTimeReward = 1 }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "2" }) - }, { + }, + { DataType.PYREEVENT_TowerKilled, new EntityModel(DataType.PYREEVENT_TowerKilled, EntityType.Pyre_Event) .AddPart(new EntityInfoModel { Name = "Tower Taken", Description = "Provides 10 when destroyed." }) .AddPart(new EntityPyreRewardModel { BaseReward = 10 }) @@ -38,14 +43,22 @@ public class DATA { // TEAPOTS { DataType.TEAPOT_Teapot, new EntityModel(DataType.TEAPOT_Teapot, EntityType.Teapot) - .AddPart(new EntityInfoModel { Name = "Teapot", Description = "Basic scout. Every faction has this", Notes = @"Very powerful! So Fast" }) + .AddPart(new EntityInfoModel + { + Name = "Teapot", Description = "Basic scout. Every faction has this", + Notes = @"Very powerful! So Fast" + }) .AddPart(new EntityVitalityModel { Health = 70, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 400 }) - }, + }, { DataType.TEAPOT_FlyingTeapot, new EntityModel(DataType.TEAPOT_FlyingTeapot, EntityType.Teapot) - .AddPart(new EntityInfoModel { Name = "Flying Teapot", Description = "Basic observer. Can fly and see hidden units", Notes = @"Much flying, Wow!" }) - .AddPart(new EntityRequirementModel{ DataType = DataType.TEAPOT_Teapot }) + .AddPart(new EntityInfoModel + { + Name = "Flying Teapot", Description = "Basic observer. Can fly and see hidden units", + Notes = @"Much flying, Wow!" + }) + .AddPart(new EntityRequirementModel { DataType = DataType.TEAPOT_Teapot }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 50 }) .AddPart(new EntityVitalityModel { Health = 70, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 400, Movement = MovementType.Air }) @@ -55,49 +68,57 @@ public class DATA { { DataType.FAMILY_Rae, new EntityModel(DataType.FAMILY_Rae, EntityType.Family, true) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Rae" }) - }, + }, { DataType.FAMILY_Sylv, new EntityModel(DataType.FAMILY_Sylv, EntityType.Family, true) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Sylv" }) - }, + }, { DataType.FAMILY_Angelic, new EntityModel(DataType.FAMILY_Angelic, EntityType.Family, true) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Angelic" }) - }, { + }, + { DataType.FAMILY_Human, new EntityModel(DataType.FAMILY_Human, EntityType.Family, true) - .AddPart(new EntityInfoModel { - Name = "Human", + .AddPart(new EntityInfoModel + { + Name = "Human" }) - }, + }, { DataType.FAMILY_Coalition, new EntityModel(DataType.FAMILY_Coalition, EntityType.Family, true) - .AddPart(new EntityInfoModel { - Name = "Coalition?", + .AddPart(new EntityInfoModel + { + Name = "Coalition?" }) - }, + }, { DataType.FAMILY_Demonic, new EntityModel(DataType.FAMILY_Demonic, EntityType.Family, true) - .AddPart(new EntityInfoModel { - Name = "Demonic?", + .AddPart(new EntityInfoModel + { + Name = "Demonic?" }) - }, + }, { DataType.FAMILY_NazRa, new EntityModel(DataType.FAMILY_NazRa, EntityType.Family, true) - .AddPart(new EntityInfoModel { - Name = "Naz'Ra", + .AddPart(new EntityInfoModel + { + Name = "Naz'Ra" }) }, // Factions @@ -105,32 +126,37 @@ public class DATA { { DataType.FACTION_Aru, new EntityModel(DataType.FACTION_Aru, EntityType.Faction) - .AddPart(new EntityInfoModel { - Name = "Aru", + .AddPart(new EntityInfoModel + { + Name = "Aru" }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "Overgrowth", Description = "Your units have an extra layer of health a regens rapidly when a unit hasn't been damaged recently. This regen is doubled on rootway." }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "Blood", Description = "Your casters passively get blood for spells. This blood regen rate is increased on rootway. Your casters can also spend their own life as blood. (Spending health as blood is currenly not in game.)" }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "Blood Wells", Description = "You can summon blood wells for pyre, that allow you to heal your units health and mana." }) - }, + }, { DataType.FACTION_Iratek, new EntityModel(DataType.FACTION_Iratek, EntityType.Faction, true) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Iratek" }) - }, + }, { DataType.FACTION_Yul, new EntityModel(DataType.FACTION_Yul, EntityType.Faction, true) @@ -141,22 +167,25 @@ public class DATA { { DataType.FACTION_QRath, new EntityModel(DataType.FACTION_QRath, EntityType.Faction) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Q'Rath", Notes = "Angelic faction that has adopted many humans into their ranks. They seek to bring more into their collective." }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "Wards", Description = "Your units have an extra layer of health that is always (but slowly) regenerates. The regeneration is double on Hallowed Ground." }) - }, + }, { DataType.FACTION_YRiah, new EntityModel(DataType.FACTION_QRath, EntityType.Faction, true) .AddPart(new EntityInfoModel { Name = "R'Raih" }) - }, { + }, + { DataType.FACTION_ArkShai, new EntityModel(DataType.FACTION_QRath, EntityType.Faction, true) .AddPart(new EntityInfoModel @@ -168,12 +197,12 @@ public class DATA { DataType.FACTION_Jora, new EntityModel(DataType.FACTION_Jora, EntityType.Faction, true) .AddPart(new EntityInfoModel { Name = "Jora" }) - }, + }, { DataType.FACTION_Telmetra, new EntityModel(DataType.FACTION_Telmetra, EntityType.Faction, true) .AddPart(new EntityInfoModel { Name = "Talmetra" }) - }, + }, { DataType.FACTION_Kjor, new EntityModel(DataType.FACTION_Kjor, EntityType.Faction, true) @@ -186,8 +215,8 @@ public class DATA { { DataType.FACTION_Herlesh, new EntityModel(DataType.FACTION_Herlesh, EntityType.Faction, true) - .AddPart(new EntityInfoModel { Name = "Herlesh"}) - }, + .AddPart(new EntityInfoModel { Name = "Herlesh" }) + }, // Factions // Coalition { @@ -202,11 +231,13 @@ public class DATA { new EntityModel(DataType.IMMORTAL_Mala, EntityType.Immortal) .AddPart(new EntityInfoModel { Name = ImmortalType.Mala }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { Resource = ResourceType.Pyre, HarvestedPerInterval = 1, HarvestDelay = 3, RequiresWorker = false, Slots = 1, TotalAmount = -1 }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "Mother's Hunger", Description = "Grants 1 pyre when a unit dies within 600 range of a blood well." }) @@ -217,16 +248,19 @@ public class DATA { .AddPart(new EntityIdPyreSpellModel { Id = DataType.ISPELL_RainOfBlood }) .AddPart(new EntityIdVanguardModel { Id = DataType.VANGUARD_Incubator_Mala }) .AddPart(new EntityIdVanguardModel { Id = DataType.VANGUARD_DreadSister_Mala }) - }, { + }, + { DataType.IMMORTAL_Xol, new EntityModel(DataType.IMMORTAL_Xol, EntityType.Immortal) .AddPart(new EntityInfoModel { Name = ImmortalType.Xol }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { Resource = ResourceType.Pyre, HarvestedPerInterval = 1, HarvestDelay = 3, RequiresWorker = false, Slots = 1, TotalAmount = -1 }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "[PlaceholderText] Instincts", Description = "[PlaceholderText] Your units can sense nearby enemies in the fog of war. (Not implemented)" @@ -245,11 +279,13 @@ public class DATA { new EntityModel(DataType.IMMORTAL_Ajari, EntityType.Immortal) .AddPart(new EntityInfoModel { Name = ImmortalType.Ajari }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { Resource = ResourceType.Pyre, HarvestedPerInterval = 1, HarvestDelay = 3, RequiresWorker = false, Slots = 1, TotalAmount = -1 }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "[PlaceholderText] Healing Hallowed Ground", Description = "[PlaceholderText] Your Hallowed Ground also heals units." }) @@ -259,16 +295,19 @@ public class DATA { .AddPart(new EntityIdPyreSpellModel { Id = DataType.ISPELL_HeavensAegis }) .AddPart(new EntityIdVanguardModel { Id = DataType.VANGUARD_Saoshin_Ajari }) .AddPart(new EntityIdVanguardModel { Id = DataType.VANGUARD_ArkMother_Ajari }) - }, { + }, + { DataType.IMMORTAL_Orzum, new EntityModel(DataType.IMMORTAL_Orzum, EntityType.Immortal) .AddPart(new EntityInfoModel { Name = ImmortalType.Orzum }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { Resource = ResourceType.Pyre, HarvestedPerInterval = 1, HarvestDelay = 3, RequiresWorker = false, Slots = 1, TotalAmount = -1 }) - .AddPart(new EntityPassiveModel { + .AddPart(new EntityPassiveModel + { Name = "[PlaceholderText] Expansionist", Description = "[PlaceholderText] Your towers cost 25 less pyre." }) @@ -287,10 +326,12 @@ public class DATA { .AddPart(new EntityInfoModel { Name = "Attack", Description = "Makes selected units attack targeted area." }) .AddPart(new EntityHotkeyModel { Hotkey = "A", HotkeyGroup = "D" }) - }, { + }, + { DataType.COMMAND_StandGround, new EntityModel(DataType.COMMAND_StandGround, EntityType.Command) - .AddPart(new EntityInfoModel { Name = "Stand Ground", Description = "Makes selected units stop moving." }) + .AddPart(new EntityInfoModel + { Name = "Stand Ground", Description = "Makes selected units stop moving." }) .AddPart(new EntityHotkeyModel { Hotkey = "S", HotkeyGroup = "D" }) }, // Starting Structures @@ -298,22 +339,27 @@ public class DATA { DataType.STARTING_Bastion, new EntityModel(DataType.STARTING_Bastion, EntityType.Building) .AddPart(new EntityInfoModel - { Name = "Bastion", - Description = "Provides a fully upgraded base worth of alloy.", - Notes = "Revives in 40 seconds when destroyed." }) + { + Name = "Bastion", + Description = "Provides a fully upgraded base worth of alloy.", + Notes = "Revives in 40 seconds when destroyed." + }) .AddPart(new EntityFactionModel { Faction = FactionType.Neutral }) .AddPart(new EntityFactionModel { Faction = FactionType.Neutral }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 6, RequiresWorker = false, Resource = ResourceType.Alloy, Slots = 1, TotalAmount = 6000 }) - .AddPart(new EntityVitalityModel{ Health = 500, Armor = ArmorType.Heavy}) - .AddPart(new EntityWeaponModel{ Damage = 30, AttacksPerSecond = 1.401f, Targets = TargetType.All, Range = 700,}) - }, + .AddPart(new EntityVitalityModel { Health = 500, Armor = ArmorType.Heavy }) + .AddPart(new EntityWeaponModel + { Damage = 30, AttacksPerSecond = 1.401f, Targets = TargetType.All, Range = 700 }) + }, { DataType.STARTING_Tower, new EntityModel(DataType.STARTING_Tower, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Starting Tower", Notes = "Currently not in game. Can be upgraded to the factions pyre tower." }) @@ -321,11 +367,12 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Neutral }) .AddPart(new EntityVitalityModel { Health = 1000, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, Range = 800, AttacksPerSecond = 1.124f, Targets = TargetType.All, MediumDamage = 25, HeavyDamage = 30 }) - .AddPart(new EntityIdPassiveModel{Id = DataType.PASSIVE_Respite}) + .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Respite }) }, // Starting Structures // Aru @@ -337,7 +384,8 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityVitalityModel { Health = 2000, DefenseLayer = 400, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 6, TotalAmount = 6000 }) @@ -352,7 +400,8 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityVitalityModel { Health = 1600, DefenseLayer = 800, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 6, RequiresWorker = false, Resource = ResourceType.Alloy, Slots = 1, TotalAmount = 6000 }) @@ -363,7 +412,8 @@ public class DATA { { DataType.VANGUARD_Zentari_Orzum, new EntityModel(DataType.VANGUARD_Zentari_Orzum, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Zentari", Descriptive = DescriptiveType.Frontliner, Description = "Brawler (Ground Unit) - Juggernaut infantry that gain a ranged attack in Hallowed Ground." @@ -371,7 +421,8 @@ public class DATA { .AddPart(new EntityTierModel { Tier = 1 }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Sipari, ImmortalId = DataType.IMMORTAL_Orzum }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Sipari, ImmortalId = DataType.IMMORTAL_Orzum }) .AddPart(new EntityProductionModel { Alloy = 100, BuildTime = 24 }) .AddPart(new EntitySupplyModel { Takes = 4 }) .AddPart(new EntityVitalityModel { Health = 180, DefenseLayer = 100, Armor = ArmorType.Light }) @@ -379,13 +430,16 @@ public class DATA { { Damage = 26, Range = 100, AttacksPerSecond = 0.699f, Targets = TargetType.Ground }) .AddPart(new EntityWeaponModel { Damage = 26, Range = 300, AttacksPerSecond = 0.699f, Targets = TargetType.Ground }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) .AddPart(new EntityMovementModel { Speed = 380, Movement = MovementType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_FaithCastBlades }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_IconOfKhastEem }) - }, { + }, + { DataType.VANGUARD_Sceptre_Orzum, new EntityModel(DataType.VANGUARD_Sceptre_Orzum, EntityType.Army) .AddPart(new EntityInfoModel @@ -396,23 +450,32 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 200, Ether = 125, BuildTime = 40 }) .AddPart(new EntityVitalityModel { Health = 350, DefenseLayer = 120, Armor = ArmorType.Heavy }) .AddPart(new EntitySupplyModel { Takes = 6 }) - .AddPart(new EntityWeaponModel { - Damage = 30, MediumDamage = 35, HeavyDamage = 40, Range = 600, SecondsBetweenAttacks = 1.8f, AttacksPerSecond = 0.637f, - Targets = TargetType.Ground, - }) - .AddPart(new EntityWeaponModel { - Damage = 40, MediumDamage = 45, HeavyDamage = 50, Range = 600, SecondsBetweenAttacks = 1.8f, AttacksPerSecond = 0.637f, - Targets = TargetType.Ground, HasSplash = true + .AddPart(new EntityWeaponModel + { + Damage = 30, MediumDamage = 35, HeavyDamage = 40, Range = 600, SecondsBetweenAttacks = 1.8f, + AttacksPerSecond = 0.637f, + Targets = TargetType.Ground }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityWeaponModel + { + Damage = 40, MediumDamage = 45, HeavyDamage = 50, Range = 600, SecondsBetweenAttacks = 1.8f, + AttacksPerSecond = 0.637f, + Targets = TargetType.Ground, HasSplash = true + }) + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Warden, ImmortalId = DataType.IMMORTAL_Orzum }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Warden, ImmortalId = DataType.IMMORTAL_Orzum }) .AddPart(new EntityMovementModel { Speed = 340, Movement = MovementType.Air }) - }, { + }, + { DataType.VANGUARD_Saoshin_Ajari, new EntityModel(DataType.VANGUARD_Saoshin_Ajari, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Saoshin", Descriptive = DescriptiveType.Force_Multiplier, Description = "Support Caster (Ground Unit) - Has a decent melee attack and can buff units for a short duration. It can also heal." @@ -420,26 +483,33 @@ public class DATA { .AddPart(new EntityTierModel { Tier = 1.5f }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Magi, ImmortalId = DataType.IMMORTAL_Ajari }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Magi, ImmortalId = DataType.IMMORTAL_Ajari }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 75, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 4 }) .AddPart(new EntityVitalityModel { Health = 140, DefenseLayer = 100, Armor = ArmorType.Light, IsEtheric = true }) .AddPart(new EntityMovementModel { Speed = 380, Movement = MovementType.Ground }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Reliquary, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Reliquary, Requirement = RequirementType.Production_Building }) .AddPart(new EntityWeaponModel { Damage = 16, Range = 80, AttacksPerSecond = 0.833f, Targets = TargetType.Ground }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_Leap }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Invervention }) - }, { + }, + { DataType.VANGUARD_ArkMother_Ajari, new EntityModel(DataType.VANGUARD_ArkMother_Ajari, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Ark Mother", Descriptive = DescriptiveType.Dislodger, Description = "Dislodger - Support unit that creates a large area of damage reduction for friendly troops." @@ -447,15 +517,20 @@ public class DATA { .AddPart(new EntityTierModel { Tier = 2 }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HoldSpace = true, HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Hallower, ImmortalId = DataType.IMMORTAL_Ajari }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Hallower, ImmortalId = DataType.IMMORTAL_Ajari }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 100, BuildTime = 40 }) .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel { Energy = 100, Health = 100, DefenseLayer = 100, Armor = ArmorType.Medium, IsEtheric = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_HouseOfFadingSaints, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_HouseOfFadingSaints, Requirement = RequirementType.Research_Building }) .AddPart(new EntityMovementModel { Speed = 335, Movement = MovementType.Ground }) @@ -471,12 +546,15 @@ public class DATA { new EntityModel(DataType.VANGUARD_Incubator_Mala, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Incubator", Descriptive = DescriptiveType.Force_Multiplier }) .AddPart(new EntityTierModel { Tier = 2 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Production_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HoldSpace = true, HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Underspine, ImmortalId = DataType.IMMORTAL_Mala }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Underspine, ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityProductionModel { Alloy = 175, Ether = 50, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel @@ -484,24 +562,31 @@ public class DATA { .AddPart(new EntityMovementModel { Speed = 340, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel { Damage = 16, Range = 700, AttacksPerSecond = 0.606f, Targets = TargetType.Ground }) - .AddPart(new EntityIdPassiveModel() { Id = DataType.PASSIVE_ProjectileGestation }) - }, { + .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_ProjectileGestation }) + }, + { DataType.VANGUARD_DreadSister_Mala, new EntityModel(DataType.VANGUARD_DreadSister_Mala, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Dread Sister", Descriptive = DescriptiveType.Elite_Caster }) .AddPart(new EntityTierModel { Tier = 3 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HoldSpace = true, HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_RedSeer, ImmortalId = DataType.IMMORTAL_Mala }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_RedSeer, ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityProductionModel { Alloy = 60, Ether = 150, BuildTime = 45 }) .AddPart(new EntitySupplyModel { Takes = 4 }) - .AddPart(new EntityVitalityModel { + .AddPart(new EntityVitalityModel + { Energy = 100, Health = 60, DefenseLayer = 75, Armor = ArmorType.Light, Defense = DefenseType.Overgrowth, IsEtheric = false }) @@ -512,17 +597,21 @@ public class DATA { .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_BirthingStorm }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_SummonSiegeMaw }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_BirthingStorm }) - }, { + }, + { DataType.VANGUARD_BoneStalker_Xol, new EntityModel(DataType.VANGUARD_BoneStalker_Xol, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Bone Stalker", Descriptive = DescriptiveType.Generalist }) .AddPart(new EntityTierModel { Tier = 1 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_MaskedHunter, ImmortalId = DataType.IMMORTAL_Xol }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_MaskedHunter, ImmortalId = DataType.IMMORTAL_Xol }) .AddPart(new EntityProductionModel { Alloy = 50, Ether = 0, BuildTime = 40 }) .AddPart(new EntitySupplyModel { Takes = 2 }) .AddPart(new EntityVitalityModel @@ -530,28 +619,36 @@ public class DATA { .AddPart(new EntityMovementModel { Speed = 350, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel { Damage = 11, Range = 400, AttacksPerSecond = 1.02f, Targets = TargetType.All }) - }, { + }, + { DataType.VANGUARD_WhiteWoodReaper_Xol, new EntityModel(DataType.VANGUARD_WhiteWoodReaper_Xol, EntityType.Army) .AddPart(new EntityInfoModel { Name = "White Wood Reaper", Descriptive = DescriptiveType.Assassin }) .AddPart(new EntityTierModel { Tier = 3 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityVanguardAddedModel { ReplaceId = DataType.UNIT_Bloodbound, ImmortalId = DataType.IMMORTAL_Xol }) + .AddPart(new EntityVanguardAddedModel + { ReplaceId = DataType.UNIT_Bloodbound, ImmortalId = DataType.IMMORTAL_Xol }) .AddPart(new EntityProductionModel { Alloy = 80, Ether = 80, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 4 }) - .AddPart(new EntityVitalityModel { + .AddPart(new EntityVitalityModel + { Energy = 60, Health = 80, DefenseLayer = 40, Defense = DefenseType.Overgrowth, Armor = ArmorType.Medium, IsEtheric = false }) .AddPart(new EntityMovementModel { Speed = 448, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 40, Range = 100, AttacksPerSecond = 1, Targets = TargetType.Ground }) @@ -569,33 +666,41 @@ public class DATA { .AddPart(new EntityMovementModel { Speed = 400, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel { Damage = 5, Range = 50, AttacksPerSecond = 1.887f, Targets = TargetType.Ground }) - }, { + }, + { DataType.UNIT_Sipari, new EntityModel(DataType.UNIT_Sipari, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Sipari", Descriptive = DescriptiveType.Frontliner, Description = @"Melee Warrior (Ground Unit) - Front-line warriors enchanced by Hallowed Ground." }) .AddPart(new EntityTierModel { Tier = 1 }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "Z" }) - .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Orzum, ReplacedById = DataType.VANGUARD_Zentari_Orzum }) + .AddPart(new EntityVanguardReplacedModel + { ImmortalId = DataType.IMMORTAL_Orzum, ReplacedById = DataType.VANGUARD_Zentari_Orzum }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 75, BuildTime = 25 }) .AddPart(new EntitySupplyModel { Takes = 3 }) .AddPart(new EntityVitalityModel { Health = 140, DefenseLayer = 70, Armor = ArmorType.Light }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) .AddPart(new EntityMovementModel { Speed = 380, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, HeavyDamage = 18, Range = 180, AttacksPerSecond = 0.699f, SecondsBetweenAttacks = 1.43f, Targets = TargetType.Ground }) - }, { + }, + { DataType.UNIT_Magi, new EntityModel(DataType.UNIT_Magi, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Magi", Descriptive = DescriptiveType.Force_Multiplier, Description = "Support Caster (Ground Unit) - Heal allies. Can deploy to create Hallowed Ground." @@ -605,26 +710,35 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 75, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 3 }) - .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Ajari, ReplacedById = DataType.VANGUARD_Saoshin_Ajari }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityVanguardReplacedModel + { ImmortalId = DataType.IMMORTAL_Ajari, ReplacedById = DataType.VANGUARD_Saoshin_Ajari }) + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Reliquary, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Reliquary, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Energy = 100, Health = 50, DefenseLayer = 50, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 335, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel - { Damage = 7, Range = 600, SecondsBetweenAttacks = 0.94f ,AttacksPerSecond = 1.408f, Targets = - TargetType.All }) + { + Damage = 7, Range = 600, SecondsBetweenAttacks = 0.94f, AttacksPerSecond = 1.408f, Targets = + TargetType.All + }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_DeployMagi }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_MobilizeQrath }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_MendingCommand }) - }, { + }, + { DataType.UNIT_Zephyr, new EntityModel(DataType.UNIT_Zephyr, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Zephyr", Descriptive = DescriptiveType.Generalist, Description = "Ranged Generalist (Ground Unit) - Can attack ground and air. Has a short-ranged teleport ability for advanced mobility." @@ -634,23 +748,30 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 40, BuildTime = 30 }) .AddPart(new EntitySupplyModel { Takes = 4 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Reliquary, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Reliquary, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 180, DefenseLayer = 90, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 350, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, MediumDamage = 24, HeavyDamage = 28, Range = 500, AttacksPerSecond = 0.667f, Targets = TargetType.All }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_Windstep }) - }, { + }, + { DataType.UNIT_Dervish, new EntityModel(DataType.UNIT_Dervish, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Dervish", Descriptive = DescriptiveType.Harrier, Description = "Skirmisher (Ground Unit) - Swift unit used to harrass enemy outposts. Can only attack ground." @@ -661,19 +782,24 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 125, Ether = 10, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 4 }) .AddPart(new EntityVitalityModel { Health = 140, DefenseLayer = 100, Armor = ArmorType.Medium }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) .AddPart(new EntityMovementModel { Speed = 435, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, LightDamage = 40, MediumDamage = 30, Range = 250, AttacksPerSecond = 0.5f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_SiroccoScript }) - }, { + }, + { DataType.UNIT_Absolver, new EntityModel(DataType.UNIT_Absolver, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Absolver", Descriptive = DescriptiveType.Zone_Control, Description = "Zone Control (Ground Unit) - Deploys to gain increased rate of fire to hold a position. Can only attack ground." @@ -684,26 +810,31 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 150, Ether = 75, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel { Health = 175, DefenseLayer = 150, Armor = ArmorType.Medium }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) .AddPart(new EntityMovementModel { Speed = 315, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 11, MediumDamage = 13, HeavyDamage = 15, StructureDamageBonus = 8, Range = 800, AttacksPerSecond = 1.25f, Targets = TargetType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 4, MediumDamage = 6, HeavyDamage = 8, Range = 800, AttacksPerSecond = 2.857f, Targets = TargetType.Ground }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_DeployAbsolver }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_MobilizeQrath }) .AddPart(new EntityPassiveModel { Name = "?", Description = "Hits multiple units when deployed." }) - }, + }, { DataType.UNIT_Castigator, new EntityModel(DataType.UNIT_Castigator, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Castigator", Descriptive = DescriptiveType.Air_Denial, Description = "Air Denial (Ground Unit) - A tough walker with a powerful, long-range anti-air attack." @@ -715,20 +846,25 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel { Health = 200, DefenseLayer = 100, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 340, Movement = MovementType.Ground }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, MediumDamage = 30, HeavyDamage = 40, Range = 800, AttacksPerSecond = 0.704f, Targets = TargetType.Air, EthericDamageBonus = 10 }) .AddPart(new EntityWeaponModel { Damage = 8, Range = 500, AttacksPerSecond = 1.429f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_RelicOfTheWrathfulGaze }) - }, { + }, + { DataType.UNIT_Hallower, new EntityModel(DataType.UNIT_Hallower, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Hallower", Descriptive = DescriptiveType.Dislodger, Description = "Dislodger (Ground Unit) - Long range artillery that can break entrenched enemy positions. Can only attack ground." @@ -740,22 +876,29 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 75, BuildTime = 35 }) .AddPart(new EntitySupplyModel { Takes = 5 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_HouseOfFadingSaints, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_HouseOfFadingSaints, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 100, DefenseLayer = 130, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 335, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 60, MediumDamage = 80, HeavyDamage = 100, Range = 1300, AttacksPerSecond = 0.143f, Targets = TargetType.Ground }) - }, { + }, + { DataType.UNIT_Sentinel, new EntityModel(DataType.UNIT_Sentinel, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Sentinel", Descriptive = DescriptiveType.Air_Superiority, Description = "Flying Anti-Air Angel" }) @@ -766,17 +909,21 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel { Health = 150, DefenseLayer = 100, Armor = ArmorType.Medium }) .AddPart(new EntityMovementModel { Speed = 525, Movement = MovementType.Air }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 28, Range = 500, AttacksPerSecond = 0.714f, Targets = TargetType.Air }) - }, + }, { DataType.UNIT_Throne, new EntityModel(DataType.UNIT_Throne, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Throne", Descriptive = DescriptiveType.Generalist, Description = "Crown Jewel (Flying Unit) - Massive flying bruiser that automatically attacks nearby units with its swords, even while moving." @@ -787,43 +934,53 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, Ether = 100, BuildTime = 50 }) .AddPart(new EntitySupplyModel { Takes = 9 }) .AddPart(new EntityVitalityModel { Health = 350, DefenseLayer = 200, Armor = ArmorType.Heavy }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_BearerOfTheCrown, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BearerOfTheCrown, Requirement = RequirementType.Research_Building }) .AddPart(new EntityMovementModel { Speed = 262, Movement = MovementType.Air }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 60, Range = 600, AttacksPerSecond = 0.5f, SecondsBetweenAttacks = 2, Targets = TargetType.All }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_BladesOfTheGodhead }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_BladesOfTheGodhead }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_GodstoneBulwark }) - }, + }, { DataType.UNIT_Warden, new EntityModel(DataType.UNIT_Warden, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Warden", Descriptive = DescriptiveType.Harrier, Description = @"Gunship (Flying Unit) - Air-to-ground specialist. Flight allos it to ignore terrain." }) .AddPart(new EntityTierModel { Tier = 3 }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HoldSpace = true, HotkeyGroup = "Z" }) - .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Orzum, ReplacedById = DataType.VANGUARD_Sceptre_Orzum }) + .AddPart(new EntityVanguardReplacedModel + { ImmortalId = DataType.IMMORTAL_Orzum, ReplacedById = DataType.VANGUARD_Sceptre_Orzum }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 175, Ether = 100, BuildTime = 40 }) .AddPart(new EntitySupplyModel { Takes = 6 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 300, DefenseLayer = 80, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 420, Movement = MovementType.Air }) .AddPart(new EntityWeaponModel { Damage = 32, Range = 600, AttacksPerSecond = 0.556f, Targets = TargetType.Ground }) - }, { + }, + { DataType.UNIT_SharU, new EntityModel(DataType.UNIT_SharU, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Shar'U", Descriptive = DescriptiveType.Elite_Caster }) @@ -832,16 +989,21 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 110, Ether = 175, BuildTime = 55 }) .AddPart(new EntitySupplyModel { Takes = 6 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_EyeOfAros, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_EyeOfAros, Requirement = RequirementType.Research_Building }) .AddPart(new EntityVitalityModel { Health = 175, DefenseLayer = 125, IsEtheric = true, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 315, Movement = MovementType.Air }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 10, Range = 650, AttacksPerSecond = 0.714f, SecondsBetweenAttacks = 1.4f, Targets = TargetType.All }) @@ -855,17 +1017,21 @@ public class DATA { .AddPart(new EntityInfoModel { Name = "Symbiote", Descriptive = DescriptiveType.Worker }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 50, BuildTime = 20 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_GroveHeart, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_GroveHeart, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 50, DefenseLayer = 10, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 400, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel { Damage = 8, Range = 40, AttacksPerSecond = 1.25f, Targets = TargetType.Ground }) - }, { + }, + { DataType.UNIT_MaskedHunter, new EntityModel(DataType.UNIT_MaskedHunter, EntityType.Army) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Masked Hunter", Descriptive = DescriptiveType.Generalist, Description = "Ranged Generalist (Ground Unit) - Can attack ground and air, and sacrifice health for a temporary boost to its range and speed." @@ -874,7 +1040,9 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "Z" }) .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Xol, ReplacedById = DataType.VANGUARD_BoneStalker_Xol }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) @@ -887,15 +1055,20 @@ public class DATA { { Damage = 7, Range = 400, AttacksPerSecond = 1.4f, Targets = TargetType.All, HeavyDamage = 6 }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_Offering }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_BloodMothersFevor }) - }, { + }, + { DataType.UNIT_Xacal, new EntityModel(DataType.UNIT_Xacal, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Xacal", Descriptive = DescriptiveType.Frontliner }) .AddPart(new EntityTierModel { Tier = 1.5f }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "Z" }) @@ -904,23 +1077,29 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 3 }) .AddPart(new EntityVitalityModel { Health = 160, DefenseLayer = 70, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 378, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 15, MediumDamage = 20, HeavyDamage = 25, Range = 400, AttacksPerSecond = 0.56f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_XacalDamage }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_XacalDamage }) - }, { + }, + { DataType.UNIT_Bloodbound, new EntityModel(DataType.UNIT_Bloodbound, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Bloodbound", Descriptive = DescriptiveType.Assassin }) .AddPart(new EntityTierModel { Tier = 3 }) .AddPart(new EntityVanguardReplacedModel - { ImmortalId = DataType.IMMORTAL_Xol, ReplacedById = DataType.VANGUARD_WhiteWoodReaper_Xol }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + { ImmortalId = DataType.IMMORTAL_Xol, ReplacedById = DataType.VANGUARD_WhiteWoodReaper_Xol }) + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "Z" }) @@ -930,12 +1109,13 @@ public class DATA { .AddPart(new EntityVitalityModel { Energy = 60, Health = 100, DefenseLayer = 40, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 434, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 30, MediumDamage = 40, LightDamage = 50, Range = 80, AttacksPerSecond = 0.714f, Targets = TargetType.Ground }) - .AddPart(new EntityIdPassiveModel() { Id = DataType.PASSIVE_QuenchingScythes }) - }, + .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_QuenchingScythes }) + }, { DataType.UNIT_RedSeer, new EntityModel(DataType.UNIT_RedSeer, EntityType.Army) @@ -943,17 +1123,22 @@ public class DATA { .AddPart(new EntityTierModel { Tier = 3 }) .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Mala, ReplacedById = DataType.VANGUARD_DreadSister_Mala }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HoldSpace = true, HotkeyGroup = "Z" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 40, Ether = 140, BuildTime = 40 }) .AddPart(new EntitySupplyModel { Takes = 3 }) - .AddPart(new EntityVitalityModel { + .AddPart(new EntityVitalityModel + { Energy = 100, Health = 60, DefenseLayer = 75, Defense = DefenseType.Overgrowth, IsEtheric = true, Armor = ArmorType.Light }) @@ -963,18 +1148,25 @@ public class DATA { .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_BloodPlague }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_DrainingEmbrace }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_AwakenAcaaluk }) - }, { + }, + { DataType.UNIT_Underspine, new EntityModel(DataType.UNIT_Underspine, EntityType.Army) .AddPart(new EntityInfoModel - { Name = "Underspine", Descriptive = DescriptiveType.Force_Multiplier, Notes = "Has +5 HP regen when burrowed."}) + { + Name = "Underspine", Descriptive = DescriptiveType.Force_Multiplier, + Notes = "Has +5 HP regen when burrowed." + }) .AddPart(new EntityTierModel { Tier = 2 }) - .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Mala, ReplacedById = DataType.VANGUARD_Incubator_Mala }) - .AddPart(new EntityRequirementModel { + .AddPart(new EntityVanguardReplacedModel + { ImmortalId = DataType.IMMORTAL_Mala, ReplacedById = DataType.VANGUARD_Incubator_Mala }) + .AddPart(new EntityRequirementModel + { DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel { + .AddPart(new EntityRequirementModel + { DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) @@ -985,20 +1177,27 @@ public class DATA { .AddPart(new EntityVitalityModel { Health = 140, DefenseLayer = 40, Armor = ArmorType.Medium }) .AddPart(new EntityMovementModel { Speed = 350, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel - { Damage = 9, Range = 700, SecondsBetweenAttacks = 1.2529f, Targets = - TargetType.All }) + { + Damage = 9, Range = 700, SecondsBetweenAttacks = 1.2529f, Targets = + TargetType.All + }) .AddPart(new EntityWeaponModel - { Damage = 9, Range = 600, SecondsBetweenAttacks = 0.7143f, Targets = - TargetType.Ground }) + { + Damage = 9, Range = 600, SecondsBetweenAttacks = 0.7143f, Targets = + TargetType.Ground + }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_DeployMobilizeUnderSpine }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_MobilizeAru }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_OssifyingSwarm }) - }, { + }, + { DataType.UNIT_Ichor, new EntityModel(DataType.UNIT_Ichor, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Ichor", Descriptive = DescriptiveType.Harrier }) .AddPart(new EntityTierModel { Tier = 2 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Production_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "Z" }) @@ -1007,21 +1206,27 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 4 }) .AddPart(new EntityVitalityModel { Health = 100, DefenseLayer = 40, Armor = ArmorType.Medium }) .AddPart(new EntityMovementModel { Speed = 382, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 13, LightDamage = 32, MediumDamage = 19, Range = 500, AttacksPerSecond = 0.7f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_DenInstinct }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_PursuitLigaments }) - }, { + }, + { DataType.UNIT_Resinant, new EntityModel(DataType.UNIT_Resinant, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Resinant", Descriptive = DescriptiveType.Zone_Control }) .AddPart(new EntityTierModel { Tier = 2.5f }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "Z" }) @@ -1030,26 +1235,33 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 5 }) .AddPart(new EntityVitalityModel { Health = 175, DefenseLayer = 60, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 350, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 25, MediumDamage = 40, HeavyDamage = 55, Range = 800, AttacksPerSecond = 0.7f, Targets = TargetType.Ground }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 50, MediumDamage = 60, HeavyDamage = 70, Range = 1000, AttacksPerSecond = 0.467f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_ResinantDeploy }) .AddPart(new EntityIdAbilityModel { Id = DataType.ABILITY_MobilizeAru }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_EngorgedArteries }) - }, { + }, + { DataType.UNIT_Aarox, new EntityModel(DataType.UNIT_Aarox, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Aarox", Descriptive = DescriptiveType.Air_Superiority }) .AddPart(new EntityTierModel { Tier = 3 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_BoneCanopy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BoneCanopy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HoldSpace = true, HotkeyGroup = "Z" }) @@ -1059,15 +1271,21 @@ public class DATA { .AddPart(new EntityVitalityModel { Health = 35, DefenseLayer = 10, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 532, Movement = MovementType.Air }) .AddPart(new EntityWeaponModel - { LightDamage = 75, MediumDamage = 100, HeavyDamage = 125,Range = 20, AttacksPerSecond = 1, Targets = - TargetType.Air }) + { + LightDamage = 75, MediumDamage = 100, HeavyDamage = 125, Range = 20, AttacksPerSecond = 1, + Targets = + TargetType.Air + }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_AaroxBurn }) - }, { + }, + { DataType.UNIT_Thrum, new EntityModel(DataType.UNIT_Thrum, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Thrum", Descriptive = DescriptiveType.Harrier }) .AddPart(new EntityTierModel { Tier = 3 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_BoneCanopy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BoneCanopy, Requirement = RequirementType.Production_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HoldSpace = true, HotkeyGroup = "Z" }) @@ -1076,17 +1294,20 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 3 }) .AddPart(new EntityVitalityModel { Health = 120, DefenseLayer = 40, Armor = ArmorType.Light }) .AddPart(new EntityMovementModel { Speed = 525, Movement = MovementType.Air }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 11, HeavyDamage = 9, Range = 350, AttacksPerSecond = 0.8f, Targets = TargetType.All }) - .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_ThrumAttackSpeed }) - }, { + }, + { DataType.UNIT_WraithBow, new EntityModel(DataType.UNIT_WraithBow, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Wraith Bow", Descriptive = DescriptiveType.Air_Denial }) .AddPart(new EntityTierModel { Tier = 2 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Production_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HoldSpace = true, HotkeyGroup = "Z" }) @@ -1100,15 +1321,20 @@ public class DATA { .AddPart(new EntityWeaponModel { Damage = 9, Range = 500, AttacksPerSecond = 0.714f, Targets = TargetType.Ground }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_GuidingAmber }) - }, { + }, + { DataType.UNIT_Behemoth, new EntityModel(DataType.UNIT_Behemoth, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Behemoth", Descriptive = DescriptiveType.Skirmisher }) .AddPart(new EntityTierModel { Tier = 3.5f }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_BoneCanopy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BoneCanopy, Requirement = RequirementType.Production_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityHotkeyModel { Hotkey = "A", HoldSpace = true, HotkeyGroup = "Z" }) @@ -1117,13 +1343,15 @@ public class DATA { .AddPart(new EntitySupplyModel { Takes = 8 }) .AddPart(new EntityVitalityModel { Health = 350, DefenseLayer = 100, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 210, Movement = MovementType.Air }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 0, Range = 600, AttacksPerSecond = 0.588f, SecondsBetweenAttacks = 1.7f, Targets = TargetType.Ground }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_BehemothCapacity }) .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_SpawnQuitl }) - }, { + }, + { DataType.SUMMON_Quitl, new EntityModel(DataType.SUMMON_Quitl, EntityType.Army) .AddPart(new EntityInfoModel { Name = "Quitl", Descriptive = DescriptiveType.Summon }) @@ -1136,30 +1364,37 @@ public class DATA { { DataType.UPGRADE_FaithCastBlades, new EntityModel(DataType.UPGRADE_FaithCastBlades, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Faith-Cast Blades", Descriptive = DescriptiveType.Upgrade, Description = "Increases the range of the Zentari's ranged weapon." }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 50, Ether = 100, BuildTime = 60 }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Production_Building + .AddPart(new EntityRequirementModel + { + Requirement = RequirementType.Production_Building }) - }, { + }, + { DataType.UPGRADE_RelicOfTheWrathfulGaze, new EntityModel(DataType.UPGRADE_RelicOfTheWrathfulGaze, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Relic Of The Wrathful Gaze", Descriptive = DescriptiveType.Upgrade, Description = "Increases the Castigator's anti-air weapon range." }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "TAB", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 75, BuildTime = 29 }) - .AddPart(new EntityRequirementModel { + .AddPart(new EntityRequirementModel + { DataType = DataType.BUILDING_HouseOfFadingSaints, Requirement = RequirementType.Production_Building }) - }, { + }, + { DataType.UPGRADE_WindStep, new EntityModel(DataType.UPGRADE_WindStep, EntityType.Tech) .AddPart(new EntityInfoModel @@ -1167,68 +1402,87 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 50, Ether = 75, BuildTime = 55 }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Production_Building }) - }, { + .AddPart(new EntityRequirementModel { Requirement = RequirementType.Production_Building }) + }, + { DataType.UPGRADE_ZephyrRange, new EntityModel(DataType.UPGRADE_ZephyrRange, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Zephyr Range", Descriptive = DescriptiveType.Upgrade, Description = "Increases Zephyr's range by 100." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 100, BuildTime = 43 }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Production_Building}) + .AddPart(new EntityRequirementModel { Requirement = RequirementType.Production_Building }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_WindStep }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_ZephyrRange }) - }, { + }, + { DataType.UPGRADE_SiroccoScript, new EntityModel(DataType.UPGRADE_SiroccoScript, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Sirocco Script", Descriptive = DescriptiveType.Upgrade, Description = "Increases the Dervish's movement speed by 50%." }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 100, BuildTime = 60 }) - .AddPart(new EntityRequirementModel { + .AddPart(new EntityRequirementModel + { DataType = DataType.BUILDING_HouseOfFadingSaints, Requirement = RequirementType.Production_Building }) - }, { + }, + { DataType.UPGRADE_IconOfKhastEem, new EntityModel(DataType.UPGRADE_IconOfKhastEem, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Icon of Khast'Eem", Descriptive = DescriptiveType.Upgrade, Description = "Grants the Zentari shields and flat armor reduction." }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HoldSpace = true, HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 100, BuildTime = 43 }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Production_Building + .AddPart(new EntityRequirementModel + { + Requirement = RequirementType.Production_Building }) - }, { + }, + { DataType.UPGRADE_BladesOfTheGodhead, new EntityModel(DataType.UPGRADE_BladesOfTheGodhead, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Blades of the Godhead", Descriptive = DescriptiveType.Upgrade, Description = "Unlocks Blades of the Godhead" }) .AddPart(new EntityHotkeyModel { Hotkey = "A", HoldSpace = true, HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 75, BuildTime = 45 }) - .AddPart(new EntityRequirementModel { DataType = DataType.BUILDING_BearerOfTheCrown, Requirement = RequirementType.Production_Building }) - }, { + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BearerOfTheCrown, Requirement = RequirementType.Production_Building + }) + }, + { DataType.UPGRADE_WingsOfTheKenLatir, new EntityModel(DataType.UPGRADE_WingsOfTheKenLatir, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Wings of the Ken'Latir", Descriptive = DescriptiveType.Upgrade, Description = "Increases the Warden's speed and shields significantly." }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HoldSpace = true, HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 100, BuildTime = 30 }) - .AddPart(new EntityRequirementModel { DataType = DataType.BUILDING_BearerOfTheCrown, Requirement = RequirementType.Production_Building}) + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BearerOfTheCrown, Requirement = RequirementType.Production_Building + }) }, // Upgrades // Aru @@ -1239,118 +1493,159 @@ public class DATA { { Name = "Offering", Descriptive = DescriptiveType.Upgrade, Description = "Unlocks Offering" }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Production_Building }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 80, BuildTime = 60 }) - }, { + }, + { DataType.UPGRADE_BloodMothersFevor, new EntityModel(DataType.UPGRADE_BloodMothersFevor, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Blood Mother's Fevor", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "V", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 150, BuildTime = 80 }) - }, { + }, + { DataType.UPGRADE_DenInstinct, new EntityModel(DataType.UPGRADE_DenInstinct, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Den Instinct", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 120, BuildTime = 45 }) - }, { + }, + { DataType.UPGRADE_PursuitLigaments, new EntityModel(DataType.UPGRADE_PursuitLigaments, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Pursuit Ligaments", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 100, BuildTime = 45 }) - }, { + }, + { DataType.UPGRADE_ResinantDeploy, new EntityModel(DataType.UPGRADE_ResinantDeploy, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Resinant Deploy", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AmberWomb, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AmberWomb, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 50, Ether = 100, BuildTime = 43 }) - }, { + }, + { DataType.UPGRADE_XacalDamage, new EntityModel(DataType.UPGRADE_XacalDamage, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Xacal Damage", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "TAB" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 75, BuildTime = 60 }) - }, { + }, + { DataType.UPGRADE_BehemothCapacity, new EntityModel(DataType.UPGRADE_BehemothCapacity, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Behemoth Capacity", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "A", HotkeyGroup = "TAB", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_DeepNest, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_DeepNest, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 150, BuildTime = 46 }) - }, { + }, + { DataType.UPGRADE_WraithBowRange, new EntityModel(DataType.UPGRADE_WraithBowRange, EntityType.Tech) - .AddPart(new EntityInfoModel { Name = "Wraith Bow Range", Description = "Increase's the range of the Wraith Bow anti-air attack.", Descriptive = DescriptiveType.Upgrade }) + .AddPart(new EntityInfoModel + { + Name = "Wraith Bow Range", + Description = "Increase's the range of the Wraith Bow anti-air attack.", + Descriptive = DescriptiveType.Upgrade + }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "TAB", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Neurocyte, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Neurocyte, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 50, Ether = 75, BuildTime = 29 }) .AddPart(new EntityIdUpgradeModel { Id = DataType.UPGRADE_WraithBowRange }) - }, { + }, + { DataType.UPGRADE_BloodPlague, new EntityModel(DataType.UPGRADE_BloodPlague, EntityType.Tech) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Blood Plague", Descriptive = DescriptiveType.Upgrade, Description = "Unlocks Blood Plague" }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "TAB", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 120, BuildTime = 80 }) .AddPart(new EntityVanguardReplacedModel { ImmortalId = DataType.IMMORTAL_Xol, ReplacedById = DataType.ABILITY_BirthingStorm }) - }, + }, { DataType.UPGRADE_BirthingStorm, new EntityModel(DataType.UPGRADE_BirthingStorm, EntityType.Tech) .AddPart(new EntityInfoModel { Name = "Birthing Storm", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "TAB", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_RedVale, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_RedVale, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 75, Ether = 120, BuildTime = 80 }) - .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala, ReplaceId = DataType.ABILITY_BloodPlague }) + .AddPart(new EntityVanguardAddedModel + { ImmortalId = DataType.IMMORTAL_Mala, ReplaceId = DataType.ABILITY_BloodPlague }) }, // Passives @@ -1358,31 +1653,34 @@ public class DATA { { DataType.PASSIVE_Respite, new EntityModel(DataType.PASSIVE_Respite, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Respite", Descriptive = DescriptiveType.Ability, Description = @"Nearby units will slowly heal after not attacking for several seconds." }) .AddPart(new EntityFactionModel { Faction = FactionType.Any }) }, - + // Passives // Q'Rath Passives - + { DataType.PASSIVE_MendingCommand, new EntityModel(DataType.PASSIVE_MendingCommand, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mending Command", Descriptive = DescriptiveType.Ability, Description = @"Autocast ability that heals 48 life and 24 shields over 2 seconds." }) - .AddPart(new EntityProductionModel{ Pyre = 10, Cooldown = 3}) + .AddPart(new EntityProductionModel { Pyre = 10, Cooldown = 3 }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - }, + }, { DataType.PASSIVE_StabilizeHallowedGround, new EntityModel(DataType.PASSIVE_StabilizeHallowedGround, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Stabilize Hallowed Ground", Descriptive = DescriptiveType.Ability, Description = @"Generates Hallowed Ground on Stabilized" }) //TODO Add a glossary of terms like for Stabilized @@ -1391,21 +1689,24 @@ public class DATA { { DataType.PASSIVE_GodstoneBulwark, new EntityModel(DataType.PASSIVE_GodstoneBulwark, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Godstone Bulkwark", Descriptive = DescriptiveType.Ability, Description = @"Grants +1 damage reduction." - }) + }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) }, - + { DataType.PASSIVE_Invervention, new EntityModel(DataType.PASSIVE_Invervention, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Intervention", Descriptive = DescriptiveType.Ability, - Description = @"The Saoshin releases healing energy. Allied units nearby heal over several seconds. This automatically activates when the Saoshin drops below 70 HP." - }) - .AddPart(new EntityProductionModel { Pyre = 70, Cooldown = 5}) + Description = + @"The Saoshin releases healing energy. Allied units nearby heal over several seconds. This automatically activates when the Saoshin drops below 70 HP." + }) + .AddPart(new EntityProductionModel { Pyre = 70, Cooldown = 5 }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) }, // Passives @@ -1414,18 +1715,20 @@ public class DATA { { DataType.PASSIVE_ThrumAttackSpeed, new EntityModel(DataType.PASSIVE_ThrumAttackSpeed, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Thrum Attack Speed Boost", Descriptive = DescriptiveType.Ability, Description = @"Thrums gain more attack speed for a short duration when a near by allied Thrum kills an enemy unit" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_XacalDamage, new EntityModel(DataType.PASSIVE_XacalDamage, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Xacal Damage", Descriptive = DescriptiveType.Ability, Description = @"Xacal builds up charges for double damage overtime. These charges can be spent on attacking." @@ -1435,7 +1738,8 @@ public class DATA { { DataType.PASSIVE_OssifyingSwarm, new EntityModel(DataType.PASSIVE_OssifyingSwarm, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Ossifying Swarm", Descriptive = DescriptiveType.Ability, Description = @"Reduces the movement speed and attack speed of enemies near your attack target.", @@ -1443,11 +1747,12 @@ public class DATA { }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_AaroxBurn, new EntityModel(DataType.PASSIVE_AaroxBurn, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Aarox Burn", Descriptive = DescriptiveType.Ability, Description = @"The aarox dies when attacking. Any units in its area of effect suffer damage over time.", @@ -1455,33 +1760,36 @@ public class DATA { }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_QuenchingScythes, new EntityModel(DataType.PASSIVE_QuenchingScythes, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Quenching Scythes", Descriptive = DescriptiveType.Ability, Description = @"Recovers 5 life when dealing damage, or 10 mana if life is full." }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_EngorgedArteries, new EntityModel(DataType.PASSIVE_EngorgedArteries, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Engorged Arteries", Descriptive = DescriptiveType.Ability, Description = @"Grants +2 range when deployed on rootway." }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_ProjectileGestation, new EntityModel(DataType.PASSIVE_ProjectileGestation, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Projectile Gestation", Descriptive = DescriptiveType.Ability, Description = @"Fires a quitl at a target enemy unit." @@ -1489,22 +1797,24 @@ public class DATA { .AddPart(new EntityProductionModel { Energy = 35, Cooldown = 2.5f }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_GuidingAmber, new EntityModel(DataType.PASSIVE_GuidingAmber, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Guiding Amber", Descriptive = DescriptiveType.Ability, Description = @"Units hit by this attack takes +1 damage for a few seconds, to a maximum of +4." }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) }, - + { DataType.PASSIVE_SpawnQuitl, new EntityModel(DataType.PASSIVE_SpawnQuitl, EntityType.Passive) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Spawn Quitl", Descriptive = DescriptiveType.Ability, Description = @"Unit spawns Quitl on attack." }) @@ -1516,7 +1826,8 @@ public class DATA { { DataType.ABILITY_BladesOfTheGodhead, new EntityModel(DataType.ABILITY_BladesOfTheGodhead, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Blades of the Godhead", Descriptive = DescriptiveType.Ability, Description = @"The Throne loses some of its shields and fires all four of its swords at the target location to deal damage in a small area of effect. This only affects ground units." @@ -1524,10 +1835,12 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Cooldown = 40 }) - }, { + }, + { DataType.ABILITY_Windstep, new EntityModel(DataType.ABILITY_Windstep, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Windstep", Descriptive = DescriptiveType.Ability, Description = @"The Zephyr teleports toward target location, draining shields. Windstepping into Halled Ground restores shields instead." @@ -1535,10 +1848,12 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Cooldown = 20 }) - }, { + }, + { DataType.ABILITY_Leap, new EntityModel(DataType.ABILITY_Leap, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Leap", Descriptive = DescriptiveType.Ability, Description = @"The Saoshin leaps to the target location. If she has enough mana, she activates Intervention upon landing." @@ -1546,10 +1861,12 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "V", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Cooldown = 5, Energy = 70 }) - }, { + }, + { DataType.ABILITY_OrdainedPassage, new EntityModel(DataType.ABILITY_OrdainedPassage, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Intervention", Descriptive = DescriptiveType.Ability, Description = @"Creates a large area that grants significant damage reduction to friendly ground troops within. Reduces the Ark Mother's shields to 0 when used." @@ -1557,31 +1874,36 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "D", HoldSpace = true }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Cooldown = 5, Energy = 75 }) - }, { + }, + { DataType.ABILITY_DeployAbsolver, new EntityModel(DataType.ABILITY_DeployAbsolver, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deploy Absolver", Descriptive = DescriptiveType.Ability, Description = @"Deploying the Absolver drastically increases its attack speed." }) .AddPart(new EntityHotkeyModel { Hotkey = "V", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - }, { + }, + { DataType.ABILITY_DeployMagi, new EntityModel(DataType.ABILITY_DeployMagi, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deploy Magi", Descriptive = DescriptiveType.Ability, Description = @"Deploys the Magic to project Hallowed Ground around it." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - }, + }, { DataType.ABILITY_Awestrike, new EntityModel(DataType.ABILITY_Awestrike, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Awestrike", Descriptive = DescriptiveType.Ability, Description = @"After a short delay, enemy ground units at center of the area suffer a huge burst of damage. Targets outside the center take reduced damage. Then the area is left ablaze damaging units over time." @@ -1593,7 +1915,8 @@ public class DATA { { DataType.ABILITY_MobilizeQrath, new EntityModel(DataType.ABILITY_MobilizeQrath, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mobilize Q'Rath", Descriptive = DescriptiveType.Ability, Description = @"Mobilize all deployed Q'Rath units." @@ -1606,7 +1929,8 @@ public class DATA { { DataType.ABILITY_MobilizeAru, new EntityModel(DataType.ABILITY_MobilizeAru, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mobilize Aru", Descriptive = DescriptiveType.Ability, Description = @"Mobilize all deployed Aru units." @@ -1617,27 +1941,32 @@ public class DATA { { DataType.ABILITY_Offering, new EntityModel(DataType.ABILITY_Offering, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Offering", Descriptive = DescriptiveType.Ability, Description = "Sacrifices 10 life to increase range, speed, and attack speed for several seconds." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, { + }, + { DataType.ABILITY_DiveBomb, new EntityModel(DataType.ABILITY_DiveBomb, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Dive Bomb", Descriptive = DescriptiveType.Ability, Description = "The aarox dives down into the ground, dealing damage in a smaller area. Non-hovering units in the area take additional damage over time." }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, { + }, + { DataType.ABILITY_CullingStrike, new EntityModel(DataType.ABILITY_CullingStrike, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Culling Strike", Descriptive = DescriptiveType.Ability, Description = "Teleports to target location, and deals massive damage to the nearest ground unit." @@ -1645,33 +1974,39 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Energy = 40, Cooldown = 3 }) - }, { + }, + { DataType.ABILITY_LethalBond, new EntityModel(DataType.ABILITY_LethalBond, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Lethal Bond", Descriptive = DescriptiveType.Ability, Description = "After a short delay, enemy units in the target area receive a debuff which causes them to take double damage from all attacks for a duration." }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "D" }) - .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Xol, ReplaceId = DataType.ABILITY_CullingStrike }) + .AddPart(new EntityVanguardAddedModel + { ImmortalId = DataType.IMMORTAL_Xol, ReplaceId = DataType.ABILITY_CullingStrike }) .AddPart(new EntityProductionModel { Energy = 40 }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, { + }, + { DataType.ABILITY_DrainingEmbrace, new EntityModel(DataType.ABILITY_DrainingEmbrace, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Draining Embrace", Descriptive = DescriptiveType.Ability, Description = "Units in the target area are rooted and lose mana." }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "D" }) .AddPart(new EntityProductionModel { Energy = 25, Cooldown = 5 }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, + }, { DataType.ABILITY_BloodPlague, new EntityModel(DataType.ABILITY_BloodPlague, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Blood Plague", Descriptive = DescriptiveType.Ability, Description = "Units that enter the target area suffer heavy damage over time. This damaging effect persists for a few seconds after leaving the plague area." @@ -1679,31 +2014,35 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "D" }) .AddPart(new EntityProductionModel { Energy = 75, Cooldown = 2 }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, + }, { DataType.ABILITY_DeployMobilizeResinant, new EntityModel(DataType.ABILITY_DeployMobilizeResinant, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deploy Resinant", Descriptive = DescriptiveType.Ability, Description = "Deploying the Resinant enables it to deal area of effect damage at long range." }) .AddPart(new EntityHotkeyModel { Hotkey = "V", HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, + }, { DataType.ABILITY_DeployMobilizeUnderSpine, new EntityModel(DataType.ABILITY_DeployMobilizeUnderSpine, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deploy Underspine", Descriptive = DescriptiveType.Ability, Description = "Burrow into the ground to generate rootway and attack air units. Enemies near your attack target will be slowed for a short duration." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HoldSpace = true, HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - }, { + }, + { DataType.ABILITY_RootVice, new EntityModel(DataType.ABILITY_RootVice, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Root Vice", Descriptive = DescriptiveType.Ability, Description = "Roots all units for several seconds, then leaves them slowed for several seconds after." @@ -1712,41 +2051,50 @@ public class DATA { .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Energy = 50, Cooldown = 10 }) - }, { + }, + { DataType.ABILITY_BirthingStorm, new EntityModel(DataType.ABILITY_BirthingStorm, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Birthing Storm", Descriptive = DescriptiveType.Ability, Description = "Deals damage over time in an area and marks affected units for several seconds. Units that die while marked spawn a quitl.", - Notes = "Deals 20 damage + 15% of max life of the target immediately upon affecting the enemy unit. It deals the same damage again after 8 seconds. If the unit dies during those 8 seconds (including the final burst), spawns 1 quitl every 2 supply of the dead unit, rounded up" + Notes = + "Deals 20 damage + 15% of max life of the target immediately upon affecting the enemy unit. It deals the same damage again after 8 seconds. If the unit dies during those 8 seconds (including the final burst), spawns 1 quitl every 2 supply of the dead unit, rounded up" }) .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "D" }) .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Energy = 80, Cooldown = 2 }) - }, { + }, + { DataType.ABILITY_SummonSiegeMaw, new EntityModel(DataType.ABILITY_SummonSiegeMaw, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Summon Siege Maw", Descriptive = DescriptiveType.Dislodger, Description = "Summons a temporary long-range siege structure at the target location." }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HoldSpace = true, HotkeyGroup = "D" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala, ReplaceId = DataType.UNIT_Acaaluk }) + .AddPart(new EntityVanguardAddedModel + { ImmortalId = DataType.IMMORTAL_Mala, ReplaceId = DataType.UNIT_Acaaluk }) .AddPart(new EntityProductionModel { Energy = 80, BuildTime = 4, Cooldown = 20 }) .AddPart(new EntitySupplyModel { Takes = 0 }) .AddPart(new EntityVitalityModel { Health = 300, DefenseLayer = 100, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 0, Movement = MovementType.Ground }) - .AddPart(new EntityWeaponModel { - Damage = 40, Range = 1300, Targets = TargetType.Ground, MediumDamage = 50, + .AddPart(new EntityWeaponModel + { + Damage = 40, Range = 1300, Targets = TargetType.Ground, MediumDamage = 50, HeavyDamage = 60 }) - }, { + }, + { DataType.ABILITY_AwakenAcaaluk, new EntityModel(DataType.ABILITY_AwakenAcaaluk, EntityType.Ability) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Awaken Acaaluk", Descriptive = DescriptiveType.Dislodger, Description = "The red seer is sacrificed to create an acaaluk." }) @@ -1754,7 +2102,7 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 100, BuildTime = 25 }) .AddPart(new EntitySupplyModel { Takes = 6 }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Morph }) + .AddPart(new EntityRequirementModel { Requirement = RequirementType.Morph }) .AddPart(new EntityVitalityModel { Health = 200, DefenseLayer = 60, Armor = ArmorType.Heavy }) .AddPart(new EntityMovementModel { Speed = 210, Movement = MovementType.Ground }) .AddPart(new EntityWeaponModel @@ -1765,7 +2113,8 @@ public class DATA { { DataType.ISPELL_SummonCitadel, new EntityModel(DataType.ISPELL_SummonCitadel, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Summon Citadel", Description = "Creates a powerful defensive structure on a Tower Foundation." }) @@ -1774,15 +2123,18 @@ public class DATA { .AddPart(new EntityProductionModel { Pyre = 75, BuildTime = 70 }) .AddPart(new EntityVitalityModel { Health = 1000, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityWeaponModel { + .AddPart(new EntityWeaponModel + { Damage = 20, Range = 800, AttacksPerSecond = 1.124f, Targets = TargetType.All, MediumDamage = 25, HeavyDamage = 30 }) - .AddPart(new EntityIdPassiveModel(){Id = DataType.PASSIVE_Respite}) - }, { + .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Respite }) + }, + { DataType.ISPELL_PillarOfHeaven, new EntityModel(DataType.ISPELL_PillarOfHeaven, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Pillar of Heavens", Description = @"Summons a powerful monument that slams into the ground to deal damage to enemy ground units (and takes damage from everything it lands on). It then creates Hallowed Ground and nearby friendly units gain Attack Speed" @@ -1791,22 +2143,26 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Orzum }) .AddPart(new EntityProductionModel { Pyre = 100, Cooldown = 15 }) - }, { + }, + { DataType.ISPELL_EmpireUnbroken, new EntityModel(DataType.ISPELL_EmpireUnbroken, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Empire Unbroken", Description = @"Structures in target area reduce incoming damage significantly for several seconds." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "1" }) - .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) + .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Orzum }) .AddPart(new EntityProductionModel { Pyre = 50, Cooldown = 15 }) - }, { + }, + { DataType.ISPELL_InfuseTroops, new EntityModel(DataType.ISPELL_InfuseTroops, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Infuse Troops", Description = @"Allied units in a large area gain Movement Speed and gain Attack Speed for several seconds." @@ -1814,10 +2170,12 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "W", HotkeyGroup = "1" }) .AddPart(new EntityFactionModel { Faction = FactionType.Any }) .AddPart(new EntityProductionModel { Pyre = 75, Cooldown = 20 }) - }, { + }, + { DataType.ISPELL_DeliverFromEvil, new EntityModel(DataType.ISPELL_DeliverFromEvil, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deliver from Evil", Description = @"Units in the area . After a short delay, allied units in teh area teleport to your nearest Town Hall." @@ -1826,10 +2184,12 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Ajari }) .AddPart(new EntityProductionModel { Pyre = 50, Cooldown = 60 }) - }, { + }, + { DataType.ISPELL_HeavensAegis, new EntityModel(DataType.ISPELL_HeavensAegis, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Heaven's Aegis", Description = @"All allied units gain bonus shields for several seconds." @@ -1844,7 +2204,8 @@ public class DATA { { DataType.ISPELL_SummonGroveGuardian, new EntityModel(DataType.ISPELL_SummonGroveGuardian, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Summon Grove Guardian", Description = "Creates a powerful defensive structure on a Tower Foundation." }) @@ -1855,11 +2216,13 @@ public class DATA { { Health = 1200, DefenseLayer = 200, Armor = ArmorType.Heavy, IsStructure = true }) .AddPart(new EntityWeaponModel { Damage = 15, Range = 800, AttacksPerSecond = 1.887f, Targets = TargetType.All }) - .AddPart(new EntityIdPassiveModel(){Id = DataType.PASSIVE_Respite}) - }, { + .AddPart(new EntityIdPassiveModel { Id = DataType.PASSIVE_Respite }) + }, + { DataType.ISPELL_ConstructBloodWell, new EntityModel(DataType.ISPELL_ConstructBloodWell, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Construct Blood Well", Description = "Creates a rootway generating structure that heals nearby allied units, and transfers it's blood to nearby allied units." @@ -1867,10 +2230,12 @@ public class DATA { .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "1" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Pyre = 50, Cooldown = 21 }) - }, { + }, + { DataType.ISPELL_RedTithe, new EntityModel(DataType.ISPELL_RedTithe, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Red Tithe", Description = "Sacrifice target unit to create an area that regenerates life and mana." }) @@ -1878,10 +2243,12 @@ public class DATA { .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Pyre = 40, Cooldown = 60 }) - }, { + }, + { DataType.ISPELL_RainOfBlood, new EntityModel(DataType.ISPELL_RainOfBlood, EntityType.Pyre_Spell) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Rain of Blood", Description = "Massively increases life, shield and mana regeneration for 30 seconds." }) @@ -1889,7 +2256,8 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityVanguardAddedModel { ImmortalId = DataType.IMMORTAL_Mala }) .AddPart(new EntityProductionModel { Pyre = 130, Cooldown = 30 }) - }, { + }, + { DataType.ISPELL_GreatHunt, new EntityModel(DataType.ISPELL_GreatHunt, EntityType.Pyre_Spell) .AddPart(new EntityInfoModel { Name = "Great Hunt" }) @@ -1904,7 +2272,8 @@ public class DATA { { DataType.BUILDING_Acropolis, new EntityModel(DataType.BUILDING_Acropolis, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Acropolis", Descriptive = DescriptiveType.Town_Hall, Description = "Town Hall (Structure) - Necessary for collecting Alloy and Ether." }) @@ -1914,47 +2283,60 @@ public class DATA { { Alloy = 350, BuildTime = 100, RequiresWorker = true, ConsumesWorker = true }) .AddPart(new EntityVitalityModel { Health = 1600, DefenseLayer = 800, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUPGRADE_MiningLevel2_QRath, new EntityModel(DataType.BUPGRADE_MiningLevel2_QRath, EntityType.Building_Upgrade) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mining Level 2", Descriptive = DescriptiveType.Upgrade, Description = "Upgrades the nearest resource cluster to allow more workers to mine from it." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "CONTROL" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Morph + .AddPart(new EntityRequirementModel + { + Requirement = RequirementType.Morph }) .AddPart(new EntityProductionModel { Alloy = 75, BuildTime = 20, RequiresWorker = false }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUPGRADE_MiningLevel3_QRath, new EntityModel(DataType.BUPGRADE_MiningLevel3_QRath, EntityType.Building_Upgrade) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mining Level 3", Descriptive = DescriptiveType.Upgrade, Description = "Upgrades the nearest resource cluster to allow more workers to mine from it." }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "CONTROL" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUPGRADE_MiningLevel2_QRath, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUPGRADE_MiningLevel2_QRath, Requirement = RequirementType.Morph }) .AddPart(new EntityProductionModel { Alloy = 125, BuildTime = 20, RequiresWorker = false }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUILDING_ApostleOfBinding, new EntityModel(DataType.BUILDING_ApostleOfBinding, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Apostle of Binding", Descriptive = DescriptiveType.Ether_Extractor, Description = "Ether Extractor (Structure) - Must be placed on an Ether Node." }) @@ -1963,14 +2345,17 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 100, BuildTime = 30, RequiresWorker = true }) .AddPart(new EntityVitalityModel { Health = 250, DefenseLayer = 150, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1.5625f, RequiresWorker = false, Resource = ResourceType.Ether, Slots = 1, TotalAmount = 1200 }) - }, { + }, + { DataType.BUILDING_LegionHall, new EntityModel(DataType.BUILDING_LegionHall, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Legion Hall", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Produces infantry units." }) @@ -1980,28 +2365,31 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, BuildTime = 38, RequiresWorker = true }) .AddPart(new EntityVitalityModel { Health = 500, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true }) - }, + }, { DataType.DEFENSE_FireSinger, new EntityModel(DataType.DEFENSE_FireSinger, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Fire Singer", Descriptive = DescriptiveType.Defense, Description = "Q'Rath Defensive structure." }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "C" }) .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 150, BuildTime = 30, RequiresWorker = true }) - .AddPart(new EntityRequirementModel { + .AddPart(new EntityRequirementModel + { DataType = DataType.BUILDING_KeeperOfTheHardenedFlames, Requirement = RequirementType.Research_Building }) .AddPart(new EntityVitalityModel { Health = 300, DefenseLayer = 300, Armor = ArmorType.Heavy, IsStructure = true }) - }, + }, { DataType.BUILDING_KeeperOfTheHardenedFlames, new EntityModel(DataType.BUILDING_KeeperOfTheHardenedFlames, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Keeper Of the Hardened Flames", Descriptive = DescriptiveType.Defense, Description = "" }) @@ -2010,12 +2398,13 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 125, BuildTime = 30, RequiresWorker = true }) .AddPart(new EntityVitalityModel { Health = 350, DefenseLayer = 450, Armor = ArmorType.Heavy, IsStructure = true }) - }, - + }, + { DataType.BUILDING_Reliquary, new EntityModel(DataType.BUILDING_Reliquary, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Reliquary", Descriptive = DescriptiveType.Research, Description = "Research (Structure) - Unlocks the Zephyr and Magi at the Legion Hall. Contains Legion Hall research." @@ -2024,15 +2413,19 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 150, Ether = 10, BuildTime = 45, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 550, DefenseLayer = 550, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_SoulFoundry, new EntityModel(DataType.BUILDING_SoulFoundry, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Soul Foundry", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Produces advanced ground units." }) @@ -2041,15 +2434,19 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, Ether = 80, BuildTime = 45, RequiresWorker = true }) .AddPart(new EntitySupplyModel { Grants = 16 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_LegionHall, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_LegionHall, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 450, DefenseLayer = 450, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_HouseOfFadingSaints, new EntityModel(DataType.BUILDING_HouseOfFadingSaints, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "House of the Fading Saints", Descriptive = DescriptiveType.Research, Description = "Research (Structure) - Has tech for the Soul Foundry. Unlocks Hallower." }) @@ -2057,15 +2454,19 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 175, Ether = 200, BuildTime = 52, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 500, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_Angelarium, new EntityModel(DataType.BUILDING_Angelarium, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Angelarium", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Produces flying units" }) @@ -2074,15 +2475,19 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, Ether = 80, BuildTime = 48, RequiresWorker = true }) .AddPart(new EntitySupplyModel { Grants = 16 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_SoulFoundry, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_SoulFoundry, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 600, DefenseLayer = 600, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_EyeOfAros, new EntityModel(DataType.BUILDING_EyeOfAros, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Eye of Aros", Descriptive = DescriptiveType.Research, Description = "Research (Structure) - Unlocks the Shar'U and some late-game Q'Rath upgrades." }) @@ -2090,15 +2495,19 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 200, Ether = 200, BuildTime = 36, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 500, DefenseLayer = 500, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_BearerOfTheCrown, new EntityModel(DataType.BUILDING_BearerOfTheCrown, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Bearer of the Crown", Descriptive = DescriptiveType.Research, Description = "Research (Structure) - Unlocks the Throne and researches for Angelarium." }) @@ -2106,7 +2515,9 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.QRath }) .AddPart(new EntityProductionModel { Alloy = 250, Ether = 200, BuildTime = 52, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_Angelarium, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_Angelarium, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel @@ -2117,22 +2528,26 @@ public class DATA { { DataType.BUILDING_GroveHeart, new EntityModel(DataType.BUILDING_GroveHeart, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Grove Heart", Descriptive = DescriptiveType.Town_Hall, Description = "Town Hall (Structure) - Necessary for collection Alloy and Ether." }) //TODO: Add Alloy, Ether and Pyre, Supply to the database .AddPart(new EntityHotkeyModel { Hotkey = "F", HotkeyGroup = "C" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 350, BuildTime = 100, RequiresWorker = true }) - .AddPart(new EntityVitalityModel { + .AddPart(new EntityVitalityModel + { Health = 2000, DefenseLayer = 400, Defense = DefenseType.Overgrowth, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUPGRADE_GodHeart, new EntityModel(DataType.BUPGRADE_GodHeart, EntityType.Building_Upgrade) .AddPart(new EntityInfoModel { Name = "God Heart", Descriptive = DescriptiveType.Upgrade }) @@ -2140,52 +2555,68 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityVitalityModel { Health = 2150, DefenseLayer = 450, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.STARTING_TownHall_Aru, + .AddPart(new EntityRequirementModel + { + DataType = DataType.STARTING_TownHall_Aru, Requirement = RequirementType.Morph }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Research_Building }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 75, BuildTime = 36, RequiresWorker = false }) - }, { + }, + { DataType.BUPGRADE_MiningLevel2_Aru, new EntityModel(DataType.BUPGRADE_MiningLevel2_Aru, EntityType.Building_Upgrade) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mining Level 2", Descriptive = DescriptiveType.Upgrade, Description = "Upgrades the nearest resource cluster to allow more workers to mine from it." }) .AddPart(new EntityHotkeyModel { Hotkey = "E", HotkeyGroup = "CONTROL" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_GroveHeart, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_GroveHeart, Requirement = RequirementType.Morph }) .AddPart(new EntityProductionModel { Alloy = 75, BuildTime = 20, RequiresWorker = false }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUPGRADE_MiningLevel3_Aru, new EntityModel(DataType.BUPGRADE_MiningLevel3_Aru, EntityType.Building_Upgrade) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Mining Level 3", Descriptive = DescriptiveType.Upgrade, Description = "Upgrades the nearest resource cluster to allow more workers to mine from it." }) .AddPart(new EntityHotkeyModel { Hotkey = "R", HotkeyGroup = "CONTROL" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUPGRADE_MiningLevel2_Aru, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUPGRADE_MiningLevel2_Aru, Requirement = RequirementType.Morph }) .AddPart(new EntityProductionModel { Alloy = 125, BuildTime = 20, RequiresWorker = false }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1, RequiresWorker = true, Resource = ResourceType.Alloy, Slots = 2, TotalAmount = 3600 }) - }, { + }, + { DataType.BUILDING_EtherMaw, new EntityModel(DataType.BUILDING_EtherMaw, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Ether Maw", Descriptive = DescriptiveType.Ether_Extractor, Description = "Ether Extractor (Structure) - Must be placed on an Ether Node." }) //TODO Add Ether Node to database @@ -2194,14 +2625,17 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 100, BuildTime = 30, RequiresWorker = true }) .AddPart(new EntityVitalityModel { Health = 400, DefenseLayer = 100, Armor = ArmorType.Heavy, IsStructure = true }) - .AddPart(new EntityHarvestModel { + .AddPart(new EntityHarvestModel + { HarvestedPerInterval = 1.5625f, RequiresWorker = false, Resource = ResourceType.Ether, Slots = 1, TotalAmount = 1200 }) - }, { + }, + { DataType.BUILDING_AltarOfTheWorthy, new EntityModel(DataType.BUILDING_AltarOfTheWorthy, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Altar of the Worthy", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Produces infantry ground units" }) @@ -2209,11 +2643,14 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntitySupplyModel { Grants = 16 }) .AddPart(new EntityProductionModel { Alloy = 250, BuildTime = 36, RequiresWorker = true }) - .AddPart(new EntityVitalityModel { Health = 900, DefenseLayer = 100, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + .AddPart(new EntityVitalityModel + { Health = 900, DefenseLayer = 100, Armor = ArmorType.Heavy, IsStructure = true }) + }, + { DataType.BUILDING_Neurocyte, new EntityModel(DataType.BUILDING_Neurocyte, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Neurocyte", Descriptive = DescriptiveType.Research, Description = "Research (Structure) - Unlocks additional research." }) @@ -2221,16 +2658,19 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 75, BuildTime = 30, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 650, DefenseLayer = 150, Armor = ArmorType.Heavy, IsStructure = true }) - }, + }, { DataType.DEFENSE_Aerovore, new EntityModel(DataType.DEFENSE_Aerovore, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Aerovore", Descriptive = DescriptiveType.Defense, Description = "Defense Structure - Aru anti-air defense structure." }) @@ -2239,23 +2679,23 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 100, BuildTime = 18, RequiresWorker = true }) .AddPart(new EntityVitalityModel { Health = 300, DefenseLayer = 50, Armor = ArmorType.Heavy, IsStructure = true }) - }, + }, { DataType.BUPGRADE_Omnivore, new EntityModel(DataType.BUPGRADE_Omnivore, EntityType.Building_Upgrade) .AddPart(new EntityInfoModel { Name = "Omnivore", Descriptive = DescriptiveType.Upgrade }) .AddPart(new EntityHotkeyModel { Hotkey = "Q", HotkeyGroup = "SHIFT" }) .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) - .AddPart(new EntityRequirementModel{ Requirement = RequirementType.Morph }) + .AddPart(new EntityRequirementModel { Requirement = RequirementType.Morph }) .AddPart(new EntityProductionModel { Alloy = 50, BuildTime = 18, RequiresWorker = false }) .AddPart(new EntityVitalityModel { Health = 400, DefenseLayer = 50, Armor = ArmorType.Heavy, IsStructure = true }) - - }, + }, { DataType.BUILDING_AmberWomb, new EntityModel(DataType.BUILDING_AmberWomb, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Amber Womb", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Produces advanced ground units" }) @@ -2264,17 +2704,24 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, Ether = 80, BuildTime = 45, RequiresWorker = true }) .AddPart(new EntitySupplyModel { Grants = 16 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUPGRADE_GodHeart, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUPGRADE_GodHeart, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityVitalityModel { Health = 1000, DefenseLayer = 250, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + .AddPart(new EntityVitalityModel + { Health = 1000, DefenseLayer = 250, Armor = ArmorType.Heavy, IsStructure = true }) + }, + { DataType.BUILDING_BoneCanopy, new EntityModel(DataType.BUILDING_BoneCanopy, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Bone Canopy", Descriptive = DescriptiveType.Production, Description = "Army Production (Structure) - Aru air production." }) @@ -2283,14 +2730,19 @@ public class DATA { .AddPart(new EntityProductionModel { Alloy = 250, Ether = 80, BuildTime = 36, RequiresWorker = true }) .AddPart(new EntitySupplyModel { Grants = 16 }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUPGRADE_GodHeart, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUPGRADE_GodHeart, Requirement = RequirementType.Research_Building }) - .AddPart(new EntityVitalityModel { Health = 1000, DefenseLayer = 300, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + .AddPart(new EntityVitalityModel + { Health = 1000, DefenseLayer = 300, Armor = ArmorType.Heavy, IsStructure = true }) + }, + { DataType.BUILDING_RedVale, new EntityModel(DataType.BUILDING_RedVale, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Red Vale", Descriptive = DescriptiveType.Research, Description = "Unlocks the advanced units at the Altar of the Worthy." }) @@ -2298,15 +2750,19 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 100, Ether = 100, BuildTime = 36, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_AltarOfTheWorthy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_AltarOfTheWorthy, Requirement = RequirementType.Production_Building }) .AddPart(new EntityVitalityModel { Health = 800, DefenseLayer = 200, Armor = ArmorType.Heavy, IsStructure = true }) - }, { + }, + { DataType.BUILDING_DeepNest, new EntityModel(DataType.BUILDING_DeepNest, EntityType.Building) - .AddPart(new EntityInfoModel { + .AddPart(new EntityInfoModel + { Name = "Deep Nest", Descriptive = DescriptiveType.Research, Description = "Unlocks the advanced units and researches at the Bone Canopy." }) @@ -2314,7 +2770,9 @@ public class DATA { .AddPart(new EntityFactionModel { Faction = FactionType.Aru }) .AddPart(new EntityProductionModel { Alloy = 175, Ether = 150, BuildTime = 38, RequiresWorker = true }) - .AddPart(new EntityRequirementModel{ DataType = DataType.BUILDING_BoneCanopy, + .AddPart(new EntityRequirementModel + { + DataType = DataType.BUILDING_BoneCanopy, Requirement = RequirementType.Research_Building }) .AddPart(new EntityVitalityModel diff --git a/Model/Entity/Data/EntityType.cs b/Model/Entity/Data/EntityType.cs index 9c345d3..b362d3c 100644 --- a/Model/Entity/Data/EntityType.cs +++ b/Model/Entity/Data/EntityType.cs @@ -1,15 +1,14 @@ -using System; +namespace Model.Entity.Data; -namespace Model.Immortal.Entity.Data; - -public static class EntityType { +public static class EntityType +{ public static string None = "None"; public static string Any = "Any"; public static string Teapot = "Teapot"; public static string Family = "Family"; public static string Faction = "Faction"; public static string Command = "Command"; - + public static string Worker = "Worker"; public static string Army = "Army"; public static string Building = "Building"; diff --git a/Model/Entity/Data/Ids_Entity.cs b/Model/Entity/Data/Ids_Entity.cs index 8e33bd9..1e9ef33 100644 --- a/Model/Entity/Data/Ids_Entity.cs +++ b/Model/Entity/Data/Ids_Entity.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Data; +namespace Model.Entity.Data; -public static class DataType { +public static class DataType +{ public static string PYREEVENT_TowerKilled = "9a923928-b016-49f2-8c7d-950abf09e287"; public static string PYREEVENT_CampTaken = "cc27a9b2-69e2-4322-8102-7a9f8bea7871"; public static string PYREEVENT_MinerTaken = "5b158cf2-2810-4a2a-8131-c4fe4b392ce9"; @@ -75,10 +76,10 @@ public static class DataType { public static string BUILDING_DeepNest = "3076ae6e-89bf-4ea1-a66c-ea45ffcb4046"; public static string BUILDING_Neurocyte = "90c6e53f-0430-4992-a1eb-4f91699292cb"; public static string DEFENSE_FireSinger = "c7a90286-6977-4d92-91e0-2a0a46eb13ea"; - + public static string BUILDING_KeeperOfTheHardenedFlames = "db784823-5199-4bae-bc5e-96174490cd00"; - + public static string DEFENSE_Aerovore = "b68307b7-4759-43a3-8679-d844ac3aa73f"; public static string UPGRADE_FaithCastBlades = "32087a66-900e-4f25-95f7-de56d5b424c7"; public static string UPGRADE_RelicOfTheWrathfulGaze = "e6fa5ded-53f5-4914-85bb-1fdff5f32b64"; @@ -98,11 +99,11 @@ public static class DataType { public static string UPGRADE_BehemothCapacity = "d0390dd2-d9a5-4b20-9d8b-f554f4c52143"; public static string UPGRADE_BloodPlague = "9c207e21-f595-49d0-967d-f30ca8cc3745"; public static string UPGRADE_BirthingStorm = "0cb2f1a4-03b3-491b-9db3-d2d4590ede3a"; - + public static string PASSIVE_Respite = "607c39f4-a957-4a7a-8fc6-a239f9e570ec"; - + public static string PASSIVE_OssifyingSwarm = "b8897247-8393-416e-b246-409a6b3263c2"; public static string PASSIVE_QuenchingScythes = "dbf07db4-e7b6-4f81-9f8e-e5391850eead"; @@ -112,14 +113,14 @@ public static class DataType { public static string PASSIVE_GuidingAmber = "9eab6701-0f0d-4858-b8a4-14e3a5dab822"; public static string PASSIVE_GodstoneBulwark = "482189ac-713d-4870-a960-d2930961c486"; public static string PASSIVE_Invervention = "3a70d237-1530-455a-b4f8-a626d708334c"; - + public static string PASSIVE_ThrumAttackSpeed = "356b6c33-a857-489c-8218-68c53d03db90"; - + public static string PASSIVE_MendingCommand = "25d94c3d-dba9-4f02-abf4-904269b539c6"; public static string PASSIVE_StabilizeHallowedGround = "0bbbaf06-fd22-4f48-a888-cc1ab6af046e"; public static string PASSIVE_SpawnQuitl = "80f6b382-da1c-49a1-8235-1ea37983ea54"; public static string PASSIVE_XacalDamage = "69928f20-5332-418f-ada3-694da3f7b199"; - + public static string ABILITY_BladesOfTheGodhead = "000154ac-faf5-483d-b0bd-e84335891a27"; public static string ABILITY_Windstep = "a410b296-39f7-42e0-87c8-6cef11eb967c"; public static string ABILITY_Leap = "aa155b88-125a-4d25-b63f-77987ea6e519"; diff --git a/Model/Entity/EntityModel.cs b/Model/Entity/EntityModel.cs index 800b4a7..e4b07c8 100644 --- a/Model/Entity/EntityModel.cs +++ b/Model/Entity/EntityModel.cs @@ -1,40 +1,37 @@ using System.Collections.Generic; using System.Linq; using System.Text; -using Model.Immortal.Entity.Data; -using Model.Immortal.Entity.Parts; -using Model.Immortal.Types; +using Model.Entity.Data; +using Model.Entity.Parts; +using Model.Types; using YamlDotNet.Serialization; -namespace Model.Immortal.Entity; +namespace Model.Entity; -public class EntityModel { +public class EntityModel +{ public static readonly string GameVersion = "0.0.6.8900a"; - private static Dictionary _database; + private static Dictionary _database; - private static List entityModels; + private static List entityModels; - private static List entityModelsOnlyHotkey; + private static List entityModelsOnlyHotkey; - private static Dictionary> entityModelsByHotkey; + private static Dictionary> entityModelsByHotkey; - public EntityModel() { } + public EntityModel() + { + } - public EntityModel(string data, string entity, bool isSpeculative = false) { + public EntityModel(string data, string entity, bool isSpeculative = false) + { DataType = data; EntityType = entity; IsSpeculative = isSpeculative; } - public string AsYaml() { - var stringBuilder = new StringBuilder(); - var serializer = new Serializer(); - stringBuilder.AppendLine(serializer.Serialize(this)); - return stringBuilder.ToString(); - } - public string DataType { get; set; } // TODO Serilization currently being used for build orders @@ -45,50 +42,64 @@ public class EntityModel { public bool IsSpeculative { get; set; } public string Descriptive { get; set; } = DescriptiveType.None; - - public EntityModel Clone() { + + public string AsYaml() + { + var stringBuilder = new StringBuilder(); + var serializer = new Serializer(); + stringBuilder.AppendLine(serializer.Serialize(this)); + return stringBuilder.ToString(); + } + + public EntityModel Clone() + { return (EntityModel)MemberwiseClone(); } - - public void Copy(EntityModel entity) { + + public void Copy(EntityModel entity) + { DataType = entity.DataType; EntityType = entity.EntityType; EntityParts = entity.EntityParts.ToList(); } - - public EntityModel AddPart(IEntityPartInterface unitPart) { + + public EntityModel AddPart(IEntityPartInterface unitPart) + { EntityParts.Add(unitPart); return this; } - - public static Dictionary GetDictionary() { + + public static Dictionary GetDictionary() + { if (_database == null) _database = DATA.Get(); return _database; } - - public static EntityModel Get(string entity) { + + public static EntityModel Get(string entity) + { if (_database == null) _database = DATA.Get(); return _database[entity]; } - - - - public static List GetList() { + + public static List GetList() + { if (entityModels == null) entityModels = DATA.Get().Values.ToList(); return entityModels; } - - public static List GetListOnlyHotkey() { - if (entityModelsOnlyHotkey == null) { + + public static List GetListOnlyHotkey() + { + if (entityModelsOnlyHotkey == null) + { entityModelsOnlyHotkey = new List(); foreach (var entity in DATA.Get().Values) @@ -99,14 +110,18 @@ public class EntityModel { return entityModelsOnlyHotkey; } - - public static Dictionary> GetEntitiesByHotkey() { - if (entityModelsByHotkey == null) { + + public static Dictionary> GetEntitiesByHotkey() + { + if (entityModelsByHotkey == null) + { entityModelsByHotkey = new Dictionary>(); - foreach (var entity in GetList()) { + foreach (var entity in GetList()) + { var entityHotkey = entity.Hotkey(); - if (entityHotkey != null) { + if (entityHotkey != null) + { if (!entityModelsByHotkey.ContainsKey(entityHotkey.Hotkey)) entityModelsByHotkey[entityHotkey.Hotkey] = new List(); @@ -119,9 +134,10 @@ public class EntityModel { return entityModelsByHotkey; } - + public static EntityModel GetFrom(string hotkey, string hotkeyGroup, bool holdSpace, string faction, - string immortal) { + string immortal) + { if (hotkey == null || hotkey == "") return null; //TODO @@ -142,121 +158,143 @@ public class EntityModel { return found; } - - public EntityInfoModel Info() { + + public EntityInfoModel Info() + { return (EntityInfoModel)EntityParts.Find(x => x.GetType() == typeof(EntityInfoModel)); } - - public EntitySupplyModel Supply() { + + public EntitySupplyModel Supply() + { return (EntitySupplyModel)EntityParts.Find(x => x.GetType() == typeof(EntitySupplyModel)); } - - public EntityTierModel Tier() { + + public EntityTierModel Tier() + { return (EntityTierModel)EntityParts.Find(x => x.GetType() == typeof(EntityTierModel)); } - - public EntityProductionModel Production() { + + public EntityProductionModel Production() + { return (EntityProductionModel)EntityParts.Find(x => x.GetType() == typeof(EntityProductionModel)); } - - public EntityMovementModel Movement() { + + public EntityMovementModel Movement() + { return (EntityMovementModel)EntityParts.Find(x => x.GetType() == typeof(EntityMovementModel)); } - - public EntityVitalityModel Vitality() { + + public EntityVitalityModel Vitality() + { return (EntityVitalityModel)EntityParts.Find(x => x.GetType() == typeof(EntityVitalityModel)); } - - public List Requirements() { + + public List Requirements() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityRequirementModel)) .Cast().ToList(); } - - public List Weapons() { + + public List Weapons() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityWeaponModel)) .Cast().ToList(); } - - public List Replaceds() { + + public List Replaceds() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityVanguardReplacedModel)) .Cast().ToList(); } - - public EntityVanguardAddedModel VanguardAdded() { + + public EntityVanguardAddedModel VanguardAdded() + { return (EntityVanguardAddedModel)EntityParts.Find(x => x.GetType() == typeof(EntityVanguardAddedModel)); } - - public EntityHotkeyModel Hotkey() { + + public EntityHotkeyModel Hotkey() + { return (EntityHotkeyModel)EntityParts.Find(x => x.GetType() == typeof(EntityHotkeyModel)); } - - public EntityFactionModel Faction() { + + public EntityFactionModel Faction() + { return (EntityFactionModel)EntityParts.Find(x => x.GetType() == typeof(EntityFactionModel)); } - - public EntityHarvestModel Harvest() { + + public EntityHarvestModel Harvest() + { return (EntityHarvestModel)EntityParts.Find(x => x.GetType() == typeof(EntityHarvestModel)); } - - public List IdAbilities() { + + public List IdAbilities() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdAbilityModel)) .Cast().ToList(); } - - public List IdArmies() { + + public List IdArmies() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdArmyModel)) .Cast().ToList(); } - - public List IdPassives() { + + public List IdPassives() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdPassiveModel)) .Cast().ToList(); } - - public List IdUpgrades() { + + public List IdUpgrades() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdUpgradeModel)) .Cast().ToList(); } - - public List IdVanguards() { + + public List IdVanguards() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdVanguardModel)) .Cast().ToList(); } - - public List IdPyreSpells() { + + public List IdPyreSpells() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityIdPyreSpellModel)) .Cast().ToList(); } - public List Mechanics() { + public List Mechanics() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityMechanicModel)) .Cast().ToList(); } - public List Passives() { + public List Passives() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityPassiveModel)) .Cast().ToList(); } - public List Strategies() { + public List Strategies() + { return EntityParts.FindAll(x => x.GetType() == typeof(EntityStrategyModel)) .Cast().ToList(); } diff --git a/Model/Entity/Parts/EntityFactionModel.cs b/Model/Entity/Parts/EntityFactionModel.cs index de99617..995e759 100644 --- a/Model/Entity/Parts/EntityFactionModel.cs +++ b/Model/Entity/Parts/EntityFactionModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityFactionModel : IEntityPartInterface { +public class EntityFactionModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityFactionModel"; public string Faction { get; set; } = FactionType.QRath; } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityHarvestModel.cs b/Model/Entity/Parts/EntityHarvestModel.cs index f77574a..e92cef5 100644 --- a/Model/Entity/Parts/EntityHarvestModel.cs +++ b/Model/Entity/Parts/EntityHarvestModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityHarvestModel : IEntityPartInterface { +public class EntityHarvestModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityHarvestModel"; public ResourceType Resource { get; set; } = ResourceType.Alloy; public float Slots { get; set; } diff --git a/Model/Entity/Parts/EntityHotkeyModel.cs b/Model/Entity/Parts/EntityHotkeyModel.cs index ea8b4ba..164e64f 100644 --- a/Model/Entity/Parts/EntityHotkeyModel.cs +++ b/Model/Entity/Parts/EntityHotkeyModel.cs @@ -1,32 +1,38 @@ using System.Collections.Generic; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityHotkeyModel : IEntityPartInterface { +public class EntityHotkeyModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityHotkeyModel"; public string Hotkey { get; set; } public bool HoldSpace { get; set; } = false; public string HotkeyGroup { get; set; } - public bool IsSelectedHotkey(List keys) { + public bool IsSelectedHotkey(List keys) + { return keys.Contains(Hotkey.ToUpper()); } - public bool IsSelectedHotkeyGroup(List keys) { + public bool IsSelectedHotkeyGroup(List keys) + { return keys.Contains(HotkeyGroup.ToUpper()); } - public bool IsSelectedHoldSpace(List keys) { + public bool IsSelectedHoldSpace(List keys) + { return (keys.Contains("SPACE") || keys.Contains(" ")) == HoldSpace; } - public bool IsSelectedHotkeyGroupWithSpace(List keys) { + public bool IsSelectedHotkeyGroupWithSpace(List keys) + { var foundKey = false; var foundHold = false; - foreach (var key in keys) { + foreach (var key in keys) + { if (key.ToUpper().Equals(HotkeyGroup.ToUpper())) foundKey = true; if (key.ToUpper().Equals("SPACE") || key.ToUpper().Equals(" ")) foundHold = true; } diff --git a/Model/Entity/Parts/EntityIdAbilityModel.cs b/Model/Entity/Parts/EntityIdAbilityModel.cs index 9ec28f1..81c94e7 100644 --- a/Model/Entity/Parts/EntityIdAbilityModel.cs +++ b/Model/Entity/Parts/EntityIdAbilityModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdAbilityModel : IEntityPartInterface { +public class EntityIdAbilityModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdAbilityModel"; public string Id { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityIdArmyModel.cs b/Model/Entity/Parts/EntityIdArmyModel.cs index cedd103..f8338f6 100644 --- a/Model/Entity/Parts/EntityIdArmyModel.cs +++ b/Model/Entity/Parts/EntityIdArmyModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdArmyModel : IEntityPartInterface { +public class EntityIdArmyModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdArmyModel"; public string Id { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityIdPassiveModel.cs b/Model/Entity/Parts/EntityIdPassiveModel.cs index fdfa345..c64684c 100644 --- a/Model/Entity/Parts/EntityIdPassiveModel.cs +++ b/Model/Entity/Parts/EntityIdPassiveModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdPassiveModel : IEntityPartInterface { +public class EntityIdPassiveModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdPassiveModel"; public string Id { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityIdPyreSpellModel.cs b/Model/Entity/Parts/EntityIdPyreSpellModel.cs index 4b87c2c..ca63a5d 100644 --- a/Model/Entity/Parts/EntityIdPyreSpellModel.cs +++ b/Model/Entity/Parts/EntityIdPyreSpellModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdPyreSpellModel : IEntityPartInterface { +public class EntityIdPyreSpellModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdPyreSpellModel"; public string Id { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityIdUpgradeModel.cs b/Model/Entity/Parts/EntityIdUpgradeModel.cs index 7aa58bc..c6e291b 100644 --- a/Model/Entity/Parts/EntityIdUpgradeModel.cs +++ b/Model/Entity/Parts/EntityIdUpgradeModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdUpgradeModel : IEntityPartInterface { +public class EntityIdUpgradeModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdUpgradeModel"; public string Id { get; set; } diff --git a/Model/Entity/Parts/EntityIdVanguardModel.cs b/Model/Entity/Parts/EntityIdVanguardModel.cs index 8ae4d7f..6655c04 100644 --- a/Model/Entity/Parts/EntityIdVanguardModel.cs +++ b/Model/Entity/Parts/EntityIdVanguardModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityIdVanguardModel : IEntityPartInterface { +public class EntityIdVanguardModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityIdVanguardModel"; public string Id { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityInfoModel.cs b/Model/Entity/Parts/EntityInfoModel.cs index 3df01e6..891096b 100644 --- a/Model/Entity/Parts/EntityInfoModel.cs +++ b/Model/Entity/Parts/EntityInfoModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityInfoModel : IEntityPartInterface { +public class EntityInfoModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityInfoModel"; public string Name { get; set; } = ""; public string Descriptive { get; set; } = DescriptiveType.None; diff --git a/Model/Entity/Parts/EntityMechanicModel.cs b/Model/Entity/Parts/EntityMechanicModel.cs index 4deaf1c..0990c2d 100644 --- a/Model/Entity/Parts/EntityMechanicModel.cs +++ b/Model/Entity/Parts/EntityMechanicModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityMechanicModel : IEntityPartInterface { +public class EntityMechanicModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityMechanicModel"; public string Name { get; set; } = ""; public string Description { get; set; } diff --git a/Model/Entity/Parts/EntityMovementModel.cs b/Model/Entity/Parts/EntityMovementModel.cs index 932d2ee..26f4b89 100644 --- a/Model/Entity/Parts/EntityMovementModel.cs +++ b/Model/Entity/Parts/EntityMovementModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityMovementModel : IEntityPartInterface { +public class EntityMovementModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityMovementModel"; public float Speed { get; set; } = 0; public string Movement { get; set; } = MovementType.Ground; diff --git a/Model/Entity/Parts/EntityPassiveModel.cs b/Model/Entity/Parts/EntityPassiveModel.cs index 36bf6e2..522e77b 100644 --- a/Model/Entity/Parts/EntityPassiveModel.cs +++ b/Model/Entity/Parts/EntityPassiveModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityPassiveModel : IEntityPartInterface { +public class EntityPassiveModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityPassiveModel"; public string Name { get; set; } = ""; public string Description { get; set; } diff --git a/Model/Entity/Parts/EntityProductionModel.cs b/Model/Entity/Parts/EntityProductionModel.cs index 4f8a3ff..52dd3a5 100644 --- a/Model/Entity/Parts/EntityProductionModel.cs +++ b/Model/Entity/Parts/EntityProductionModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityProductionModel : IEntityPartInterface { +public class EntityProductionModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityProductionModel"; public int Alloy { get; set; } = 0; diff --git a/Model/Entity/Parts/EntityPyreRewardModel.cs b/Model/Entity/Parts/EntityPyreRewardModel.cs index 644fdc1..c9b9e46 100644 --- a/Model/Entity/Parts/EntityPyreRewardModel.cs +++ b/Model/Entity/Parts/EntityPyreRewardModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityPyreRewardModel : IEntityPartInterface { +public class EntityPyreRewardModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityPyreRewardModel"; public int BaseReward { get; set; } = 0; diff --git a/Model/Entity/Parts/EntityRequirementModel.cs b/Model/Entity/Parts/EntityRequirementModel.cs index 056107b..f4dbcd4 100644 --- a/Model/Entity/Parts/EntityRequirementModel.cs +++ b/Model/Entity/Parts/EntityRequirementModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityRequirementModel : IEntityPartInterface { +public class EntityRequirementModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityRequirementModel"; public string DataType { get; set; } public string Requirement { get; set; } = RequirementType.Production_Building; diff --git a/Model/Entity/Parts/EntityStrategyModel.cs b/Model/Entity/Parts/EntityStrategyModel.cs index 6346d6b..a2e6bd8 100644 --- a/Model/Entity/Parts/EntityStrategyModel.cs +++ b/Model/Entity/Parts/EntityStrategyModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityStrategyModel : IEntityPartInterface { +public class EntityStrategyModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityStrategyModel"; public string Notes { get; set; } = ""; } \ No newline at end of file diff --git a/Model/Entity/Parts/EntitySupplyModel.cs b/Model/Entity/Parts/EntitySupplyModel.cs index 6449e56..9eb7eb3 100644 --- a/Model/Entity/Parts/EntitySupplyModel.cs +++ b/Model/Entity/Parts/EntitySupplyModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntitySupplyModel : IEntityPartInterface { +public class EntitySupplyModel : IEntityPartInterface +{ public string Type { get; set; } = "EntitySupplyModel"; public int Takes { get; set; } = 0; public int Grants { get; set; } = 0; diff --git a/Model/Entity/Parts/EntityTierModel.cs b/Model/Entity/Parts/EntityTierModel.cs index 704f041..73fde60 100644 --- a/Model/Entity/Parts/EntityTierModel.cs +++ b/Model/Entity/Parts/EntityTierModel.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityTierModel : IEntityPartInterface { +public class EntityTierModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityTierModel"; public float Tier { get; set; } } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityVanguardAddedModel.cs b/Model/Entity/Parts/EntityVanguardAddedModel.cs index 1fc4ee6..94e195b 100644 --- a/Model/Entity/Parts/EntityVanguardAddedModel.cs +++ b/Model/Entity/Parts/EntityVanguardAddedModel.cs @@ -1,13 +1,12 @@ -using System; -using Model.Immortal.Entity.Data; -using Model.Immortal.Types; +using Model.Entity.Data; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityVanguardAddedModel : IEntityPartInterface { +public class EntityVanguardAddedModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityVanguardAddedModel"; - + public string ImmortalId { get; set; } = DataType.IMMORTAL_Ajari; - + public string ReplaceId { get; set; } = ""; } \ No newline at end of file diff --git a/Model/Entity/Parts/EntityVanguardReplacedModel.cs b/Model/Entity/Parts/EntityVanguardReplacedModel.cs index 25173f2..8110879 100644 --- a/Model/Entity/Parts/EntityVanguardReplacedModel.cs +++ b/Model/Entity/Parts/EntityVanguardReplacedModel.cs @@ -1,9 +1,9 @@ -using Model.Immortal.Entity.Data; -using Model.Immortal.Types; +using Model.Entity.Data; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityVanguardReplacedModel : IEntityPartInterface { +public class EntityVanguardReplacedModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityVanguardReplacedModel"; public string ImmortalId { get; set; } = DataType.IMMORTAL_Xol; public string ReplacedById { get; set; } = ""; diff --git a/Model/Entity/Parts/EntityVitalityModel.cs b/Model/Entity/Parts/EntityVitalityModel.cs index e919fc6..4eaa555 100644 --- a/Model/Entity/Parts/EntityVitalityModel.cs +++ b/Model/Entity/Parts/EntityVitalityModel.cs @@ -1,8 +1,9 @@ -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityVitalityModel : IEntityPartInterface { +public class EntityVitalityModel : IEntityPartInterface +{ public string Type { get; set; } = "EntityVitalityModel"; public int Health { get; set; } = 0; public int DefenseLayer { get; set; } = 0; diff --git a/Model/Entity/Parts/EntityWeaponModel.cs b/Model/Entity/Parts/EntityWeaponModel.cs index 81f054b..9a02682 100644 --- a/Model/Entity/Parts/EntityWeaponModel.cs +++ b/Model/Entity/Parts/EntityWeaponModel.cs @@ -1,9 +1,9 @@ -using System; -using Model.Immortal.Types; +using Model.Types; -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public class EntityWeaponModel : IEntityPartInterface { +public class EntityWeaponModel : IEntityPartInterface +{ public int Id { get; set; } = 1; public int EntityModelId { get; set; } public virtual EntityModel EntityModel { get; set; } diff --git a/Model/Entity/Parts/IEntityPartInterface.cs b/Model/Entity/Parts/IEntityPartInterface.cs index 429c2b3..8e84d91 100644 --- a/Model/Entity/Parts/IEntityPartInterface.cs +++ b/Model/Entity/Parts/IEntityPartInterface.cs @@ -1,3 +1,5 @@ -namespace Model.Immortal.Entity.Parts; +namespace Model.Entity.Parts; -public interface IEntityPartInterface { } \ No newline at end of file +public interface IEntityPartInterface +{ +} \ No newline at end of file diff --git a/Model/Entity/Types/ArmourType.cs b/Model/Entity/Types/ArmourType.cs index 2a1e297..d3cf2e7 100644 --- a/Model/Entity/Types/ArmourType.cs +++ b/Model/Entity/Types/ArmourType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class ArmorType { +public static class ArmorType +{ public static string Light = "Light"; public static string Medium = "Medium"; public static string Heavy = "Heavy"; diff --git a/Model/Entity/Types/BuildType.cs b/Model/Entity/Types/BuildType.cs index 43498ee..d31b4ee 100644 --- a/Model/Entity/Types/BuildType.cs +++ b/Model/Entity/Types/BuildType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class BuildType { +public static class BuildType +{ public static string Eco = "Eco"; public static string Harass = "Harass"; public static string Pyre_Hunting = "Pyre_Hunting"; diff --git a/Model/Entity/Types/DefenseType.cs b/Model/Entity/Types/DefenseType.cs index 6a3510b..7f501c2 100644 --- a/Model/Entity/Types/DefenseType.cs +++ b/Model/Entity/Types/DefenseType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class DefenseType { +public static class DefenseType +{ public static string None = "None"; public static string Shield = "Shield"; public static string Overgrowth = "Overgrowth"; diff --git a/Model/Entity/Types/DescriptiveType.cs b/Model/Entity/Types/DescriptiveType.cs index a30cd1e..bdecc14 100644 --- a/Model/Entity/Types/DescriptiveType.cs +++ b/Model/Entity/Types/DescriptiveType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class DescriptiveType { +public static class DescriptiveType +{ public static string None = "None"; public static string Frontliner = "Frontliner"; public static string Force_Multiplier = "Force_Multiplier"; diff --git a/Model/Entity/Types/FactionType.cs b/Model/Entity/Types/FactionType.cs index bf8dc0e..cea3485 100644 --- a/Model/Entity/Types/FactionType.cs +++ b/Model/Entity/Types/FactionType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class FactionType { +public static class FactionType +{ public static string None = "None"; public static string Any = "Any"; public static string Neutral = "Neutral"; diff --git a/Model/Entity/Types/ImmortalType.cs b/Model/Entity/Types/ImmortalType.cs index a0ad736..9a49545 100644 --- a/Model/Entity/Types/ImmortalType.cs +++ b/Model/Entity/Types/ImmortalType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class ImmortalType { +public static class ImmortalType +{ public static string None = "None"; public static string Any = "Any"; diff --git a/Model/Entity/Types/MovementType.cs b/Model/Entity/Types/MovementType.cs index 66254be..41eb2d8 100644 --- a/Model/Entity/Types/MovementType.cs +++ b/Model/Entity/Types/MovementType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class MovementType { +public static class MovementType +{ public static string Ground = "Ground"; public static string Air = "Air"; } \ No newline at end of file diff --git a/Model/Entity/Types/RequirementType.cs b/Model/Entity/Types/RequirementType.cs index e8eea86..b24320c 100644 --- a/Model/Entity/Types/RequirementType.cs +++ b/Model/Entity/Types/RequirementType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class RequirementType { +public static class RequirementType +{ public static string Production_Building = "Production_Building"; public static string Research_Building = "Research_Building"; public static string Research_Upgrade = "Research_Upgrade"; diff --git a/Model/Entity/Types/ResourceType.cs b/Model/Entity/Types/ResourceType.cs index 5320fca..799effa 100644 --- a/Model/Entity/Types/ResourceType.cs +++ b/Model/Entity/Types/ResourceType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public enum ResourceType { +public enum ResourceType +{ Alloy, Ether, Pyre diff --git a/Model/Entity/Types/TargetType.cs b/Model/Entity/Types/TargetType.cs index bbe6ee7..8ac1fbe 100644 --- a/Model/Entity/Types/TargetType.cs +++ b/Model/Entity/Types/TargetType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Types; +namespace Model.Types; -public static class TargetType { +public static class TargetType +{ public static string Ground = "Ground"; public static string Air = "Air"; public static string All = "All"; diff --git a/Model/Development/Git/CommitType.cs b/Model/Git/CommitType.cs similarity index 91% rename from Model/Development/Git/CommitType.cs rename to Model/Git/CommitType.cs index f2a9629..2fde070 100644 --- a/Model/Development/Git/CommitType.cs +++ b/Model/Git/CommitType.cs @@ -1,6 +1,7 @@ -namespace Model.Work.Git; +namespace Model.Development.Git; -public class CommitType { +public class CommitType +{ public const string Feature = "Feature"; public const string Game_Patch = "Game Patch"; public const string Fix = "Fix"; diff --git a/Model/Development/Git/ChangeModel.cs b/Model/Git/GitChangeModel.cs similarity index 53% rename from Model/Development/Git/ChangeModel.cs rename to Model/Git/GitChangeModel.cs index 51b4121..1e34a20 100644 --- a/Model/Development/Git/ChangeModel.cs +++ b/Model/Git/GitChangeModel.cs @@ -1,19 +1,11 @@ using System; -using System.Collections.Generic; -namespace Model.Work.Git; - -public class ChangeModel { - public static int id; - - public static List exampleData = new() { new ChangeModel() }; - - public ChangeModel() { - Id = id++; - } +namespace Model.Development.Git; +public class GitChangeModel +{ public int Id { get; set; } = 1; - public int PatchModelId { get; set; } = 1; + public int GitPatchModelId { get; set; } = 1; public string Name { get; set; } = "Add name..."; public string Description { get; set; } = "Add desciption..."; public string Commit { get; set; } = CommitType.Feature; diff --git a/Model/Git/GitPatchModel.cs b/Model/Git/GitPatchModel.cs new file mode 100644 index 0000000..a94f9b3 --- /dev/null +++ b/Model/Git/GitPatchModel.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; + +namespace Model.Development.Git; + +public class GitPatchModel +{ + public int Id { get; set; } = 1; + public string Name { get; set; } = "Add name..."; + public DateTime Date { get; set; } = DateTime.Now; + public ICollection GitChangeModels { get; set; } = new List(); + public string Important { get; set; } = "False"; +} \ No newline at end of file diff --git a/Model/Hotkeys/HotKeyType.cs b/Model/Hotkeys/HotKeyType.cs index 8c91dea..bf65a1a 100644 --- a/Model/Hotkeys/HotKeyType.cs +++ b/Model/Hotkeys/HotKeyType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.Hotkeys; +namespace Model.Hotkeys; -public enum KeyType { +public enum KeyType +{ Action, ControlGroup, Cancel, diff --git a/Model/Hotkeys/HotkeyModel.cs b/Model/Hotkeys/HotkeyModel.cs index 4fd52a1..792ba2c 100644 --- a/Model/Hotkeys/HotkeyModel.cs +++ b/Model/Hotkeys/HotkeyModel.cs @@ -1,8 +1,9 @@ using System.Collections.Generic; -namespace Model.Immortal.Hotkeys; +namespace Model.Hotkeys; -public class HotkeyModel { +public class HotkeyModel +{ public static readonly string[] KeyGroups = { "Z", "1", "2", "TAB", "CONTROL", "SHIFT", "C" }; public static readonly string[] HotKeys = { "`", "Q", "W", "E", "R", "A", "S", "F", "X", "V" }; public string KeyText { get; set; } @@ -11,7 +12,8 @@ public class HotkeyModel { public int PositionY { get; set; } public bool IsHidden { get; set; } - public string GetColor() { + public string GetColor() + { return KeyType == KeyType.Action ? "#404146" : KeyType == KeyType.Cancel ? "#621b1b" : KeyType == KeyType.ControlGroup ? "#443512" @@ -21,113 +23,133 @@ public class HotkeyModel { : "#37393F"; } - public static List GetAll() { - return new List { - new() { + public static List GetAll() + { + return new List + { + new() + { KeyText = "`", KeyType = KeyType.Cancel, PositionX = 0, PositionY = 0 }, - new() { + new() + { KeyText = "TAB", KeyType = KeyType.ControlGroup, PositionX = 0, PositionY = 1 }, - new() { + new() + { KeyText = "1", KeyType = KeyType.ControlGroup, PositionX = 1, PositionY = 0 }, - new() { + new() + { KeyText = "Q", KeyType = KeyType.Action, PositionX = 1, PositionY = 1 }, - new() { + new() + { KeyText = "W", KeyType = KeyType.Action, PositionX = 2, PositionY = 1 }, - new() { + new() + { KeyText = "E", KeyType = KeyType.Action, PositionX = 3, PositionY = 1 }, - new() { + new() + { KeyText = "R", KeyType = KeyType.Action, PositionX = 4, PositionY = 1 }, - new() { + new() + { KeyText = "A", KeyType = KeyType.Action, PositionX = 1, PositionY = 2 }, - new() { + new() + { KeyText = "S", KeyType = KeyType.Action, PositionX = 2, PositionY = 2 }, - new() { + new() + { KeyText = "D", KeyType = KeyType.ControlGroup, PositionX = 3, PositionY = 2 }, - new() { + new() + { KeyText = "F", KeyType = KeyType.Action, PositionX = 4, PositionY = 2 }, - new() { + new() + { KeyText = "Z", KeyType = KeyType.ControlGroup, PositionX = 1, PositionY = 3 }, - new() { + new() + { KeyText = "X", KeyType = KeyType.Action, PositionX = 2, PositionY = 3 }, - new() { + new() + { KeyText = "C", KeyType = KeyType.ControlGroup, PositionX = 3, PositionY = 3 }, - new() { + new() + { KeyText = "V", KeyType = KeyType.Action, PositionX = 4, PositionY = 3 }, - new() { + new() + { KeyText = "SPACE", KeyType = KeyType.Advance, PositionX = 1, PositionY = 4 }, // Economy - new() { + new() + { KeyText = "SHIFT", //TODO Update when game changes KeyType = KeyType.Economy, PositionX = 0, PositionY = 2 }, // Pyre - new() { + new() + { KeyText = "2", KeyType = KeyType.Pyre, PositionX = 2, @@ -136,7 +158,8 @@ public class HotkeyModel { }, // Morphs - new() { + new() + { KeyText = "CONTROL", KeyType = KeyType.Economy, PositionX = 0, diff --git a/Model/Hotkeys/KeyType.cs b/Model/Hotkeys/KeyType.cs index e3f2c99..e6b7664 100644 --- a/Model/Hotkeys/KeyType.cs +++ b/Model/Hotkeys/KeyType.cs @@ -1,5 +1,6 @@ -namespace Model.Immortal.Hotkeys; +namespace Model.Hotkeys; -public enum HotKeyType { +public enum HotKeyType +{ SPACE } \ No newline at end of file diff --git a/Model/MemoryTester/AnswerEventArgs.cs b/Model/MemoryTester/AnswerEventArgs.cs index 415c8f3..51bc514 100644 --- a/Model/MemoryTester/AnswerEventArgs.cs +++ b/Model/MemoryTester/AnswerEventArgs.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.MemoryTester; +namespace Model.MemoryTester; -public class AnswerEventArgs { +public class AnswerEventArgs +{ public string Name { get; set; } public bool IsCorrect { get; set; } public int Guess { get; set; } diff --git a/Model/MemoryTester/MemoryEntityModel.cs b/Model/MemoryTester/MemoryEntityModel.cs index 8609d26..114cfe2 100644 --- a/Model/MemoryTester/MemoryEntityModel.cs +++ b/Model/MemoryTester/MemoryEntityModel.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; -namespace Model.Immortal.MemoryTester; +namespace Model.MemoryTester; -public class MemoryEntityModel { - public static List TestData = new() { +public class MemoryEntityModel +{ + public static List TestData = new() + { new MemoryEntityModel { Id = 1, Name = "Masked Hunter" }, new MemoryEntityModel { Id = 2, Name = "Scepter" }, new MemoryEntityModel { Id = 3, Name = "Wraith Bow" }, diff --git a/Model/MemoryTester/MemoryQuestionModel.cs b/Model/MemoryTester/MemoryQuestionModel.cs index 651aeae..85ea804 100644 --- a/Model/MemoryTester/MemoryQuestionModel.cs +++ b/Model/MemoryTester/MemoryQuestionModel.cs @@ -1,9 +1,11 @@ using System.Collections.Generic; -namespace Model.Immortal.MemoryTester; +namespace Model.MemoryTester; -public class MemoryQuestionModel { - public static List TestData = new() { +public class MemoryQuestionModel +{ + public static List TestData = new() + { new MemoryQuestionModel { Id = 1, MemoryEntityModelId = 1, Name = "Range", Answer = 600, IsRevealed = false }, new MemoryQuestionModel { Id = 2, MemoryEntityModelId = 2, Name = "Range", Answer = 600, IsRevealed = false }, new MemoryQuestionModel { Id = 3, MemoryEntityModelId = 3, Name = "Range", Answer = 600, IsRevealed = false }, diff --git a/Model/Notes/NoteConnectionModel.cs b/Model/Notes/NoteConnectionModel.cs new file mode 100644 index 0000000..152de3d --- /dev/null +++ b/Model/Notes/NoteConnectionModel.cs @@ -0,0 +1,10 @@ +using System.ComponentModel.DataAnnotations; + +namespace Model.Notes; + +public class NoteConnectionModel +{ + [Key] public int Id { get; set; } = 1; + public int ParentId { get; set; } = 1; + public int ChildId { get; set; } = 1; +} \ No newline at end of file diff --git a/Model/Notes/NoteContentModel.cs b/Model/Notes/NoteContentModel.cs new file mode 100644 index 0000000..4101fd5 --- /dev/null +++ b/Model/Notes/NoteContentModel.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations.Schema; +using Model.Doc; + +namespace Model.Notes; + +public class NoteContentModel +{ + public int Id { get; set; } + + public int? ParentId { get; set; } = null; + + public int? NoteSectionModelId { get; set; } = null; + public string Href { get; set; } + //public DateTime LastUpdated { get; set; } + + public DateTime CreatedDate { get; set; } + public DateTime UpdatedDate { get; set; } + + public string Name { get; set; } + + public string Description { get; set; } + public string Content { get; set; } + public string IsHidden { get; set; } = "False"; + public string IsPreAlpha { get; set; } = "True"; + + [NotMapped] public virtual ICollection NoteContentModels { get; set; } = new List(); + [NotMapped] public virtual NoteContentModel Parent { get; set; } + [NotMapped] public virtual int PageOrder { get; set; } + + + private string GetLink() + { + var link = Href; + + if (Parent != null) link = $"{Parent.GetLink()}/" + link; + + return link; + } + + public string GetNoteLink() + { + return $"notes/{GetLink()}"; + } + +} \ No newline at end of file diff --git a/Model/Notes/NoteModel.cs b/Model/Notes/NoteModel.cs deleted file mode 100644 index 2ddd8c7..0000000 --- a/Model/Notes/NoteModel.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Model.Immortal.Notes; - -public class NoteModel { - public int Id { get; set; } - public DateTime LastUpdated { get; set; } - public string Name { get; set; } - public string Section { get; set; } - public string Description { get; set; } - public bool IsHidden { get; set; } = false; - public bool IsPreAlpha { get; set; } = true; - - public string DEPRECATED_Id() { - return (Section + "-" + Name).ToLower().Replace(" ", "-"); - } -} \ No newline at end of file diff --git a/Model/Notes/NoteSectionModel.cs b/Model/Notes/NoteSectionModel.cs new file mode 100644 index 0000000..8bc8286 --- /dev/null +++ b/Model/Notes/NoteSectionModel.cs @@ -0,0 +1,15 @@ +using System.Collections.Generic; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Model.Notes; + +public class NoteSectionModel +{ + [Key] public int Id { get; set; } + + public string Name { get; set; } + + [NotMapped] + public virtual ICollection NoteContentModels { get; set; } = new List(); +} \ No newline at end of file diff --git a/Model/RoadMap/Enums/ReleasePriorityType.cs b/Model/RoadMap/Enums/ReleasePriorityType.cs index 65b2101..633300d 100644 --- a/Model/RoadMap/Enums/ReleasePriorityType.cs +++ b/Model/RoadMap/Enums/ReleasePriorityType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.RoadMap.Enums; +namespace Model.RoadMap.Enums; -public class ReleasePriorityType { +public class ReleasePriorityType +{ public static string High = "High"; public static string Medium = "Medium"; public static string Low = "Low"; diff --git a/Model/RoadMap/Enums/ReleaseStatusType.cs b/Model/RoadMap/Enums/ReleaseStatusType.cs index dc924ac..8867d9d 100644 --- a/Model/RoadMap/Enums/ReleaseStatusType.cs +++ b/Model/RoadMap/Enums/ReleaseStatusType.cs @@ -1,6 +1,7 @@ -namespace Model.Immortal.RoadMap.Enums; +namespace Model.RoadMap.Enums; -public class ReleaseStatusType { +public class ReleaseStatusType +{ public static string In_Development = "In_Development"; public static string Done = "Done"; public static string Future_Possibility = "Future_Possibility"; diff --git a/Model/RoadMap/ImmortalRoadMapModel.cs b/Model/RoadMap/ImmortalRoadMapModel.cs index b47e8e3..364e0e1 100644 --- a/Model/RoadMap/ImmortalRoadMapModel.cs +++ b/Model/RoadMap/ImmortalRoadMapModel.cs @@ -1,67 +1,78 @@ using System.Collections.Generic; -using Model.Immortal.RoadMap.Enums; +using Model.RoadMap.Enums; -namespace Model.Immortal.RoadMap; +namespace Model.RoadMap; -public class ImmortalRoadMapModel { - public static readonly List Data = new() { - new ImmortalRoadMapModel { +public class ImmortalRoadMapModel +{ + public static readonly List Data = new() + { + new ImmortalRoadMapModel + { Name = "UI Overhaul", Description = @"In the process of redoing the UI. Perhaps add 'Making Of' page for development related details, including a visual list of all components used, for ease of design reference. Ideally avoid menu bloat. Database, Build Calculator, Notes and Documentation, should be obvious main pages. Review 900px width on all pages.", Priority = ReleasePriorityType.High, Status = ReleaseStatusType.In_Development }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Build Calculator Improvements", Description = @"The Calculator will be optimized to perform faster. It needs to be updated to consider training queue limits. Also, it needs error popups added for not enough ether, not enough supply, or no more interval time.", Priority = ReleasePriorityType.High, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Build Calculator Pyre", Description = @"Build calculator should also handle pyre generation over time. 2 key will represent taking pyre camps. Make sure people can mark ""casted"" pyre spells as a part of the build order.", Priority = ReleasePriorityType.Medium, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Build Comparisons", Description = @"You should be able to calculate two builds and load them against each other. Compare armies over time, to see when it would be best to strike against a certain build, and when it would be too late.", Priority = ReleasePriorityType.Medium, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Notes", Description = @"There should be general notes on how to play Immortal. Nothing too extensive, but general faction and gameplay feel, like mentioning mechanics like Overgrowth for Aru and Wards for Q'Rath. Interesting but basic lore notes are also ideal, but all of these notes still need to be sortable in a method that feels natural, not a giant text bloat.", Priority = ReleasePriorityType.High, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Documentation", Description = @"There should be documents on how to use this website. Calculator, Database, etc. Ideally, these documents will be designed in a way that becomes easily maintainable with patches. (Currently, some QA document type stuff is appended to the bottom of each tool page.) Add a button to easily go from the current tool, to its matching documented.", Priority = ReleasePriorityType.Medium, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Test Automation", Description = @"All patches should be tested via test automation, to avoid obvious bugs from getting into production. Add a informational test automation page to the Development section.", Priority = ReleasePriorityType.Medium, Status = ReleaseStatusType.Planned }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Hot Key Reference", Description = @"Assuming the game continues to use Unreal-based hotkeys, there should be a reference for viewing and generating hotkey templates. Perhaps link to community hotkey files for people that do not wish to write their own.", Priority = ReleasePriorityType.Low, Status = ReleaseStatusType.Future_Possibility }, - new ImmortalRoadMapModel { + new ImmortalRoadMapModel + { Name = "Data Features", Description = @"Being able to save and load the state of the website would be cool. User's would keep all the data as JSON on their local machine, and just be able to load it when visiting the website. Being able to use the website offline would also be cool. People would only visit the live website to get updates. Perhaps offline website could do a check for this update version.", diff --git a/Model/Website/Enums/NavSelectionType.cs b/Model/Website/Enums/NavSelectionType.cs index 5597275..d5de6ac 100644 --- a/Model/Website/Enums/NavSelectionType.cs +++ b/Model/Website/Enums/NavSelectionType.cs @@ -1,6 +1,7 @@ namespace Model.Website.Enums; -public enum NavSelectionType { +public enum NavSelectionType +{ None, Section, Page diff --git a/Model/Website/Enums/NavigationStateType.cs b/Model/Website/Enums/NavigationStateType.cs index 906eadd..7ec0399 100644 --- a/Model/Website/Enums/NavigationStateType.cs +++ b/Model/Website/Enums/NavigationStateType.cs @@ -1,6 +1,7 @@ namespace Model.Website.Enums; -public class NavigationStateType { +public class NavigationStateType +{ public const string Default = "Default"; public const string Hovering_Menu = "Hovering_Menu"; } \ No newline at end of file diff --git a/Model/Website/Enums/WebDeploymentType.cs b/Model/Website/Enums/WebDeploymentType.cs index b11bed8..f98929e 100644 --- a/Model/Website/Enums/WebDeploymentType.cs +++ b/Model/Website/Enums/WebDeploymentType.cs @@ -1,6 +1,7 @@ namespace Model.Website.Enums; -public enum WebDeploymentType { +public enum WebDeploymentType +{ Private, Public, Immortal diff --git a/Model/Website/Enums/WebPageType.cs b/Model/Website/Enums/WebPageType.cs index 1234ec2..e2d97ee 100644 --- a/Model/Website/Enums/WebPageType.cs +++ b/Model/Website/Enums/WebPageType.cs @@ -1,6 +1,7 @@ namespace Model.Website.Enums; -public class WebPageType { +public class WebPageType +{ //TODO Deprecated public static readonly string None = "725d1adb-d5c8-4e51-bafb-09c86a94d0b0"; public static readonly string IMMORTAL_About = "16e56a46-e593-4de5-a2ff-272b41a28d99"; diff --git a/Model/Website/Enums/WebSectionType.cs b/Model/Website/Enums/WebSectionType.cs index ea62063..7d905e6 100644 --- a/Model/Website/Enums/WebSectionType.cs +++ b/Model/Website/Enums/WebSectionType.cs @@ -1,6 +1,7 @@ namespace Model.Website.Enums; -public class WebSectionType { +public class WebSectionType +{ public static readonly string None = "28eefe79-3808-48da-8665-3eab5aebca1d"; public static readonly string ImmortalGeneral = "1a7dce11-57ff-453e-abac-6eeab01b9a61"; diff --git a/Model/Website/SupportedWebSizes.cs b/Model/Website/SupportedWebSizes.cs index e66251c..bfe8355 100644 --- a/Model/Website/SupportedWebSizes.cs +++ b/Model/Website/SupportedWebSizes.cs @@ -1,6 +1,7 @@ namespace Model.Website; -public static class SupportedWebSizes { +public static class SupportedWebSizes +{ // Mins //public static string Phone = "0px"; public static string Tablet = "479px"; diff --git a/Model/Website/WebDeploymentModel.cs b/Model/Website/WebDeploymentModel.cs index 3a06ba5..d60cac4 100644 --- a/Model/Website/WebDeploymentModel.cs +++ b/Model/Website/WebDeploymentModel.cs @@ -3,16 +3,20 @@ using Model.Website.Enums; namespace Model.Website; -public class WebDeploymentModel { +public class WebDeploymentModel +{ public static WebDeploymentType DeploymentType { get; set; } = WebDeploymentType.Private; - public static List Get() { + public static List Get() + { return DeploymentType == WebDeploymentType.Immortal ? GetImmortal() : new List(); } - public static List GetImmortal() { - return new List { + public static List GetImmortal() + { + return new List + { "", "build-calculator", "comparison-charts", diff --git a/Model/Website/WebDescriptionModel.cs b/Model/Website/WebDescriptionModel.cs index 9764a60..2b90e64 100644 --- a/Model/Website/WebDescriptionModel.cs +++ b/Model/Website/WebDescriptionModel.cs @@ -4,7 +4,8 @@ using Model.Website.Enums; namespace Model.Website; -public class WebDescriptionModel { +public class WebDescriptionModel +{ public static readonly List List = new(); public string Name { get; set; } = "Add Name"; @@ -12,7 +13,8 @@ public class WebDescriptionModel { public string Parent { get; set; } = WebSectionType.None; public bool IsPrivate { get; set; } = true; - public static IEnumerable GetPages(string forSection) { + public static IEnumerable GetPages(string forSection) + { return from page in List where page.Parent == forSection select page; diff --git a/Model/Website/WebPageModel.cs b/Model/Website/WebPageModel.cs index d122cba..3cccd4a 100644 --- a/Model/Website/WebPageModel.cs +++ b/Model/Website/WebPageModel.cs @@ -1,6 +1,7 @@ namespace Model.Website; -public class WebPageModel { +public class WebPageModel +{ public int Id { get; set; } public int WebSectionModelId { get; set; } public string Name { get; set; } = "Add name"; diff --git a/Model/Website/WebSectionModel.cs b/Model/Website/WebSectionModel.cs index 0018cc9..06e517c 100644 --- a/Model/Website/WebSectionModel.cs +++ b/Model/Website/WebSectionModel.cs @@ -1,6 +1,7 @@ namespace Model.Website; -public class WebSectionModel { +public class WebSectionModel +{ public int Id { get; set; } public string Name { get; set; } = "Add name"; public string Description { get; set; } = "Add description"; diff --git a/Services/Development/AgileService.cs b/Services/Development/AgileService.cs index 1d66106..fb22786 100644 --- a/Services/Development/AgileService.cs +++ b/Services/Development/AgileService.cs @@ -11,19 +11,17 @@ public class AgileService : IAgileService { private readonly HttpClient httpClient; private bool isLoaded; - - private event Action _onChange; + private event Action OnChange = default!; - public AgileService(HttpClient httpClient) { this.httpClient = httpClient; } #if NO_SQL - public List SprintModels { get; set; } - public List TaskModels { get; set; } + public List? AgileSprintModels { get; set; } + public List? AgileTaskModels { get; set; } #else private DatabaseContext Database { get; set; } @@ -32,12 +30,12 @@ public class AgileService : IAgileService { #endif - public void Subscribe(Action action) { - _onChange += action; + public void Subscribe(Action? action) { + OnChange += action; } - public void Unsubscribe(Action action) { - _onChange -= action; + public void Unsubscribe(Action? action) { + OnChange -= action; } public bool IsLoaded() { @@ -50,13 +48,40 @@ public class AgileService : IAgileService { return; } - SprintModels = (await httpClient.GetFromJsonAsync("generated/SprintModels.json")?? Array.Empty() ).ToList(); - TaskModels =(await httpClient.GetFromJsonAsync("generated/TaskModels.json") ?? Array.Empty()).ToList(); - + AgileSprintModels = (await httpClient.GetFromJsonAsync("generated/AgileSprintModels.json")?? Array.Empty() ).ToList(); + AgileTaskModels = (await httpClient.GetFromJsonAsync("generated/AgileTaskModels.json") ?? Array.Empty()).ToList(); + + foreach (var agileTask in AgileTaskModels) + { + if (agileTask.AgileSprintModelId != null) + { + SprintById(agileTask.AgileSprintModelId.Value)?.AgileTaskModels.Add(agileTask); + } + } + isLoaded = true; NotifyDataChanged(); } + + private AgileSprintModel? SprintById(int id) + { + foreach (var data in AgileSprintModels!) + if (data.Id == id) + return data; + + return null; + } + + private AgileTaskModel? TaskById(int id) + { + foreach (var data in AgileTaskModels!) + if (data.Id == id) + return data; + + return null; + } + #else public async Task Load(DatabaseContext database) { Database = database; @@ -65,8 +90,8 @@ public class AgileService : IAgileService { return; } - Database.SprintModels.AddRange(await httpClient.GetFromJsonAsync("generated/SprintModels.json")); - Database.TaskModels.AddRange(await httpClient.GetFromJsonAsync("generated/TaskModels.json")); + Database.SprintModels.AddRange(await httpClient.GetFromJsonAsync("generated/AgileSprintModels.json")); + Database.TaskModels.AddRange(await httpClient.GetFromJsonAsync("generated/AgileTaskModels.json")); Database.SaveChanges(); @@ -81,6 +106,6 @@ public class AgileService : IAgileService { } private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } } \ No newline at end of file diff --git a/Services/Development/DocumentationService.cs b/Services/Development/DocumentationService.cs index 0291788..be4085d 100644 --- a/Services/Development/DocumentationService.cs +++ b/Services/Development/DocumentationService.cs @@ -1,5 +1,5 @@ using System.Net.Http.Json; -using Model.Documentation; +using Model.Doc; #if NO_SQL @@ -13,29 +13,31 @@ namespace Services.Development; public class DocumentationService : IDocumentationService { private readonly HttpClient httpClient; - private bool isLoaded; - - - private event Action _onChange; - public DocumentationService(HttpClient httpClient) { this.httpClient = httpClient; } - public List DocumentationModels { get; set; } + public List DocContentModels { get; set; } = new(); + + public List DocContentModelsByPageOrder { get; set; } = new(); + public List DocSectionModels { get; set; } = new(); - public void Subscribe(Action action) + public List DocConnectionModels { get; set; } = new(); + + + + public void Subscribe(Action? action) { - _onChange += action; + OnChange += action; } - public void Unsubscribe(Action action) + public void Unsubscribe(Action? action) { - _onChange -= action; + OnChange -= action; } public bool IsLoaded() @@ -48,9 +50,25 @@ public class DocumentationService : IDocumentationService { if (isLoaded) return; - DocumentationModels = - (await httpClient.GetFromJsonAsync("generated/DocumentationModels.json") ?? Array.Empty()).ToList(); + DocContentModels = + (await httpClient.GetFromJsonAsync("generated/DocContentModels.json") ?? + Array.Empty()).ToList(); + + DocConnectionModels = + (await httpClient.GetFromJsonAsync("generated/DocConnectionModels.json") ?? + Array.Empty()).ToList(); + DocSectionModels = + (await httpClient.GetFromJsonAsync("generated/DocSectionModels.json") ?? + Array.Empty()).ToList(); + + +#if DEBUG + AddTestCode(); +#endif + + //TODO Until SQL work in production. Or, why even add SQL? + SortSQL(); isLoaded = true; @@ -63,9 +81,108 @@ public class DocumentationService : IDocumentationService NotifyDataChanged(); } + private event Action? OnChange; + + private DocContentModel? ContentById(int id) + { + foreach (var doc in DocContentModels!) + if (doc.Id == id) + return doc; + + return null; + } + + private void SortSQL() + { + foreach (var connection in DocConnectionModels) + { + ContentById(connection.ParentId)!.DocumentationModels.Add(ContentById(connection.ChildId)); + ContentById(connection.ChildId)!.Parent = ContentById(connection.ParentId); + } + + foreach (var content in DocContentModels) + { + if (content.DocSectionModelId != null) + { + foreach (var section in DocSectionModels) + { + if (section.Id == content.DocSectionModelId) + { + section.DocumentationModels.Add(content); + } + } + } + } + + ByPageOrder(); + } + + + private void ByPageOrder() + { + DocContentModelsByPageOrder = new List(); + + int order = 1; + foreach (var documentation in DocContentModels) + { + if (documentation.Parent != null) continue; + + documentation.PageOrder = order++; + DocContentModelsByPageOrder.Add(documentation); + + void GetAllChildren(DocContentModel docs) + { + foreach (var doc in docs.DocumentationModels) + { + doc.PageOrder = order++; + DocContentModelsByPageOrder.Add(doc); + + if (doc.DocumentationModels.Count > 0) GetAllChildren(doc); + } + } + + GetAllChildren(documentation); + } + + DocContentModelsByPageOrder = DocContentModelsByPageOrder.OrderBy(docContent => docContent.PageOrder).ToList(); + } + + + private void AddTestCode() + { + DocContentModels.Add(new DocContentModel + { + Id = -110, Name = "Root Parent", Href = "root-parent", CreatedDate = DateTime.Now, + UpdatedDate = DateTime.Now, Content = "Example root parent" + }); + DocContentModels.Add(new DocContentModel + { + Id = -109, Name = "Child Parent", Href = "child-parent", CreatedDate = DateTime.Now, + UpdatedDate = DateTime.Now, Content = "Example child parent" + }); + DocContentModels.Add(new DocContentModel + { + Id = -108, Name = "Child Child 2", Href = "child-child", CreatedDate = DateTime.Now, + UpdatedDate = DateTime.Now, Content = "Example child child" + }); + DocContentModels.Add(new DocContentModel + { + Id = -107, Name = "A", Href = "A", CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, Content = "A" + }); + DocContentModels.Add(new DocContentModel + { + Id = -106, Name = "B", Href = "B", CreatedDate = DateTime.Now, UpdatedDate = DateTime.Now, Content = "B" + }); + + DocConnectionModels.Add(new DocConnectionModel { Id = -110, ParentId = -110, ChildId = -109 }); + DocConnectionModels.Add(new DocConnectionModel { Id = -109, ParentId = -109, ChildId = -108 }); + DocConnectionModels.Add(new DocConnectionModel { Id = -108, ParentId = -108, ChildId = -106 }); + DocConnectionModels.Add(new DocConnectionModel { Id = -107, ParentId = -108, ChildId = -107 }); + } + private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } } \ No newline at end of file diff --git a/Services/Development/GitService.cs b/Services/Development/GitService.cs index d60bdbe..85f1a9c 100644 --- a/Services/Development/GitService.cs +++ b/Services/Development/GitService.cs @@ -1,5 +1,5 @@ using System.Net.Http.Json; -using Model.Work.Git; +using Model.Development.Git; #if NO_SQL @@ -15,13 +15,16 @@ public class GitService : IGitService { private bool isLoaded; + private event Action OnChange = default!; + + public GitService(HttpClient httpClient) { this.httpClient = httpClient; } #if NO_SQL - public List ChangeModels { get; set; } - public List PatchModels { get; set; } + public List GitChangeModels { get; set; } = default!; + public List GitPatchModels { get; set; } = default!; #else public DbSet ChangeModels => Database.ChangeModels; public DbSet PatchModels => Database.PatchModels; @@ -31,11 +34,11 @@ public class GitService : IGitService { public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + OnChange -= action; } public bool IsLoaded() { @@ -51,8 +54,8 @@ public class GitService : IGitService { return; } - ChangeModels = (await httpClient.GetFromJsonAsync("generated/ChangeModels.json") ?? Array.Empty()).ToList(); - PatchModels = (await httpClient.GetFromJsonAsync("generated/PatchModels.json") ?? Array.Empty()).ToList(); + GitChangeModels = (await httpClient.GetFromJsonAsync("generated/GitChangeModels.json") ?? Array.Empty()).ToList(); + GitPatchModels = (await httpClient.GetFromJsonAsync("generated/GitPatchModels.json") ?? Array.Empty()).ToList(); isLoaded = true; @@ -69,8 +72,8 @@ public class GitService : IGitService { return; } - Database.ChangeModels.AddRange(await httpClient.GetFromJsonAsync("generated/ChangeModels.json")); - Database.PatchModels.AddRange(await httpClient.GetFromJsonAsync("generated/PatchModels.json")); + Database.ChangeModels.AddRange(await httpClient.GetFromJsonAsync("generated/GitChangeModels.json")); + Database.PatchModels.AddRange(await httpClient.GetFromJsonAsync("generated/GitPatchModels.json")); Database.SaveChanges(); @@ -86,9 +89,7 @@ public class GitService : IGitService { NotifyDataChanged(); } - private event Action _onChange; - private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } } \ No newline at end of file diff --git a/Services/Development/NoteService.cs b/Services/Development/NoteService.cs index a6bf425..380b24e 100644 --- a/Services/Development/NoteService.cs +++ b/Services/Development/NoteService.cs @@ -1,5 +1,5 @@ using System.Net.Http.Json; -using Model.Immortal.Notes; +using Model.Notes; #if NO_SQL @@ -16,50 +16,115 @@ public class NoteService : INoteService { private bool isLoaded; - private event Action _onChange; + private event Action OnChange = default!; private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } public NoteService(HttpClient httpClient) { this.httpClient = httpClient; } - public List NoteModels { get; set; } + public List NoteContentModels { get; set; } = default!; + public List NoteConnectionModels { get; set; } + public List NoteSectionModels { get; set; } + + public List NoteContentModelsByPageOrder { get; set; } = new(); public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + OnChange -= action; } public bool IsLoaded() { return isLoaded; } - - public async Task Load() { - if (isLoaded) { return; } - NoteModels = (await httpClient.GetFromJsonAsync("generated/NoteModels.json") ?? Array.Empty()).ToList(); + NoteContentModels = (await httpClient.GetFromJsonAsync("generated/NoteContentModels.json") ?? Array.Empty()).ToList(); + NoteConnectionModels = (await httpClient.GetFromJsonAsync("generated/NoteConnectionModels.json") ?? Array.Empty()).ToList(); + NoteSectionModels = (await httpClient.GetFromJsonAsync("generated/NoteSectionModels.json") ?? Array.Empty()).ToList(); - isLoaded = true; + + SortSQL(); NotifyDataChanged(); } + + private NoteContentModel? ContentById(int id) + { + foreach (var data in NoteContentModels!) + if (data.Id == id) + return data; + return null; + } + + private void SortSQL() + { + foreach (var connection in NoteConnectionModels) + { + ContentById(connection.ParentId)!.NoteContentModels.Add(ContentById(connection.ChildId)); + ContentById(connection.ChildId)!.Parent = ContentById(connection.ParentId); + } + + foreach (var content in NoteContentModels) + { + if (content.NoteSectionModelId != null) + { + foreach (var section in NoteSectionModels) + { + if (section.Id == content.NoteSectionModelId) + { + section.NoteContentModels.Add(content); + } + } + } + } + + ByPageOrder(); + } + + private void ByPageOrder() + { + NoteContentModelsByPageOrder = new List(); + + int order = 1; + foreach (var note in NoteContentModels) + { + if (note.Parent != null) continue; + + note.PageOrder = order++; + NoteContentModelsByPageOrder.Add(note); + + void GetAllChildren(NoteContentModel docs) + { + foreach (var doc in docs.NoteContentModels) + { + doc.PageOrder = order++; + NoteContentModelsByPageOrder.Add(doc); + + if (doc.NoteContentModels.Count > 0) GetAllChildren(doc); + } + } + + GetAllChildren(note); + } + + NoteContentModelsByPageOrder = NoteContentModelsByPageOrder.OrderBy(noteContent => noteContent.PageOrder).ToList(); + } public void Update() { NotifyDataChanged(); } - } \ No newline at end of file diff --git a/Services/IServices.cs b/Services/IServices.cs index 51da9ad..fbebbd0 100644 --- a/Services/IServices.cs +++ b/Services/IServices.cs @@ -5,16 +5,16 @@ using Contexts; using Microsoft.EntityFrameworkCore; #endif -using Model.Documentation; -using Model.Immortal.BuildOrders; -using Model.Immortal.Economy; -using Model.Immortal.Entity; -using Model.Immortal.Entity.Data; -using Model.Immortal.MemoryTester; -using Model.Immortal.Notes; +using Model.Doc; +using Model.BuildOrders; +using Model.Economy; +using Model.Entity; +using Model.Entity.Data; +using Model.MemoryTester; +using Model.Notes; using Model.Website; using Model.Website.Enums; -using Model.Work.Git; +using Model.Development.Git; using Model.Work.Tasks; using Services.Immortal; @@ -65,15 +65,15 @@ public interface IWebsiteService { public interface IAgileService { #if NO_SQL - public List SprintModels { get; set; } - public List TaskModels { get; set; } + public List? AgileSprintModels { get; set; } + public List? AgileTaskModels { get; set; } #else public DbSet SprintModels { get; } public DbSet TaskModels { get; } #endif - public void Subscribe(Action action); - public void Unsubscribe(Action action); + public void Subscribe(Action? action); + public void Unsubscribe(Action? action); public void Update(); #if NO_SQL @@ -85,7 +85,9 @@ public interface IAgileService { } public interface INoteService { - public List NoteModels { get; set; } + public List NoteContentModels { get; set; } + public List NoteConnectionModels { get; set; } + public List NoteSectionModels { get; set; } public void Subscribe(Action action); public void Unsubscribe(Action action); public void Update(); @@ -93,10 +95,15 @@ public interface INoteService { public bool IsLoaded(); } -public interface IDocumentationService { - public List DocumentationModels { get; set; } - public void Subscribe(Action action); - public void Unsubscribe(Action action); +public interface IDocumentationService +{ + public List DocContentModels { get; set; } + public List DocConnectionModels { get; set; } + public List DocContentModelsByPageOrder { get; set; } + public List DocSectionModels { get; set; } + + public void Subscribe(Action? action); + public void Unsubscribe(Action? action); public void Update(); public Task Load(); public bool IsLoaded(); @@ -106,8 +113,8 @@ public interface IDocumentationService { public interface IGitService { #if NO_SQL - public List ChangeModels { get; set; } - public List PatchModels { get; set; } + public List GitChangeModels { get; set; } + public List GitPatchModels { get; set; } #else public DbSet ChangeModels { get; } public DbSet PatchModels { get; } @@ -143,7 +150,7 @@ public interface INavigationService { } public interface IBuildComparisonService { - public void SetBuilds(BuildComparisonModel buildComparison); + public void SetBuilds(BuildComparisonModel buildComparisonModel); public BuildComparisonModel Get(); public string BuildOrderAsYaml(); public string AsJson(); @@ -155,8 +162,8 @@ public interface IBuildComparisonService { public interface ITimingService { public int GetTiming(); public void SetTiming(int timing); - public void Subscribe(Action action); - public void Unsubscribe(Action action); + public void Subscribe(Action? action); + public void Unsubscribe(Action? action); } public interface IEconomyService { @@ -218,13 +225,13 @@ public interface IImmortalSelectionService { public interface IKeyService { public List GetAllPressedKeys(); - public string GetHotkey(); + public string? GetHotkey(); public string GetHotkeyGroup(); public bool IsHoldingSpace(); public bool AddPressedKey(string key); public bool RemovePressedKey(string key); - public void Subscribe(Action action); - public void Unsubscribe(Action action); + public void Subscribe(Action? action); + public void Unsubscribe(Action? action); } public interface IMemoryTesterService { diff --git a/Services/Immortal/BuildComparisionService.cs b/Services/Immortal/BuildComparisionService.cs index 0bcf627..83fd661 100644 --- a/Services/Immortal/BuildComparisionService.cs +++ b/Services/Immortal/BuildComparisionService.cs @@ -1,50 +1,32 @@ using System.Text; using System.Text.Json; using System.Text.Json.Serialization; -using Model.Immortal.BuildOrders; -using Model.Immortal.Entity; -using Model.Immortal.Entity.Data; +using Model.BuildOrders; +using Model.Entity; +using Model.Entity.Data; using YamlDotNet.Serialization; namespace Services.Immortal; public class BuildComparisionService : IBuildComparisonService { - private BuildComparisonModel buildComparison = new() { - Builds = new List { - new() { - Name = "one base", - Orders = new Dictionary> { - { - 0, new List { - new(DataType.STARTING_Bastion, EntityType.Building) - } - } - } - }, - new() { - Name = "two base", - Orders = new Dictionary> { - { - 0, new List { - new(DataType.STARTING_Bastion, EntityType.Building), - new(DataType.STARTING_Bastion, EntityType.Building) - } - } - } - } - } - }; + private event Action OnChange = default!; + + private BuildComparisonModel buildComparison = new(); public void Subscribe(Action action) { - onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - onChange -= action; + OnChange -= action; } - public void SetBuilds(BuildComparisonModel buildComparison) { - this.buildComparison = buildComparison; + private void NotifyDataChanged() { + OnChange?.Invoke(); + } + + public void SetBuilds(BuildComparisonModel buildComparisonModel) { + buildComparison = buildComparisonModel; NotifyDataChanged(); } @@ -66,7 +48,7 @@ public class BuildComparisionService : IBuildComparisonService { WriteIndented = true }; options.Converters.Add(new JsonStringEnumConverter()); - buildComparison = JsonSerializer.Deserialize(data, options); + buildComparison = JsonSerializer.Deserialize(data, options)!; // Must Hydrate because not loaded with Parts HydratedLoadedJson(); @@ -87,15 +69,6 @@ public class BuildComparisionService : IBuildComparisonService { return buildOrderText; } - private event Action onChange; - - private void NotifyDataChanged() { - onChange?.Invoke(); - } - - public Action OnChange() { - return onChange; - } public void HydratedLoadedJson() { foreach (var build in buildComparison.Builds) diff --git a/Services/Immortal/BuildOrderService.cs b/Services/Immortal/BuildOrderService.cs index cd04243..8348370 100644 --- a/Services/Immortal/BuildOrderService.cs +++ b/Services/Immortal/BuildOrderService.cs @@ -1,19 +1,19 @@ using System.Text; using System.Text.Json; using System.Text.Json.Serialization; -using Model.Immortal.BuildOrders; -using Model.Immortal.Entity; -using Model.Immortal.Types; +using Model.BuildOrders; +using Model.Entity; +using Model.Types; using YamlDotNet.Serialization; namespace Services.Immortal; public class BuildOrderService : IBuildOrderService { - public static int HumanMicro = 2; + private int HumanMicro = 2; private readonly BuildOrderModel buildOrder = new(); - private int lastInterval; - + private int lastInterval = 0; + public int GetLastRequestInterval() { return lastInterval; } @@ -23,11 +23,11 @@ public class BuildOrderService : IBuildOrderService { } public void Subscribe(Action action) { - onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - onChange -= action; + OnChange -= action; } public void Add(EntityModel entity, int atInterval) { @@ -81,7 +81,7 @@ public class BuildOrderService : IBuildOrderService { } public void RemoveLast() { - EntityModel entityRemoved = null; + EntityModel entityRemoved = null!; if (buildOrder.Orders.Keys.Count > 1) { @@ -184,7 +184,7 @@ public class BuildOrderService : IBuildOrderService { select requiredEntity; - if (entitiesNeeded.Count() == 0) return false; + if (!entitiesNeeded.Any()) return false; if (entitiesNeeded.Any() == false) @@ -212,8 +212,8 @@ public class BuildOrderService : IBuildOrderService { return buildOrder.Notes; } - public void SetColor(string Color) { - buildOrder.Color = Color; + public void SetColor(string color) { + buildOrder.Color = color; NotifyDataChanged(); } @@ -221,14 +221,10 @@ public class BuildOrderService : IBuildOrderService { return buildOrder.Color; } - private event Action onChange; + private event Action OnChange = null!; private void NotifyDataChanged() { - onChange?.Invoke(); - } - - public Action OnChange() { - return onChange; + OnChange?.Invoke(); } public bool MeetsSupply(EntityModel entity) { diff --git a/Services/Immortal/EconomyService.cs b/Services/Immortal/EconomyService.cs index 3149c7b..648d57b 100644 --- a/Services/Immortal/EconomyService.cs +++ b/Services/Immortal/EconomyService.cs @@ -1,22 +1,22 @@ -using Model.Immortal.Economy; -using Model.Immortal.Entity; -using Model.Immortal.Types; +using Model.Economy; +using Model.Entity; +using Model.Types; namespace Services.Immortal; public class EconomyService : IEconomyService { - private List _overTime; + private List _overTime = null!; public List GetOverTime() { return _overTime; } public void Subscribe(Action action) { - _onChange += action; + onChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + onChange -= action; } public void Calculate(IBuildOrderService buildOrder, ITimingService timing, int fromInterval) { @@ -137,13 +137,13 @@ public class EconomyService : IEconomyService { return _overTime[atInterval]; } - private event Action _onChange; + private event Action onChange = null!; private void NotifyDataChanged() { - _onChange?.Invoke(); + onChange?.Invoke(); } public Action OnChange() { - return _onChange; + return onChange; } } \ No newline at end of file diff --git a/Services/Immortal/EntityDisplayService.cs b/Services/Immortal/EntityDisplayService.cs index 1a86e33..d4bd7c9 100644 --- a/Services/Immortal/EntityDisplayService.cs +++ b/Services/Immortal/EntityDisplayService.cs @@ -1,10 +1,10 @@ -using Model.Immortal.Types; +using Model.Types; namespace Services.Immortal; public class EntityDisplayService : IEntityDisplayService { private string displayType = "Detailed"; - private event Action _onChange; + private event Action OnChange = null!; public List DefaultChoices() { @@ -12,19 +12,15 @@ public class EntityDisplayService : IEntityDisplayService { } public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + OnChange -= action; } private void NotifyDataChanged() { - _onChange?.Invoke(); - } - - public Action OnChange() { - return _onChange; + OnChange?.Invoke(); } public string GetDisplayType() diff --git a/Services/Immortal/EntityFilterService.cs b/Services/Immortal/EntityFilterService.cs index 702f965..21770bd 100644 --- a/Services/Immortal/EntityFilterService.cs +++ b/Services/Immortal/EntityFilterService.cs @@ -1,5 +1,5 @@ -using Model.Immortal.Entity.Data; -using Model.Immortal.Types; +using Model.Entity.Data; +using Model.Types; using static Services.IEntityFilterService; namespace Services.Immortal; @@ -159,7 +159,7 @@ public class EntityFilterService : IEntityFilterService { } - private event EntityFilterAction _onChange; + private event EntityFilterAction _onChange = null!; private void NotifyDataChanged(EntityFilterEvent entityFilterEvent) { _onChange?.Invoke(entityFilterEvent); diff --git a/Services/Immortal/EntityService.cs b/Services/Immortal/EntityService.cs index 6908d72..8905e78 100644 --- a/Services/Immortal/EntityService.cs +++ b/Services/Immortal/EntityService.cs @@ -1,4 +1,4 @@ -using Model.Immortal.Entity; +using Model.Entity; namespace Services.Immortal; diff --git a/Services/Immortal/ImmortalSelectionService.cs b/Services/Immortal/ImmortalSelectionService.cs index aa508d9..38b8913 100644 --- a/Services/Immortal/ImmortalSelectionService.cs +++ b/Services/Immortal/ImmortalSelectionService.cs @@ -1,4 +1,4 @@ -using Model.Immortal.Types; +using Model.Types; namespace Services.Immortal; @@ -7,11 +7,11 @@ public class ImmortalSelectionService : IImmortalSelectionService { private string _selectedImmortal = ImmortalType.Orzum; public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + OnChange -= action; } public string GetFactionType() { @@ -41,13 +41,10 @@ public class ImmortalSelectionService : IImmortalSelectionService { return true; } - private event Action _onChange; + private event Action OnChange = null!; private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } - public Action OnChange() { - return _onChange; - } } \ No newline at end of file diff --git a/Services/Immortal/KeyService.cs b/Services/Immortal/KeyService.cs index 1246beb..03334eb 100644 --- a/Services/Immortal/KeyService.cs +++ b/Services/Immortal/KeyService.cs @@ -1,25 +1,25 @@ -using Model.Immortal.Hotkeys; +using Model.Hotkeys; namespace Services.Immortal; public class KeyService : IKeyService { - private static readonly List _pressedKeys = new(); + private static readonly List PressedKeys = new(); private string? _hotkey; private string _hotkeyGroup = "C"; private bool _isHoldingSpace; - public void Subscribe(Action action) { + public void Subscribe(Action? action) { _onChange += action; } - public void Unsubscribe(Action action) { + public void Unsubscribe(Action? action) { _onChange -= action; } public bool AddPressedKey(string key) { _hotkey = null; - if (_pressedKeys.Count > 0) return false; + if (PressedKeys.Count > 0) return false; var pressedKey = key.ToUpper(); if (pressedKey.Equals(" ") || pressedKey.Equals("SPACE")) { @@ -31,12 +31,12 @@ public class KeyService : IKeyService { return false; } - if (!_pressedKeys.Contains(pressedKey)) { + if (!PressedKeys.Contains(pressedKey)) { if (HotkeyModel.KeyGroups.Contains(pressedKey)) _hotkeyGroup = pressedKey; if (HotkeyModel.HotKeys.Contains(pressedKey)) _hotkey = pressedKey; - _pressedKeys.Add(pressedKey); + PressedKeys.Add(pressedKey); NotifyDataChanged(); return true; } @@ -45,7 +45,7 @@ public class KeyService : IKeyService { } public List GetAllPressedKeys() { - return _pressedKeys; + return PressedKeys; } public bool RemovePressedKey(string key) { @@ -61,8 +61,8 @@ public class KeyService : IKeyService { return false; } - if (_pressedKeys.Contains(pressedKey)) { - _pressedKeys.Remove(pressedKey); + if (PressedKeys.Contains(pressedKey)) { + PressedKeys.Remove(pressedKey); NotifyDataChanged(); return true; } @@ -74,7 +74,7 @@ public class KeyService : IKeyService { return _isHoldingSpace; } - public string GetHotkey() { + public string? GetHotkey() { return _hotkey; } @@ -82,13 +82,13 @@ public class KeyService : IKeyService { return _hotkeyGroup; } - private event Action _onChange; + private event Action? _onChange; private void NotifyDataChanged() { _onChange?.Invoke(); } - public Action OnChange() { + public Action? OnChange() { return _onChange; } } \ No newline at end of file diff --git a/Services/Immortal/MemoryTesterService.cs b/Services/Immortal/MemoryTesterService.cs index 11e3cbf..2b3397d 100644 --- a/Services/Immortal/MemoryTesterService.cs +++ b/Services/Immortal/MemoryTesterService.cs @@ -1,6 +1,6 @@ -using Model.Immortal.Entity; -using Model.Immortal.Entity.Data; -using Model.Immortal.MemoryTester; +using Model.Entity; +using Model.Entity.Data; +using Model.MemoryTester; using static Services.IMemoryTesterService; namespace Services.Immortal; @@ -18,11 +18,11 @@ public class MemoryTesterService : IMemoryTesterService { private readonly Random random = new(); public void Subscribe(MemoryAction action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(MemoryAction action) { - _onChange -= action; + OnChange -= action; } public void GenerateQuiz() { @@ -88,13 +88,10 @@ public class MemoryTesterService : IMemoryTesterService { //public delegate void MemoryAction(MemoryTesterActions memoryAction); - private event MemoryAction _onChange; + private event MemoryAction OnChange = null!; private void NotifyDataChanged(MemoryTesterEvent memoryAction) { - _onChange?.Invoke(memoryAction); + OnChange?.Invoke(memoryAction); } - public MemoryAction OnChange() { - return _onChange; - } } \ No newline at end of file diff --git a/Services/Immortal/TimingService.cs b/Services/Immortal/TimingService.cs index ce87626..01cd105 100644 --- a/Services/Immortal/TimingService.cs +++ b/Services/Immortal/TimingService.cs @@ -3,11 +3,11 @@ public class TimingService : ITimingService { private int _timing = 360; - public void Subscribe(Action action) { + public void Subscribe(Action? action) { _onChange += action; } - public void Unsubscribe(Action action) { + public void Unsubscribe(Action? action) { _onChange -= action; } @@ -22,13 +22,13 @@ public class TimingService : ITimingService { } } - private event Action _onChange; + private event Action? _onChange; private void NotifyDataChanged() { _onChange?.Invoke(); } - public Action OnChange() { + public Action? OnChange() { return _onChange; } } \ No newline at end of file diff --git a/Services/Website/EntityDialogService.cs b/Services/Website/EntityDialogService.cs index fdfd531..5a5565a 100644 --- a/Services/Website/EntityDialogService.cs +++ b/Services/Website/EntityDialogService.cs @@ -1,5 +1,5 @@ using System.ComponentModel.DataAnnotations; -using DataType = Model.Immortal.Entity.Data.DataType; +using DataType = Model.Entity.Data.DataType; namespace Services.Website; @@ -10,18 +10,18 @@ public class EntityDialogService : IEntityDialogService private List history = new List(); - private event Action _onChange; + private event Action OnChange = null!; private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange += action; + OnChange += action; } public void AddDialog(string id) diff --git a/Services/Website/NavigationService.cs b/Services/Website/NavigationService.cs index eb9d991..206488a 100644 --- a/Services/Website/NavigationService.cs +++ b/Services/Website/NavigationService.cs @@ -7,16 +7,16 @@ public class NavigationService : INavigationService { private NavSelectionType navSelectionType = NavSelectionType.None; - private Type renderType; + private Type renderType = null!; private int webPageType; private int webSectionType; public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange += action; + OnChange += action; } public void ChangeNavigationState(string newState) { @@ -83,13 +83,9 @@ public class NavigationService : INavigationService { return renderType; } - private event Action _onChange; + private event Action OnChange = null!; private void NotifyDataChanged() { - _onChange?.Invoke(); - } - - public Action OnChange() { - return _onChange; + OnChange?.Invoke(); } } \ No newline at end of file diff --git a/Services/Website/WebsiteService.cs b/Services/Website/WebsiteService.cs index fa0e3a6..4d1e18b 100644 --- a/Services/Website/WebsiteService.cs +++ b/Services/Website/WebsiteService.cs @@ -15,7 +15,7 @@ public class WebsiteService : IWebsiteService { private bool isLoaded; - private event Action _onChange; + private event Action OnChange = default!; public WebsiteService(HttpClient httpClient) { @@ -25,8 +25,8 @@ public class WebsiteService : IWebsiteService { #if NO_SQL - public List WebSectionModels { get; set; } - public List WebPageModels { get; set; } + public List WebSectionModels { get; set; } = default!; + public List WebPageModels { get; set; } = default!; #else private DatabaseContext Database { get; set; } @@ -38,11 +38,11 @@ public class WebsiteService : IWebsiteService { public void Subscribe(Action action) { - _onChange += action; + OnChange += action; } public void Unsubscribe(Action action) { - _onChange -= action; + OnChange -= action; } public bool IsLoaded() { @@ -54,8 +54,10 @@ public class WebsiteService : IWebsiteService { public async Task Load() { if (isLoaded) {return;} - WebPageModels = (await httpClient.GetFromJsonAsync("generated/WebPageModels.json")).ToList(); - WebSectionModels =(await httpClient.GetFromJsonAsync("generated/WebSectionModels.json")).ToList(); + + + WebPageModels = ((await httpClient.GetFromJsonAsync("generated/WebPageModels.json"))!).ToList(); + WebSectionModels =((await httpClient.GetFromJsonAsync("generated/WebSectionModels.json"))!).ToList(); isLoaded = true; @@ -85,6 +87,6 @@ public class WebsiteService : IWebsiteService { } private void NotifyDataChanged() { - _onChange?.Invoke(); + OnChange?.Invoke(); } } \ No newline at end of file