1
0
mirror of synced 2024-11-12 01:20:51 +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>
@{
var conditionOperator = ">";
if ((DanConditionType)border.OdaiType is DanConditionType.BadCount)
{
conditionOperator = "<";
}
var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
}
<MudStack Spacing="1">
<MudText Typo="Typo.subtitle2" Style="font-weight:bold">Conditions</MudText>
@ -359,11 +355,8 @@
</MudStack>
}
@{
var conditionOperator = ">";
if ((DanConditionType)border.OdaiType is DanConditionType.BadCount)
{
conditionOperator = "<";
}
var conditionOperator = GetDanConditionOperator((DanConditionType)border.OdaiType);
if (redRequirement == 0) {
conditionOperator = "";

View File

@ -179,4 +179,16 @@ public partial class DaniDojo
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;
}
}