diff --git a/P3D/Dialogues/TextBox.vb b/P3D/Dialogues/TextBox.vb index 7aa745a13..c822a0e17 100644 --- a/P3D/Dialogues/TextBox.vb +++ b/P3D/Dialogues/TextBox.vb @@ -99,20 +99,6 @@ End Sub Private Sub FormatText() - Dim tokenSearchBuffer As String() = Me.Text.Split(CChar("") - If Not tokenEndIdx = -1 Then - validToken = possibleToken.Substring(0, tokenEndIdx) - If Localization.LocalizationTokens.ContainsKey(validToken) = True Then - Me.Text = Me.Text.Replace("", Localization.GetString(validToken, validToken)) - End If - End If - Next - Me.Text = Me.Text.Replace("", Core.Player.Name) Me.Text = Me.Text.Replace("", Core.Player.Name) diff --git a/P3D/HelperClasses/Localization.vb b/P3D/HelperClasses/Localization.vb index 56fa69010..c52cb5312 100644 --- a/P3D/HelperClasses/Localization.vb +++ b/P3D/HelperClasses/Localization.vb @@ -116,71 +116,6 @@ result = result.Replace("", Core.Player.RivalName) result = result.Replace("", Core.Player.RivalName) End If - - Dim tokenSearchBuffer As String() = result.Split("") - If Not tokenEndIdx = -1 Then - Dim key As Keys - validToken = possibleToken.Substring(0, tokenEndIdx) - Select Case validToken.ToLower() - Case "moveforward" - key = KeyBindings.ForwardMoveKey - Case "moveleft" - key = KeyBindings.LeftMoveKey - Case "movebackward" - key = KeyBindings.BackwardMoveKey - Case "moveright" - key = KeyBindings.RightMoveKey - Case "openmenu" - key = KeyBindings.OpenInventoryKey - Case "chat" - key = KeyBindings.ChatKey - Case "special", "phone" - key = KeyBindings.SpecialKey - Case "muteaudio" - key = KeyBindings.MuteAudioKey - Case "cameraleft" - key = KeyBindings.LeftKey - Case "cameraright" - key = KeyBindings.RightKey - Case "cameraup" - key = KeyBindings.UpKey - Case "cameradown" - key = KeyBindings.DownKey - Case "cameralock" - key = KeyBindings.CameraLockKey - Case "guicontrol" - key = KeyBindings.GUIControlKey - Case "screenshot" - key = KeyBindings.ScreenshotKey - Case "debugcontrol" - key = KeyBindings.DebugKey - Case "perspectiveswitch" - key = KeyBindings.PerspectiveSwitchKey - Case "fullscreen" - key = KeyBindings.FullScreenKey - Case "enter1" - key = KeyBindings.EnterKey1 - Case "enter2" - key = KeyBindings.EnterKey2 - Case "back1" - key = KeyBindings.BackKey1 - Case "back2" - key = KeyBindings.BackKey2 - Case "escape", "esc" - key = KeyBindings.EscapeKey - Case "onlinestatus" - key = KeyBindings.OnlineStatusKey - Case "lighting" - key = KeyBindings.LightKey - End Select - result = result.Replace("", KeyBindings.GetKeyName(key)) - End If - Next - Return result End If Else diff --git a/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb b/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb index c31ab846a..2aa798b9b 100644 --- a/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb +++ b/P3D/World/ActionScript/V2/ScriptConstructs/DoSystem.vb @@ -11,6 +11,70 @@ Dim argument As String = GetSubClassArgumentPair(subClass).Argument Select Case command.ToLower() + Case "token" + Dim tokenName As String = Localization.GetString(argument) + Return tokenName + Case "button" + Dim key As Keys = Nothing + Dim buttonName As String = argument + Select Case buttonName.ToLower() + Case "moveforward" + key = KeyBindings.ForwardMoveKey + Case "moveleft" + key = KeyBindings.LeftMoveKey + Case "movebackward" + key = KeyBindings.BackwardMoveKey + Case "moveright" + key = KeyBindings.RightMoveKey + Case "openmenu" + key = KeyBindings.OpenInventoryKey + Case "chat" + key = KeyBindings.ChatKey + Case "special", "phone" + key = KeyBindings.SpecialKey + Case "muteaudio" + key = KeyBindings.MuteAudioKey + Case "cameraleft" + key = KeyBindings.LeftKey + Case "cameraright" + key = KeyBindings.RightKey + Case "cameraup" + key = KeyBindings.UpKey + Case "cameradown" + key = KeyBindings.DownKey + Case "cameralock" + key = KeyBindings.CameraLockKey + Case "guicontrol" + key = KeyBindings.GUIControlKey + Case "screenshot" + key = KeyBindings.ScreenshotKey + Case "debugcontrol" + key = KeyBindings.DebugKey + Case "perspectiveswitch" + key = KeyBindings.PerspectiveSwitchKey + Case "fullscreen" + key = KeyBindings.FullScreenKey + Case "enter1" + key = KeyBindings.EnterKey1 + Case "enter2" + key = KeyBindings.EnterKey2 + Case "back1" + key = KeyBindings.BackKey1 + Case "back2" + key = KeyBindings.BackKey2 + Case "escape", "esc" + key = KeyBindings.EscapeKey + Case "onlinestatus" + key = KeyBindings.OnlineStatusKey + Case "lighting" + key = KeyBindings.LightKey + Case "hidegui" + key = KeyBindings.GUIControlKey + End Select + If key <> Nothing Then + buttonName = KeyBindings.GetKeyName(key) + End If + Return buttonName Case "random" Dim minRange As Integer = 1 Dim maxRange As Integer = 2