File tree Expand file tree Collapse file tree
Mythril.Blazor/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 @( QuestData ! .Type == QuestType .Single ? " flag" : " repeat" )
2121 </span >
2222 @QuestData.Name
23+ @if (ResourceManager .IsCompleted (QuestData .Name ))
24+ {
25+ <span class =" ms-1 text-success material-icons" style =" font-size : 1rem ;" title =" Completed at least once" >check_circle </span >
26+ }
2327 @if (inProgress )
2428 {
2529 <span class =" ms-auto badge bg-warning text-dark small" >In Progress </span >
3438 <div class =" card-side" >
3539 @{
3640 var forwardUnlocks = ResourceManager .GetForwardUnlocks (QuestData .Quest );
41+ bool isCompleted = ResourceManager .IsCompleted (QuestData .Name );
3742 }
38- @if (QuestData .Requirements .Length > 0 || (QuestData .RequiredStats != null && QuestData .RequiredStats .Count > 0 ) || forwardUnlocks .Count > 0 )
43+ @if (QuestData .Requirements .Length > 0 || (QuestData .RequiredStats != null && QuestData .RequiredStats .Count > 0 ) || ( forwardUnlocks .Count > 0 && ! isCompleted ) )
3944 {
4045 <ul >
41- @foreach ( var unlock in forwardUnlocks )
46+ @if ( ! isCompleted )
4247 {
43- <li @key =" unlock" class =" text-warning" >
44- <span title =" Unlocks" >✨</span > @unlock
45- </li >
48+ @foreach ( var unlock in forwardUnlocks )
49+ {
50+ <li @key =" unlock" class =" text-warning" >
51+ <span title =" Unlocks" >✨</span > @unlock
52+ </li >
53+ }
4654 }
4755 @foreach ( var requirement in QuestData .Requirements )
4856 {
Original file line number Diff line number Diff line change @@ -186,6 +186,8 @@ public void Tick(double deltaSeconds)
186186 }
187187
188188 public IEnumerable < Quest > GetCompletedQuests ( ) => _gameStore . State . CompletedQuests . Select ( name => _quests . All . FirstOrDefault ( q => q . Name == name ) is var q && q . Name != null ? q : new Quest ( name , "" ) ) ;
189+ public bool IsCompleted ( string questName ) => _gameStore . State . CompletedQuests . Contains ( questName ) ;
190+
189191 public void ClearCompletedQuests ( )
190192 {
191193 foreach ( var q in _gameStore . State . CompletedQuests )
You can’t perform that action at this time.
0 commit comments