From 7310e3cd132c000573118f3302b8239f64911b0a Mon Sep 17 00:00:00 2001 From: darkfire006 Date: Sat, 6 Aug 2022 21:49:50 -0500 Subject: [PATCH] Remove caps from registers re Strength triggers and time registers --- P3D/Entites/Enviroment/StrengthTrigger.vb | 6 +++--- P3D/World/ActionScript/ActionScript.vb | 4 ++-- P3D/World/ActionScript/V2/ScriptCommands/DoRegister.vb | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/P3D/Entites/Enviroment/StrengthTrigger.vb b/P3D/Entites/Enviroment/StrengthTrigger.vb index 67e98a7fb..b52d828fc 100644 --- a/P3D/Entites/Enviroment/StrengthTrigger.vb +++ b/P3D/Entites/Enviroment/StrengthTrigger.vb @@ -27,8 +27,8 @@ Dim registers() As String = Core.Player.RegisterData.Split(CChar(",")) For Each r As String In registers - If r.StartsWith("ACTIVATOR_REMOVE_STRENGTH_ROCK_" & Screen.Level.LevelFile & "_") = True Then - Dim RemoveID As String = r.Remove(0, ("ACTIVATOR_REMOVE_STRENGTHT_ROCK_" & Screen.Level.LevelFile & "_").Length - 1) + If r.StartsWith(("activator_remove_strength_rock_" & Screen.Level.LevelFile & "_").ToLower()) = True Then + Dim RemoveID As String = r.Remove(0, ("activator_remove_strength_rock_" & Screen.Level.LevelFile & "_").ToLower().Length - 1) For Each sRock As Entity In Screen.Level.Entities If sRock.EntityID = "StrengthRock" Then If sRock.ID = CInt(RemoveID) Then @@ -51,7 +51,7 @@ CType(sRock, StrengthRock).CanBeRemoved = True End If If RemoveForever = True Then - ActionScript.RegisterID("ACTIVATOR_REMOVE_STRENGTH_ROCK_" & Screen.Level.LevelFile & "_" & sRock.ID.ToString()) + ActionScript.RegisterID("activator_remove_strength_rock_" & Screen.Level.LevelFile & "_" & sRock.ID.ToString()) End If If ActivateScript <> "" Then If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then diff --git a/P3D/World/ActionScript/ActionScript.vb b/P3D/World/ActionScript/ActionScript.vb index ebb03f8d3..36392d980 100644 --- a/P3D/World/ActionScript/ActionScript.vb +++ b/P3D/World/ActionScript/ActionScript.vb @@ -358,8 +358,8 @@ nextScript: If i <= Data.Count - 1 Then Dim d As String = Data(i) - If d.StartsWith("[TIME|") = True Then - Dim timeString As String = d.Remove(0, ("[TIME|").Length) + If d.StartsWith("[time|") = True Then + Dim timeString As String = d.Remove(0, ("[time|").Length) timeString = timeString.Remove(timeString.IndexOf("]")) Dim timeData() As String = timeString.Split(CChar("|")) diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoRegister.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoRegister.vb index 2c293bd9d..9bbe1782d 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoRegister.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoRegister.vb @@ -67,7 +67,7 @@ If validValue = True Then If isValidFormat = True Then - Dim s As String = "[TIME|" & ActionScript.TimeToUnix(Date.Now) & "|" & args(1) & "|" & format & "]" & args(0) + Dim s As String = "[time|" & ActionScript.TimeToUnix(Date.Now) & "|" & args(1) & "|" & format & "]" & args(0) ActionScript.RegisterID(s) Else Logger.Log(Logger.LogTypes.Warning, "ScriptCommander.vb: (@register." & command & ") Invalid date format used for time based register!")