Updating Mudblazor Version
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user