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 texture As Texture2D
|
||||||
|
|
||||||
Dim Entries As New List(Of HallOfFameEntry)
|
Dim Entries As New List(Of HallOfFameEntry)
|
||||||
|
Dim AmountOfEntries As Integer = 0
|
||||||
|
|
||||||
Dim Scroll As Integer = 0
|
Dim Scroll As Integer = 0
|
||||||
Dim Cursor As Integer = 0
|
Dim Cursor As Integer = 0
|
||||||
|
@ -118,6 +119,7 @@
|
||||||
If IsNumeric(s) = True Then
|
If IsNumeric(s) = True Then
|
||||||
If IDs.Contains(CInt(s)) = False Then
|
If IDs.Contains(CInt(s)) = False Then
|
||||||
IDs.Add(CInt(s))
|
IDs.Add(CInt(s))
|
||||||
|
AmountOfEntries = CInt(s) + 1
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
@ -194,7 +196,7 @@
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Core.SpriteBatch.DrawString(FontManager.MainFont, "Entries: ", New Vector2(90 + 64 * 11, 119), New Color(0, 0, 0, alpha))
|
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()
|
DrawCursor()
|
||||||
End If
|
End If
|
||||||
|
@ -467,8 +469,11 @@
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
count += 1
|
||||||
Return (count + 1)
|
If count > 21 Then
|
||||||
|
count = 21
|
||||||
|
End If
|
||||||
|
Return count
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
|
@ -433,7 +433,7 @@
|
||||||
End If
|
End If
|
||||||
Case "registerhalloffame"
|
Case "registerhalloffame"
|
||||||
Dim count As Integer = -1
|
Dim count As Integer = -1
|
||||||
|
Dim NewHallOfFameData As String = ""
|
||||||
If Core.Player.HallOfFameData <> "" Then
|
If Core.Player.HallOfFameData <> "" Then
|
||||||
Dim data() As String = Core.Player.HallOfFameData.SplitAtNewline()
|
Dim data() As String = Core.Player.HallOfFameData.SplitAtNewline()
|
||||||
|
|
||||||
|
@ -443,6 +443,13 @@
|
||||||
count = id
|
count = id
|
||||||
End If
|
End If
|
||||||
Next
|
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
|
End If
|
||||||
|
|
||||||
count += 1
|
count += 1
|
||||||
|
@ -464,11 +471,8 @@
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If Core.Player.HallOfFameData <> "" Then
|
NewHallOfFameData &= newData
|
||||||
Core.Player.HallOfFameData &= vbNewLine
|
Core.Player.HallOfFameData = NewHallOfFameData
|
||||||
End If
|
|
||||||
|
|
||||||
Core.Player.HallOfFameData &= newData
|
|
||||||
Case "setot"
|
Case "setot"
|
||||||
Dim Index As Integer = int(argument.GetSplit(0, ","))
|
Dim Index As Integer = int(argument.GetSplit(0, ","))
|
||||||
Dim OT As String = argument.GetSplit(1, ",")
|
Dim OT As String = argument.GetSplit(1, ",")
|
||||||
|
|
Loading…
Reference in New Issue