Updating Mudblazor Version

This commit is contained in:
Jonathan
2025-04-27 19:34:50 -04:00
parent 38ff4e3e89
commit e820457176
153 changed files with 5010 additions and 2059 deletions
+27 -13
View File
@@ -1,6 +1,6 @@
@layout PageLayout
@inject IDataCollectionService DataCollectionService
@inject IDataCollectionService DataCollectionService
@using Model
@inherits BasePage
@@ -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,8 +204,9 @@
</InfoQuestionComponent>
<InfoAnswerComponent>
<br/>
<LinkButtonComponent Href="https://git.jonathanmccaffrey.ca/JonathanMcCaffrey/IGP-Fan-Reference/src/branch/main/IGP/Pages/HarassCalculatorPage.razor#L226">
View Here
<LinkButtonComponent
Href="https://git.jonathanmccaffrey.ca/JonathanMcCaffrey/IGP-Fan-Reference/src/branch/main/IGP/Pages/HarassCalculatorPage.razor#L226">
View Here
</LinkButtonComponent>
</InfoAnswerComponent>
</InfoBodyComponent>
@@ -222,6 +235,7 @@
</style>
@code {
// Example calcs
float ExampleTotalAlloyLoss => Calculate(
WorkerReplacementCost(6),