Changed hall of fame to keep first entry + last 20 entries.
This commit is contained in:
parent
418154b282
commit
514bc5ecf5
|
@ -11,6 +11,7 @@
|
|||
Dim texture As Texture2D
|
||||
|
||||
Dim Entries As New List(Of HallOfFameEntry)
|
||||
Dim AmountOfEntries As Integer = 0
|
||||
|
||||
Dim Scroll As Integer = 0
|
||||
Dim Cursor As Integer = 0
|
||||
|
@ -118,6 +119,7 @@
|
|||
If IsNumeric(s) = True Then
|
||||
If IDs.Contains(CInt(s)) = False Then
|
||||
IDs.Add(CInt(s))
|
||||
AmountOfEntries = CInt(s) + 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
@ -194,7 +196,7 @@
|
|||
Next
|
||||
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Entries: ", New Vector2(90 + 64 * 11, 119), New Color(0, 0, 0, alpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, Me.Entries.Count.ToString(), New Vector2(190 + 64 * 11, 119), New Color(255, 255, 255, alpha))
|
||||
Core.SpriteBatch.DrawString(FontManager.MainFont, AmountOfEntries.ToString(), New Vector2(190 + 64 * 11, 119), New Color(255, 255, 255, alpha))
|
||||
|
||||
DrawCursor()
|
||||
End If
|
||||
|
@ -467,8 +469,11 @@
|
|||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
Return (count + 1)
|
||||
count += 1
|
||||
If count > 21 Then
|
||||
count = 21
|
||||
End If
|
||||
Return count
|
||||
End Function
|
||||
|
||||
End Class
|
|
@ -433,7 +433,7 @@
|
|||
End If
|
||||
Case "registerhalloffame"
|
||||
Dim count As Integer = -1
|
||||
|
||||
Dim NewHallOfFameData As String = ""
|
||||
If Core.Player.HallOfFameData <> "" Then
|
||||
Dim data() As String = Core.Player.HallOfFameData.SplitAtNewline()
|
||||
|
||||
|
@ -443,6 +443,13 @@
|
|||
count = id
|
||||
End If
|
||||
Next
|
||||
|
||||
For Each l As String In data
|
||||
Dim id As Integer = CInt(l.Remove(l.IndexOf(",")))
|
||||
If id > (count - 19) OrElse id = 0 Then 'last 20 entries saved, plus the first entry
|
||||
NewHallOfFameData &= l & vbNewLine
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
count += 1
|
||||
|
@ -464,11 +471,8 @@
|
|||
End If
|
||||
Next
|
||||
|
||||
If Core.Player.HallOfFameData <> "" Then
|
||||
Core.Player.HallOfFameData &= vbNewLine
|
||||
End If
|
||||
|
||||
Core.Player.HallOfFameData &= newData
|
||||
NewHallOfFameData &= newData
|
||||
Core.Player.HallOfFameData = NewHallOfFameData
|
||||
Case "setot"
|
||||
Dim Index As Integer = int(argument.GetSplit(0, ","))
|
||||
Dim OT As String = argument.GetSplit(1, ",")
|
||||
|
|
Loading…
Reference in New Issue