Added some more text replacements

This commit is contained in:
JappaWakka 2024-05-10 18:07:31 +02:00
parent 260cf6aa66
commit 8479bd0fc3
7 changed files with 12 additions and 8 deletions

View File

@ -29,6 +29,7 @@
Me._text = Me._text.Replace("~", " ")
Me._text = Me._text.Replace("<player.name>", Core.Player.Name)
Me._text = Me._text.Replace("<playername>", Core.Player.Name)
Me._text = Me._text.Replace("<rival.name>", Core.Player.RivalName)
Me._text = Me._text.Replace("<rivalname>", Core.Player.RivalName)
Me._text = Me._text.Replace("[POKE]", "Poké")

View File

@ -66,7 +66,7 @@
Private Sub SetupOptions()
For i = 0 To Options.Count - 1
Options(i) = Options(i).Replace("<playername>", Core.Player.Name)
Options(i) = Options(i).Replace("<playername>", Core.Player.Name).Replace("<player.name>", Core.Player.Name)
Next
End Sub

View File

@ -110,7 +110,9 @@
Dim result As String = resultToken.TokenContent
If Core.Player IsNot Nothing Then
result = result.Replace("<playername>", Core.Player.Name)
result = result.Replace("<player.name>", Core.Player.Name)
result = result.Replace("<rivalname>", Core.Player.RivalName)
result = result.Replace("<rival.name>", Core.Player.RivalName)
End If
If result.Contains("<") Then
result = CStr(ScriptVersion2.ScriptComparer.EvaluateConstruct(result))

View File

@ -392,7 +392,7 @@
Public Statistics As String = ""
'Secure fields:
Private _name As String = "<playername>"
Private _name As String = "<player.name>"
Private _rivalName As String = "???"
Private _rivalSkin As String = "Silver"
Private _gender As String = "Male"
@ -2060,7 +2060,7 @@
Trophies.Clear()
'Restore default values:
Name = "<playername>"
Name = "<player.name>"
RivalName = ""
RivalSkin = ""
Money = 0

View File

@ -249,6 +249,7 @@
Private Function ReplaceIntroName(ByVal Name As String) As String
Dim n As String = Name.Replace("<rivalname>", Core.Player.RivalName)
n = n.Replace("<rival.name>", Core.Player.RivalName)
n = n.Replace("<playername>", Core.Player.Name)
n = n.Replace("<player.name>", Core.Player.Name)
n = n.Replace("[POKE]", "Poké")

View File

@ -660,7 +660,7 @@
End If
Dim catchTrainer As String = Core.Player.Name
If commas > 5 And Me.Value.GetSplit(6) <> "<playername>" Then
If commas > 5 And Me.Value.GetSplit(6) <> "<playername>" And Me.Value.GetSplit(6) <> "<player.name>" Then
catchTrainer = Me.Value.GetSplit(6)
End If
@ -1700,9 +1700,9 @@
Dim Message As String = ""
If Amount = 1 Then
Message = "<playername> handed over the~" & Item.OneLineName() & "!"
Message = "<player.name> handed over the~" & Item.OneLineName() & "!"
Else
Message = "<playername> handed over the~" & Item.OneLinePluralName() & "!"
Message = "<player.name> handed over the~" & Item.OneLinePluralName() & "!"
End If
Core.Player.Inventory.RemoveItem(ItemID, Amount)

View File

@ -64,9 +64,9 @@
If showMessage = True Then
Dim Message As String = ""
If amount = 1 Then
Message = "<playername> handed over the~" & Item.OneLineName() & "!"
Message = "<player.name> handed over the~" & Item.OneLineName() & "!"
Else
Message = "<playername> handed over the~" & Item.OneLinePluralName() & "!"
Message = "<player.name> handed over the~" & Item.OneLinePluralName() & "!"
End If
Screen.TextBox.reDelay = 0.0F