1
0
mirror of synced 2024-11-28 00:20:53 +01:00

Fix OK note operator on Dan Dojo page

This commit is contained in:
shiibe 2022-10-02 19:27:06 -04:00
parent c15e15acca
commit 055c490c77
2 changed files with 15 additions and 10 deletions

View File

@ -262,11 +262,7 @@
} }
</MudStack> </MudStack>
@{ @{
var conditionOperator = ">"; var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
if ((DanConditionType)border.OdaiType is DanConditionType.BadCount)
{
conditionOperator = "<";
}
} }
<MudStack Spacing="1"> <MudStack Spacing="1">
<MudText Typo="Typo.subtitle2" Style="font-weight:bold">Conditions</MudText> <MudText Typo="Typo.subtitle2" Style="font-weight:bold">Conditions</MudText>
@ -359,11 +355,8 @@
</MudStack> </MudStack>
} }
@{ @{
var conditionOperator = ">"; var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
if ((DanConditionType)border.OdaiType is DanConditionType.BadCount)
{
conditionOperator = "<";
}
if (redRequirement == 0) { if (redRequirement == 0) {
conditionOperator = ""; conditionOperator = "";

View File

@ -179,4 +179,16 @@ public partial class DaniDojo
return isGold ? soulBorder.GoldBorderTotal : soulBorder.RedBorderTotal; return isGold ? soulBorder.GoldBorderTotal : soulBorder.RedBorderTotal;
} }
private static string GetDanConditionOperator(DanConditionType type)
{
var conditionOperator = ">";
if (type is DanConditionType.BadCount or DanConditionType.OkCount)
{
conditionOperator = "<";
}
return conditionOperator;
}
} }