Browse Source

Updating Mudblazor Version

main
Jonathan 1 year ago
parent
commit
e820457176
  1. 16
      Components/Components.csproj
  2. 3
      Components/Display/CodeComponent.razor
  3. 14
      Components/Display/DevOnlyComponent.razor
  4. 6
      Components/Display/EntityDisplayComponent.razor
  5. 11
      Components/Display/InfoTooltipComponent.razor
  6. 19
      Components/Display/MakingOfComponent.razor
  7. 8
      Components/Display/MakingOfSectionComponent.razor
  8. 3
      Components/Display/PanelComponent.razor
  9. 6
      Components/Display/PaperComponent.razor
  10. 9
      Components/Feedback/AlertComponent.razor
  11. 7
      Components/Feedback/ToastComponent.razor
  12. 15
      Components/Form/FormCheckboxComponent.razor
  13. 19
      Components/Form/FormDisplayComponent.razor
  14. 4
      Components/Form/FormEscapeCodeComponent.razor
  15. 15
      Components/Form/FormGuessComponent.razor
  16. 3
      Components/Form/FormInfoComponent.razor
  17. 3
      Components/Form/FormLabelComponent.razor
  18. 3
      Components/Form/FormLayoutComponent.razor
  19. 24
      Components/Form/FormNumberComponent.razor
  20. 12
      Components/Form/FormSelectComponent.razor
  21. 29
      Components/Form/FormTextAreaComponent.razor
  22. 27
      Components/Form/FormTextComponent.razor
  23. 15
      Components/Form/FormToggleComponent.razor
  24. 6
      Components/Info/InfoBodyComponent.razor
  25. 9
      Components/Inputs/ButtonComponent.razor
  26. 43
      Components/Inputs/ButtonGroupComponent.razor
  27. 3
      Components/Inputs/CodeLinkComponent.razor
  28. 3
      Components/Inputs/EditLinkComponent.razor
  29. 3
      Components/Inputs/EntityLabelComponent.razor
  30. 6
      Components/Inputs/LinkButtonComponent.razor
  31. 10
      Components/Inputs/SearchButtonComponent.razor
  32. 6
      Components/Inputs/SearchIconButtonComponent.razor
  33. 3
      Components/Layout/LayoutColumnComponent.razor
  34. 4
      Components/Layout/LayoutLargeContentComponent.razor
  35. 3
      Components/Layout/LayoutMediumContentComponent.razor
  36. 3
      Components/Layout/LayoutNoteContentComponent.razor
  37. 3
      Components/Layout/LayoutRowComponent.razor
  38. 7
      Components/Layout/LayoutWithSidebarComponent.razor
  39. 3
      Components/Layout/PageContainerComponent.razor
  40. 3
      Components/Layout/WebsiteTitleComponent.razor
  41. 6
      Components/MarkdownContent/MarkdownContent.razor
  42. 14
      Components/Navigation/DesktopNavComponent.razor
  43. 9
      Components/Navigation/DesktopNavLinkComponent.razor
  44. 4
      Components/Navigation/DesktopNavSectionComponent.razor
  45. 25
      Components/Navigation/MobileNavComponent.razor
  46. 20
      Components/Navigation/TabletNavComponent.razor
  47. 9
      Components/Shared/DisplayableContent.razor
  48. 6
      Components/Shared/DisplayableRoute.razor
  49. 15
      Components/Shared/FooterComponent.razor
  50. 6
      Components/Shared/MathDivisionComponent.razor
  51. 12
      Components/Shared/MathLoopSumComponent.razor
  52. 5
      Components/Shared/SpoilerTextComponent.razor
  53. 4
      Contexts/Contexts.csproj
  54. 8
      IGP/App.razor
  55. 31
      IGP/Dialog/ConfirmationDialogComponent.razor
  56. 41
      IGP/Dialog/EntityDialogComponent.razor
  57. 35
      IGP/Dialog/SearchDialogComponent.razor
  58. 22
      IGP/IGP.csproj
  59. 29
      IGP/PageLayout.razor
  60. 11
      IGP/Pages/AboutPage.razor
  61. 21
      IGP/Pages/BuildCalculator/BuildCalculatorPage.razor
  62. 17
      IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor
  63. 9
      IGP/Pages/BuildCalculator/Parts/BankComponent.razor
  64. 12
      IGP/Pages/BuildCalculator/Parts/BuildChartComponent.razor
  65. 7
      IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor
  66. 19
      IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor
  67. 3
      IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor
  68. 4
      IGP/Pages/BuildCalculator/Parts/OptionsComponent.razor
  69. 3
      IGP/Pages/ContactPage.razor
  70. 393
      IGP/Pages/DataTables/DataTablesPage.razor
  71. 5
      IGP/Pages/DataTables/Parts/UnitTable.razor
  72. 23
      IGP/Pages/DataTables/Parts/WeaponTable.razor
  73. 17
      IGP/Pages/Database/DatabasePage.razor
  74. 7
      IGP/Pages/Database/DatabaseSinglePage.razor
  75. 6
      IGP/Pages/Database/Entity/EntityViewComponent.razor
  76. 15
      IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor
  77. 8
      IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor
  78. 8
      IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor
  79. 6
      IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor
  80. 9
      IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor
  81. 12
      IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor
  82. 13
      IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor
  83. 8
      IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor
  84. 11
      IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor
  85. 13
      IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor
  86. 15
      IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor
  87. 14
      IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor
  88. 70
      IGP/Pages/Database/Parts/EntityFilterComponent.razor
  89. 4
      IGP/Pages/Documentation/Parts/DocumentComponent.razor
  90. 8
      IGP/Pages/EconomyComparison/Parts/ChartComponent.razor
  91. 14
      IGP/Pages/EconomyComparison/Parts/EconomyDifferenceComponent.razor
  92. 3
      IGP/Pages/EconomyComparison/Parts/EconomyInputComponent.razor
  93. 36
      IGP/Pages/HarassCalculatorPage.razor
  94. 4
      IGP/Pages/Home/HomePage.razor
  95. 18
      IGP/Pages/Home/Parts/ContentHighlightComponent.razor
  96. 13
      IGP/Pages/MemoryTester/MemoryTesterPage.razor
  97. 11
      IGP/Pages/MemoryTester/Parts/UnitMemory.razor
  98. 17
      IGP/Pages/Notes/NotesIndexPage.razor
  99. 16
      IGP/Pages/Notes/NotesPage.razor
  100. 5
      IGP/Pages/Notes/Parts/NoteComponent.razor
  101. Some files were not shown because too many files have changed in this diff Show More

16
Components/Components.csproj

@ -15,24 +15,24 @@
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
<SupportedPlatform Include="browser"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Markdig" Version="0.28.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.14" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.14" />
<PackageReference Include="Markdig" Version="0.28.1"/>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.14"/>
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.14"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Inputs\" />
<Folder Include="Inputs\"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
<ProjectReference Include="..\Services\Services.csproj" />
<ProjectReference Include="..\Model\Model.csproj"/>
<ProjectReference Include="..\Services\Services.csproj"/>
</ItemGroup>
<ItemGroup>
<None Remove="Inputs\" />
<None Remove="Inputs\"/>
</ItemGroup>
</Project>

3
Components/Display/CodeComponent.razor

@ -21,7 +21,6 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
}

14
Components/Display/DevOnlyComponent.razor

@ -22,7 +22,7 @@
}
.devOnlyTitle {
background-color: rgba(20,20,20,0.75);
background-color: rgba(20, 20, 20, 0.75);
padding: 10px;
color: orange;
font-weight: bolder;
@ -30,14 +30,14 @@
}
.devOnlyContent {
background-color: rgba(20,20,20,0.75);
background-color: rgba(20, 20, 20, 0.75);
width: 100%;
padding: 10px;
}
.devOnlyTitleContainer {
background: repeating-linear-gradient( 45deg, blue, blue 50px, orange 51px, orange 100px);
background: repeating-linear-gradient(45deg, blue, blue 50px, orange 51px, orange 100px);
margin-right: auto;
padding: 10px;
border-left: 6px dashed orange;
@ -48,7 +48,7 @@
.devOnlyContentContainer {
border: 6px dashed orange;
background: repeating-linear-gradient( 45deg, blue, blue 50px, orange 51px, orange 100px);
background: repeating-linear-gradient(45deg, blue, blue 50px, orange 51px, orange 100px);
box-shadow: 5px 5px 5px blue;
padding: 20px;
}
@ -58,11 +58,9 @@
@code {
[Inject]
NavigationManager NavigationManager { get; set; } = default!;
[Inject] NavigationManager NavigationManager { get; set; } = default!;
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
bool isOnDev;

6
Components/Display/EntityDisplayComponent.razor

@ -69,10 +69,8 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string Title { get; set; } = default!;
[Parameter] public string Title { get; set; } = default!;
}

11
Components/Display/InfoTooltipComponent.razor

@ -35,7 +35,7 @@
border: 1px solid var(--info-secondary-border);
border-radius: 2px;
box-shadow: 0 3px 8px rgba(0,0,0,0.5);
box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}
@ -55,13 +55,10 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string InfoText { get; set; } = default!;
[Parameter] public string InfoText { get; set; } = default!;
[Parameter]
public int? Margin { get; set; }
[Parameter] public int? Margin { get; set; }
}

19
Components/Display/MakingOfComponent.razor

@ -70,13 +70,13 @@
.makingOfContainer summary {
font-weight: bold;
padding: 12px;
background-color: rgba(0,0,0, 0.1);
background-color: rgba(0, 0, 0, 0.1);
}
.shownCode {
visibility: hidden;
padding: 12px;
background-color: rgba(0,0,0, 0.1);
background-color: rgba(0, 0, 0, 0.1);
}
.makingOfContainer details[open] .shownCode {
@ -97,20 +97,15 @@
@code {
[Parameter]
public RenderFragment Title { get; set; } = default!;
[Parameter] public RenderFragment Title { get; set; } = default!;
[Parameter]
public RenderFragment Description { get; set; } = default!;
[Parameter] public RenderFragment Description { get; set; } = default!;
[Parameter]
public RenderFragment Example { get; set; } = default!;
[Parameter] public RenderFragment Example { get; set; } = default!;
[Parameter]
public RenderFragment Usage { get; set; } = default!;
[Parameter] public RenderFragment Usage { get; set; } = default!;
[Parameter]
public RenderFragment Code { get; set; } = default!;
[Parameter] public RenderFragment Code { get; set; } = default!;
}

8
Components/Display/MakingOfSectionComponent.razor

@ -9,7 +9,7 @@
<style>
.makingOfSection {
width: 100%;
background-color: rgba(0,0,0, 0.1);
background-color: rgba(0, 0, 0, 0.1);
padding: 25px;
border-radius: 8px;
border: 2px black dashed;
@ -22,11 +22,9 @@
@code {
[Parameter]
public string Title { get; set; } = default!;
[Parameter] public string Title { get; set; } = default!;
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
}

3
Components/Display/PanelComponent.razor

@ -15,7 +15,6 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
}

6
Components/Display/PaperComponent.razor

@ -18,10 +18,8 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string Title { get; set; } = default!;
[Parameter] public string Title { get; set; } = default!;
}

9
Components/Feedback/AlertComponent.razor

@ -52,13 +52,10 @@
@code {
[Parameter]
public RenderFragment? Title { get; set; }
[Parameter] public RenderFragment? Title { get; set; }
[Parameter]
public RenderFragment? Message { get; set; }
[Parameter] public RenderFragment? Message { get; set; }
[Parameter]
public string Type { get; set; } = SeverityType.Warning;
[Parameter] public string Type { get; set; } = SeverityType.Warning;
}

7
Components/Feedback/ToastComponent.razor

@ -58,11 +58,10 @@ else
@code {
[Parameter]
public ToastModel? Toast { get; set; } = default!;
[Parameter] public ToastModel? Toast { get; set; }
private float removalTime = 1300;
private float fadeoutTime = 1200;
private readonly float removalTime = 1300;
private readonly float fadeoutTime = 1200;
private float Opacity()
{

15
Components/Form/FormCheckboxComponent.razor

@ -51,20 +51,15 @@
@code {
[Parameter]
public string Label { get; set; } = "";
[Parameter] public string Label { get; set; } = "";
[Parameter]
public string Info { get; set; } = "";
[Parameter] public string Info { get; set; } = "";
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter]
public bool ReadOnly { get; set; }
[Parameter] public bool ReadOnly { get; set; }
[Parameter]
public bool Value { get; set; }
[Parameter] public bool Value { get; set; }
private string labelId = "";

19
Components/Form/FormDisplayComponent.razor

@ -35,23 +35,18 @@
</style>
@code {
//TODO Clean up
[Parameter]
public string Label { get; set; } = default!;
[Parameter] public string Label { get; set; } = default!;
[Parameter]
public string Info { get; set; } = default!;
[Parameter] public string Info { get; set; } = default!;
[Parameter]
public RenderFragment? Display { get; set; }
[Parameter] public RenderFragment? Display { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter]
public bool? ReadOnly { get; set; }
[Parameter] public bool? ReadOnly { get; set; }
[Parameter]
public string? Value { get; set; }
[Parameter] public string? Value { get; set; }
}

4
Components/Form/FormEscapeCodeComponent.razor

@ -2,11 +2,11 @@
<div class="escapeCodeContainer">
<textarea style="background-color: #2C2E33; width: 100%; border:3px solid #A8ADB9; border-radius:1px; padding: 8px;"
rows="8"
@onchange="OnChange" />
@onchange="OnChange"/>
<textarea style="background-color: #2C2E33; width: 100%; border:3px solid #A8ADB9; border-radius:1px; padding: 8px;"
rows="8"
@bind="Output" />
@bind="Output"/>
</div>
<style>

15
Components/Form/FormGuessComponent.razor

@ -73,20 +73,15 @@
@code {
[Parameter]
public string Label { get; set; } = "";
[Parameter] public string Label { get; set; } = "";
[Parameter]
public string Info { get; set; } = "";
[Parameter] public string Info { get; set; } = "";
[Parameter]
public EventCallback<AnswerEventArgs> OnChange { get; set; } = default!;
[Parameter] public EventCallback<AnswerEventArgs> OnChange { get; set; }
[Parameter]
public MemoryQuestionModel MemoryQuestion { get; set; } = default!;
[Parameter] public MemoryQuestionModel MemoryQuestion { get; set; } = default!;
[Parameter]
public bool IsSubmitted { get; set; }
[Parameter] public bool IsSubmitted { get; set; }
private string? guess = "";

3
Components/Form/FormInfoComponent.razor

@ -6,7 +6,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

3
Components/Form/FormLabelComponent.razor

@ -4,7 +4,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

3
Components/Form/FormLayoutComponent.razor

@ -4,7 +4,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

24
Components/Form/FormNumberComponent.razor

@ -38,17 +38,13 @@
@code {
[Parameter]
public RenderFragment? FormLabelComponent { get; set; }
[Parameter] public RenderFragment? FormLabelComponent { get; set; }
[Parameter]
public string Id { get; set; } = default!;
[Parameter] public string Id { get; set; } = default!;
[Parameter]
public RenderFragment? FormInfoComponent { get; set; }
[Parameter] public RenderFragment? FormInfoComponent { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
void OnInputChanged(ChangeEventArgs changeEventArgs)
{
@ -73,16 +69,12 @@
}
}
[Parameter]
public bool ReadOnly { get; set; } = false;
[Parameter] public bool ReadOnly { get; set; }
[Parameter]
public int Value { get; set; } = 0;
[Parameter] public int Value { get; set; }
[Parameter]
public int Min { get; set; } = 0;
[Parameter] public int Min { get; set; }
[Parameter]
public int Max { get; set; } = 2048;
[Parameter] public int Max { get; set; } = 2048;
}

12
Components/Form/FormSelectComponent.razor

@ -17,16 +17,12 @@
@code {
[Parameter]
public RenderFragment? FormLabelComponent { get; set; }
[Parameter] public RenderFragment? FormLabelComponent { get; set; }
[Parameter]
public RenderFragment? FormInfoComponent { get; set; }
[Parameter] public RenderFragment? FormInfoComponent { get; set; }
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
}

29
Components/Form/FormTextAreaComponent.razor

@ -11,7 +11,7 @@
type="text"
rows="@Rows"
value="@Value"
@onchange="OnChange" />
@onchange="OnChange"/>
</div>
@if (Info != "")
{
@ -56,32 +56,23 @@
@code {
[Parameter]
public RenderFragment? FormLabelComponent { get; set; }
[Parameter] public RenderFragment? FormLabelComponent { get; set; }
[Parameter]
public RenderFragment? FormInfoComponent { get; set; }
[Parameter] public RenderFragment? FormInfoComponent { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter]
public bool? ReadOnly { get; set; }
[Parameter] public bool? ReadOnly { get; set; }
[Parameter]
public string? Value { get; set; }
[Parameter] public string? Value { get; set; }
[Parameter]
public int Rows { get; set; } = 4;
[Parameter] public int Rows { get; set; } = 4;
[Parameter]
public string Label { get; set; } = "";
[Parameter] public string Label { get; set; } = "";
[Parameter]
public string Info { get; set; } = "";
[Parameter] public string Info { get; set; } = "";
[Parameter]
public string Placeholder { get; set; } = "";
[Parameter] public string Placeholder { get; set; } = "";
private string labelId = "";

27
Components/Form/FormTextComponent.razor

@ -52,34 +52,25 @@
@code {
[Parameter]
public string Id { get; set; } = "";
[Parameter] public string Id { get; set; } = "";
[Parameter]
public string Label { get; set; } = "";
[Parameter] public string Label { get; set; } = "";
[Parameter]
public string Info { get; set; } = "";
[Parameter] public string Info { get; set; } = "";
[Parameter]
public string Placeholder { get; set; } = "";
[Parameter] public string Placeholder { get; set; } = "";
[Parameter]
public EventCallback<ChangeEventArgs> OnInput { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnInput { get; set; }
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter]
public EventCallback OnFocus { get; set; }
[Parameter] public EventCallback OnFocus { get; set; }
[Parameter]
public bool ReadOnly { get; set; }
[Parameter] public bool ReadOnly { get; set; }
[Parameter]
public string Value { get; set; } = "";
[Parameter] public string Value { get; set; } = "";
private string labelId = "";

15
Components/Form/FormToggleComponent.razor

@ -98,20 +98,15 @@
@code {
[Parameter]
public string Label { get; set; } = "";
[Parameter] public string Label { get; set; } = "";
[Parameter]
public string Info { get; set; } = "";
[Parameter] public string Info { get; set; } = "";
[Parameter]
public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter] public EventCallback<ChangeEventArgs> OnChange { get; set; }
[Parameter]
public bool ReadOnly { get; set; }
[Parameter] public bool ReadOnly { get; set; }
[Parameter]
public bool Value { get; set; }
[Parameter] public bool Value { get; set; }
private string labelId = "";

6
Components/Info/InfoBodyComponent.razor

@ -37,10 +37,8 @@
@code {
[Parameter]
public RenderFragment? InfoQuestionComponent { get; set; }
[Parameter] public RenderFragment? InfoQuestionComponent { get; set; }
[Parameter]
public RenderFragment? InfoAnswerComponent { get; set; }
[Parameter] public RenderFragment? InfoAnswerComponent { get; set; }
}

9
Components/Inputs/ButtonComponent.razor

@ -36,14 +36,11 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public EventCallback<EventArgs> OnClick { get; set; } = default!;
[Parameter] public EventCallback<EventArgs> OnClick { get; set; }
[Parameter]
public MyButtonType MyButtonType { get; set; } = default!;
[Parameter] public MyButtonType MyButtonType { get; set; }
private void ButtonClicked(EventArgs eventArgs)
{

43
Components/Inputs/ButtonGroupComponent.razor

@ -7,76 +7,75 @@
{
styleClass = "selected";
}
<button @onclick="@(e => OnChangeChoice(choice))" class="groupChoiceButton @styleClass">@choice</button>
}
</div>
</div>
<style>
.groupButtonContainerContainer {
.groupButtonContainerContainer {
margin: auto;
display: flex;
flex-direction: column;
justify-content: flex-start;
justify-items: flex-start;
}
.groupButtonContainer {
}
.groupButtonContainer {
display: flex;
background-color: var(--background);
gap: 2px;
margin-right: auto;
border-radius: 8px;
}
}
.groupChoiceButton {
.groupChoiceButton {
background-color: var(--primary);
color: white;
padding: 12px;
border: 1px solid var(--primary);
}
}
.groupChoiceButton:hover {
.groupChoiceButton:hover {
background-color: var(--primary-hover);
border-color: var(--primary-border-hover);
}
}
.selected {
.selected {
background-color: var(--secondary);
color: white;
font-style: normal;
font-weight: bold;
}
}
.selected:hover {
.selected:hover {
background-color: var(--secondary-hover);
border-color: var(--secondary-border-hover);
}
}
.groupButtonContainer .groupChoiceButton:first-child {
.groupButtonContainer .groupChoiceButton:first-child {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
}
.groupButtonContainer .groupChoiceButton:last-child {
.groupButtonContainer .groupChoiceButton:last-child {
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
}
</style>
@code {
[Parameter]
public string Choice { get; set; } = default!;
[Parameter] public string Choice { get; set; } = default!;
[Parameter]
public List<string> Choices { get; set; } = default!;
[Parameter] public List<string> Choices { get; set; } = default!;
[Parameter]
public EventCallback<string> OnClick { get; set; }
[Parameter] public EventCallback<string> OnClick { get; set; }
protected override void OnInitialized()

3
Components/Inputs/CodeLinkComponent.razor

@ -23,7 +23,6 @@
@code {
[Parameter]
public string Href { get; set; } = "";
[Parameter] public string Href { get; set; } = "";
}

3
Components/Inputs/EditLinkComponent.razor

@ -23,7 +23,6 @@
@code {
[Parameter]
public string Href { get; set; } = "";
[Parameter] public string Href { get; set; } = "";
}

3
Components/Inputs/EntityLabelComponent.razor

@ -14,8 +14,7 @@ else
@code {
[Parameter]
public string EntityId { get; set; } = default!;
[Parameter] public string EntityId { get; set; } = default!;
private EntityModel Entity => DATA.Get()[EntityId];

6
Components/Inputs/LinkButtonComponent.razor

@ -24,12 +24,10 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string Href { get; set; } = "";
[Parameter] public string Href { get; set; } = "";
}

10
Components/Inputs/SearchButtonComponent.razor

@ -37,19 +37,17 @@
.searchHotkey {
padding: 4px;
background-color: rgba(255,255,255,0.05);
border: 2px solid rgba(255,255,255,0.25);
background-color: rgba(255, 255, 255, 0.05);
border: 2px solid rgba(255, 255, 255, 0.25);
border-radius: 4px;
}
</style>
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string Id { get; set; } = default!;
[Parameter] public string Id { get; set; } = default!;
private string _userAgent = "";

6
Components/Inputs/SearchIconButtonComponent.razor

@ -29,11 +29,9 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public string Id { get; set; } = default!;
[Parameter] public string Id { get; set; } = default!;
private void ButtonClicked(EventArgs eventArgs)
{

3
Components/Layout/LayoutColumnComponent.razor

@ -12,7 +12,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

4
Components/Layout/LayoutLargeContentComponent.razor

@ -23,7 +23,6 @@
}
@@media only screen and (min-width: 1024px) {
.lrg_container {
margin-top: 50px;
@ -34,7 +33,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

3
Components/Layout/LayoutMediumContentComponent.razor

@ -33,7 +33,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

3
Components/Layout/LayoutNoteContentComponent.razor

@ -29,7 +29,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

3
Components/Layout/LayoutRowComponent.razor

@ -21,7 +21,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

7
Components/Layout/LayoutWithSidebarComponent.razor

@ -39,7 +39,6 @@
}
@@media only screen and (min-width: 1024px) {
.layoutWithSidebar {
margin-top: 50px;
@ -50,10 +49,8 @@
@code {
[Parameter]
public RenderFragment Sidebar { get; set; } = default!;
[Parameter] public RenderFragment Sidebar { get; set; } = default!;
[Parameter]
public RenderFragment Content { get; set; } = default!;
[Parameter] public RenderFragment Content { get; set; } = default!;
}

3
Components/Layout/PageContainerComponent.razor

@ -24,7 +24,6 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
}

3
Components/Layout/WebsiteTitleComponent.razor

@ -21,7 +21,6 @@
@code {
[Parameter]
public RenderFragment? ChildContent { get; set; }
[Parameter] public RenderFragment? ChildContent { get; set; }
}

6
Components/MarkdownContent/MarkdownContent.razor

@ -3,11 +3,9 @@
@code {
[Inject]
protected HttpClient Http { get; set; } = default!;
[Inject] protected HttpClient Http { get; set; } = default!;
[Parameter]
public string MarkdownFileName { get; set; } = default!;
[Parameter] public string MarkdownFileName { get; set; } = default!;
private string MarkdownText { get; set; } = "";

14
Components/Navigation/DesktopNavComponent.razor

@ -62,7 +62,7 @@
}
.clickOffBackground.clickOffVisible {
visibility:visible;
visibility: visible;
}
.sectionButton {
@ -78,7 +78,7 @@
left: 0;
width: 100vw;
height: 40px;
background-color: rgba(255,255,255,0.1);
background-color: rgba(255, 255, 255, 0.1);
}
.menuHeader {
@ -106,11 +106,11 @@
align-items: center;
}
.sectionNav {
.sectionNav {
display: flex;
align-items: center;
height: 100%;
}
}
.websiteTitle {
font-weight: bold;
@ -166,11 +166,9 @@
@code {
[Parameter]
public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter] public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter]
public List<WebPageModel> WebPages { get; set; } = default!;
[Parameter] public List<WebPageModel> WebPages { get; set; } = default!;
protected override void OnInitialized()

9
Components/Navigation/DesktopNavLinkComponent.razor

@ -12,7 +12,9 @@
}
else
{
<NavLink target="@Links.GetTarget(Page.Href)" @onclick="() => { NavigationService.ChangeNavigationState(NavigationStateType.Default); NavigationService.ChangeNavigationSectionId(-1); }" href="@Page.Href" class="desktopNavLink">
<NavLink target="@Links.GetTarget(Page.Href)"
@onclick="() => { NavigationService.ChangeNavigationState(NavigationStateType.Default); NavigationService.ChangeNavigationSectionId(-1); }"
href="@Page.Href" class="desktopNavLink">
<div class="navName">
@Page.Name
</div>
@ -65,10 +67,9 @@ else
@code {
[Parameter]
public WebPageModel Page { get; set; } = default!;
[Parameter] public WebPageModel Page { get; set; } = default!;
bool isOnPage = false;
bool isOnPage;
protected override Task OnParametersSetAsync()
{

4
Components/Navigation/DesktopNavSectionComponent.razor

@ -5,6 +5,7 @@
{
continue;
}
<DesktopNavLinkComponent Page=childPage></DesktopNavLinkComponent>
}
</div>
@ -24,7 +25,6 @@
@code {
[Parameter]
public WebSectionModel Section { get; set; } = default!;
[Parameter] public WebSectionModel Section { get; set; } = default!;
}

25
Components/Navigation/MobileNavComponent.razor

@ -2,7 +2,8 @@
<div class="mobileNavSectionsContainer">
@foreach (var webSection in WebSections)
{
<div class="mobileNavSectionButton" @onclick="() => OnSectionClicked(webSection)" @onclick:preventDefault="true" @onclick:stopPropagation="true">
<div class="mobileNavSectionButton" @onclick="() => OnSectionClicked(webSection)"
@onclick:preventDefault="true" @onclick:stopPropagation="true">
<div class="mobileNavSectionButtonText">
<i class="fa-solid @webSection.Icon" style="font-size: 28px;"></i>
</div>
@ -11,7 +12,8 @@
<SearchIconButtonComponent/>
</div>
<div class="fullPageButton @(selectedSection != null)" @onclick="OnPageClicked" @onclick:stopPropagation="false" @onclick:preventDefault="false">
<div class="fullPageButton @(selectedSection != null)" @onclick="OnPageClicked" @onclick:stopPropagation="false"
@onclick:preventDefault="false">
</div>
@if (selectedSection != null)
@ -27,7 +29,9 @@
{
continue;
}
<div class="mobileNavPageButton" @onclick="() => OnPageLinkClicked(webPage)" @onclick:preventDefault="true" @onclick:stopPropagation="true">
<div class="mobileNavPageButton" @onclick="() => OnPageLinkClicked(webPage)"
@onclick:preventDefault="true" @onclick:stopPropagation="true">
<div class="mobileNavPageButtonText">
@webPage.Name
</div>
@ -45,7 +49,7 @@
height: 100vh;
bottom: 0;
display: none;
background-color: rgba(0,0,0,0.6);
background-color: rgba(0, 0, 0, 0.6);
}
.fullPageButton.True {
@ -53,11 +57,9 @@
}
.mobileFooter {
position: fixed;
background-color: rgba(0,0,0,1);
background-color: rgba(0, 0, 0, 1);
width: 100vw;
bottom: 0;
display: none;
@ -143,11 +145,9 @@
@code {
#if NO_SQL
[Parameter]
public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter] public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter]
public List<WebPageModel> WebPages { get; set; } = default!;
[Parameter] public List<WebPageModel> WebPages { get; set; } = default!;
#else
[Parameter]
@ -157,8 +157,7 @@
public DbSet<WebPageModel> WebPages { get; set; }
#endif
[Inject]
public NavigationManager NavigationManager { get; set; } = default!;
[Inject] public NavigationManager NavigationManager { get; set; } = default!;
private WebSectionModel? selectedSection;

20
Components/Navigation/TabletNavComponent.razor

@ -17,7 +17,8 @@
</div>
<div class="fullPageButton @navOpen" @onclick="OnNavClicked" @onclick:stopPropagation="false" @onclick:preventDefault="false">
<div class="fullPageButton @navOpen" @onclick="OnNavClicked" @onclick:stopPropagation="false"
@onclick:preventDefault="false">
</div>
@ -40,6 +41,7 @@
{
continue;
}
<NavLink href="@webPage.Href" class="tabletNavItem" @onclick="OnPageClicked">
@webPage.Name
</NavLink>
@ -58,7 +60,7 @@
height: 100vh;
bottom: 0;
display: none;
background-color: rgba(0,0,0,0.6);
background-color: rgba(0, 0, 0, 0.6);
}
.fullPageButton.True {
@ -71,7 +73,7 @@
.tabletNav {
position: fixed;
background-color: rgba(30,30,30,0.98);
background-color: rgba(30, 30, 30, 0.98);
display: none;
height: 100vh;
padding: 32px;
@ -108,7 +110,7 @@
top: 0;
display: flex;
background-color: var(--accent);
border-bottom: 4px solid rgba(0,0,0,0.95);
border-bottom: 4px solid rgba(0, 0, 0, 0.95);
justify-content: space-between;
}
@ -125,7 +127,7 @@
.tabletButton {
border: 2px solid black;
background-color: rgba(0,0,0,0.3);
background-color: rgba(0, 0, 0, 0.3);
width: 80px;
height: 100%;
display: flex;
@ -133,7 +135,7 @@
}
.tabletButton:hover {
background-color: rgba(0,0,0,0.7);
background-color: rgba(0, 0, 0, 0.7);
}
@ -153,11 +155,9 @@
@code {
#if NO_SQL
[Parameter]
public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter] public List<WebSectionModel> WebSections { get; set; } = default!;
[Parameter]
public List<WebPageModel> WebPages { get; set; } = default!;
[Parameter] public List<WebPageModel> WebPages { get; set; } = default!;
#else
[Parameter]

9
Components/Shared/DisplayableContent.razor

@ -5,14 +5,11 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Parameter]
public WebDeploymentType DeploymentType { get; set; }
[Parameter] public WebDeploymentType DeploymentType { get; set; }
[Inject]
public NavigationManager MyNavigationManager { get; set; } = default!;
[Inject] public NavigationManager MyNavigationManager { get; set; } = default!;
bool isDisplayable;

6
Components/Shared/DisplayableRoute.razor

@ -11,11 +11,9 @@ else
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
[Inject]
public NavigationManager MyNavigationManager { get; set; } = default!;
[Inject] public NavigationManager MyNavigationManager { get; set; } = default!;
bool isDisplayable;

15
Components/Shared/FooterComponent.razor

@ -24,7 +24,9 @@
<div class="footerDivider"></div>
<div class="footerLastUpdated">Website updated <a href="https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/commits/main"><b>@VariableService.Variables["LastUpdated"]</b></a></div>
<div class="footerLastUpdated">Website updated <a
href="https://github.com/JonathanMcCaffrey/IGP-Fan-Reference/commits/main"><b>@VariableService.Variables["LastUpdated"]</b></a>
</div>
<div class="footerDisclaimer">
This website is fan-made and not affiliated with <b>SunSpear Games</b> in any way.
@ -36,20 +38,19 @@
.footerIcon {
font-size: 24px;
padding: 8px;
background-color: rgba(255,255,255,0.05);
border: 2px solid rgba(255,255,255,0.1);
background-color: rgba(255, 255, 255, 0.05);
border: 2px solid rgba(255, 255, 255, 0.1);
border-radius: 6px;
line-height: 0;
}
.footerIcon:hover {
color: #8fc5ff;
background-color: rgba(200,200,255,0.1);
border: 2px solid rgba(140,140,255,0.4);
background-color: rgba(200, 200, 255, 0.1);
border: 2px solid rgba(140, 140, 255, 0.4);
}
.footerContainer {
width: 100%;
display: flex;
@ -69,7 +70,7 @@
}
.footerDivider {
background-color: rgba(255,255,255,0.12);
background-color: rgba(255, 255, 255, 0.12);
height: 1px;
width: 128px;
margin: auto;

6
Components/Shared/MathDivisionComponent.razor

@ -10,10 +10,8 @@
@code {
[Parameter]
public RenderFragment Dividee { get; set; } = default!;
[Parameter] public RenderFragment Dividee { get; set; } = default!;
[Parameter]
public RenderFragment Divider { get; set; } = default!;
[Parameter] public RenderFragment Divider { get; set; } = default!;
}

12
Components/Shared/MathLoopSumComponent.razor

@ -1,4 +1,5 @@
<div style="display:flex; flex-direction:column; align-items:center;padding-right: 12px;padding-left: 4px; font-family:monospace">
<div
style="display:flex; flex-direction:column; align-items:center;padding-right: 12px;padding-left: 4px; font-family:monospace">
<div style="height: 0px;display:flex; flex-direction:row; ">
<div style="font-size: 18px; height: 0px;">
&#8721;
@ -12,13 +13,10 @@
@code {
[Parameter]
public RenderFragment LoopEnd { get; set; } = default!;
[Parameter] public RenderFragment LoopEnd { get; set; } = default!;
[Parameter]
public RenderFragment LoopStart { get; set; } = default!;
[Parameter] public RenderFragment LoopStart { get; set; } = default!;
[Parameter]
public RenderFragment IndexSymbol { get; set; } = default!;
[Parameter] public RenderFragment IndexSymbol { get; set; } = default!;
}

5
Components/Shared/SpoilerTextComponent.razor

@ -10,7 +10,7 @@
u {
text-decoration-color: inherit;
text-decoration-thickness:1px;
text-decoration-thickness: 1px;
}
.spoiler:hover {
@ -22,7 +22,6 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
}

4
Contexts/Contexts.csproj

@ -15,7 +15,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.14" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.14"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.14">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Model\Model.csproj" />
<ProjectReference Include="..\Model\Model.csproj"/>
</ItemGroup>
</Project>

8
IGP/App.razor

@ -27,7 +27,7 @@
@if (PermissionService.GetIsDataCollectionEnabled())
{
<NavigationTracker />
<NavigationTracker/>
}
@ -46,7 +46,7 @@
}
:root {
:root {
--severity-warning-color: #2a2000;
--severity-warning-border-color: #755c13;
--severity-error-color: #290102;
@ -77,12 +77,12 @@
--dialog-border-color: black;
--dialog-border-width: 2px;
--dialog-radius: 6px;
}
}
</style>
@code {
private bool isLoaded = false;
private bool isLoaded;
protected override async Task OnInitializedAsync()
{

31
IGP/Dialog/ConfirmationDialogComponent.razor

@ -1,5 +1,4 @@
@using Services.Website
@implements IDisposable;
@implements IDisposable;
@inject IMyDialogService MyDialogService
@inject IJSRuntime JsRuntime
@ -21,10 +20,12 @@
</div>
<div class="confirmDialogFooter">
<ButtonComponent MyButtonType="MyButtonType.Secondary" OnClick="MyDialogService.GetDialogContents().OnCancel">
<ButtonComponent MyButtonType="MyButtonType.Secondary"
OnClick="MyDialogService.GetDialogContents().OnCancel">
Cancel
</ButtonComponent>
<ButtonComponent MyButtonType="MyButtonType.Primary" OnClick="MyDialogService.GetDialogContents().OnConfirm">
<ButtonComponent MyButtonType="MyButtonType.Primary"
OnClick="MyDialogService.GetDialogContents().OnConfirm">
@MyDialogService.GetDialogContents().ConfirmButtonLabel
</ButtonComponent>
</div>
@ -36,7 +37,7 @@
filter: blur(2px);
}
.confirmDialogBackground {
.confirmDialogBackground {
position: fixed;
top: 0;
left: 0;
@ -44,10 +45,10 @@
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
}
}
.confirmDialogContainer {
.confirmDialogContainer {
margin-left: auto;
margin-right: auto;
margin-top: 64px;
@ -68,26 +69,26 @@
display: flex;
flex-direction: column;
}
}
.confirmDialogHeader {
.confirmDialogHeader {
font-size: 1.4em;
padding: 12px;
}
}
.confirmDialogBody {
.confirmDialogBody {
padding: 12px;
flex-grow: 1;
}
}
.confirmDialogFooter {
.confirmDialogFooter {
display: flex;
gap: 12px;
justify-content: flex-end;
padding: 12px;
}
}
</style>
</style>
}

41
IGP/Dialog/EntityDialogComponent.razor

@ -16,7 +16,7 @@
@if (entityDialogService.HasHistory())
{
<button class="backButton" @onclick="entityDialogService.BackDialog">
<div class="backButtonIcon"> </div>
<div class="backButtonIcon"></div>
</button>
}
@ -55,7 +55,7 @@
}
.dialogBackground {
.dialogBackground {
position: fixed;
top: 0;
left: 0;
@ -63,9 +63,9 @@
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
}
}
.dialogContainer {
.dialogContainer {
margin-left: auto;
margin-right: auto;
margin-top: 64px;
@ -81,9 +81,9 @@
box-shadow: 1px 2px 2px black;
}
}
.dialogHeader {
.dialogHeader {
width: 100%;
background-color: var(--accent);
border-top-left-radius: var(--dialog-radius);
@ -92,56 +92,55 @@
display: flex;
align-items: center;
justify-content: flex-start;
}
}
.backButton {
.backButton {
margin-left: 16px;
padding: 12px;
border: 1px solid var(--accent);
}
}
.backButton:hover {
.backButton:hover {
background-color: var(--primary-hover);
border: 1px solid var(--primary-border-hover);
}
}
.backButtonIcon
{
.backButtonIcon {
height: 32px;
width: 32px;
border: solid white;
border-width: 0 9px 9px 0;
transform: rotate(135deg);
}
}
.dialogTitle {
.dialogTitle {
padding: 16px;
font-size: 2rem;
font-weight: bold;
}
}
.dialogContent {
.dialogContent {
flex-grow: 1;
padding: 6px;
overflow-y: auto;
overflow-x: hidden;
height: 800px;
}
}
.dialogFooter {
.dialogFooter {
width: 100%;
height: 6px;
background-color: var(--paper);
}
}
</style>
@code {
EntityModel entity = default!;
private int refresh = 0;
private int refresh;
protected override void OnInitialized()
{

35
IGP/Dialog/SearchDialogComponent.razor

@ -13,7 +13,8 @@
@onclick:stopPropagation="true">
<FormLayoutComponent>
<FormTextComponent OnFocus="OnFocus" Id="searchInput" Placeholder="Search..." OnInput="SearchChanged"></FormTextComponent>
<FormTextComponent OnFocus="OnFocus" Id="searchInput" Placeholder="Search..."
OnInput="SearchChanged"></FormTextComponent>
</FormLayoutComponent>
<div class="searchBox">
@ -59,7 +60,7 @@
filter: blur(2px);
}
.searchBackground {
.searchBackground {
position: fixed;
top: 0;
left: 0;
@ -67,33 +68,33 @@
height: 100vh;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
}
}
.searchBox {
.searchBox {
padding: 12px;
overflow-y: scroll;
overflow-x: hidden;
height: 530px;
border: 1px solid black;
border-radius: 2px;
}
}
.searchContents {
.searchContents {
display: flex;
flex-direction: column;
gap: 6px;
align-items: flex-start;
padding: 12px;
}
}
.searchSectionTitle {
.searchSectionTitle {
font-weight: bolder;
}
}
.searchContainer {
.searchContainer {
margin-left: auto;
margin-right: auto;
margin-top: 64px;
@ -111,23 +112,24 @@
box-shadow: 1px 2px 2px black;
}
}
.searchLink {
.searchLink {
text-decoration: underline;
}
}
@@media only screen and (max-width: 1025px) {
@@media only screen and (max-width: 1025px) {
.searchContainer {
height: 300px;
}
.searchBox {
height: 230px;
}
}
}
</style>
</style>
}
@ -161,6 +163,7 @@
{
timer.Enabled = searchService.IsVisible;
}
StateHasChanged();
}

22
IGP/IGP.csproj

@ -21,26 +21,26 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazor-Analytics" Version="3.11.0" />
<PackageReference Include="Markdig" Version="0.30.3" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.14" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.14" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.14" />
<PackageReference Include="MudBlazor" Version="6.0.14" />
<PackageReference Include="Blazor-Analytics" Version="3.11.0"/>
<PackageReference Include="Markdig" Version="0.30.3"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.14"/>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="8.0.14"/>
<PackageReference Include="Microsoft.Extensions.Localization" Version="8.0.14"/>
<PackageReference Include="MudBlazor" Version="8.5.1"/>
</ItemGroup>
<ItemGroup>
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js" />
<ServiceWorker Include="wwwroot\service-worker.js" PublishedContent="wwwroot\service-worker.published.js"/>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Components\Components.csproj" />
<ProjectReference Include="..\Model\Model.csproj" />
<ProjectReference Include="..\Services\Services.csproj" />
<ProjectReference Include="..\Components\Components.csproj"/>
<ProjectReference Include="..\Model\Model.csproj"/>
<ProjectReference Include="..\Services\Services.csproj"/>
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\generated" />
<Folder Include="wwwroot\generated"/>
</ItemGroup>
<ItemGroup>

29
IGP/PageLayout.razor

@ -6,12 +6,16 @@
@using Services.Website
@implements IDisposable
<MudThemeProvider />
<MudThemeProvider/>
<MudPopoverProvider/>
<MudDialogProvider/>
<MudSnackbarProvider/>
<MudLayout>
<MudAppBar Elevation="1">
<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start" OnClick="@((e) => DrawerToggle())" />
<MudIconButton Icon="@Icons.Material.Filled.Menu" Color="Color.Inherit" Edge="Edge.Start"
OnClick="@(e => DrawerToggle())"/>
</MudHidden>
<MudButton Class="ml-3 mr-8"
Href="/"
@ -25,26 +29,26 @@
Variant="Variant.Text"
Color="Color.Default"
Class="mr-4">
<MudIcon Icon="fa-solid fa-helmet-battle" Class="mr-2" />
<MudIcon Icon="fa-solid fa-helmet-battle" Class="mr-2"/>
Build Calculator
</MudButton>
<MudButton Href="/harass-calculator"
Variant="Variant.Text"
Color="Color.Default"
Class="mr-4">
<MudIcon Icon="fa-solid fa-bow-arrow" Class="mr-2" />
<MudIcon Icon="fa-solid fa-bow-arrow" Class="mr-2"/>
Harass Calculator
</MudButton>
<MudButton Href="/database"
Variant="Variant.Text"
Color="Color.Default"
Class="mr-4">
<MudIcon Icon="fa-solid fa-clipboard-list" Class="mr-2" />
<MudIcon Icon="fa-solid fa-clipboard-list" Class="mr-2"/>
Database
</MudButton>
</MudHidden>
<MudSpacer />
<SearchButtonComponent Id="desktop-searchButton" />
<MudSpacer/>
<SearchButtonComponent Id="desktop-searchButton"/>
</MudAppBar>
<MudHidden Breakpoint="Breakpoint.SmAndDown" Invert="true">
<MudDrawer @bind-Open="_drawerOpen" ClipMode="DrawerClipMode.Always" Elevation="2">
@ -53,8 +57,8 @@
<MudNavLink Href="/build-calculator" Icon="fa-solid fa-helmet-battle">Build Calculator</MudNavLink>
<MudNavLink Href="/harass-calculator" Icon="fa-solid fa-bow-arrow">Harass Calculator</MudNavLink>
<MudNavLink Href="/database" Icon="fa-solid fa-clipboard-list">Database</MudNavLink>
<MudSpacer />
<MudDivider Class="my-2" />
<MudSpacer/>
<MudDivider Class="my-2"/>
</MudNavMenu>
</MudPaper>
</MudDrawer>
@ -70,9 +74,9 @@
</MudLayout>
<MudThemeProvider @ref="@_mudThemeProvider" @bind-IsDarkMode="@_isDarkMode" />
<MudDialogProvider />
<MudSnackbarProvider />
<MudThemeProvider @ref="@_mudThemeProvider" @bind-IsDarkMode="@_isDarkMode"/>
<MudDialogProvider/>
<MudSnackbarProvider/>
@code {
@ -153,5 +157,4 @@
}
}
}

11
IGP/Pages/AboutPage.razor

@ -16,7 +16,8 @@
What is this website for?
</InfoQuestionComponent>
<InfoAnswerComponent>
This is just a "yet another third-party tool" website for a video game. If you played a game like Path of Exile, you are probably already used to seeing a bunch of said tools.
This is just a "yet another third-party tool" website for a video game. If you played a game like Path
of Exile, you are probably already used to seeing a bunch of said tools.
</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
@ -24,7 +25,9 @@
So what is <i>this</i> specific tool for?
</InfoQuestionComponent>
<InfoAnswerComponent>
Ideally, this website will be a casual reference, for getting started with understanding the themes and game patterns of IMMORTAL: Gates of Pyre. That said, this tool is currently not near to achieving said goal. In the meantime, you can check out the simple calculator and database tools on this website.
Ideally, this website will be a casual reference, for getting started with understanding the themes and
game patterns of IMMORTAL: Gates of Pyre. That said, this tool is currently not near to achieving said
goal. In the meantime, you can check out the simple calculator and database tools on this website.
</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
@ -40,7 +43,9 @@
Any disclaimers?
</InfoQuestionComponent>
<InfoAnswerComponent>
This website has no association with "SunSpear Games." Beyond that, any game data displayed on this website for "IMMORTAL: Gates of Pyre" may be inaccurate due to my own human error and time limitations. Use with caution.
This website has no association with "SunSpear Games." Beyond that, any game data displayed on this
website for "IMMORTAL: Gates of Pyre" may be inaccurate due to my own human error and time limitations.
Use with caution.
</InfoAnswerComponent>
</InfoBodyComponent>
</PaperComponent>

21
IGP/Pages/BuildCalculator/BuildCalculatorPage.razor

@ -32,7 +32,8 @@
<div class="calculatorGrid">
<div class="gridItem" style="grid-area: timing;">
<ButtonComponent MyButtonType="MyButtonType.Secondary" OnClick="OnResetClicked">Clear Build Order</ButtonComponent>
<ButtonComponent MyButtonType="MyButtonType.Secondary" OnClick="OnResetClicked">Clear Build Order
</ButtonComponent>
<PanelComponent>
<InfoTooltipComponent InfoText="@Locale["Tooltip Timing Info"]">
<TimingComponent></TimingComponent>
@ -119,7 +120,8 @@
What is this tool?
</InfoQuestionComponent>
<InfoAnswerComponent>
This is a calculator to determine build timings. Mostly so someone can quickly try out a few build orders to see if they somewhat make sense.
This is a calculator to determine build timings. Mostly so someone can quickly try out a few build
orders to see if they somewhat make sense.
</InfoAnswerComponent>
</InfoBodyComponent>
@ -128,13 +130,22 @@
How does it work?
</InfoQuestionComponent>
<InfoAnswerComponent>
The tool calculates every second of game time. So if you attempt to build a <b>Legion Hall</b> as your first action, the tool will scan every second, until you get to one where the request can be made. In this case, that is interval 58.
The tool calculates every second of game time. So if you attempt to build a <b>Legion Hall</b> as
your first action, the tool will scan every second, until you get to one where the request can be
made. In this case, that is interval 58.
<br/>
<br/>
If you then build 2 <b>Apostle of Bindings</b> a <b>Soul Foundry</b> and a 3 <b>Absolvers</b> you should see yourself roughly floating 500 alloy, with barely having any ether. Which means you could of gotten an <b>Acropolis</b> and a <b>Zentari</b> without hurting your build.
If you then build 2 <b>Apostle of Bindings</b> a <b>Soul Foundry</b> and a 3 <b>Absolvers</b> you
should see yourself roughly floating 500 alloy, with barely having any ether. Which means you could
of gotten an <b>Acropolis</b> and a <b>Zentari</b> without hurting your build.
<br/>
<br/>
Try building <b>Apostle of Bindings</b> before the <b>Legion Hall</b> and see how that changes the timing of your 3 <b>Absolvers</b>. (Spoiler: <SpoilerTextComponent> your <b>Absolvers</b> will be built much faster, and you won't be floating so much alloy.</SpoilerTextComponent>)
Try building <b>Apostle of Bindings</b> before the <b>Legion Hall</b> and see how that changes the
timing of your 3 <b>Absolvers</b>. (Spoiler:
<SpoilerTextComponent> your <b>Absolvers</b> will be built much faster, and you won't be floating so
much alloy.
</SpoilerTextComponent>
)
</InfoAnswerComponent>
</InfoBodyComponent>

17
IGP/Pages/BuildCalculator/Parts/ArmyComponent.razor

@ -13,7 +13,8 @@
<Display>@lastInterval | T @Interval.ToTime(lastInterval)</Display>
</FormDisplayComponent>
<FormDisplayComponent Label="Army Attacking At">
<Display>@(lastInterval + timingService.GetTravelTime()) | T @Interval.ToTime(lastInterval + timingService.GetTravelTime())</Display>
<Display>@(lastInterval + timingService.GetTravelTime()) |
T @Interval.ToTime(lastInterval + timingService.GetTravelTime())</Display>
</FormDisplayComponent>
</div>
<FormDisplayComponent Label="Army units built">
@ -38,18 +39,21 @@
<style>
.armyView {
overflow-y: scroll; width: 100%; overflow-x: hidden; height: 350px;
}
overflow-y: scroll;
width: 100%;
overflow-x: hidden;
height: 350px;
}
.armyCardsContainer {
.armyCardsContainer {
display: flex;
width: 100%;
gap: 16px;
flex-wrap: wrap;
}
}
.armyCard {
width:100px;
width: 100px;
height: 80px;
padding: 16px;
}
@ -60,6 +64,7 @@
left: -16px;
position: relative;
}
.armyCount {
font-weight: bolder;
}

9
IGP/Pages/BuildCalculator/Parts/BankComponent.razor

@ -7,7 +7,8 @@
<div class="bankContainer">
<FormDisplayComponent Label="Time">
<Display>@(BuildOrderService.GetLastRequestInterval() + 1) | T @Interval.ToTime(BuildOrderService.GetLastRequestInterval() + 1)</Display>
<Display>@(BuildOrderService.GetLastRequestInterval() + 1) |
T @Interval.ToTime(BuildOrderService.GetLastRequestInterval() + 1)</Display>
</FormDisplayComponent>
<div class="bankRow">
<FormDisplayComponent Label="Alloy">
@ -62,11 +63,9 @@
@code {
[Inject]
IBuildOrderService BuildOrderService { get; set; } = default!;
[Inject] IBuildOrderService BuildOrderService { get; set; } = default!;
[Inject]
IEconomyService EconomyService { get; set; } = default!;
[Inject] IEconomyService EconomyService { get; set; } = default!;
EconomyModel _economy = new();
int _supplyGranted;

12
IGP/Pages/BuildCalculator/Parts/BuildChartComponent.razor

@ -16,7 +16,8 @@ else
var takenPixels = new Dictionary<int, bool>();
<div style="width: @chart.IntervalDisplayMax.ToString()px; height: @chart.ValueDisplayMax.ToString()px">
<div style="position: relative; border: 2px solid gray; border-radius:2px; width: @chart.IntervalDisplayMax.ToString()px; height: @chart.ValueDisplayMax.ToString()px">
<div
style="position: relative; border: 2px solid gray; border-radius:2px; width: @chart.IntervalDisplayMax.ToString()px; height: @chart.ValueDisplayMax.ToString()px">
@foreach (var point in chart.Points)
{
var x = int.Parse(point.GetInterval(chart.HighestIntervalPoint, chart.IntervalDisplayMax));
@ -31,7 +32,8 @@ else
left:@point.GetInterval(chart.HighestIntervalPoint, chart.IntervalDisplayMax)px;
width: 0px;
height: 0px;">
<div style="width:1px; height: 1px; border-top-right-radius:10px; border-top-left-radius:10px; border: 2px solid @chart.ChartColor; background-color:@chart.ChartColor">
<div
style="width:1px; height: 1px; border-top-right-radius:10px; border-top-left-radius:10px; border: 2px solid @chart.ChartColor; background-color:@chart.ChartColor">
</div>
</div>
}
@ -51,7 +53,7 @@ else
margin-bottom: 20px;
}
</style>
</style>
<FormLayoutComponent>
<FormDisplayComponent Label="Highest Alloy">
@ -103,7 +105,7 @@ else
}
int lastRequestedRefreshIndex = 0;
int lastRequestedRefreshIndex;
void OnAge(object? sender, ElapsedEventArgs elapsedEventArgs)
{
@ -130,7 +132,7 @@ else
}
int requestedRefreshIndex = 0;
int requestedRefreshIndex;
void OnBuilderOrderChanged()
{

7
IGP/Pages/BuildCalculator/Parts/EntityClickViewComponent.razor

@ -18,12 +18,15 @@
}
<style>
.entityClickView {
overflow-y: scroll; width: 100%; overflow-x: hidden; height: 550px;
overflow-y: scroll;
width: 100%;
overflow-x: hidden;
height: 550px;
}
</style>
@code {
private EntityModel? _entity = default!;
private EntityModel? _entity;
private string _viewType = EntityViewType.Detailed;
protected override void OnInitialized()

19
IGP/Pages/BuildCalculator/Parts/HotkeyViewerComponent.razor

@ -22,7 +22,8 @@
var color = (hotkey.KeyText.Equals("SPACE") && KeyService.IsHoldingSpace()) || KeyService.GetAllPressedKeys().Contains(hotkey.KeyText)
? "#0a0f12" : hotkey.GetColor();
? "#0a0f12"
: hotkey.GetColor();
var x = hotkey.PositionX * Size;
var y = hotkey.PositionY * Size + (hotkey.PositionY == 0 ? 5 : -50);
@ -37,6 +38,7 @@
{
border = "5px solid black";
}
if (hotkey.KeyText.Equals(controlGroup))
{
color = "#257525";
@ -138,8 +140,7 @@
@code {
[Parameter]
public int Size { get; set; } = 100;
[Parameter] public int Size { get; set; } = 100;
readonly Dictionary<string, EntityModel> data = EntityModel.GetDictionary();
readonly List<HotkeyModel> hotkeys = HotkeyModel.GetAll();
@ -163,7 +164,7 @@
BuildOrderService.Unsubscribe(OnBuilderOrderChanged);
}
int completedTimeCount = 0;
int completedTimeCount;
void OnBuilderOrderChanged()
{
@ -237,6 +238,7 @@
{
return false;
}
return true;
}
@ -256,6 +258,7 @@
{
return false;
}
return true;
}
@ -265,6 +268,7 @@
{
return false;
}
return true;
}
@ -274,6 +278,7 @@
{
return false;
}
return true;
}
@ -286,26 +291,32 @@
{
controlGroup = "Z";
}
if (KeyService.GetAllPressedKeys().Contains("TAB"))
{
controlGroup = "TAB";
}
if (KeyService.GetAllPressedKeys().Contains("C"))
{
controlGroup = "C";
}
if (KeyService.GetAllPressedKeys().Contains("D"))
{
controlGroup = "D";
}
if (KeyService.GetAllPressedKeys().Contains("V"))
{
controlGroup = "V";
}
if (KeyService.GetAllPressedKeys().Contains("ALT"))
{
controlGroup = "ALT";
}
if (KeyService.GetAllPressedKeys().Contains("SHIFT"))
{
controlGroup = "SHIFT";

3
IGP/Pages/BuildCalculator/Parts/InputPanelComponent.razor

@ -16,8 +16,7 @@
@code {
[Parameter]
public RenderFragment ChildContent { get; set; } = default!;
[Parameter] public RenderFragment ChildContent { get; set; } = default!;
private void HandleKeyDown(KeyboardEventArgs e)
{

4
IGP/Pages/BuildCalculator/Parts/OptionsComponent.razor

@ -12,7 +12,9 @@
Value="BuildDelay"
OnChange="@OnBuildingInputDelayChanged">
<FormLabelComponent>Building Input Delay</FormLabelComponent>
<FormInfoComponent>Add a input delay to constructing buildings for simulating worker movement and player micro.</FormInfoComponent>
<FormInfoComponent>Add a input delay to constructing buildings for simulating worker movement and player
micro.
</FormInfoComponent>
</FormNumberComponent>
<div class="optionRow">
<FormLayoutComponent>

3
IGP/Pages/ContactPage.razor

@ -14,7 +14,8 @@
How do I contact you for feature requests and bug reports?
</InfoQuestionComponent>
<InfoAnswerComponent>
You can message me at <b>JonathanMcCaffrey#3544</b> on my <a href="https://discord.gg/uMq8bMGeeN" target="_blank">Discord</a> channel.
You can message me at <b>JonathanMcCaffrey#3544</b> on my <a href="https://discord.gg/uMq8bMGeeN"
target="_blank">Discord</a> channel.
</InfoAnswerComponent>
</InfoBodyComponent>
</PaperComponent>

393
IGP/Pages/DataTables/DataTablesPage.razor

@ -0,0 +1,393 @@
@layout PageLayout
@inject IDataCollectionService DataCollectionService
@using Model
@inherits BasePage
@page "/data-tables"
<LayoutMediumContentComponent>
<WebsiteTitleComponent>Comparision Tables</WebsiteTitleComponent>
<PaperComponent>
Credit to Zard for deriving the formula.
</PaperComponent>
<PaperComponent>
<LayoutRowComponent>
<LayoutColumnComponent>
<FormLayoutComponent>
<FormDisplayComponent Label="Cost of worker">
<Display>@CostOfWorker</Display>
</FormDisplayComponent>
<FormDisplayComponent Label="Alloy mined per second by worker">
<Display>@AlloyMinedPerSecondByWorker</Display>
</FormDisplayComponent>
<FormDisplayComponent Label="Time to produce worker">
<Display>@TimeToProduceWorker</Display>
</FormDisplayComponent>
</FormLayoutComponent>
</LayoutColumnComponent>
<LayoutColumnComponent>
<FormLayoutComponent>
<FormNumberComponent Min="1"
Id="numberOfWorkersLostToHarass"
Value="@((int)NumberOfWorkersLostToHarass)"
OnChange="@(e =>
{
NumberOfWorkersLostToHarass = int.Parse(e.Value!.ToString()!);
Calculate();
})">
<FormLabelComponent>Number of workers lost to harass</FormLabelComponent>
</FormNumberComponent>
<FormNumberComponent Min="1"
Id="numberOfTownHallsExisting"
Value="@((int)NumberOfTownHallsExisting)"
OnChange="OnTownHallsChanged">
<FormLabelComponent>Number of townhalls you have</FormLabelComponent>
</FormNumberComponent>
<div id="numberOfTownHallTravelTimes">
@{
var index = 0;
}
@foreach (var travelTime in TravelTimes)
{
index++;
if (index == 1)
{
continue;
}
var id = $"numberOfTownHallsExisting_{index}";
<FormNumberComponent Min="0"
Id="@id"
Value="@((int)travelTime.Value)"
OnChange="e => { OnTownHallTravelTimeChanged(e, travelTime); }">
<FormLabelComponent>Worker travel time from other
base @(travelTime.Index + 1)</FormLabelComponent>
</FormNumberComponent>
}
</div>
<FormDisplayComponent Label="Total alloy lost">
<Display>
<div style="font-size: 1.5rem; font-weight: 800;">
<span id="totalAlloyHarassment">
@TotalAlloyHarassment
</span>
</div>
</Display>
</FormDisplayComponent>
</FormLayoutComponent>
<br/>
<div>
(<b>Worker replacement costs:</b> <span id="workerReplacementCost">@WorkerReplacementCost()</span>)
</div>
<div>
(<b>Delayed mining time:</b> <span id="delayedMiningCost">@DelayedMiningCost()</span>)
</div>
<div>
(<b>Average travel time:</b> <span id="getAverageTravelTime">@GetAverageTravelTime()</span>)
</div>
</LayoutColumnComponent>
</LayoutRowComponent>
</PaperComponent>
<ContentDividerComponent></ContentDividerComponent>
<PaperComponent>
<InfoBodyComponent>
<InfoQuestionComponent>
What is this tool?
</InfoQuestionComponent>
<InfoAnswerComponent>
The Harass Calculator allows you to calculate damage done to an enemy alloy line. For example, if you
were to attack with Ichors, and kill 6 enemy workers, you can set the
<b>
Number of workers lost to
harass
</b> to 6. This would determine a loss of <span id="exampleTotalAlloyLoss">@ExampleTotalAlloyLoss</span>
alloy. Quite
the large number.
</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>
What can I learn from this?
</InfoQuestionComponent>
<InfoAnswerComponent>
Well, let's assume you lost a full alloy line of workers, and have to take that
@ExampleTotalAlloyLoss alloy cost (<span id="exampleWorkerCost">@ExampleWorkerCost</span>
to rebuy the workers, and <span id="exampleMiningTimeCost">@ExampleMiningTimeCost</span> in lost mining
time.)
<br/><br/>
If you were to set the <b>Number of townhalls you have</b> to 2, the calculator will consider worker
transfer micro. Allowing you to cut the total cost by roughly
<span id="exampleTotalAlloyLossDifference">@ExampleTotalAlloyLossDifference</span> alloy. However, that
number isn't
entirely accurate, you are also going to have to bump up the <b>Worker travel time to alloy</b> to
account for the time it takes the transferred workers to arrive at the decimated alloy line.
<br/><br/>
Let's say it takes 10 seconds for workers to transfer from your second base. Let's enter that for the
second base travel time for the more accurate loss of
<span
id="exampleTotalAlloyLossAccurate">
@ExampleTotalAlloyLossAccurate
</span> alloy
(saving you <span
id="exampleTotalAlloyLossAccurateDifference">@ExampleTotalAlloyLossAccurateDifference</span> alloy.)
<i>
Which is
much better than not transferring workers!
</i>
</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>
Can I see the formula for the calculation?
</InfoQuestionComponent>
<InfoAnswerComponent>
The Harass Calculator is based on the following calculation.
<br/>
<div class="mathContainer">
<div> =c*m+r*g*(t+l) +</div>
<MathLoopSumComponent>
<LoopStart><i>x</i> =1</LoopStart>
<LoopEnd>
<MathDivisionComponent>
<Dividee>m</Dividee>
<Divider>a</Divider>
</MathDivisionComponent>
</LoopEnd>
<IndexSymbol>
<i>x</i>
</IndexSymbol>
</MathLoopSumComponent>
<div style="width: 132px">g*<i>x</i>*(t+l)</div>
</div>
<br/>
<div style="font-family:monospace;">
<div>c is CostOfWorker</div>
<div>m is NumberOfWorkersLostToHarass, <i>m for [M]otes</i></div>
<div>a is NumberOfTownHallsExisting, <i>a for [A]cropolis</i></div>
<div>r is m mod a is LeftOverWorkersToProduceCount()</div>
<div>g is AlloyMinedPerSecondByWorker</div>
<div>t is TimeToProduceWorker</div>
<div>l is TravelTime</div>
<div><i>x</i> is workerProductionIndex</div>
</div>
<br/>
This logic has since been changed slightly to allow client to enter different travel times per base.
<br/>
</InfoAnswerComponent>
</InfoBodyComponent>
<InfoBodyComponent>
<InfoQuestionComponent>
Can I see the code for the calculation?
</InfoQuestionComponent>
<InfoAnswerComponent>
<br/>
<LinkButtonComponent
Href="https://git.jonathanmccaffrey.ca/JonathanMcCaffrey/IGP-Fan-Reference/src/branch/main/IGP/Pages/HarassCalculatorPage.razor#L226">
View Here
</LinkButtonComponent>
</InfoAnswerComponent>
</InfoBodyComponent>
</PaperComponent>
</LayoutMediumContentComponent>
<style>
.mathContainer {
font-family: monospace;
display: flex;
flex-direction: row;
align-items: flex-start;
border: 1px black solid;
padding: 32px;
background-color: #1A1B1E
}
@@media only screen and (max-width: 1025px) {
.mathContainer {
padding-left: 2px;
padding-right: 2px;
}
}
</style>
@code {
// Example calcs
float ExampleTotalAlloyLoss => Calculate(
WorkerReplacementCost(6),
SimultaneousProductionFloor(1, 6),
6,
new List<float> { 0 });
float ExampleWorkerCost => WorkerReplacementCost(6);
float ExampleMiningTimeCost => ExampleTotalAlloyLoss - ExampleWorkerCost;
float ExampleTotalAlloyLossDifference => ExampleTotalAlloyLoss - Calculate(
WorkerReplacementCost(6),
SimultaneousProductionFloor(2, 6),
6,
new List<float> { 0, 0 });
float ExampleTotalAlloyLossAccurate => Calculate(
WorkerReplacementCost(6),
SimultaneousProductionFloor(2, 6),
6,
new List<float> { 0, 10 });
float ExampleTotalAlloyLossAccurateDifference => ExampleTotalAlloyLoss - ExampleTotalAlloyLossAccurate;
float TotalAlloyHarassment;
readonly float CostOfWorker = 50;
readonly float AlloyMinedPerSecondByWorker = 1;
readonly float TimeToProduceWorker = 20;
float NumberOfWorkersLostToHarass = 1;
float NumberOfTownHallsExisting = 1;
float GetAverageTravelTime()
{
if (TravelTimes.Count == 0)
{
return 0;
}
float sum = 0;
foreach (var travelTime in TravelTimes)
{
sum += travelTime.Value;
}
return sum / NumberOfTownHallsExisting;
}
float SimultaneousProductionFloor()
{
if (NumberOfTownHallsExisting <= 0 || NumberOfWorkersLostToHarass <= 0)
{
return 0;
}
return NumberOfWorkersLostToHarass / Math.Min(NumberOfTownHallsExisting, NumberOfWorkersLostToHarass);
}
float SimultaneousProductionFloor(float existingTownHalls, float numberOfWorkersLost)
{
if (existingTownHalls <= 0 || numberOfWorkersLost <= 0)
{
return 0;
}
return numberOfWorkersLost / Math.Min(existingTownHalls, numberOfWorkersLost);
}
float WorkerReplacementCost()
{
return CostOfWorker * NumberOfWorkersLostToHarass;
}
float WorkerReplacementCost(int numberOfWorkersLostToHarass)
{
return CostOfWorker * numberOfWorkersLostToHarass;
}
float DelayedMiningCost()
{
return TotalAlloyHarassment - WorkerReplacementCost();
}
void Calculate()
{
TotalAlloyHarassment = Calculate(WorkerReplacementCost(),
SimultaneousProductionFloor(),
NumberOfWorkersLostToHarass,
TravelTimes.Select(x => x.Value).ToList(),
TimeToProduceWorker,
AlloyMinedPerSecondByWorker);
}
float Calculate(float workerReplacementCost,
float simultaneousProductionFloor,
float numberOfWorkersLostToHarass,
IList<float> travelTimes,
float timeToProduceWorker = 20,
float alloyMinedPerSecondByWorker = 1)
{
var totalAlloyHarassment = workerReplacementCost;
for (var workerProductionIndex = 0; workerProductionIndex < simultaneousProductionFloor; workerProductionIndex++)
{
totalAlloyHarassment += alloyMinedPerSecondByWorker * timeToProduceWorker * (workerProductionIndex + 1);
}
var remainder = (int)(numberOfWorkersLostToHarass % simultaneousProductionFloor);
for (var remainderIndex = 0; remainderIndex < remainder; remainderIndex++)
{
totalAlloyHarassment += alloyMinedPerSecondByWorker * timeToProduceWorker * (simultaneousProductionFloor + 1);
}
for (var travelTimeIndex = 0; travelTimeIndex < numberOfWorkersLostToHarass; travelTimeIndex++)
{
var townHallIndex = travelTimeIndex % travelTimes.Count;
totalAlloyHarassment += alloyMinedPerSecondByWorker * travelTimes[townHallIndex];
}
return totalAlloyHarassment;
}
protected override void OnInitialized()
{
base.OnInitialized();
Calculate();
}
public List<TravelTime> TravelTimes { get; set; } = new() { new TravelTime(0, 0) };
private void OnTownHallsChanged(ChangeEventArgs obj)
{
NumberOfTownHallsExisting = int.Parse(obj.Value!.ToString()!);
while (TravelTimes.Count > NumberOfTownHallsExisting)
TravelTimes.Remove(TravelTimes.Last());
while (TravelTimes.Count < NumberOfTownHallsExisting)
TravelTimes.Add(new TravelTime(TravelTimes.Count, 10 * TravelTimes.Count));
Calculate();
}
private void OnTownHallTravelTimeChanged(ChangeEventArgs obj, TravelTime travelTime)
{
travelTime.Value = (int)obj.Value!;
Calculate();
StateHasChanged();
}
}

5
IGP/Pages/DataTables/Parts/UnitTable.razor

@ -0,0 +1,5 @@
<h3>UnitTable</h3>
@code {
}

23
IGP/Pages/DataTables/Parts/WeaponTable.razor

@ -0,0 +1,23 @@
<h3>WeaponTable</h3>
<MudDataGrid Items="@_entityWeapons.Take(4)">
<Columns>
<PropertyColumn Property="x => x.Range" Title="Nr"/>
</Columns>
</MudDataGrid>
@code {
List<EntityWeaponModel> _entityWeapons;
protected override void OnInitialized()
{
base.OnInitialized();
_entityWeapons = DATA.Get()
.SelectMany(e => e.Value.EntityParts)
.OfType<EntityWeaponModel>()
.ToList();
}
}

17
IGP/Pages/Database/DatabasePage.razor

@ -20,7 +20,9 @@
</PaperComponent>
<div style="margin-left: 8px">
<ButtonGroupComponent OnClick="choice => { EntityDisplayService.SetDisplayType(choice); }" Choice="@EntityDisplayService.GetDisplayType()" Choices="@EntityDisplayService.DefaultChoices()"></ButtonGroupComponent>
<ButtonGroupComponent OnClick="choice => { EntityDisplayService.SetDisplayType(choice); }"
Choice="@EntityDisplayService.GetDisplayType()"
Choices="@EntityDisplayService.DefaultChoices()"></ButtonGroupComponent>
</div>
<PaperComponent>
@ -50,7 +52,8 @@
What is this tool?
</InfoQuestionComponent>
<InfoAnswerComponent>
This is a reference database. Mostly so unit stats can be reviewed outside of the game, IMMORTAL: Gates of Pyre.
This is a reference database. Mostly so unit stats can be reviewed outside of the game, IMMORTAL: Gates
of Pyre.
</InfoAnswerComponent>
</InfoBodyComponent>
@ -59,7 +62,8 @@
Is this database complete?
</InfoQuestionComponent>
<InfoAnswerComponent>
No. A lot of content is missing, that needs to be manually transfered from screenshots of IMMORTAL: Gates of Pyre. This will happen slowly over-time.
No. A lot of content is missing, that needs to be manually transfered from screenshots of IMMORTAL:
Gates of Pyre. This will happen slowly over-time.
</InfoAnswerComponent>
</InfoBodyComponent>
@ -68,7 +72,9 @@
Is this database updated to the latest version?
</InfoQuestionComponent>
<InfoAnswerComponent>
Maybe. Check this <b>@VariableService.Variables["GamePatch"]</b> version number, and compare it to the number on discord, in the <b>#game-updates</b> channel. That should give a general sense of how out of date the data is.
Maybe. Check this <b>@VariableService.Variables["GamePatch"]</b> version number, and compare it to the
number on discord, in the <b>#game-updates</b> channel. That should give a general sense of how out of
date the data is.
</InfoAnswerComponent>
</InfoBodyComponent>
@ -115,8 +121,7 @@
@code {
[Inject]
public IEntityFilterService EntityFilterService { get; set; } = default!;
[Inject] public IEntityFilterService EntityFilterService { get; set; } = default!;
readonly List<EntityModel> defaults = (from entity in EntityModel.GetList()
where entity.IsSpeculative == false

7
IGP/Pages/Database/DatabaseSinglePage.razor

@ -20,7 +20,9 @@
</PaperComponent>
<div style="margin-left: 8px">
<ButtonGroupComponent OnClick="choice => { EntityDisplayService.SetDisplayType(choice); }" Choice="@EntityDisplayService.GetDisplayType()" Choices="@EntityDisplayService.DefaultChoices()"></ButtonGroupComponent>
<ButtonGroupComponent OnClick="choice => { EntityDisplayService.SetDisplayType(choice); }"
Choice="@EntityDisplayService.GetDisplayType()"
Choices="@EntityDisplayService.DefaultChoices()"></ButtonGroupComponent>
</div>
@ -61,8 +63,7 @@
@code {
[Parameter]
public string? Text { get; set; }
[Parameter] public string? Text { get; set; }
private EntityModel? _entity;

6
IGP/Pages/Database/Entity/EntityViewComponent.razor

@ -49,10 +49,8 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; }
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string? StyleType { get; set; }
[CascadingParameter] public string? StyleType { get; set; }
}

15
IGP/Pages/Database/Entity/Parts/EntityAbilitiesComponent.razor

@ -33,18 +33,21 @@
<b>- Energy: </b> @production.Energy
</div>
}
@if (!production.DefensiveLayer.Equals(0))
{
<div>
<b>- Shields:</b> @production.DefensiveLayer
</div>
}
if (production.BuildTime != 0)
{
<div>
<b>- BuildTime: </b> @production.BuildTime
</div>
}
if (production.Cooldown != 0)
{
<div>
@ -68,7 +71,8 @@
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
<b>Name:</b>
<EntityLabelComponent EntityId="@spell.DataType"/>
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
@ -90,18 +94,21 @@
<b> Energy: </b> @production.Energy
</div>
}
@if (!production.DefensiveLayer.Equals(0))
{
<div>
<b>Shields:</b> @production.DefensiveLayer
</div>
}
if (production.BuildTime != 0)
{
<div>
<b> BuildTime: </b> @production.BuildTime
</div>
}
if (production.Cooldown != 0)
{
<div>
@ -119,11 +126,9 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

8
IGP/Pages/Database/Entity/Parts/EntityHeaderComponent.razor

@ -48,16 +48,14 @@ else
margin-left: 4px;
}
}
</style>
</style>
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

8
IGP/Pages/Database/Entity/Parts/EntityInfoComponent.razor

@ -110,17 +110,15 @@ else
gap: 4px;
}
}
</style>
</style>
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

6
IGP/Pages/Database/Entity/Parts/EntityMechanicsComponent.razor

@ -23,10 +23,8 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

9
IGP/Pages/Database/Entity/Parts/EntityPassivesComponent.razor

@ -77,7 +77,8 @@
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@passive.DataType"/>
<b>Name:</b>
<EntityLabelComponent EntityId="@passive.DataType"/>
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
@ -130,11 +131,9 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

12
IGP/Pages/Database/Entity/Parts/EntityProductionComponent.razor

@ -72,6 +72,7 @@
}
</div>
}
@if (Supply != null)
{
<div>
@ -103,7 +104,8 @@
<div>
<span>
<b>@requirement.Requirement.Replace("_", " "):</b> <EntityLabelComponent EntityId="@requirement.Id"/>
<b>@requirement.Requirement.Replace("_", " "):</b> <EntityLabelComponent
EntityId="@requirement.Id"/>
</span>
</div>
}
@ -197,18 +199,16 @@
gap: 4px;
}
}
</style>
</style>
}
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; }
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
private EntityProductionModel Production => Entity!.Production();

13
IGP/Pages/Database/Entity/Parts/EntityPyreSpellsComponent.razor

@ -24,11 +24,13 @@
<b>- Pyre: </b>
@production.Pyre
}
if (production.BuildTime != 0)
{
<b>- BuildTime: </b>
@production.BuildTime
}
if (production.Cooldown != 0)
{
<b>- Cooldown: </b>
@ -51,7 +53,8 @@
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@spell.DataType"/>
<b>Name:</b>
<EntityLabelComponent EntityId="@spell.DataType"/>
</div>
<div>
<b>Description:</b> @((MarkupString)info.Description)
@ -64,11 +67,13 @@
<b> Pyre: </b>
@production.Pyre
}
if (production.BuildTime != 0)
{
<b> BuildTime: </b>
@production.BuildTime
}
if (production.Cooldown != 0)
{
<b> Cooldown: </b>
@ -85,11 +90,9 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

8
IGP/Pages/Database/Entity/Parts/EntityStatsComponent.razor

@ -162,19 +162,17 @@
gap: 4px;
}
}
</style>
</style>
}
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
private EntityVitalityModel Vitality => Entity!.Vitality();

11
IGP/Pages/Database/Entity/Parts/EntityUpgradesComponent.razor

@ -24,7 +24,8 @@
var entity = EntityModel.Get(upgradeId.Id);
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
<b>Name:</b>
<EntityLabelComponent EntityId="@entity.DataType"/>
</div>
<div>
<b>Description:</b> @entity.Info().Description
@ -47,18 +48,16 @@
gap: 4px;
}
}
</style>
</style>
}
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

13
IGP/Pages/Database/Entity/Parts/EntityVanguardAddedComponent.razor

@ -22,12 +22,14 @@
<EntityDisplayComponent Title="Vanguard">
<div>
<div>
<b>Immortal:</b> <EntityLabelComponent EntityId="@immortal.DataType"/>
<b>Immortal:</b>
<EntityLabelComponent EntityId="@immortal.DataType"/>
</div>
@if (!Vanguard.ReplaceId.Equals(""))
{
<div>
<b>Replaces:</b> <EntityLabelComponent EntityId="@Vanguard.ReplaceId"></EntityLabelComponent>
<b>Replaces:</b>
<EntityLabelComponent EntityId="@Vanguard.ReplaceId"></EntityLabelComponent>
</div>
}
</div>
@ -37,14 +39,11 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
private EntityVanguardAddedModel? Vanguard => Entity?.VanguardAdded();
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

15
IGP/Pages/Database/Entity/Parts/EntityVanguardsComponent.razor

@ -44,13 +44,16 @@
<div>
<div>
<b>Name:</b> <EntityLabelComponent EntityId="@entity.DataType"/>
<b>Name:</b>
<EntityLabelComponent EntityId="@entity.DataType"/>
</div>
<div>
<b>Replaces:</b> <EntityLabelComponent EntityId="@vanguard.ReplaceId"/>
<b>Replaces:</b>
<EntityLabelComponent EntityId="@vanguard.ReplaceId"/>
</div>
<div>
<b>Built From:</b> <EntityLabelComponent EntityId="@productionBuilding"/>
<b>Built From:</b>
<EntityLabelComponent EntityId="@productionBuilding"/>
</div>
</div>
}
@ -60,11 +63,9 @@
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
}

14
IGP/Pages/Database/Entity/Parts/EntityWeaponsComponent.razor

@ -91,12 +91,14 @@
<i>- Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))</i>&nbsp;
</span>
}
@if (data.MediumDamage != 0)
{
<span>
<i>- Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))</i>&nbsp;
</span>
}
@if (data.HeavyDamage != 0)
{
<span>
@ -188,12 +190,14 @@
<i>Light DPS: @(Math.Round(data.LightDamage * data.AttacksPerSecond))</i>&nbsp;
</div>
}
@if (data.MediumDamage != 0)
{
<div>
<i>Medium DPS: @(Math.Round(data.MediumDamage * data.AttacksPerSecond))</i>&nbsp;
</div>
}
@if (data.HeavyDamage != 0)
{
<div>
@ -226,20 +230,18 @@
.damageContainer {
margin-bottom: 6px;
}
</style>
</style>
}
}
@code {
[CascadingParameter]
public EntityModel? Entity { get; set; } = default!;
[CascadingParameter] public EntityModel? Entity { get; set; }
[CascadingParameter]
public string StyleType { get; set; } = "Detailed";
[CascadingParameter] public string StyleType { get; set; } = "Detailed";
private bool _isDynamicFormatting = false;
private bool _isDynamicFormatting;
protected override void OnInitialized()
{

70
IGP/Pages/Database/Parts/EntityFilterComponent.razor

@ -9,6 +9,7 @@
{
styleClass = "selected";
}
<button @onclick="@(e => OnChangeFaction(choice))"
class="choiceButton @styleClass">
@(choice == DataType.Any
@ -30,7 +31,9 @@
{
styleClass = "selected";
}
<button class="choiceButton @styleClass" @onclick="@(e => OnChangeImmortal(choice))">@name</button>
<button class="choiceButton @styleClass"
@onclick="@(e => OnChangeImmortal(choice))">@name</button>
}
</div>
}
@ -44,10 +47,12 @@
styleClass = "selected";
}
<button class="choiceButton @styleClass" @onclick="@(e => OnChangeEntity(choice))">@choice.Replace("_", " ")</button>
<button class="choiceButton @styleClass"
@onclick="@(e => OnChangeEntity(choice))">@choice.Replace("_", " ")</button>
}
</div>
<FormTextComponent Id="filterName" Label="Filter Name" Placeholder="Throne..." OnChange="@(e => EntityFilterService.EnterSearchText(e.Value!.ToString()!))"/>
<FormTextComponent Id="filterName" Label="Filter Name" Placeholder="Throne..."
OnChange="@(e => EntityFilterService.EnterSearchText(e.Value!.ToString()!))"/>
</div>
</div>
@ -99,7 +104,7 @@
<style>
.desktopFilters {
.desktopFilters {
display: flex;
gap: 12px;
flex-direction: column;
@ -109,9 +114,9 @@
padding: 12px;
width: 100%;
left: 0px;
}
}
.desktopFiltersContainer {
.desktopFiltersContainer {
width: 75%;
min-width: 1000px;
margin: auto;
@ -120,64 +125,64 @@
flex-direction: column;
justify-content: flex-start;
justify-items: flex-start;
}
}
.filtersContainer {
.filtersContainer {
display: flex;
gap: 16px;
}
}
.filterContainer {
.filterContainer {
display: flex;
background-color: var(--background);
gap: 2px;
margin-right: auto;
border-radius: 8px;
}
}
.choiceButton {
.choiceButton {
background-color: var(--primary);
color: white;
padding: 12px;
border: 1px solid var(--primary);
}
}
.choiceButton:hover {
.choiceButton:hover {
background-color: var(--primary-hover);
border-color: var(--primary-border-hover);
}
}
.selected {
.selected {
background-color: var(--secondary);
color: white;
font-style: normal;
font-weight: bold;
}
}
.selected:hover {
.selected:hover {
background-color: var(--secondary-hover);
border-color: var(--secondary-border-hover);
}
}
.filterContainer .choiceButton:first-child {
.filterContainer .choiceButton:first-child {
border-top-left-radius: 8px;
border-bottom-left-radius: 8px;
}
}
.filterContainer .choiceButton:last-child {
.filterContainer .choiceButton:last-child {
border-top-right-radius: 8px;
border-bottom-right-radius: 8px;
}
}
@@media only screen and (max-width: 1025px) {
@@media only screen and (max-width: 1025px) {
.desktopNavContainer {
display: none;
}
}
}
@@media only screen and (max-width: 480px) {
@@media only screen and (max-width: 480px) {
.filtersContainer {
flex-direction: column;
}
@ -185,13 +190,13 @@
.filterContainer {
flex-direction: column;
}
}
}
.mobileFilters {
.mobileFilters {
display: none;
}
}
@@media only screen and (max-width: 1024px) {
@@media only screen and (max-width: 1024px) {
.mobileFilters {
display: block;
}
@ -203,14 +208,13 @@
.desktopSpacer {
display: none;
}
}
}
</style>
@code {
[Inject]
public IEntityFilterService EntityFilterService { get; set; } = default!;
[Inject] public IEntityFilterService EntityFilterService { get; set; } = default!;
protected override void OnInitialized()
{

4
IGP/Pages/Documentation/Parts/DocumentComponent.razor

@ -47,6 +47,7 @@ else
padding: 8px;
border: 1px solid gray;
}
td {
padding: 8px;
border: 1px solid gray;
@ -55,8 +56,7 @@ else
@code {
[Parameter]
public DocContentModel DocContentModel { get; set; } = default!;
[Parameter] public DocContentModel DocContentModel { get; set; } = default!;
DocFrontMatterModel docFrontMatter = null!;
private string? content;

8
IGP/Pages/EconomyComparison/Parts/ChartComponent.razor

@ -13,7 +13,8 @@
index++;
<div style="width: 0; height: @chart.ValueDisplayMax.ToString()px">
<div style="left: calc(-@width.ToString()px / 2); position: relative; border: 2px solid gray; border-radius:2px; width: @chart.IntervalDisplayMax.ToString()px; height: @chart.ValueDisplayMax.ToString()px">
<div
style="left: calc(-@width.ToString()px / 2); position: relative; border: 2px solid gray; border-radius:2px; width: @chart.IntervalDisplayMax.ToString()px; height: @chart.ValueDisplayMax.ToString()px">
@foreach (var point in chart.Points)
{
var xCoord = point.GetInterval(chart.HighestIntervalPoint, chart.IntervalDisplayMax);
@ -28,7 +29,8 @@
left:@point.GetInterval(chart.HighestIntervalPoint, chart.IntervalDisplayMax)px;
width: 0px;
height: 0px;">
<div style="width:1px; height: 1px; border-top-right-radius:10px; border-top-left-radius:10px; border: 2px solid @chart.ChartColor; background-color:@chart.ChartColor">
<div
style="width:1px; height: 1px; border-top-right-radius:10px; border-top-left-radius:10px; border: 2px solid @chart.ChartColor; background-color:@chart.ChartColor">
</div>
</div>
}
@ -57,7 +59,7 @@
private List<ChartModel> charts = new();
float highestAlloyPoint = 0;
float highestAlloyPoint;
protected override void OnInitialized()

14
IGP/Pages/EconomyComparison/Parts/EconomyDifferenceComponent.razor

@ -44,12 +44,12 @@
<style>
.differences {
.differences {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
}
}
.differenceTitle {
font-size: 1.2em;
@ -62,13 +62,13 @@
</style>
@code {
private int StartingAdvantageAtTime = 0;
private int StartingAdvantageAtTime;
private int PeakAdvantageByAlloy = 0;
private int PeakAdvantageAtTime = 0;
private int PeakAdvantageByAlloy;
private int PeakAdvantageAtTime;
private int WorseningTime = 0;
private int MiracleTime = 0;
private int WorseningTime;
private int MiracleTime;
protected override void OnInitialized()
{

3
IGP/Pages/EconomyComparison/Parts/EconomyInputComponent.razor

@ -39,8 +39,7 @@
@code {
[Parameter]
public int ForPlayer { get; set; }
[Parameter] public int ForPlayer { get; set; }
private int TownHallCount => economyComparisonService.GetTownHallCount(ForPlayer);
private string ChartColor => economyComparisonService.GetColor(ForPlayer);

36
IGP/Pages/HarassCalculatorPage.razor

@ -36,7 +36,11 @@
<FormNumberComponent Min="1"
Id="numberOfWorkersLostToHarass"
Value="@((int)NumberOfWorkersLostToHarass)"
OnChange="@(e => { NumberOfWorkersLostToHarass = int.Parse(e.Value!.ToString()!); Calculate();})">
OnChange="@(e =>
{
NumberOfWorkersLostToHarass = int.Parse(e.Value!.ToString()!);
Calculate();
})">
<FormLabelComponent>Number of workers lost to harass</FormLabelComponent>
</FormNumberComponent>
@ -58,12 +62,14 @@
{
continue;
}
var id = $"numberOfTownHallsExisting_{index}";
<FormNumberComponent Min="0"
Id="@id"
Value="@((int)travelTime.Value)"
OnChange="e => { OnTownHallTravelTimeChanged(e, travelTime); }">
<FormLabelComponent>Worker travel time from other base @(travelTime.Index + 1)</FormLabelComponent>
<FormLabelComponent>Worker travel time from other
base @(travelTime.Index + 1)</FormLabelComponent>
</FormNumberComponent>
}
</div>
@ -110,7 +116,8 @@
<b>
Number of workers lost to
harass
</b> to 6. This would determine a loss of <span id="exampleTotalAlloyLoss">@ExampleTotalAlloyLoss</span> alloy. Quite
</b> to 6. This would determine a loss of <span id="exampleTotalAlloyLoss">@ExampleTotalAlloyLoss</span>
alloy. Quite
the large number.
</InfoAnswerComponent>
</InfoBodyComponent>
@ -127,8 +134,10 @@
<br/><br/>
If you were to set the <b>Number of townhalls you have</b> to 2, the calculator will consider worker
transfer micro. Allowing you to cut the total cost by roughly
<span id="exampleTotalAlloyLossDifference">@ExampleTotalAlloyLossDifference</span> alloy. However, that number isn't
entirely accurate, you are also going to have to bump up the <b>Worker travel time to alloy</b> to account for the time it takes the transferred workers to arrive at the decimated alloy line.
<span id="exampleTotalAlloyLossDifference">@ExampleTotalAlloyLossDifference</span> alloy. However, that
number isn't
entirely accurate, you are also going to have to bump up the <b>Worker travel time to alloy</b> to
account for the time it takes the transferred workers to arrive at the decimated alloy line.
<br/><br/>
Let's say it takes 10 seconds for workers to transfer from your second base. Let's enter that for the
second base travel time for the more accurate loss of
@ -136,7 +145,8 @@
id="exampleTotalAlloyLossAccurate">
@ExampleTotalAlloyLossAccurate
</span> alloy
(saving you <span id="exampleTotalAlloyLossAccurateDifference">@ExampleTotalAlloyLossAccurateDifference</span> alloy.)
(saving you <span
id="exampleTotalAlloyLossAccurateDifference">@ExampleTotalAlloyLossAccurateDifference</span> alloy.)
<i>
Which is
much better than not transferring workers!
@ -153,15 +163,17 @@
<br/>
<div class="mathContainer">
<div> =c*m+r*g*(t+l) + </div>
<div> =c*m+r*g*(t+l) +</div>
<MathLoopSumComponent>
<LoopStart><i>x</i> =1</LoopStart>
<LoopEnd>
<MathDivisionComponent>
<Dividee>m</Dividee><Divider>a</Divider>
</MathDivisionComponent>⌋
<Dividee>m</Dividee>
<Divider>a</Divider>
</MathDivisionComponent>
</LoopEnd>
<IndexSymbol>
<i>x</i>
@ -172,7 +184,7 @@
</div>
<br/>
<div style="font-family:monospace;">
<div>c is CostOfWorker </div>
<div>c is CostOfWorker</div>
<div>m is NumberOfWorkersLostToHarass, <i>m for [M]otes</i></div>
<div>a is NumberOfTownHallsExisting, <i>a for [A]cropolis</i></div>
<div>r is m mod a is LeftOverWorkersToProduceCount()</div>
@ -192,7 +204,8 @@
</InfoQuestionComponent>
<InfoAnswerComponent>
<br/>
<LinkButtonComponent Href="https://git.jonathanmccaffrey.ca/JonathanMcCaffrey/IGP-Fan-Reference/src/branch/main/IGP/Pages/HarassCalculatorPage.razor#L226">
<LinkButtonComponent
Href="https://git.jonathanmccaffrey.ca/JonathanMcCaffrey/IGP-Fan-Reference/src/branch/main/IGP/Pages/HarassCalculatorPage.razor#L226">
View Here
</LinkButtonComponent>
</InfoAnswerComponent>
@ -222,6 +235,7 @@
</style>
@code {
// Example calcs
float ExampleTotalAlloyLoss => Calculate(
WorkerReplacementCost(6),

4
IGP/Pages/Home/HomePage.razor

@ -25,12 +25,12 @@
<ContentHighlightComponent Title="Build Calculator"
Description="Make a build!"
Href="/build-calculator"
ImageHref="image/hero/Build.png" />
ImageHref="image/hero/Build.png"/>
<ContentHighlightComponent Title="Database"
Description="Review the units!"
Href="/database"
ImageHref="image/hero/Database.png" />
ImageHref="image/hero/Database.png"/>
</div>

18
IGP/Pages/Home/Parts/ContentHighlightComponent.razor

@ -31,7 +31,7 @@
background-color: var(--paper-hover);
border-color: var(--paper-border-hover);
text-decoration: none;
box-shadow: 0 4px 6px rgba(0,0,0,0.6);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
transform: translateY(-2px) scale(1.01);
}
@ -43,8 +43,8 @@
}
.contentHighlightImage {
border: 1px solid rgba(0,0,0,0.5);
box-shadow: 2px 2px 2px rgba(0,0,0,0.5);
border: 1px solid rgba(0, 0, 0, 0.5);
box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.5);
width: calc(100% - 32px);
margin-left: auto;
margin-right: auto;
@ -62,17 +62,13 @@
@code {
[Parameter]
public string Href { get; set; } = default!;
[Parameter] public string Href { get; set; } = default!;
[Parameter]
public string Title { get; set; } = default!;
[Parameter] public string Title { get; set; } = default!;
[Parameter]
public string Description { get; set; } = default!;
[Parameter] public string Description { get; set; } = default!;
[Parameter]
public string ImageHref { get; set; } = default!;
[Parameter] public string ImageHref { get; set; } = default!;
}

13
IGP/Pages/MemoryTester/MemoryTesterPage.razor

@ -19,10 +19,16 @@
What is this tool?
</InfoQuestionComponent>
<InfoAnswerComponent>
A tool to test your memory of unit stats. Look at the first unit given, and fill in the remaining stats based on how they should compare.
A tool to test your memory of unit stats. Look at the first unit given, and fill in the remaining stats
based on how they should compare.
<br/><br/>
For example, if the first unit you see is the Masked Hunter of range 400, do you remember the range of the Scepter? Are they the same? Does the Scepter have double the range of the Masked Hunter? Less range than it? Well, enter your guess and submit! <SpoilerTextComponent>The range is 200 longer, so if you remember that, you know you are going to need more than Masked Hunters to deal with hard to reach enemy Scepters.</SpoilerTextComponent>
For example, if the first unit you see is the Masked Hunter of range 400, do you remember the range of
the Scepter? Are they the same? Does the Scepter have double the range of the Masked Hunter? Less range
than it? Well, enter your guess and submit!
<SpoilerTextComponent>The range is 200 longer, so if you remember that, you know you are going to need
more than Masked Hunters to deal with hard to reach enemy Scepters.
</SpoilerTextComponent>
</InfoAnswerComponent>
</InfoBodyComponent>
@ -31,7 +37,8 @@
Why is this tool here?
</InfoQuestionComponent>
<InfoAnswerComponent>
It was just a tool to quickly develop for fun when I didn't want to cover something larger on the 02/27/2022 live coding stream.
It was just a tool to quickly develop for fun when I didn't want to cover something larger on the
02/27/2022 live coding stream.
<br/><br/>
It may get expanded upon later.
</InfoAnswerComponent>

11
IGP/Pages/MemoryTester/Parts/UnitMemory.razor

@ -41,7 +41,7 @@
padding: 12px;
color: #ff2525;
font-weight: 700;
background-color: rgba(0,0,0,0.4);
background-color: rgba(0, 0, 0, 0.4);
padding: 8px;
border-radius: 2px;
}
@ -49,14 +49,13 @@
@code {
[Parameter]
public MemoryEntityModel EntityMemory { get; set; } = default!;
[Parameter] public MemoryEntityModel EntityMemory { get; set; } = default!;
private List<MemoryQuestionModel> questions { get; set; } = default!;
private bool hasBeenSubmitted = false;
private bool isCorrect = false;
private bool isWrong = false;
private bool hasBeenSubmitted;
private bool isCorrect;
private bool isWrong;
public int Guess { get; set; }

17
IGP/Pages/Notes/NotesIndexPage.razor

@ -99,7 +99,7 @@ else
background-color: var(--paper-hover);
border-color: var(--paper-border-hover);
text-decoration: none;
box-shadow: 0 4px 6px rgba(0,0,0,0.6);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.6);
transform: translateY(-2px) scale(1.01);
}
@ -107,20 +107,15 @@ else
@code {
[Parameter]
public string? Href1 { get; set; }
[Parameter] public string? Href1 { get; set; }
[Parameter]
public string? Href2 { get; set; }
[Parameter] public string? Href2 { get; set; }
[Parameter]
public string? Href3 { get; set; }
[Parameter] public string? Href3 { get; set; }
[Parameter]
public string? Href4 { get; set; }
[Parameter] public string? Href4 { get; set; }
[Parameter]
public string? Href5 { get; set; }
[Parameter] public string? Href5 { get; set; }
private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? "";

16
IGP/Pages/Notes/NotesPage.razor

@ -30,6 +30,7 @@ else
{
continue;
}
<NoteComponent NoteContentModel="note"/>
}
</PaperComponent>
@ -92,20 +93,15 @@ else
@code {
[Parameter]
public string? Href1 { get; set; }
[Parameter] public string? Href1 { get; set; }
[Parameter]
public string? Href2 { get; set; }
[Parameter] public string? Href2 { get; set; }
[Parameter]
public string? Href3 { get; set; }
[Parameter] public string? Href3 { get; set; }
[Parameter]
public string? Href4 { get; set; }
[Parameter] public string? Href4 { get; set; }
[Parameter]
public string? Href5 { get; set; }
[Parameter] public string? Href5 { get; set; }
private string Href => Href5 ?? Href4 ?? Href3 ?? Href2 ?? Href1 ?? "";

5
IGP/Pages/Notes/Parts/NoteComponent.razor

@ -48,11 +48,10 @@ else
@code {
[Parameter]
public NoteContentModel NoteContentModel { get; set; } = default!;
[Parameter] public NoteContentModel NoteContentModel { get; set; } = default!;
NoteFrontMatterModel noteFrontMatter = null!;
private string? content = null;
private string? content;
private string Filepath => $"content/notes/{NoteContentModel.Content}.md";
private string GitUrl => $"{Project.GitResourcesUrl}/{Filepath}";

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save