JappaWakka 22cedcd6c7 Added @Pokedex.ChangeEntry(str,int,bool)
@Pokedex.ChangeEntry(PokeID,EntryType,ForceChange)

PokeID [str] = the Pokémon ID: number (e.g. 19) + optionally Data File Suffix (e.g. 19_alola) or AdditionalValue (201;0)
EntryType [int] = the type that the entry needs to be set to: 0 (undiscovered), 1 (seen), 2 (seen + caught) or 3 (seen + caught + shiny)
ForceChange [bool] = if this is set to true, the game doesn't check whether the Pokédex entry is lower than EntryType before setting it
2023-07-22 20:47:07 +02:00

31 lines
1.4 KiB
VB.net

Namespace ScriptVersion2
Partial Class ScriptCommander
' --------------------------------------------------------------------------------------------------------------------------
' Contains the @pokedex commands.
' --------------------------------------------------------------------------------------------------------------------------
Private Shared Sub DoPokedex(ByVal subClass As String)
Dim command As String = ScriptComparer.GetSubClassArgumentPair(subClass).Command
Dim argument As String = ScriptComparer.GetSubClassArgumentPair(subClass).Argument
Select Case command.ToLower()
Case "setautodetect"
Pokedex.AutoDetect = ScriptConversion.ToBoolean(argument)
Case "changeentry"
Dim ForceChange As Boolean = False
If argument.Split(",").Count > 2 Then
ForceChange = CBool(argument.GetSplit(2, ","))
End If
Pokedex.ChangeEntry(Core.Player.PokedexData, argument.GetSplit(0, ","), CInt(argument.GetSplit(1, ",")), ForceChange)
Case Else
Logger.Log(Logger.LogTypes.Warning, "ScriptCommander.vb: (@pokedex." & command & ") Command not found.")
End Select
IsReady = True
End Sub ' Crash Handler
End Class
End Namespace