almost there

This commit is contained in:
CaptainSegis 2017-04-11 00:56:33 -05:00
parent f9650da9cd
commit d12137797c
1524 changed files with 69012 additions and 4142 deletions
2.5DHero/2.5DHero
2.5DHero.vbproj
Battle
Construct
Controller.vb
Framework/ScriptClasses
Core
Debug
Dialogues
Entites
HelperClasses
Network
Overworld
Player
Pokemon
Resources
Screens

@ -304,7 +304,7 @@
<Compile Include="HelperClasses\Camera.vb" />
<Compile Include="HelperClasses\GameMessage.vb" />
<Compile Include="HelperClasses\LoadingDots.vb" />
<Compile Include="HelperClasses\OldLocalization.vb" />
<Compile Include="HelperClasses\Localization.vb" />
<Compile Include="HelperClasses\PlayerStatistics.vb" />
<Compile Include="HelperClasses\Size.vb" />
<Compile Include="HelperClasses\TimeHelpers.vb" />
@ -364,6 +364,7 @@
<Compile Include="Overworld\SecretBase\SecretBase.vb" />
<Compile Include="Overworld\SecretBase\SecretBaseCamera.vb" />
<Compile Include="Overworld\SecretBase\SecretBaseScreen.vb" />
<Compile Include="Player\Badge.vb" />
<Compile Include="Player\Player.vb" />
<Compile Include="Player\PlayerInventory.vb" />
<Compile Include="Player\PlayerTemp.vb" />
@ -1714,7 +1715,6 @@
<Compile Include="Resources\FontContainer.vb" />
<Compile Include="Resources\FontManager.vb" />
<Compile Include="Resources\GameModeManager.vb" />
<Compile Include="Resources\OldGameModeManager.vb" />
<Compile Include="Resources\GaussianBlur.vb" />
<Compile Include="Resources\ModelManager.vb" />
<Compile Include="Resources\Models\2D\BillModel.vb" />
@ -1776,8 +1776,6 @@
<Compile Include="Screens\MapPreview\MapPreviewScreen.vb" />
<Compile Include="Screens\MapScreen.vb" />
<Compile Include="Screens\NewMenuScreen.vb" />
<Compile Include="Screens\MenuScreen.vb" />
<Compile Include="Screens\NewGameScreen.vb" />
<Compile Include="Screens\OptionScreen.vb" />
<Compile Include="Screens\PC\HallOfFameScreen.vb" />
<Compile Include="Screens\PC\MailSystemScreen.vb" />
@ -1793,7 +1791,6 @@
<Compile Include="Screens\Pokemon\LearnAttackScreen.vb" />
<Compile Include="Screens\Pokemon\NameObjectScreen.vb" />
<Compile Include="Screens\Pokemon\PartyScreen.vb" />
<Compile Include="Screens\Pokemon\PokemonScreen.vb" />
<Compile Include="Screens\Pokemon\PokemonScreenV2.vb" />
<Compile Include="Screens\Pokemon\PokemonStatusScreen.vb" />
<Compile Include="Screens\Pokemon\SummaryScreen.vb" />
@ -1810,59 +1807,6 @@
<Compile Include="Security\FileValidation.vb" />
<Compile Include="Security\HackerAlerts.vb" />
<Compile Include="Security\HashSecureBase.vb" />
<Compile Include="World\ActionScript\ActionScript.vb" />
<Compile Include="World\ActionScript\Script.vb" />
<Compile Include="World\ActionScript\ScriptConversion.vb" />
<Compile Include="World\ActionScript\ScriptStorage.vb" />
<Compile Include="World\ActionScript\V1\ScriptV1.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommander.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoBattle.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoCamera.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoChat.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoDayCare.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoEntity.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoEnvironment.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoItem.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoLevel.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoMusic.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoNPC.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoOptions.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoOverworldPokemon.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoPlayer.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoPokedex.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoPokemon.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoRadio.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoRegister.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoScreen.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoScript.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoSound.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoStorage.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoText.vb" />
<Compile Include="World\ActionScript\V2\ScriptCommands\DoTitle.vb" />
<Compile Include="World\ActionScript\V2\ScriptComparer.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoBattle.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoCamera.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoDaycare.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoEntity.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoEnvironment.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoFilesystem.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoInventory.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoLevel.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoMath.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoNPC.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoOverworldPokemon.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoPhone.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoPlayer.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoPokedex.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoPokemon.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoRadio.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoRegister.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoRival.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoStorage.vb" />
<Compile Include="World\ActionScript\V2\ScriptConstructs\DoSystem.vb" />
<Compile Include="World\ActionScript\V2\ScriptLibrary.vb" />
<Compile Include="World\ActionScript\V2\ScriptV2.vb" />
<Compile Include="World\Badge.vb" />
<Compile Include="World\BaseEntity.vb" />
<Compile Include="World\Level.vb" />
<Compile Include="World\LevelLoader.vb" />

@ -6694,7 +6694,7 @@
For i = 0 To expPokemon.Count - 1
Dim PokeIndex As Integer = expPokemon(i)
If Core.Player.Pokemons(PokeIndex).Level < CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
If Core.Player.Pokemons(PokeIndex).Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
Dim EXP As Integer = BattleCalculation.GainExp(Core.Player.Pokemons(PokeIndex), BattleScreen, expPokemon)
BattleScreen.BattleQuery.Add(New TextQueryObject(Core.Player.Pokemons(PokeIndex).GetDisplayName() & " gained " & EXP & " experience points."))

@ -97,7 +97,7 @@
Dim NeedExp As Integer = NextLvExp - currentExp
If p.Level = CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
If p.Level = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
NextLvExp = 0
Else
Dim barPercentage As Integer = CInt((currentExp / NextLvExp) * 100)
@ -977,7 +977,7 @@
If Item.IsBall = True Then
Core.Player.Inventory.RemoveItem(itemID, 1)
If TempBattleScreen.IsTrainerBattle = False Then
If BattleScreen.CanCatch = True Or CBool(OldGameModeManager.GetGameRuleValue("OnlyCaptureFirst", "0")) = True And Core.Player.PokeFiles.Contains(BattleScreen.TempPokeFile) = True Then
If BattleScreen.CanCatch = True Or CBool(GameModeManager.GetGameRuleValue("OnlyCaptureFirst", "0")) = True And Core.Player.PokeFiles.Contains(BattleScreen.TempPokeFile) = True Then
TempBattleScreen.BattleQuery.Clear()
TempBattleScreen.BattleQuery.Add(TempBattleScreen.FocusBattle())
TempBattleScreen.BattleQuery.Insert(0, New ToggleMenuQueryObject(True))

@ -745,7 +745,7 @@
End Select
End If
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & OldGameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
Select Case Me.defaultMapType
Case 0
levelfile = cRegion & "0.dat"
@ -778,7 +778,7 @@
End If
End If
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & OldGameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
If File.Exists(GameController.GamePath & "\maps\battle\" & levelfile) = False And File.Exists(GameController.GamePath & GameModeManager.ActiveGameMode.MapPath & "battle\" & levelfile) = False Then
Select Case Me.defaultMapType
Case 0
levelfile = "battle0.dat"
@ -998,7 +998,7 @@ nextIndex:
Next
'Remove fainted Pokémon from player's team if the DeathInsteadOfFaint GameRule is activated.
If CBool(OldGameModeManager.GetGameRuleValue("DeathInsteadOfFaint", "0")) = True Then
If CBool(GameModeManager.GetGameRuleValue("DeathInsteadOfFaint", "0")) = True Then
For i = 0 To Core.Player.Pokemons.Count - 1
If i <= Core.Player.Pokemons.Count - 1 Then
If Core.Player.Pokemons(i).HP <= 0 Or Core.Player.Pokemons(i).Status = Pokemon.StatusProblems.Fainted Then
@ -1064,7 +1064,7 @@ nextIndex:
ResetVars()
If IsTrainerBattle = True Then
ActionScript.RegisterID("trainer_" & Trainer.TrainerFile)
Construct.Framework.RegisterHandler.NewRegister("trainer_" & Trainer.TrainerFile, "")
End If
If Me.BattleMode <> BattleModes.PVP Then

@ -1,6 +1,4 @@
Imports net.Pokemon3D.Game.ScriptVersion2
Public Class Trainer
Public Class Trainer
Public AILevel As Integer = 0
Public SignatureMoves As New List(Of BattleSystem.Attack)
@ -35,11 +33,11 @@ Public Class Trainer
Public Shared FrontierTrainer As Integer = -1
Public Function IsBeaten() As Boolean
Return ActionScript.IsRegistered("trainer_" & TrainerFile)
Return Construct.Framework.RegisterHandler.IsRegistered("trainer_" & TrainerFile)
End Function
Public Shared Function IsBeaten(ByVal CheckTrainerFile As String) As Boolean
Return ActionScript.IsRegistered("trainer_" & CheckTrainerFile)
Return Construct.Framework.RegisterHandler.IsRegistered("trainer_" & CheckTrainerFile)
End Function
Public Sub New()
@ -48,7 +46,7 @@ Public Class Trainer
Public Sub New(ByVal TrainerFile As String)
Me.TrainerFile = TrainerFile
Dim path As String = OldGameModeManager.GetScriptPath("Trainer\" & TrainerFile & ".trainer")
Dim path As String = GameModeManager.GetScriptPath("Trainer\" & TrainerFile & ".trainer")
Security.FileValidation.CheckFileValid(path, False, "Trainer.vb")
Dim Data() As String = System.IO.File.ReadAllLines(path)
@ -105,8 +103,8 @@ Public Class Trainer
End If
newData.Add("IntroSequence|" & sequenceData)
Logger.Log(Logger.LogTypes.Warning, "Trainer.vb: Converted legacy trainer file! Generated new trainer data:")
Logger.Log(Logger.LogTypes.Message, newData.ToArray().ArrayToString())
Logger.Log("215", Logger.LogTypes.Warning, "Trainer.vb: Converted legacy trainer file! Generated new trainer data:")
Logger.Log("216", Logger.LogTypes.Message, newData.ToArray().ArrayToString())
LoadTrainer(newData.ToArray())
End Sub
@ -124,7 +122,7 @@ Public Class Trainer
Select Case pointer.ToLower()
Case "name"
Me.Name = ScriptCommander.Parse(value).ToString()
Me.Name = Construct.Framework.Parser.EvaluateScriptExpression(value)
If Me.Name.Contains(",") = True Then
Me.Name2 = Me.Name.GetSplit(1)
Me.Name = Me.Name.GetSplit(0)
@ -132,7 +130,7 @@ Public Class Trainer
isDoubleTrainerValid += 1
End If
Case "trainerclass"
Me.TrainerType = ScriptCommander.Parse(value).ToString()
Me.TrainerType = Construct.Framework.Parser.EvaluateScriptExpression(value)
If Me.TrainerType.Contains(",") = True Then
Me.TrainerType2 = TrainerType.GetSplit(1)
Me.TrainerType = TrainerType.GetSplit(0)
@ -140,11 +138,11 @@ Public Class Trainer
isDoubleTrainerValid += 1
End If
Case "money"
Me.Money = CInt(ScriptCommander.Parse(value).ToString())
Me.Money = CInt(Construct.Framework.Parser.EvaluateScriptExpression(value))
Case "intromessage"
Me.IntroMessage = ScriptCommander.Parse(value).ToString()
Me.IntroMessage = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "outromessage"
Me.OutroMessage = ScriptCommander.Parse(value).ToString()
Me.OutroMessage = Construct.Framework.Parser.EvaluateScriptExpression(value)
If Me.OutroMessage.Contains("|") = True Then
Me.OutroMessage2 = OutroMessage.GetSplit(1, "|")
Me.OutroMessage = OutroMessage.GetSplit(0, "|")
@ -152,9 +150,9 @@ Public Class Trainer
isDoubleTrainerValid += 1
End If
Case "defeatmessage"
Me.DefeatMessage = ScriptCommander.Parse(value).ToString()
Me.DefeatMessage = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "textureid"
Me.SpriteName = ScriptCommander.Parse(value).ToString()
Me.SpriteName = Construct.Framework.Parser.EvaluateScriptExpression(value)
If Me.SpriteName.Contains(",") = True Then
Me.SpriteName2 = Me.SpriteName.GetSplit(1)
Me.SpriteName = Me.SpriteName.GetSplit(0)
@ -162,34 +160,34 @@ Public Class Trainer
isDoubleTrainerValid += 1
End If
Case "region"
Me.Region = ScriptCommander.Parse(value).ToString()
Me.Region = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "inimusic"
Me.IniMusic = ScriptCommander.Parse(value).ToString()
Me.IniMusic = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "defeatmusic"
Me.DefeatMusic = ScriptCommander.Parse(value).ToString()
Me.DefeatMusic = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "battlemusic"
Me.BattleMusic = ScriptCommander.Parse(value).ToString()
Me.BattleMusic = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "insightmusic"
Me.InSightMusic = ScriptCommander.Parse(value).ToString()
Me.InSightMusic = Construct.Framework.Parser.EvaluateScriptExpression(value)
Case "pokemon1", "pokemon2", "pokemon3", "pokemon4", "pokemon5", "pokemon6"
If value <> "" Then
PokeLines.Add(value)
End If
Case "items"
If value <> "" Then
Dim itemData() As String = ScriptCommander.Parse(value).ToString().Split(CChar(","))
Dim itemData() As String = Construct.Framework.Parser.EvaluateScriptExpression(value).Split(CChar(","))
For Each ItemID As String In itemData
Items.Add(Item.GetItemByID(CInt(ItemID)))
Next
End If
Case "gender"
Dim GenderInt As Integer = CInt(ScriptCommander.Parse(value).ToString())
Dim GenderInt As Integer = CInt(Construct.Framework.Parser.EvaluateScriptExpression(value))
Me.Gender = CInt(MathHelper.Clamp(GenderInt, -1, 1))
Case "ai"
Me.AILevel = CInt(ScriptCommander.Parse(value).ToString())
Me.AILevel = CInt(Construct.Framework.Parser.EvaluateScriptExpression(value))
Case "introsequence"
value = ScriptCommander.Parse(value).ToString()
value = Construct.Framework.Parser.EvaluateScriptExpression(value)
If value.Contains(",") = True Then
vsdata = value.GetSplit(0)
@ -198,7 +196,7 @@ Public Class Trainer
vsdata = value
End If
Case "introtype"
Me.IntroType = CInt(ScriptCommander.Parse(value).ToString())
Me.IntroType = CInt(Construct.Framework.Parser.EvaluateScriptExpression(value))
End Select
End If
Next
@ -206,8 +204,8 @@ Public Class Trainer
For Each PokeLine As String In PokeLines
Dim PokeData As String = PokeLine.GetSplit(1, "|")
If PokeData <> "" Then
If ScriptCommander.Parse(PokeData).ToString().StartsWith("{") = True Then
PokeData = ScriptCommander.Parse(PokeData).ToString().Replace("§", ",")
If Construct.Framework.Parser.EvaluateScriptExpression(PokeData).StartsWith("{") = True Then
PokeData = Construct.Framework.Parser.EvaluateScriptExpression(PokeData).Replace("§", ",")
End If
If PokeData.StartsWith("{") = True And PokeData.EndsWith("}") = True Then
Dim p As Pokemon = Pokemon.GetPokemonByData(PokeData)
@ -260,8 +258,8 @@ Public Class Trainer
readData = readData.Remove(0, 1)
End While
Dim ID As Integer = ScriptConversion.ToInteger(ScriptCommander.Parse(firstPart))
Dim Level As Integer = ScriptConversion.ToInteger(ScriptCommander.Parse(secondPart))
Dim ID As Integer = Construct.Framework.Converter.ToInteger(Construct.Framework.Parser.EvaluateScriptExpression(firstPart))
Dim Level As Integer = Construct.Framework.Converter.ToInteger(Construct.Framework.Parser.EvaluateScriptExpression(secondPart))
Dim addLevel As Integer = 0
If Core.Player.DifficultyMode = 1 Then
@ -271,7 +269,7 @@ Public Class Trainer
End If
Level += addLevel
Dim maxLevel As Integer = CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100"))
Dim maxLevel As Integer = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100"))
If Level > maxLevel Then
Level = maxLevel
@ -448,7 +446,7 @@ Public Class Trainer
Public Function HasBattlePokemon() As Boolean
For Each Pokemon As Pokemon In Pokemons
If Pokemon.Status <> net.Pokemon3D.Game.Pokemon.StatusProblems.Fainted And Pokemon.HP > 0 Then
If Pokemon.Status <> Pokemon.StatusProblems.Fainted And Pokemon.HP > 0 Then
Return True
End If
Next

@ -142,7 +142,7 @@
filePath = filePath & ".dat"
End If
Dim path As String = OldGameModeManager.GetScriptPath(filePath)
Dim path As String = GameModeManager.GetScriptPath(filePath)
Security.FileValidation.CheckFileValid(path, False, "ScriptController")
If IO.File.Exists(path) = True Then

@ -1180,7 +1180,7 @@
<ScriptDescription("Returns a generated frontier Pokémon.")>
Private Function F_GenerateFrontier(ByVal argument As String) As String
Dim level As Integer = Int(argument.GetSplit(0))
level = level.Clamp(1, CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")))
level = level.Clamp(1, CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")))
Dim pokemon_class As Integer = Int(argument.GetSplit(1))
Dim IDPreset As List(Of Integer) = Nothing

@ -86,87 +86,92 @@
Public Sub LoadContent()
KeyBindings.Load()
GameModeManager.LoadGameModes()
Logger.Debug("Loaded game modes.")
Logger.Debug("162", "Loaded game modes.")
FontManager.LoadFonts()
Screen.TextBox.TextFont = FontManager.GetFontContainer("textfont")
Logger.Debug("Loaded fonts.")
Logger.Debug("163", "Loaded fonts.")
TextureManager.InitializeTextures()
MusicManager.Setup()
MusicManager.LoadMusic(False)
SoundManager.LoadSounds(False)
Logger.Debug("Loaded content.")
Logger.Debug("164", "Loaded content.")
Logger.Debug("Validated files. Result: " & Security.FileValidation.IsValid(True).ToString())
Logger.Debug("165", "Validated files. Result: " & Security.FileValidation.IsValid(True).ToString())
If Security.FileValidation.IsValid(False) = False Then
Logger.Log(Logger.LogTypes.Warning, "Core.vb: File Validation failed! Download a fresh copy of the game to fix this issue.")
Logger.Log("250", Logger.LogTypes.Warning, "Core.vb: File Validation failed! Download a fresh copy of the game to fix this issue.")
End If
GameMessage = New GameMessage(net.Pokemon3D.Game.TextureManager.DefaultTexture, New Size(10, 40), New Vector2(0, 0))
GameMessage.Dock = net.Pokemon3D.Game.GameMessage.DockStyles.Top
GameMessage = New GameMessage(Game.TextureManager.DefaultTexture, New Size(10, 40), New Vector2(0, 0))
GameMessage.Dock = Game.GameMessage.DockStyles.Top
GameMessage.BackgroundColor = Color.Black
GameMessage.TextPosition = New Vector2(10, 10)
Logger.Debug("Gamemessage initialized.")
Logger.Debug("166", "Gamemessage initialized.")
GameOptions.Load()
If System.IO.Directory.Exists(GameController.GamePath & "\Temp") = True Then
Try
System.IO.Directory.Delete(GameController.GamePath & "\Temp", True)
Logger.Log(Logger.LogTypes.Message, "Core.vb: Deleted Temp directory.")
Logger.Log("251", Logger.LogTypes.Message, "Core.vb: Deleted Temp directory.")
Catch ex As Exception
Logger.Log(Logger.LogTypes.Warning, "Core.vb: Failed to delete the Temp directory.")
Logger.Log("252", Logger.LogTypes.Warning, "Core.vb: Failed to delete the Temp directory.")
End Try
End If
GameJolt.StaffProfile.SetupStaff()
ScriptVersion2.ScriptLibrary.InitializeLibrary()
End Sub
Public Sub Update(ByVal gameTime As GameTime)
Core.GameTime = gameTime
If KeyBindings.IsInitialized Then
Core.GameTime = gameTime
KeyBoardHandler.Update()
ControllerHandler.Update()
KeyBoardHandler.Update()
ControllerHandler.Update()
ConnectScreen.UpdateConnectSet()
ConnectScreen.UpdateConnectSet()
If Core.GameInstance.IsActive = False Then
If Core.CurrentScreen.CanBePaused = True Then
Core.SetScreen(New PauseScreen(Core.CurrentScreen))
End If
Else
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) = True Or ControllerHandler.ButtonDown(Buttons.Start) = True Then
CurrentScreen.EscapePressed()
End If
End If
CurrentScreen.Update()
If CurrentScreen.CanChat = True Then
If KeyBoardHandler.KeyPressed(KeyBindings.ChatKey) = True Or ControllerHandler.ButtonPressed(Buttons.RightShoulder) = True Then
If JoinServerScreen.Online = True Or Player.SandBoxMode = True Or GameController.IS_DEBUG_ACTIVE = True Then
SetScreen(New ChatScreen(CurrentScreen))
If Core.GameInstance.IsActive = False Then
If Core.CurrentScreen.CanBePaused = True Then
Core.SetScreen(New PauseScreen(Core.CurrentScreen))
End If
Else
If KeyBoardHandler.KeyPressed(KeyBindings.EscapeKey) = True Or ControllerHandler.ButtonDown(Buttons.Start) = True Then
CurrentScreen.EscapePressed()
End If
End If
CurrentScreen.Update()
If CurrentScreen.CanChat = True Then
If KeyBoardHandler.KeyPressed(KeyBindings.ChatKey) = True Then
OpenChatScreen()
End If
End If
MainGameFunctions.FunctionKeys()
MusicPlayer.GetInstance().Update(gameTime)
GameMessage.Update()
Controls.MakeMouseVisible()
MouseHandler.Update()
LoadingDots.Update()
ForcedCrash.Update()
ServersManager.Update()
Else
'Update the current screen when the keybindings have not been initialized, because this happens in the Update method of the SplashScreen.
CurrentScreen.Update()
End If
End Sub
MainGameFunctions.FunctionKeys()
MusicManager.Update()
GameMessage.Update()
Controls.MakeMouseVisible()
MouseHandler.Update()
LoadingDots.Update()
ForcedCrash.Update()
ServersManager.Update()
Public Sub OpenChatScreen()
If JoinServerScreen.Online = True Or Player.SandBoxMode = True Or GameController.IS_DEBUG_ACTIVE = True Then
SetScreen(New ChatScreen(CurrentScreen))
End If
End Sub
Public Sub Draw()

@ -209,7 +209,7 @@ Public Class GameOptions
MediaPlayer.IsMuted = .Muted
Entity.drawViewBox = .ShowBoundingBoxes
Logger.DisplayLog = .ShowDebugConsole
OldLocalization.Load(.Language)
Localization.Load(.Language)
ContentPackManager.CreateContentPackFolder()
If _dataModel.ContentPacks.Length > 0 Then
@ -264,7 +264,7 @@ Public Class GameOptions
_dataModel.ShowBoundingBoxes = Entity.drawViewBox
_dataModel.Muted = MediaPlayer.IsMuted
_dataModel.ShowDebugConsole = Logger.DisplayLog
_dataModel.Language = OldLocalization.LanguageSuffix
_dataModel.Language = Localization.LanguageSuffix
End If
IO.File.WriteAllText(GameController.GamePath & "\Save\options.dat", _dataModel.ToString(" "))

@ -17,9 +17,9 @@
Core.GameOptions.Save()
If Core.GameOptions.LightingEnabled Then
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_lighting_on", "Lighting Enabled"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_lighting_on", "Lighting Enabled"), 12, FontManager.MainFont, Color.White)
Else
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_lighting_off", "Lighting Disabled"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_lighting_off", "Lighting Disabled"), 12, FontManager.MainFont, Color.White)
End If
ElseIf KeyBoardHandler.KeyPressed(KeyBindings.FullScreenKey) AndAlso Core.CurrentScreen.CanGoFullscreen Then
ToggleFullScreen()
@ -33,7 +33,7 @@
If KeyBoardHandler.KeyDown(KeyBindings.DebugKey) = True Then
If KeyBoardHandler.KeyPressed(Keys.F) Then
TextureManager.TextureList.Clear()
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_debug_texture_list_clear", "Texture list have cleared"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_debug_texture_list_clear", "Texture list have cleared"), 12, FontManager.MainFont, Color.White)
ElseIf KeyBoardHandler.KeyPressed(Keys.S) Then
Core.SetWindowSize(New Vector2(1200, 680))
ElseIf KeyBoardHandler.KeyPressed(Keys.L) Then
@ -107,10 +107,10 @@
stream.Dispose()
End If
Core.GameMessage.SetupText(OldLocalization.GetString("game_message_screenshot") & fileName, FontManager.MainFont, Color.White)
Core.GameMessage.SetupText(Localization.GetString("game_message_screenshot") & fileName, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(12, Core.GraphicsDevice)
Catch ex As Exception
Logger.Log(Logger.LogTypes.ErrorMessage, "Basic.vb: " & OldLocalization.GetString("game_message_screenshot_failed") & ". More information: " & ex.Message)
Logger.Log(Logger.LogTypes.ErrorMessage, "Basic.vb: " & Localization.GetString("game_message_screenshot_failed") & ". More information: " & ex.Message)
End Try
End Sub
@ -134,7 +134,7 @@
Core.GraphicsManager.ToggleFullScreen()
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_fullscreen_on"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_fullscreen_on"), 12, FontManager.MainFont, Color.White)
Else
Core.GraphicsManager.PreferredBackBufferWidth = 1200
Core.GraphicsManager.PreferredBackBufferHeight = 680
@ -144,7 +144,7 @@
Core.GraphicsManager.ToggleFullScreen()
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_fullscreen_off"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_fullscreen_off"), 12, FontManager.MainFont, Color.White)
End If
Core.GraphicsManager.ApplyChanges()

@ -12,7 +12,7 @@
Dim ActionscriptActive As Boolean = True
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
ActionscriptActive = CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady
ActionscriptActive = Construct.Controller.GetInstance.IsReady
End If
Dim thirdPersonString As String = ""

@ -116,8 +116,8 @@ Public Class Logger
End If
Dim GameMode As String = "[No GameMode loaded]"
If Not OldGameModeManager.ActiveGameMode Is Nothing Then
GameMode = OldGameModeManager.ActiveGameMode.Name
If Not GameModeManager.ActiveGameMode Is Nothing Then
GameMode = GameModeManager.ActiveGameMode.Name
End If
Dim OnlineInformation As String = "GameJolt Account: FALSE"
@ -131,8 +131,10 @@ Public Class Logger
Dim ScriptInfo As String = "Actionscript: No script running"
If Not CurrentScreen Is Nothing Then
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(CurrentScreen, OverworldScreen).ActionScript.IsReady = False Then
ScriptInfo = "Actionscript: " & ActionScript.CSL().ScriptName & "; Line: " & ActionScript.CSL().CurrentLine
If Construct.Controller.GetInstance.IsReady = False Then
'ScriptInfo = "Actionscript: " & ActionScript.CSL().ScriptName & "; Line: " & ActionScript.CSL().CurrentLine
'Test
ScriptInfo = "Actionscript: " & Construct.Controller.GetInstance.ActiveScript.OriginIdentifier & "; Line: " & Construct.Controller.GetInstance.ActiveScript.ActiveLine.ToString
End If
End If
End If
@ -176,7 +178,7 @@ Public Class Logger
Dim specs As String = "Operating system: " & My.Computer.Info.OSFullName & " [" & My.Computer.Info.OSVersion & "]" & vbNewLine &
"Core architecture: " & architectureString & vbNewLine &
"System time: " & My.Computer.Clock.LocalTime.ToString() & vbNewLine &
"System language: " & System.Globalization.CultureInfo.CurrentCulture.EnglishName & "(" & System.Globalization.CultureInfo.CurrentCulture.ThreeLetterWindowsLanguageName & ") / Loaded game language: " & OldLocalization.LanguageSuffix & vbNewLine &
"System language: " & System.Globalization.CultureInfo.CurrentCulture.EnglishName & "(" & System.Globalization.CultureInfo.CurrentCulture.ThreeLetterWindowsLanguageName & ") / Loaded game language: " & Localization.LanguageSuffix & vbNewLine &
"Decimal separator: " & GameController.DecSeparator & vbNewLine &
"Available physical memory: " & Math.Round((My.Computer.Info.TotalPhysicalMemory / Math.Pow(1024, 3)), 2).ToString() & " Gigabyte" & vbNewLine &
"Available logical processors: " & Environment.ProcessorCount.ToString()

@ -107,8 +107,8 @@
tokenEndIdx = possibleToken.IndexOf(">")
If Not tokenEndIdx = -1 Then
validToken = possibleToken.Substring(0, tokenEndIdx)
If OldLocalization.LocalizationTokens.ContainsKey(validToken) = True Then
If OldLocalization.LocalizationTokens.TryGetValue(validToken, token) = True Then
If Localization.LocalizationTokens.ContainsKey(validToken) = True Then
If Localization.LocalizationTokens.TryGetValue(validToken, token) = True Then
Me.Text = Me.Text.Replace("<" & validToken & ">", token.TokenContent)
End If
End If

@ -372,7 +372,7 @@
CPosition = CType(Screen.Camera, BattleSystem.BattleCamera).CPosition
End If
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
ActionScriptActive = Not CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady
ActionScriptActive = Not Construct.Controller.GetInstance().IsReady
End If
End If
End SyncLock

@ -62,13 +62,11 @@
Me.CanBeRemoved = True
Dim s As String =
"version=2" & vbNewLine &
"@text.show(" & Text & ")" & vbNewLine &
"@sound.play(destroy,0)" & vbNewLine &
":end"
"@sound.play(destroy,0)"
PlayerStatistics.Track("Cut used", 1)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {})
End If
End Sub

@ -15,9 +15,12 @@
If CInt(Me.Position.X) = CInt(Screen.Camera.Position.X) And CInt(Me.Position.Y) = CInt(Screen.Camera.Position.Y) And CInt(Me.Position.Z) = CInt(Screen.Camera.Position.Z) Then
If Controls.Accept(True, True, True) = True Then
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady Then
If Construct.Controller.GetInstance.IsReady Then
Me.StartDive()
End If
'If CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady Then
' Me.StartDive()
'End If
End If
End If
End If
@ -54,46 +57,30 @@
If result = 0 Then
If diveUp = 0 Then
'Down
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & GetDivePokemon() & "~used Dive!)" & vbNewLine &
Dim s As String = "@text.show(" & GetDivePokemon() & "~used Dive!)" & vbNewLine &
"@screen.fadeout" & vbNewLine &
"@player.warp(" & Me.AdditionalValue & ")" & vbNewLine &
"@level.update" & vbNewLine &
"@player.setmovement(0,-0.5,0)" & vbNewLine &
"@screen.fadein" & vbNewLine &
"@player.move(8)" & vbNewLine &
"@player.resetmovement" & vbNewLine &
":end"
"@player.resetmovement"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
ElseIf diveUp = 1 Then
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
'Up
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & GetDivePokemon() & "~used Dive!)" & vbNewLine &
Dim s As String = "@text.show(" & GetDivePokemon() & "~used Dive!)" & vbNewLine &
"@player.setmovement(0,0.5,0)" & vbNewLine &
"@player.move(8)" & vbNewLine &
"@player.resetmovement" & vbNewLine &
"@screen.fadeout" & vbNewLine &
"@player.warp(" & Me.AdditionalValue & ")" & vbNewLine &
"@level.update" & vbNewLine &
"@screen.fadein" & vbNewLine &
":end"
"@screen.fadein"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
ElseIf diveUp = 2 Then
'Up
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & GetDivePokemon() & "~used Dive!)" & vbNewLine &
"@player.setmovement(0,0.5,0)" & vbNewLine &
"@player.move(6)" & vbNewLine &
"@player.resetmovement" & vbNewLine &
"@screen.fadeout" & vbNewLine &
"@player.warp(" & Me.AdditionalValue & ")" & vbNewLine &
"@level.update" & vbNewLine &
"@screen.fadein" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If
End Sub

@ -57,22 +57,18 @@
Dim spawnedPokemon As Pokemon = Spawner.GetPokemon(Screen.Level.LevelFile, Spawner.EncounterMethods.Headbutt, False)
If spawnedPokemon Is Nothing Then
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Headbutt!)" & vbNewLine &
Dim s As String = "@text.show(" & pName & " used~Headbutt!)" & vbNewLine &
"@sound.play(destroy,0)" & vbNewLine &
"@level.wait(20)" & vbNewLine &
"@text.show(Nothing happened...)" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
"@text.show(Nothing happened...)"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Headbutt!)" & vbNewLine &
Dim s As String = "@text.show(" & pName & " used~Headbutt!)" & vbNewLine &
"@sound.play(destroy,0)" & vbNewLine &
"@level.wait(20)" & vbNewLine &
"@text.show(A wild Pokémon~appeared!)" & vbNewLine &
"@battle.wild(" & spawnedPokemon.Number & "," & spawnedPokemon.Level & ")" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
"@battle.wild(" & spawnedPokemon.Number & "," & spawnedPokemon.Level & ")"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If
End Sub

@ -112,28 +112,25 @@
Screen.Level.OwnPlayer.Texture = RockClimbPokemon.GetOverworldTexture()
Screen.Level.OwnPlayer.ChangeTexture()
Dim s As String = "version=2" & vbNewLine &
"@pokemon.cry(" & RockClimbPokemon.Number & ")" & vbNewLine &
Dim s As String = "@pokemon.cry(" & RockClimbPokemon.Number & ")" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",1," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@overworldpokemon.hide" & vbNewLine &
"@player.move(1)" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@player.wearskin(" & tempSkin & ")" & vbNewLine
"@overworldpokemon.hide" & vbNewLine &
"@player.wearskin(" & tempSkin & ")"
If Not Me.TempScriptEntity Is Nothing Then
s &= GetScriptStartLine(Me.TempScriptEntity) & vbNewLine
s &= vbNewLine & GetScriptStartLine(Me.TempScriptEntity)
Me.TempScriptEntity = Nothing
End If
s &= ":end"
'Reset the player's transparency:
Screen.Level.OwnPlayer.Opacity = 1.0F
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s)
End If
facing = CInt(Me.Rotation.Y / MathHelper.PiOver2)
@ -185,26 +182,23 @@
Screen.Level.OwnPlayer.Texture = RockClimbPokemon.GetOverworldTexture()
Screen.Level.OwnPlayer.ChangeTexture()
Dim s As String = "version=2" & vbNewLine &
"@pokemon.cry(" & RockClimbPokemon.Number & ")" & vbNewLine &
Dim s As String = "@pokemon.cry(" & RockClimbPokemon.Number & ")" & vbNewLine &
"@player.move(1)" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",-1," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@player.wearskin(" & tempSkin & ")" & vbNewLine
"@overworldpokemon.hide" & vbNewLine &
"@player.wearskin(" & tempSkin & ")"
If Not Me.TempScriptEntity Is Nothing Then
s &= GetScriptStartLine(Me.TempScriptEntity) & vbNewLine
s &= vbNewLine & GetScriptStartLine(Me.TempScriptEntity)
Me.TempScriptEntity = Nothing
End If
s &= ":end"
'Reset the player's transparency:
Screen.Level.OwnPlayer.Opacity = 1.0F
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s)
End If
End Sub

@ -27,17 +27,15 @@
Public Overrides Sub Update()
If Me.RotationType = RotationTypes.StartSpin Then
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady = True Then
If Construct.Controller.GetInstance().IsReady = True Then
If Me.Position.X = Screen.Camera.Position.X And CInt(Me.Position.Y) = CInt(Screen.Camera.Position.Y) And Me.Position.Z = Screen.Camera.Position.Z Then
Dim steps As Integer = GetSteps()
Dim s As String = "version=2" & vbNewLine &
"@player.move(0)" & vbNewLine &
Dim s As String = "@player.move(0)" & vbNewLine &
"@player.turnto(" & Me.RotateTo.ToString() & ")" & vbNewLine &
"@player.move(" & steps & ")" & vbNewLine &
":end"
"@player.move(" & steps & ")"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If
End If

@ -36,8 +36,8 @@
If Me.TriggerID = 0 Or Me.TriggerID = 4 Then
ActivateScript = True
TriggeredScriptBlock = True
If ActionScript.TempInputDirection = -1 Then
ActionScript.TempInputDirection = Screen.Camera.GetPlayerFacingDirection()
If Construct.Controller.GetInstance().CorrectPlayerOrientation = -1 Then
Construct.Controller.GetInstance().CorrectPlayerOrientation = Screen.Camera.GetPlayerFacingDirection()
End If
If Screen.Camera.Name = "Overworld" Then
@ -55,7 +55,7 @@
Public Overrides Sub ClickFunction()
If Me.TriggerID = 1 Then
ActionScript.TempInputDirection = -1
Construct.Controller.GetInstance().CorrectPlayerOrientation = -1
Me.clickedToActivate = True
TriggerScript(False)
End If
@ -75,17 +75,18 @@
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Dim oS As OverworldScreen = CType(Core.CurrentScreen, OverworldScreen)
If oS.ActionScript.IsReady = True Or canAttach = True Then
If Me.CorrectRotation() = True Then
If Me.clickedToActivate = True Then
Me.clickedToActivate = False
SoundManager.PlaySound("select")
End If
With Construct.Controller.GetInstance()
If .IsReady = True Or canAttach = True Then
If Me.CorrectRotation() = True Then
If Me.clickedToActivate = True Then
Me.clickedToActivate = False
SoundManager.PlaySound("select")
End If
oS.ActionScript.StartScript(Me._scriptID, GetActivationID())
ActionScript.TempSpin = True
.RunFromFile(Me._scriptID, {Construct.Controller.ScriptRunOptions.CheckDelay, Construct.Controller.ScriptRunOptions.OrientatePlayer})
End If
End If
End If
End With
End If
TriggeredScriptBlock = False
End Sub

@ -22,7 +22,7 @@
Public Overrides Sub ClickFunction()
Dim canRead As Boolean = False
Select Case Screen.Camera.GetPlayerFacingDirection()
Select Case Screen.Camera.GetPlayerFacingDirection()
Case 1, 3
If Me.Rotation.Y = MathHelper.Pi * 1.5F Or Me.Rotation.Y = MathHelper.Pi * 0.5F Then
canRead = True
@ -35,17 +35,17 @@
If canRead = True Then
Dim oScreen As OverworldScreen = CType(Core.CurrentScreen, OverworldScreen)
If oScreen.ActionScript.IsReady = True Then
If Construct.Controller.GetInstance().IsReady = True Then
SoundManager.PlaySound("select")
Select Case Me.ActionValue
Case 0, 3
oScreen.ActionScript.StartScript(Me.AdditionalValue, 1)
Case 1
oScreen.ActionScript.StartScript(Me.AdditionalValue, 0)
Case 2
oScreen.ActionScript.StartScript(Me.AdditionalValue.Replace("<br>", vbNewLine), 2)
Case Else
oScreen.ActionScript.StartScript(Me.AdditionalValue, 1)
Case 0, 3 'text
Construct.Controller.GetInstance().RunFromText(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case 1 'file
Construct.Controller.GetInstance().RunFromFile(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case 2 'string
Construct.Controller.GetInstance().RunFromString(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case Else 'text
Construct.Controller.GetInstance().RunFromText(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
End Select
End If
End If

@ -46,22 +46,19 @@
Screen.Level.OverworldPokemon.Visible = False
Screen.Level.OverworldPokemon.warped = True
Dim s As String = "version=2" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",1," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
Dim s As String = "@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",1," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@player.move(1)" & vbNewLine &
"@pokemon.hide" & vbNewLine
"@overworldpokemon.hide"
If Not Me.TempScriptEntity Is Nothing Then
s &= GetScriptStartLine(Me.TempScriptEntity) & vbNewLine
s &= vbNewLine & GetScriptStartLine(Me.TempScriptEntity)
Me.TempScriptEntity = Nothing
End If
s &= ":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {})
Return True
End If
@ -69,7 +66,7 @@
If facing < 0 Then
facing += 4
End If
If Screen.Camera.GetPlayerFacingDirection() = facing Then
If Screen.Camera.GetPlayerFacingDirection() = facing Then
Return False
End If
@ -131,20 +128,17 @@
Screen.Level.OverworldPokemon.Visible = False
Screen.Level.OverworldPokemon.warped = True
Dim s As String = "version=2" & vbNewLine &
"@player.move(1)" & vbNewLine &
Dim s As String = "@player.move(1)" & vbNewLine &
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",-1," & Screen.Camera.GetMoveDirection().Z & ")" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine
"@overworldpokemon.hide"
If Not Me.TempScriptEntity Is Nothing Then
s &= GetScriptStartLine(Me.TempScriptEntity) & vbNewLine
s &= vbNewLine & GetScriptStartLine(Me.TempScriptEntity)
Me.TempScriptEntity = Nothing
End If
s &= ":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {})
End If
End Sub

@ -55,38 +55,30 @@
If Core.Random.Next(0, 100) < 20 Then
spawnedPokemon = Spawner.GetPokemon(Screen.Level.LevelFile, Spawner.EncounterMethods.RockSmash, False)
If spawnedPokemon Is Nothing Then
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Dim s As String = "@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
Dim s As String = "@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
"@level.update" & vbNewLine &
"@text.show(A wild Pokémon~appeared!)" & vbNewLine &
"@battle.wild(" & spawnedPokemon.Number & "," & spawnedPokemon.Level & ")" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
"@battle.wild(" & spawnedPokemon.Number & "," & spawnedPokemon.Level & ")"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
Else
If Core.Random.Next(0, 100) < 20 Then
Dim ItemID As Integer = GetItemID()
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
Dim s As String = "@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
"@level.update" & vbNewLine &
"@item.give(" & ItemID & ",1)" & vbNewLine &
"@item.messagegive(" & ItemID & ",1)" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
"@item.messagegive(" & ItemID & ",1)"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Dim s As String = "@text.show(" & pName & " used~Rock Smash!)" & vbNewLine &
"@sound.play(destroy)"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If
PlayerStatistics.Track("Rock Smash used", 1)
@ -132,7 +124,7 @@
Public Shared Sub Load()
ItemContainerlist.Clear()
Dim File As String = OldGameModeManager.GetContentFilePath("Data\smashrockitems.dat")
Dim File As String = GameModeManager.GetDataFilePath("smashrockitems.dat")
If System.IO.File.Exists(File) = True Then
Security.FileValidation.CheckFileValid(File, False, "SmashRock.vb")
Dim data() As String = System.IO.File.ReadAllLines(File)

@ -51,11 +51,11 @@
CType(sRock, StrengthRock).CanBeRemoved = True
End If
If RemoveForever = True Then
ActionScript.RegisterID("ACTIVATOR_REMOVE_STRENGTH_ROCK_" & Screen.Level.LevelFile & "_" & sRock.ID.ToString())
Construct.Framework.RegisterHandler.NewRegister("ACTIVATOR_REMOVE_STRENGTH_ROCK_" & Screen.Level.LevelFile & "_" & sRock.ID.ToString(), "")
End If
If ActivateScript <> "" Then
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(Me.ActivateScript, 0, False)
Construct.Controller.GetInstance().RunFromString(Me.ActivateScript, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If

@ -33,7 +33,7 @@
End If
End If
If System.IO.File.Exists(GameController.GamePath & "\" & OldGameModeManager.ActiveGameMode.MapPath & destination) = True Or System.IO.File.Exists(GameController.GamePath & "\maps\" & destination) = True Then
If System.IO.File.Exists(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.MapPath & destination) = True Or System.IO.File.Exists(GameController.GamePath & "\maps\" & destination) = True Then
If MapViewMode = False Then
Screen.Level.WarpData.WarpDestination = Me.AdditionalValue.GetSplit(0)
Screen.Level.WarpData.WarpPosition = New Vector3(CSng(Me.AdditionalValue.GetSplit(1)), CSng(Me.AdditionalValue.GetSplit(2).Replace(".", GameController.DecSeparator)), CSng(Me.AdditionalValue.GetSplit(3)))
@ -51,7 +51,7 @@
Screen.Camera.Position = New Vector3(CSng(Me.AdditionalValue.GetSplit(1)), CSng(Me.AdditionalValue.GetSplit(2).Replace(".", GameController.DecSeparator)), CSng(Me.AdditionalValue.GetSplit(3)))
End If
Else
CallError("Map file """ & OldGameModeManager.ActiveGameMode.MapPath & destination & """ does not exist.")
CallError("Map file """ & GameModeManager.ActiveGameMode.MapPath & destination & """ does not exist.")
End If
End If

@ -207,16 +207,14 @@
End If
End While
s = "version=2" & vbNewLine &
"@pokemon.hide" & vbNewLine &
s = "@overworldpokemon.hide" & vbNewLine &
"@player.move(2)" & vbNewLine &
"@player.setmovement(0,-1,0)" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@overworldpokemon.hide" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine &
":end"
"@overworldpokemon.hide"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End Sub
@ -259,18 +257,16 @@
Screen.Camera.PlannedMovement = New Vector3(0, 1, 0)
s = "version=2" & vbNewLine &
"@pokemon.cry(" & pNumber & ")" & vbNewLine &
s = "@pokemon.cry(" & pNumber & ")" & vbNewLine &
"@sound.play(select)" & vbNewLine &
"@text.show(" & pName & " used~Waterfall.)" & vbNewLine &
"@player.move(" & Steps & ")" & vbNewLine &
"@pokemon.hide" & vbNewLine &
"@overworldpokemon.hide" & vbNewLine &
"@player.move(2)" & vbNewLine &
"@pokemon.hide" & vbNewLine &
":end"
"@overworldpokemon.hide"
PlayerStatistics.Track("Waterfall used", 1)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Return False
End If

@ -11,22 +11,22 @@
Public Overrides Sub Initialize()
MyBase.Initialize()
WaterAnimation = New Animation(net.Pokemon3D.Game.TextureManager.GetTexture("Textures\Routes"), 1, 4, 16, 16, 9, 12, 0)
WaterAnimation = New Animation(TextureManager.GetTexture("Textures\Routes"), 1, 4, 16, 16, 9, 12, 0)
If Whirlpool.LoadedWaterTemp = False Then
If LoadedWaterTemp = False Then
End If
End Sub
Public Shared Sub CreateWaterTextureTemp()
If Core.GameOptions.GraphicStyle = 1 Then
Whirlpool.WaterTexturesTemp.Clear()
WaterTexturesTemp.Clear()
Whirlpool.WaterTexturesTemp.Add(net.Pokemon3D.Game.TextureManager.GetTexture("Routes", New Rectangle(0, 176, 16, 16)))
Whirlpool.WaterTexturesTemp.Add(net.Pokemon3D.Game.TextureManager.GetTexture("Routes", New Rectangle(16, 176, 16, 16)))
Whirlpool.WaterTexturesTemp.Add(net.Pokemon3D.Game.TextureManager.GetTexture("Routes", New Rectangle(32, 176, 16, 16)))
Whirlpool.WaterTexturesTemp.Add(net.Pokemon3D.Game.TextureManager.GetTexture("Routes", New Rectangle(48, 176, 16, 16)))
Whirlpool.LoadedWaterTemp = True
WaterTexturesTemp.Add(TextureManager.GetTexture("Routes", New Rectangle(0, 176, 16, 16)))
WaterTexturesTemp.Add(TextureManager.GetTexture("Routes", New Rectangle(16, 176, 16, 16)))
WaterTexturesTemp.Add(TextureManager.GetTexture("Routes", New Rectangle(32, 176, 16, 16)))
WaterTexturesTemp.Add(TextureManager.GetTexture("Routes", New Rectangle(48, 176, 16, 16)))
LoadedWaterTemp = True
End If
End Sub
@ -45,24 +45,24 @@
Private Sub ChangeTexture()
If Core.GameOptions.GraphicStyle = 1 Then
If Whirlpool.LoadedWaterTemp = False Then
Whirlpool.CreateWaterTextureTemp()
If LoadedWaterTemp = False Then
CreateWaterTextureTemp()
End If
Select Case WaterAnimation.CurrentColumn
Case 0
Me.Textures(0) = Whirlpool.WaterTexturesTemp(0)
Textures(0) = WaterTexturesTemp(0)
Case 1
Me.Textures(0) = Whirlpool.WaterTexturesTemp(1)
Textures(0) = WaterTexturesTemp(1)
Case 2
Me.Textures(0) = Whirlpool.WaterTexturesTemp(2)
Textures(0) = WaterTexturesTemp(2)
Case 3
Me.Textures(0) = Whirlpool.WaterTexturesTemp(3)
Textures(0) = WaterTexturesTemp(3)
End Select
End If
End Sub
Public Overrides Sub Render()
Me.Draw(Me.Model, Textures, False)
Draw(Model, Textures, False)
End Sub
Private Function ReturnWhirlPoolPokemonName() As String
@ -79,8 +79,8 @@
End Function
Public Overrides Function WalkAgainstFunction() As Boolean
If Me.ActionValue = 1 Then
Return Me.Collision
If ActionValue = 1 Then
Return Collision
End If
If Screen.Level.Surfing = True Then
@ -88,14 +88,11 @@
Dim s As String = ""
If Badge.CanUseHMMove(Badge.HMMoves.Whirlpool) = True And pName <> "" Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
s = "version=2
@text.show(" & pName & " used~Whirlpool!)
@player.move(2)
:end"
s = "@text.show(" & pName & " used~Whirlpool!)
@player.move(2)"
PlayerStatistics.Track("Whirlpool used", 1)
Else
s = "version=2
@player.move(1)
s = "@player.move(1)
@player.turn(1)
@level.wait(3)
@player.turn(1)
@ -121,11 +118,10 @@
@level.wait(3)
@player.turn(1)
@level.wait(3)
@text.show(It's a vicious~whirlpool!*A Pokémon may be~able to pass it.)
:end"
@text.show(It's a vicious~whirlpool!*A Pokémon may be~able to pass it.)"
End If
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Return True
End If

@ -278,17 +278,19 @@
Public Sub ActivateScript()
Dim oScreen As OverworldScreen = CType(Core.CurrentScreen, OverworldScreen)
If oScreen.ActionScript.IsReady = True Then
If Construct.Controller.GetInstance().IsReady = True Then
SoundManager.PlaySound("select")
Select Case Me.ActionValue
Case 0
oScreen.ActionScript.StartScript(Me.AdditionalValue, 1)
Case 1
oScreen.ActionScript.StartScript(Me.AdditionalValue, 0)
Case 3
oScreen.ActionScript.StartScript(Me.AdditionalValue.Replace("<br>", vbNewLine), 2)
Case Else
oScreen.ActionScript.StartScript(Me.AdditionalValue, 0)
Case 0 'text
Construct.Controller.GetInstance().RunFromText(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case 1 'script
Construct.Controller.GetInstance().RunFromFile(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case 2 'script (is trainer)
Construct.Controller.GetInstance().RunFromFile(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case 3 'string
Construct.Controller.GetInstance().RunFromString(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
Case Else 'text
Construct.Controller.GetInstance().RunFromText(Me.AdditionalValue, {Construct.Controller.ScriptRunOptions.CheckDelay})
End Select
End If
End Sub
@ -328,13 +330,13 @@
End If
If correctFacing = True Then
distance = distance.ToPositive()
distance = Math.Abs(distance)
If distance <= Me.TrainerSight Then
Dim InSightMusic As String = "nomusic"
If Me.IsTrainer = True Then
Dim trainerFilePath As String = OldGameModeManager.GetScriptPath(Me.AdditionalValue & ".dat")
Dim trainerFilePath As String = GameModeManager.GetScriptPath(Me.AdditionalValue & ".dat")
Security.FileValidation.CheckFileValid(trainerFilePath, False, "NPC.vb")
Dim trainerContent() As String = System.IO.File.ReadAllLines(trainerFilePath)
@ -372,12 +374,12 @@
End Select
Dim turns As Integer = needFacing - Screen.Camera.GetPlayerFacingDirection()
If turns < 0 Then
turns = 4 - turns.ToPositive()
turns = 4 - Math.Abs(turns)
End If
CType(Core.CurrentScreen, OverworldScreen).TrainerEncountered = True
If InSightMusic <> "nomusic" And InSightMusic <> "" Then
MusicManager.PlayMusic(InSightMusic, True, 0.0F, 0.0F)
MusicPlayer.GetInstance().Play(InSightMusic, True, 0.0F, 0.0F)
End If
Screen.Camera.StopMovement()
Me.Movement = Movements.Still
@ -394,8 +396,7 @@
offset.X = 0.01F
End Select
Dim s As String = "version=2" & vbNewLine &
"@player.turn(" & turns & ")" & vbNewLine
Dim s As String = "@player.turn(" & turns & ")" & vbNewLine
With CType(Screen.Camera, OverworldCamera)
If CType(Screen.Camera, OverworldCamera).ThirdPerson = True And IsOnScreen() = False Then
@ -405,20 +406,17 @@
"@npc.move(" & Me.NPCID & "," & distance - 1 & ")" & vbNewLine &
"@camera.resetfocus" & vbNewLine &
"@camera.setposition(" & cPosition & ")" & vbNewLine &
"@script.start(" & Me.AdditionalValue & ")" & vbNewLine &
":end"
"@script.start(" & Me.AdditionalValue & ")"
Else
s &= "@entity.showmessagebulb(1|" & Me.Position.X + offset.X & "|" & Me.Position.Y + 0.7F & "|" & Me.Position.Z + offset.Y & ")" & vbNewLine &
"@npc.move(" & Me.NPCID & "," & distance - 1 & ")" & vbNewLine &
"@script.start(" & Me.AdditionalValue & ")" & vbNewLine &
":end"
"@script.start(" & Me.AdditionalValue & ")"
End If
End With
Screen.Level.OwnPlayer.Opacity = 0.5F
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
ActionScript.IsInsightScript = True
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay, Construct.Controller.ScriptRunOptions.InsightScript})
End If
End If
End If
@ -471,7 +469,7 @@
Private Sub NPCMovement()
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady = False Then
If Construct.Controller.GetInstance().IsReady = False Then
Exit Sub
End If
End If

@ -65,7 +65,7 @@
Public Overrides Sub Render()
If ConnectScreen.Connected = True Then
If CBool(OldGameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If CBool(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If Screen.Level.ShowOverworldPokemon = True Then
If IsCorrectScreen() = True Then
If Me.PokemonTexture <> "" Then

@ -124,7 +124,7 @@ Public Class OverworldPokemon
''' If the OverworldPokémon should be rendered.
''' </summary>
Public Function IsVisible() As Boolean
If CBool(OldGameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If CBool(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If Screen.Level.ShowOverworldPokemon = True Then
If IsCorrectScreen() = True Then
If Not Core.Player.GetWalkPokemon() Is Nothing Then
@ -241,14 +241,14 @@ Public Class OverworldPokemon
End Sub
Public Overrides Sub ClickFunction()
If CBool(OldGameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If CBool(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If Me.Visible = True And Not Core.Player.GetWalkPokemon() Is Nothing And Screen.Level.Surfing = False And Screen.Level.Riding = False And Screen.Level.ShowOverworldPokemon = True Then
Dim p As Pokemon = Core.Player.GetWalkPokemon()
Dim scriptString As String = PokemonInteractions.GetScriptString(p, Me.Position, Me.faceRotation)
Dim s As String = PokemonInteractions.GetScriptString(p, Me.Position, Me.faceRotation)
If Core.CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(Core.CurrentScreen, OverworldScreen).ActionScript.IsReady = True Then
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(scriptString, 2)
If Construct.Controller.GetInstance().IsReady = True Then
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End If
End If

@ -1,4 +1,4 @@
Public Class OldLocalization
Public Class Localization
Public Shared LanguageSuffix As String = "en"
Public Shared LocalizationTokens As Dictionary(Of String, Token) = New Dictionary(Of String, Token)
@ -6,40 +6,11 @@
Public Shared Sub Load(ByVal LanguageSuffix As String)
LocalizationTokens.Clear()
OldLocalization.LanguageSuffix = LanguageSuffix
Localization.LanguageSuffix = LanguageSuffix
Logger.Debug("Loaded language [" & LanguageSuffix & "]")
Logger.Debug("149", "Loaded language [" & LanguageSuffix & "]")
LoadTokenFile(OldGameMode.DefaultLocalizationsPath, False)
If OldGameModeManager.GameModeCount > 0 Then
Dim GameModeLocalizationPath As String = OldGameModeManager.ActiveGameMode.LocalizationsPath
If GameModeLocalizationPath <> OldGameMode.DefaultLocalizationsPath Then
LoadTokenFile(GameModeLocalizationPath, True)
End If
End If
End Sub
Public Shared Sub ReloadGameModeTokens()
For i = 0 To LocalizationTokens.Count - 1
If i <= LocalizationTokens.Count - 1 Then
Dim Token As Token = LocalizationTokens.Values(i)
If Token.IsGameModeToken = True Then
LocalizationTokens.Remove(LocalizationTokens.Keys(i))
i -= 1
End If
End If
Next
If OldGameModeManager.GameModeCount > 0 Then
Dim GameModeLocalizationPath As String = OldGameModeManager.ActiveGameMode.LocalizationsPath
If GameModeLocalizationPath <> OldGameMode.DefaultLocalizationsPath Then
LoadTokenFile(GameModeLocalizationPath, True)
End If
End If
Logger.Debug("---Reloaded GameMode Tokens---")
LoadTokenFile("\Localization\", False)
End Sub
Private Shared Sub LoadTokenFile(ByVal path As String, ByVal IsGameModeFile As Boolean)

@ -199,7 +199,7 @@
If s.Identification = Screen.Identifications.OverworldScreen Then
If testForScript = False Then
CType(s, OverworldScreen).ActionScript.StartScript("version=2" & vbNewLine & text & vbNewLine & ":end", 2, False)
Construct.Controller.GetInstance().RunFromString(text, {})
End If
Return text
@ -211,7 +211,7 @@
End Try
Case "<"
Try
Return text & ": " & ScriptVersion2.ScriptComparer.EvaluateConstruct(text).ToString()
Return text & "= " & Construct.Framework.Parser.EvaluateConstruct(text)
Catch ex As Exception
Return "Invalid construct: """ & text & """"
End Try

@ -536,10 +536,10 @@ Namespace GameJolt
Next
If exists(ID_BERRIES) = False Then
_berries = NewGameScreen.GetBerryData()
_berries = GetBerryData()
End If
If exists(ID_OPTIONS) = False Then
_options = NewGameScreen.GetOptionsData()
_options = GetOptionsData()
End If
If exists(ID_PLAYER) = False Then
_player = GetPlayerData()
@ -623,7 +623,7 @@ Namespace GameJolt
_berries = data.Replace("\""", """")
Else
_berries = NewGameScreen.GetBerryData()
_berries = GetBerryData()
End If
_downloadedFlags(ID_BERRIES) = True
@ -713,7 +713,7 @@ Namespace GameJolt
_options = data.Replace("\""", """")
Else
_options = NewGameScreen.GetOptionsData()
_options = GetOptionsData()
End If
_downloadedFlags(ID_OPTIONS) = True
@ -904,8 +904,43 @@ Namespace GameJolt
#Region "DefaultData"
Private Function GetOptionsData() As String
Return "FOV|50" & vbNewLine &
"TextSpeed|2" & vbNewLine &
"MouseSpeed|12"
End Function
Private Function GetBerryData() As String
Return "{route29.dat|13,0,5|6|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route29.dat|14,0,5|6|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route29.dat|15,0,5|6|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{azalea.dat|9,0,3|0|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{azalea.dat|9,0,4|1|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{azalea.dat|9,0,5|0|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route30.dat|7,0,41|10|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route30.dat|14,0,5|2|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route30.dat|15,0,5|6|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route30.dat|16,0,5|2|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{routes\route35.dat|0,0,4|7|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{routes\route35.dat|1,0,4|8|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route36.dat|37,0,7|0|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route36.dat|38,0,7|4|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route36.dat|39,0,7|3|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route39.dat|8,0,2|9|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route39.dat|8,0,3|6|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route38.dat|13,0,12|16|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route38.dat|14,0,12|23|1|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{route38.dat|15,0,12|16|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{routes\route43.dat|13,0,45|23|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{routes\route43.dat|13,0,46|24|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{routes\route43.dat|13,0,47|25|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{safarizone\main.dat|3,0,11|5|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{safarizone\main.dat|4,0,11|0|2|0|2012,9,21,4,0,0|1}" & vbNewLine &
"{safarizone\main.dat|5,0,11|6|3|0|2012,9,21,4,0,0|1}"
End Function
Private Function GetPlayerData() As String
Dim GameMode As OldGameMode = OldGameModeManager.ActiveGameMode
Dim GameMode As GameMode = GameModeManager.ActiveGameMode
Dim ot As String = GameJoltID
While ot.Length < 5
@ -937,7 +972,7 @@ Namespace GameJolt
"RepelSteps|0" & vbNewLine &
"LastSavePlace|yourroom.dat" & vbNewLine &
"LastSavePlacePosition|1,0.1,3" & vbNewLine &
"Difficulty|" & OldGameModeManager.GetGameRuleValue("Difficulty", "0") & vbNewLine &
"Difficulty|" & GameModeManager.GetGameRuleValue("Difficulty", "0") & vbNewLine &
"BattleStyle|0" & vbNewLine &
"saveCreated|" & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & vbNewLine &
"LastPokemonPosition|999,999,999" & vbNewLine &
@ -963,13 +998,13 @@ Namespace GameJolt
Gender = "0"
_apricorns = ""
_berries = NewGameScreen.GetBerryData()
_berries = GetBerryData()
_box = ""
_daycare = ""
_itemData = ""
_items = ""
_NPC = ""
_options = NewGameScreen.GetOptionsData()
_options = GetOptionsData()
_party = ""
_player = GetPlayerData()
_pokedex = ""

@ -275,7 +275,7 @@ Namespace Servers
GameJoltID = Core.GameJoltSave.GameJoltID
End If
AddToDataItems(dataItems, OldGameModeManager.ActiveGameMode.Name.ToLower(), 0)
AddToDataItems(dataItems, GameModeManager.ActiveGameMode.Name.ToLower(), 0)
AddToDataItems(dataItems, Core.Player.IsGamejoltSave.ToNumberString(), 1)
AddToDataItems(dataItems, GameJoltID, 2)
AddToDataItems(dataItems, GameController.DecSeparator, 3)

@ -208,7 +208,7 @@ Public Class OverworldCamera
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Dim OS As OverworldScreen = CType(CurrentScreen, OverworldScreen)
If _freeCameraMode = True And OS.ActionScript.IsReady = True Then
If _freeCameraMode = True And Construct.Controller.GetInstance().IsReady = True Then
If YawLocked = False Then
Yaw += -RotationSpeed * 0.75F * dx
End If
@ -226,14 +226,14 @@ Public Class OverworldCamera
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
Dim OS As OverworldScreen = CType(CurrentScreen, OverworldScreen)
If OS.ActionScript.IsReady = True Then
If Construct.Controller.GetInstance().IsReady = True Then
If (KeyBoardHandler.KeyPressed(KeyBindings.CameraLockKey) = True Or ControllerHandler.ButtonPressed(Buttons.RightStick)) = True And _moved = 0.0F And YawLocked = False Then
_freeCameraMode = Not _freeCameraMode
If _freeCameraMode = False Then
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_free_camera_off"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_free_camera_off"), 12, FontManager.MainFont, Color.White)
Else
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_free_camera_on"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_free_camera_on"), 12, FontManager.MainFont, Color.White)
End If
End If
End If
@ -284,7 +284,7 @@ Public Class OverworldCamera
If KeyBoardHandler.KeyPressed(KeyBindings.PerspectiveSwitchKey) = True Or ControllerHandler.ButtonPressed(Buttons.LeftShoulder) = True Then
Dim actionscriptReady As Boolean = True
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
actionscriptReady = CType(CurrentScreen, OverworldScreen).ActionScript.IsReady
actionscriptReady = Construct.Controller.GetInstance().IsReady
End If
If actionscriptReady = True Then
SetThirdPerson(Not _thirdPerson, True)
@ -336,12 +336,12 @@ Public Class OverworldCamera
If _thirdPerson = True Then
Screen.Level.OwnPlayer.Opacity = 1.0F
If showMessage = True Then
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_third_person_on"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_third_person_on"), 12, FontManager.MainFont, Color.White)
End If
Else
Yaw = GetAimYawFromDirection(_playerFacing)
If showMessage = True Then
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_third_person_off"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_third_person_off"), 12, FontManager.MainFont, Color.White)
End If
End If
End If
@ -380,7 +380,7 @@ Public Class OverworldCamera
#Region "CameraMethods"
Private Sub SetSpeed()
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen AndAlso CType(CurrentScreen, OverworldScreen).ActionScript.IsReady = False Then
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen AndAlso Construct.Controller.GetInstance().IsReady = False Then
Speed = 0.04F
Else
If Screen.Level.Riding = True Then
@ -589,7 +589,7 @@ Public Class OverworldCamera
Dim OS As OverworldScreen = Nothing
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
OS = CType(CurrentScreen, OverworldScreen)
isActionscriptReady = OS.ActionScript.IsReady
isActionscriptReady = Construct.Controller.GetInstance().IsReady
End If
If isActionscriptReady = True And Screen.Level.CanMove() = True Then

@ -1,8 +1,5 @@
Imports System.Threading
''' <summary>
''' The screen to display the default Overworld gameplay.
''' </summary>
Public Class OverworldScreen
Inherits Screen
@ -12,7 +9,6 @@ Public Class OverworldScreen
Private Shared _fadeValue As Integer = 0 'Fade progress value for the black screen fade.
Private Shared _drawRodID As Integer = -1 'The rod ID to display on the screen during the fishing animation.
Private _actionScript As ActionScript 'Private ActionScript instance.
Private _particlesTexture As Texture2D 'A texture field to contain the particles texture, currently only used for the crosshair.
Private _trainerEncountered As Boolean = False
Private _titles As New List(Of Title)
@ -31,16 +27,7 @@ Public Class OverworldScreen
''' </summary>
Public ReadOnly Property Titles() As List(Of Title)
Get
Return Me._titles
End Get
End Property
''' <summary>
''' The ActionScript instance that controls the scripts.
''' </summary>
Public ReadOnly Property ActionScript() As ActionScript
Get
Return Me._actionScript
Return _titles
End Get
End Property
@ -49,10 +36,10 @@ Public Class OverworldScreen
''' </summary>
Public Property TrainerEncountered() As Boolean
Get
Return Me._trainerEncountered
Return _trainerEncountered
End Get
Set(value As Boolean)
Me._trainerEncountered = value
_trainerEncountered = value
End Set
End Property
@ -81,7 +68,6 @@ Public Class OverworldScreen
End Set
End Property
Public Property GlobalGameModeScriptStarted As Boolean = False
#End Region
''' <summary>
@ -103,13 +89,18 @@ Public Class OverworldScreen
''' </summary>
Public Sub New()
'Set default information:
Me.Identification = Identifications.OverworldScreen
Me.CanChat = True
Me.MouseVisible = False
Identification = Identifications.OverworldScreen
CanChat = True
MouseVisible = False
IsOverlay = True
'Set up 3D environment variables (Effect, Camera, SkyDome and Level):
Effect = New BasicEffect(Core.GraphicsDevice)
Effect = New BasicEffect(GraphicsDevice)
Effect.FogEnabled = True
Effect.TextureEnabled = True
'Reset Construct:
Construct.Controller.GetInstance().Reset()
Camera = New OverworldCamera()
SkyDome = New SkyDome()
@ -118,47 +109,37 @@ Public Class OverworldScreen
'Play music depending on the player state in the level (surfing and riding):
If Level.Surfing = True Then
MusicManager.PlayMusic("surf", True) 'Play "surf" when player is surfing.
MusicPlayer.GetInstance().Play("system\surf", True) 'Play "surf" when player is surfing.
Else
If Level.Riding = True Then
MusicManager.PlayMusic("ride", True) 'Play "ride" when player is riding.
MusicPlayer.GetInstance().Play("system\ride", True) 'Play "ride" when player is riding.
Else
MusicManager.PlayMusic(Level.MusicLoop, True) 'Play default MusicLoop.
MusicPlayer.GetInstance().Play(Level.MusicLoop, True) 'Play default MusicLoop.
End If
End If
'Setup the RouteSign for the initial level.
Level.RouteSign.Setup(Level.MapName)
'Create a new instance of the ActionScript.
Me._actionScript = New ActionScript(Level)
'Initialize the World information with the loaded level.
Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
Level.World.Initialize(Level.EnvironmentType, Level.WeatherType)
'Load the particle texture.
Me._particlesTexture = TextureManager.GetTexture("GUI\Overworld\Particles")
_particlesTexture = TextureManager.GetTexture("GUI\Overworld\Particles")
End Sub
''' <summary>
''' Updates the OverworldScreen.
''' </summary>
Public Overrides Sub Update()
If OldGameModeManager.ActiveGameMode.StartScript <> "" AndAlso ActionScript.IsReady AndAlso Not GlobalGameModeScriptStarted Then
ActionScript.reDelay = 0.0F
ActionScript.StartScript(OldGameModeManager.ActiveGameMode.StartScript, 0)
GlobalGameModeScriptStarted = True
End If
'If the MapScript has a value loaded from the MapScript map tag and there is no script running, start that script:
If LevelLoader.MapScript <> "" And ActionScript.IsReady = True Then
ActionScript.reDelay = 0.0F
ActionScript.StartScript(LevelLoader.MapScript, 0)
If Level.MapScript <> "" And Construct.Controller.GetInstance().IsReady = True Then
Construct.Controller.GetInstance().RunFromFile(Level.MapScript, {})
LevelLoader.MapScript = "" 'Reset the MapScript.
Level.MapScript = "" 'Reset the MapScript.
End If
Lighting.UpdateLighting(Screen.Effect) 'Update the lighting on the basic effect.
Lighting.UpdateLighting(Effect) 'Update the lighting on the basic effect.
'Update the Dialogues:
ChooseBox.Update()
@ -170,11 +151,10 @@ Public Class OverworldScreen
End If
'Middle click/Thumbstick press: Show first Pokémon in party.
If ActionScript.IsReady = True Then
If Construct.Controller.GetInstance().IsReady = True Then
If MouseHandler.ButtonPressed(MouseHandler.MouseButtons.MiddleButton) = True Or ControllerHandler.ButtonPressed(Buttons.LeftStick) = True Then
If Core.Player.Pokemons.Count > 0 Then
''Core.SetScreen(New PokemonStatusScreen(Core.CurrentScreen, 0, {}, Core.Player.Pokemons(0), True))
Core.SetScreen(New SummaryScreen(CurrentScreen, Core.Player.Pokemons.ToArray, 0))
SetScreen(New SummaryScreen(Me, Core.Player.Pokemons.ToArray(), 0))
End If
End If
End If
@ -182,8 +162,8 @@ Public Class OverworldScreen
'If no dialogue is showing, do level update tasks:
If TextBox.Showing = False And ChooseBox.Showing = False And PokemonImageView.Showing = False Then
'If no script is running and no MapScript is in the queue, update camera and the level.
If ActionScript.IsReady = True And LevelLoader.MapScript = "" Then
If Me.HandleServerRequests() = True Then
If Construct.Controller.GetInstance().IsReady = True And Level.MapScript = "" Then
If HandleServerRequests() = True Then
Camera.Update()
Level.Update()
End If
@ -197,24 +177,28 @@ Public Class OverworldScreen
'Open the MenuScreen:
If KeyBoardHandler.KeyPressed(KeyBindings.InventoryKey) = True Or ControllerHandler.ButtonPressed(Buttons.X) = True Then
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True Then
If Camera.IsMoving() = False And Construct.Controller.GetInstance().IsReady = True Then
Level.RouteSign.Hide()
SoundManager.PlaySound("menu_open")
Core.SetScreen(New NewMenuScreen(Me))
SetScreen(New NewMenuScreen(Me))
End If
End If
'Open the PokégearScreen:
If KeyBoardHandler.KeyPressed(KeyBindings.SpecialKey) = True Or ControllerHandler.ButtonPressed(Buttons.Y) = True Then
If Core.Player.HasPokegear = True Or GameController.IS_DEBUG_ACTIVE = True Then
If Screen.Camera.IsMoving() = False And ActionScript.IsReady = True Then
Core.SetScreen(New GameJolt.PokegearScreen(Me, GameJolt.PokegearScreen.EntryModes.MainMenu, {}))
If Camera.IsMoving() = False And Construct.Controller.GetInstance().IsReady = True Then
SetScreen(New GameJolt.PokegearScreen(Me, GameJolt.PokegearScreen.EntryModes.MainMenu, {}))
End If
End If
End If
ActionScript.Update() 'Update the action script.
Construct.Controller.GetInstance().Update() 'Update construct scripts.
If ControllerHandler.ButtonPressed(Buttons.RightShoulder) = True Then
Core.OpenChatScreen()
End If
Else 'Dialogues are showing:
'Update some parts of the camera:
If Camera.Name = "Overworld" Then
@ -253,21 +237,36 @@ Public Class OverworldScreen
Level.RouteSign.Update()
'Update the World with new environment variables.
Screen.Level.World.Initialize(Screen.Level.EnvironmentType, Screen.Level.WeatherType)
Level.World.Initialize(Level.EnvironmentType, Level.WeatherType)
Me.UpdateShowControlDelay()
UpdateShowControlDelay()
'If for some mysterical reason, a player with a GameJolt account is not logged in during a play session, prompt the LogInScreen.
GameJolt.LogInScreen.KickFromOnlineScreen(Me)
Me.UpdateTitles()
UpdateTitles()
UpdateWorldWeather()
End Sub
Private _minimumWeatherChangeDelay As Double = 200.0F
''' <summary>
''' Updates the weather to change it after a while.
''' </summary>
Private Sub UpdateWorldWeather()
If _minimumWeatherChangeDelay > 0F Then
_minimumWeatherChangeDelay -= 0.1F
Else
_minimumWeatherChangeDelay = Random.Next(100, 400)
Level.World.SetNewRegionWeather(Level.EnvironmentType, Level.WeatherType)
End If
End Sub
''' <summary>
''' Updates the delay of the XBOX button render.
''' </summary>
Private Sub UpdateShowControlDelay()
If Me.ShowControlsDelay > 0.0F Then
If ShowControlsDelay > 0.0F Then
'If any Gamepad is connected, countdown the delay.
If Core.GameOptions.GamePadEnabled = True AndAlso GamePad.GetState(PlayerIndex.One).IsConnected = True Then
ShowControlsDelay -= 0.1F
@ -276,7 +275,7 @@ Public Class OverworldScreen
End If
End If
End If
If Screen.Camera.IsMoving() = True Or Camera.Turning = True Or ActionScript.IsReady = False Or TextBox.Showing = True Or ChooseBox.Showing = True Then
If Camera.IsMoving() = True Or Camera.Turning = True Or Construct.Controller.GetInstance().IsReady = False Or TextBox.Showing = True Or ChooseBox.Showing = True Then
'If any input is received, reset the delay:
ShowControlsDelay = 8.0F
End If
@ -288,16 +287,16 @@ Public Class OverworldScreen
''' <returns>True, if no requests are in the queue, False otherwise.</returns>
Private Function HandleServerRequests() As Boolean
If GameJolt.PokegearScreen.BattleRequestData <> -1 Then 'A Servers ID from another player is set here.
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.BattleRequestData) = True Then 'If the player still exists on the server.
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.BattleRequest, {GameJolt.PokegearScreen.BattleRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.BattleRequestData).GameJoltId}))
If ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.BattleRequestData) = True Then 'If the player still exists on the server.
SetScreen(New GameJolt.PokegearScreen(CurrentScreen, GameJolt.PokegearScreen.EntryModes.BattleRequest, {GameJolt.PokegearScreen.BattleRequestData, ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.BattleRequestData).GameJoltId}))
Return False
Else 'Otherwise, reset the data.
GameJolt.PokegearScreen.BattleRequestData = -1
End If
End If
If GameJolt.PokegearScreen.TradeRequestData <> -1 Then 'A Servers ID from another player is set here.
If Core.ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.TradeRequestData) = True Then 'If the player still exists on the server.
Core.SetScreen(New GameJolt.PokegearScreen(Core.CurrentScreen, GameJolt.PokegearScreen.EntryModes.TradeRequest, {GameJolt.PokegearScreen.TradeRequestData, Core.ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.TradeRequestData).GameJoltId}))
If ServersManager.PlayerCollection.HasPlayer(GameJolt.PokegearScreen.TradeRequestData) = True Then 'If the player still exists on the server.
SetScreen(New GameJolt.PokegearScreen(CurrentScreen, GameJolt.PokegearScreen.EntryModes.TradeRequest, {GameJolt.PokegearScreen.TradeRequestData, ServersManager.PlayerCollection.GetPlayer(GameJolt.PokegearScreen.TradeRequestData).GameJoltId}))
Return False
Else 'Otherwise, reset the data.
GameJolt.PokegearScreen.TradeRequestData = -1
@ -311,14 +310,14 @@ Public Class OverworldScreen
Level.Draw()
World.DrawWeather(Screen.Level.World.CurrentMapWeather)
World.DrawWeather(Level.World.CurrentMapWeather)
DrawGUI()
PokemonImageView.Draw()
TextBox.Draw()
'Only draw the ChooseBox when it's the current screen, cause the same ChooseBox might get used on other screens.
If Me.IsCurrentScreen() = True Then
If IsCurrentScreen() = True Then
ChooseBox.Draw()
End If
@ -355,25 +354,25 @@ Public Class OverworldScreen
'Render the Rod (based on the DrawRodID property).
If DrawRodID > -1 And isThirdPerson = False Then
Dim t As Texture2D = TextureManager.GetTexture("GUI\Overworld\Rods", New Rectangle(DrawRodID * 8, 0, 8, 64), "") 'Load the texture.
Dim P As New Vector2(CSng(Core.windowSize.Width / 2 - 32), Core.windowSize.Height - 490)
Dim P As New Vector2(CSng(windowSize.Width / 2 - 32), windowSize.Height - 490)
Core.SpriteBatch.Draw(t, New Rectangle(CInt(P.X), CInt(P.Y), 64, 512), Color.White)
SpriteBatch.Draw(t, New Rectangle(CInt(P.X), CInt(P.Y), 64, 512), Color.White)
End If
'Render Crosshair:
If Core.GameOptions.ShowGUI = True And isThirdPerson = False Then
Dim P As Vector2 = Core.GetMiddlePosition(New Size(16, 16))
Core.SpriteBatch.Draw(_particlesTexture, New Rectangle(CInt(P.X), CInt(P.Y), 16, 16), New Rectangle(0, 0, 9, 9), Color.White)
Dim P As Vector2 = GetMiddlePosition(New Size(16, 16))
SpriteBatch.Draw(_particlesTexture, New Rectangle(CInt(P.X), CInt(P.Y), 16, 16), New Rectangle(0, 0, 9, 9), Color.White)
End If
'Render all active titles:
For Each Title As Title In Me._titles
For Each Title As Title In _titles
Title.Draw()
Next
'If the black fade is visible, render it:
If FadeValue > 0 Then
Canvas.DrawRectangle(Core.windowSize, New Color(0, 0, 0, FadeValue))
Canvas.DrawRectangle(windowSize, New Color(0, 0, 0, FadeValue))
End If
End Sub
@ -382,11 +381,11 @@ Public Class OverworldScreen
DrawRodID = -1
'Center the mouse:
Dim c As OverworldCamera = CType(Screen.Camera, OverworldCamera)
Dim c As OverworldCamera = CType(Camera, OverworldCamera)
c.oldX = MouseHandler.MousePosition.X
c.oldY = MouseHandler.MousePosition.Y
Player.Temp.IsInBattle = False
Core.Player.Temp.IsInBattle = False
'Set to correct music:
If TrainerEncountered = False Then
@ -400,21 +399,21 @@ Public Class OverworldScreen
End If
Dim theme As String = Level.MusicLoop
If Screen.Level.Surfing = True Then
If Level.Surfing = True Then
theme = "surf"
End If
If Screen.Level.Riding = True Then
If Level.Riding = True Then
theme = "ride"
End If
'If the radio is activated and the station can be played on the current map, play the music.
If Level.IsRadioOn = True AndAlso GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = True Then
If Level.IsRadioOn = True AndAlso GameJolt.PokegearScreen.StationCanPlay(Level.SelectedRadioStation) = True Then
theme = Level.SelectedRadioStation.Music
Else
Level.IsRadioOn = False
End If
MusicManager.PlayMusic(theme, True)
MusicPlayer.GetInstance().Play(theme, True)
End If
End Sub
@ -422,15 +421,38 @@ Public Class OverworldScreen
''' Update all title objects in the _titles array.
''' </summary>
Private Sub UpdateTitles()
For Each t As Title In Me._titles
For Each t As Title In _titles
t.Update()
If t.IsReady = True Then 'If the title animation is ready, remove it from the array.
Me._titles.Remove(t)
_titles.Remove(t)
Exit For
End If
Next
End Sub
''' <summary>
''' Returns the currently active OverworldScreen instance.
''' </summary>
Public Shared Function GetCurrentInstance() As OverworldScreen
Return GetCurrentInstance(CurrentScreen)
End Function
''' <summary>
''' Returns the currently active OverworldScreen instance.
''' </summary>
''' <param name="startScreen">The screen on the top of the stack.</param>
Public Shared Function GetCurrentInstance(ByVal startScreen As Screen) As OverworldScreen
Dim s As Screen = startScreen
While s.Identification <> Identifications.OverworldScreen And s.PreScreen IsNot Nothing
s = s.PreScreen
End While
If s.Identification = Identifications.OverworldScreen Then
Return CType(s, OverworldScreen)
Else
Return Nothing
End If
End Function
''' <summary>
''' A class to display text on the OverworldScreen.
''' </summary>
@ -449,10 +471,10 @@ Public Class OverworldScreen
''' <remarks>The default is "Sample Text".</remarks>
Public Property Text() As String
Get
Return Me._text
Return _text
End Get
Set(value As String)
Me._text = value
_text = value
End Set
End Property
@ -462,10 +484,10 @@ Public Class OverworldScreen
''' <remarks>The default is White (255,255,255). No transparency is suppoorted.</remarks>
Public Property TextColor() As Color
Get
Return Me._textColor
Return _textColor
End Get
Set(value As Color)
Me._textColor = value
_textColor = value
End Set
End Property
@ -475,10 +497,10 @@ Public Class OverworldScreen
''' <remarks>The default is x10.</remarks>
Public Property Scale() As Single
Get
Return Me._scale
Return _scale
End Get
Set(value As Single)
Me._scale = value
_scale = value
End Set
End Property
@ -488,10 +510,10 @@ Public Class OverworldScreen
''' <remarks>The default is 0,0 - This position gets ignored when IsCentered is set to True.</remarks>
Public Property Position() As Vector2
Get
Return Me._position
Return _position
End Get
Set(value As Vector2)
Me._position = value
_position = value
End Set
End Property
@ -501,10 +523,10 @@ Public Class OverworldScreen
''' <remarks>The default is True. If this is set to True, the Position Property is getting ignored.</remarks>
Public Property IsCentered() As Boolean
Get
Return Me._isCentered
Return _isCentered
End Get
Set(value As Boolean)
Me._isCentered = value
_isCentered = value
End Set
End Property
@ -514,10 +536,10 @@ Public Class OverworldScreen
''' <remarks>The default is 20.</remarks>
Public Property Delay() As Single
Get
Return Me._delay
Return _delay
End Get
Set(value As Single)
Me._delay = value
_delay = value
End Set
End Property
@ -538,12 +560,12 @@ Public Class OverworldScreen
''' <param name="Position">The position of the text on the screen.</param>
''' <param name="IsCentered">If the text should always get centered on the screen.</param>
Public Sub New(ByVal Text As String, ByVal Delay As Single, ByVal TextColor As Color, ByVal Scale As Single, ByVal Position As Vector2, ByVal IsCentered As Boolean)
Me._text = Text
Me._delay = Delay
Me._textColor = TextColor
Me._scale = Scale
Me._position = Position
Me._isCentered = IsCentered
_text = Text
_delay = Delay
_textColor = TextColor
_scale = Scale
_position = Position
_isCentered = IsCentered
End Sub
''' <summary>
@ -553,29 +575,29 @@ Public Class OverworldScreen
Dim p As Vector2 = Vector2.Zero
'If the text is centered, set the draw position to the center of the screen, then add the position.
If Me._isCentered = True Then
Dim v As Vector2 = FontManager.TextFont.MeasureString(Me._text) * Me._scale
p = New Vector2(CSng(Core.windowSize.Width / 2 - v.X / 2), CSng(Core.windowSize.Height / 2 - v.Y / 2))
If _isCentered = True Then
Dim v As Vector2 = FontManager.TextFont.MeasureString(_text) * _scale
p = New Vector2(CSng(windowSize.Width / 2 - v.X / 2), CSng(windowSize.Height / 2 - v.Y / 2))
End If
p += Me._position
p += _position
'Determine the alpha value.
Dim A As Integer = 255
If Me._delay <= 3.0F Then
A = CInt(255 * (1 / 3 * Me._delay))
If _delay <= 3.0F Then
A = CInt(255 * (1 / 3 * _delay))
End If
Core.SpriteBatch.DrawString(FontManager.TextFont, Me._text, p, New Color(Me._textColor.R, Me._textColor.G, Me._textColor.B, A), 0.0F, Vector2.Zero, Me._scale, SpriteEffects.None, 0.0F)
SpriteBatch.DrawString(FontManager.TextFont, _text, p, New Color(_textColor.R, _textColor.G, _textColor.B, A), 0.0F, Vector2.Zero, _scale, SpriteEffects.None, 0.0F)
End Sub
''' <summary>
''' Updates the Title object.
''' </summary>
Public Sub Update()
If Me._delay > 0.0F Then
Me._delay -= 0.1F
If Me._delay <= 0.0F Then
Me._delay = 0.0F
If _delay > 0.0F Then
_delay -= 0.1F
If _delay <= 0.0F Then
_delay = 0.0F
End If
End If
End Sub
@ -585,7 +607,7 @@ Public Class OverworldScreen
''' </summary>
Public ReadOnly Property IsReady() As Boolean
Get
Return Me._delay = 0.0F
Return _delay = 0.0F
End Get
End Property

@ -54,7 +54,7 @@ Public Class RouteSign
''' </summary>
Public Sub Draw()
If Me._show = True Then
Dim placeString As String = OldLocalization.GetString("Places_" & Me._text, Me._text)
Dim placeString As String = Localization.GetString("Places_" & Me._text, Me._text)
'Get the point to render the text to.
Dim pX As Integer = CInt(316 / 2) - CInt(FontManager.InGameFont.MeasureString(placeString).X / 2)

@ -0,0 +1,234 @@
''' <summary>
''' This class handles all actions regarding badge loading and displaying.
''' </summary>
Public Class Badge
Public Enum HMMoves
Surf
Cut
Strength
Flash
Fly
Whirlpool
Waterfall
Ride
Dive
RockClimb
End Enum
Private Shared Badges As New List(Of BadgeDeclaration)
''' <summary>
''' This describes one badge loaded by a GameMode with ID, Name, Texture and Arguments
''' </summary>
Private Class BadgeDeclaration
Public ID As Integer = 0
Public Name As String = ""
Public LevelCap As Integer = -1
Public HMs As New List(Of HMMoves)
Public TextureRectangle As Rectangle = New Rectangle(0, 0, 50, 50)
Public TexturePath As String = "GUI\Badges"
Public Region As String = "Johto"
Public Sub New(ByVal inputData As String)
Dim data() As String = inputData.Split(CChar("|"))
Me.ID = CInt(data(0))
Me.Name = data(1)
If data.Count > 2 Then
For i = 2 To data.Count - 1
Dim argName As String = data(i).Remove(data(i).IndexOf("="))
Dim argData As String = data(i).Remove(0, data(i).IndexOf("=") + 1)
Select Case argName.ToLower()
Case "level"
Me.LevelCap = CInt(argData)
Case "hm"
Dim hms() As String = argData.Split(CChar(","))
For Each hm As String In hms
Select Case hm.ToLower()
Case "surf"
Me.HMs.Add(HMMoves.Surf)
Case "cut"
Me.HMs.Add(HMMoves.Cut)
Case "strength"
Me.HMs.Add(HMMoves.Strength)
Case "flash"
Me.HMs.Add(HMMoves.Flash)
Case "fly"
Me.HMs.Add(HMMoves.Fly)
Case "whirlpool"
Me.HMs.Add(HMMoves.Whirlpool)
Case "waterfall"
Me.HMs.Add(HMMoves.Waterfall)
Case "ride"
Me.HMs.Add(HMMoves.Ride)
Case "dive"
Me.HMs.Add(HMMoves.Dive)
Case "rockclimb"
Me.HMs.Add(HMMoves.RockClimb)
End Select
Next
Case "texture"
Dim texData() As String = argData.Split(CChar(","))
Me.TexturePath = texData(0)
Me.TextureRectangle = New Rectangle(CInt(texData(1)), CInt(texData(2)), CInt(texData(3)), CInt(texData(4)))
Case "region"
Me.Region = argData
End Select
Next
End If
End Sub
End Class
''' <summary>
''' Loads the badges. Only use after the GameMode got set.
''' </summary>
Public Shared Sub Load()
Badges.Clear()
Dim file As String = GameModeManager.GetDataFilePath("badges.dat")
Security.FileValidation.CheckFileValid(file, False, "Badge.vb")
Dim data() As String = System.IO.File.ReadAllLines(file)
For Each line As String In data
If line.Contains("|") = True Then
Badges.Add(New BadgeDeclaration(line))
End If
Next
End Sub
#Region "GetFunctions"
''' <summary>
''' Gets the badge name.
''' </summary>
''' <param name="ID">The ID of the badge.</param>
Public Shared Function GetBadgeName(ByVal ID As Integer) As String
For Each b As BadgeDeclaration In Badges
If b.ID = ID Then
Return b.Name
End If
Next
Return "Plain"
End Function
''' <summary>
''' Gets the badge texture.
''' </summary>
''' <param name="ID">The ID of the badge.</param>
Public Shared Function GetBadgeTexture(ByVal ID As Integer) As Texture2D
For Each b As BadgeDeclaration In Badges
If b.ID = ID Then
Return TextureManager.GetTexture(b.TexturePath, b.TextureRectangle, "")
End If
Next
Return TextureManager.GetTexture("GUI\Badges", New Rectangle(0, 0, 50, 50), "")
End Function
''' <summary>
''' Gets the highest level cap the player can use traded Pokémon on.
''' </summary>
Public Shared Function GetLevelCap() As Integer
Dim trainerBadges As List(Of Integer) = Core.Player.Badges
Dim highestCap As Integer = 10
For Each b As BadgeDeclaration In Badges
If b.LevelCap > highestCap And trainerBadges.Contains(b.ID) = True Then
highestCap = b.LevelCap
End If
Next
Return highestCap
End Function
''' <summary>
''' Checks if the player is able to perform a certain HM move.
''' </summary>
''' <param name="HM">The HM move the player tries to use.</param>
Public Shared Function CanUseHMMove(ByVal HM As HMMoves) As Boolean
Dim trainerBadges As List(Of Integer) = Core.Player.Badges
For Each b As BadgeDeclaration In Badges
If b.HMs.Contains(HM) = True And trainerBadges.Contains(b.ID) = True Or b.ID = 0 Then
Return True
End If
Next
Return False
End Function
''' <summary>
''' Gets the region.
''' </summary>
''' <param name="index">The index of the region in the badges enumeration.</param>
Public Shared Function GetRegion(ByVal index As Integer) As String
Dim regions As New List(Of String)
For Each b As BadgeDeclaration In Badges
If regions.Contains(b.Region) = False Then
regions.Add(b.Region)
End If
Next
If regions.Count - 1 >= index Then
Return regions(index)
Else
Return "Johto"
End If
End Function
''' <summary>
''' Gets the amount of badges in a certain region.
''' </summary>
''' <param name="region">The region to count the badges.</param>
Public Shared Function GetBadgesCount(ByVal region As String) As Integer
Dim c As Integer = 0
For Each b As BadgeDeclaration In Badges
If b.Region.ToLower() = region.ToLower() Then
c += 1
End If
Next
Return c
End Function
''' <summary>
''' Returns the amount of regions that exists in total.
''' </summary>
Public Shared Function GetRegionCount() As Integer
Dim regions As New List(Of String)
For Each b As BadgeDeclaration In Badges
If regions.Contains(b.Region) = False Then
regions.Add(b.Region)
End If
Next
Return regions.Count
End Function
''' <summary>
''' Gets the ID of a badge.
''' </summary>
''' <param name="region">The region this badge is from.</param>
''' <param name="index">The index of this badge.</param>
Public Shared Function GetBadgeID(ByVal region As String, ByVal index As Integer) As Integer
Dim cBadges As New List(Of BadgeDeclaration)
For Each b As BadgeDeclaration In Badges
If b.Region.ToLower() = region.ToLower() Then
cBadges.Add(b)
End If
Next
If cBadges.Count - 1 >= index Then
Return cBadges(index).ID
Else
Return 1
End If
End Function
''' <summary>
''' Checks if the player has a certain badge.
''' </summary>
''' <param name="BadgeID">The Badge ID to check for.</param>
Public Shared Function PlayerHasBadge(ByVal BadgeID As Integer) As Boolean
Return Core.Player.Badges.Contains(BadgeID)
End Function
#End Region
End Class

@ -421,7 +421,7 @@
Public AutosaveUsed As Boolean = False
Public loadedSave As Boolean = False
Public PlayerTemp As New PlayerTemp()
Public PlayerTemp As PlayerTemp
Public Structure Temp
Public Shared PokemonScreenIndex As Integer = 0
@ -487,10 +487,7 @@
ContentPackManager.LoadTextureReplacements(GameController.GamePath & "\ContentPacks\" & s & "\exceptions.dat")
Next
OldGameModeManager.CreateGameModesFolder()
OldGameModeManager.CreateKolbenMode()
ScriptStorage.Clear()
Construct.Framework.StorageHandler.GetInstance().Clear()
ScriptBlock.TriggeredScriptBlock = False
MysteryEventScreen.ClearActivatedEvents()
Pokedex.AutoDetect = True
@ -504,25 +501,22 @@
LoadPlayer()
If OldGameModeManager.GameModeExists(GameMode) = False Then
If GameModeManager.GameModeExists(GameMode) = False Then
GameMode = "Kolben"
OldGameModeManager.SetGameModePointer("Kolben")
GameModeManager.SetGameModePointer("Kolben")
Else
OldGameModeManager.SetGameModePointer(GameMode)
GameModeManager.SetGameModePointer(GameMode)
End If
GameModeManager.LoadFileItems()
BattleSystem.GameModeAttackLoader.Load()
If IsGameJoltSave = True Then
SandBoxMode = False
End If
OldLocalization.ReloadGameModeTokens()
If OldGameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
MusicManager.LoadMusic(True)
SoundManager.LoadSounds(True)
End If
MusicManager.Clear()
SoundManager.Clear()
SmashRock.Load()
Badge.Load()
Pokedex.Load()
@ -545,8 +539,7 @@
LoadRoamingPokemonData()
LoadStatistics()
PlayerTemp.Reset()
ResetTemp()
PlayerTemp = New PlayerTemp()
Chat.ClearChat()
If AutosaveUsed = True Then
@ -557,7 +550,7 @@
Dim outputString As String = newFilePrefix
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_continue_autosave") & " """ & outputString & """", 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_continue_autosave") & " """ & outputString & """", 12, FontManager.MainFont, Color.White)
newFilePrefix = ""
End If
@ -569,124 +562,126 @@
Entity.MakeShake = Name.ToLower() = "drunknilllzz"
''' Indev 0.54 Removal List
''' 1. All Mega Stones. [ID: 507 - 553]
''' 2. Shiny Candy [ID: 501]
If Not ActionScript.IsRegistered("PokemonIndev054Update") Then
' Check Inventory.
Inventory.RemoveItem(501)
For i As Integer = 507 To 553 Step +1
Inventory.RemoveItem(i)
Next
'If Not ActionScript.IsRegistered("PokemonIndev054Update") Then
' ' Check Inventory.
' Inventory.RemoveItem(501)
' For i As Integer = 507 To 553 Step +1
' Inventory.RemoveItem(i)
' Next
' Check Party Pokemon.
For Each Pokemon As Pokemon In Pokemons
If Pokemon.Item IsNot Nothing AndAlso (Pokemon.Item.ID >= 501 OrElse (Pokemon.Item.ID >= 507 AndAlso Pokemon.Item.ID <= 553)) Then
Pokemon.Item = Nothing
End If
Next
' ' Check Party Pokemon.
' For Each Pokemon As Pokemon In Pokemons
' If Pokemon.Item IsNot Nothing AndAlso (Pokemon.Item.ID >= 501 OrElse (Pokemon.Item.ID >= 507 AndAlso Pokemon.Item.ID <= 553)) Then
' Pokemon.Item = Nothing
' End If
' Next
' Check PC Boxes.
If Not String.IsNullOrWhiteSpace(BoxData) Then
Dim TempBoxData As New List(Of String)
TempBoxData.AddRange(BoxData.SplitAtNewline())
' ' Check PC Boxes.
' If Not String.IsNullOrWhiteSpace(BoxData) Then
' Dim TempBoxData As New List(Of String)
' TempBoxData.AddRange(BoxData.SplitAtNewline())
For Each item As String In TempBoxData
If Not String.IsNullOrWhiteSpace(item) AndAlso Not item.StartsWith("BOX") Then
Dim TempString As String = item.Remove(item.IndexOf("{"))
Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
' For Each item As String In TempBoxData
' If Not String.IsNullOrWhiteSpace(item) AndAlso Not item.StartsWith("BOX") Then
' Dim TempString As String = item.Remove(item.IndexOf("{"))
' Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
If TempPokemon.Item IsNot Nothing AndAlso (TempPokemon.Item.ID >= 501 OrElse (TempPokemon.Item.ID >= 507 AndAlso TempPokemon.Item.ID <= 553)) Then
TempPokemon.Item = Nothing
End If
' If TempPokemon.Item IsNot Nothing AndAlso (TempPokemon.Item.ID >= 501 OrElse (TempPokemon.Item.ID >= 507 AndAlso TempPokemon.Item.ID <= 553)) Then
' TempPokemon.Item = Nothing
' End If
item = TempString & TempPokemon.ToString()
End If
Next
' item = TempString & TempPokemon.ToString()
' End If
' Next
BoxData = String.Join(vbNewLine, TempBoxData)
End If
' BoxData = String.Join(vbNewLine, TempBoxData)
' End If
' Check Day Care.
If Not String.IsNullOrWhiteSpace(DaycareData) Then
Dim TempDaycareData As New List(Of String)
TempDaycareData.AddRange(DaycareData.SplitAtNewline())
' ' Check Day Care.
' If Not String.IsNullOrWhiteSpace(DaycareData) Then
' Dim TempDaycareData As New List(Of String)
' TempDaycareData.AddRange(DaycareData.SplitAtNewline())
For Each item As String In TempDaycareData
If Not String.IsNullOrWhiteSpace(item) AndAlso item.Contains("{") Then
Dim TempString As String = ItemData.Remove(item.IndexOf("{"))
Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
' For Each item As String In TempDaycareData
' If Not String.IsNullOrWhiteSpace(item) AndAlso item.Contains("{") Then
' Dim TempString As String = ItemData.Remove(item.IndexOf("{"))
' Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
If TempPokemon.Item IsNot Nothing AndAlso (TempPokemon.Item.ID >= 501 OrElse (TempPokemon.Item.ID >= 507 AndAlso TempPokemon.Item.ID <= 553)) Then
TempPokemon.Item = Nothing
End If
' If TempPokemon.Item IsNot Nothing AndAlso (TempPokemon.Item.ID >= 501 OrElse (TempPokemon.Item.ID >= 507 AndAlso TempPokemon.Item.ID <= 553)) Then
' TempPokemon.Item = Nothing
' End If
item = TempString & TempPokemon.ToString()
End If
Next
' item = TempString & TempPokemon.ToString()
' End If
' Next
DaycareData = String.Join(vbNewLine, TempDaycareData)
End If
' DaycareData = String.Join(vbNewLine, TempDaycareData)
' End If
ActionScript.RegisterID("PokemonIndev054Update")
End If
' ActionScript.RegisterID("PokemonIndev054Update")
'End If
''' Indev 0.54.2 OT Fix List.
If Not ActionScript.IsRegistered("PokemonIndev0542Update") Then
' Check Party Pokemon.
For Each Pokemon As Pokemon In Pokemons
If String.Equals(Pokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso Pokemon.OT <> GameJoltSave.GameJoltID Then
Pokemon.OT = GameJoltSave.GameJoltID
End If
Next
'''' Indev 0.54.2 OT Fix List.
'If Not ActionScript.IsRegistered("PokemonIndev0542Update") Then
' ' Check Party Pokemon.
' For Each Pokemon As Pokemon In Pokemons
' If String.Equals(Pokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso Pokemon.OT <> GameJoltSave.GameJoltID Then
' Pokemon.OT = GameJoltSave.GameJoltID
' End If
' Next
' Check PC Boxes.
If Not String.IsNullOrWhiteSpace(BoxData) Then
Dim TempBoxData As New List(Of String)
TempBoxData.AddRange(BoxData.SplitAtNewline())
' ' Check PC Boxes.
' If Not String.IsNullOrWhiteSpace(BoxData) Then
' Dim TempBoxData As New List(Of String)
' TempBoxData.AddRange(BoxData.SplitAtNewline())
For Each item As String In TempBoxData
If Not String.IsNullOrWhiteSpace(item) AndAlso Not item.StartsWith("BOX") Then
Dim TempString As String = item.Remove(item.IndexOf("{"))
Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
' For Each item As String In TempBoxData
' If Not String.IsNullOrWhiteSpace(item) AndAlso Not item.StartsWith("BOX") Then
' Dim TempString As String = item.Remove(item.IndexOf("{"))
' Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
If String.Equals(TempPokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso TempPokemon.OT <> GameJoltSave.GameJoltID Then
TempPokemon.OT = GameJoltSave.GameJoltID
End If
' If String.Equals(TempPokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso TempPokemon.OT <> GameJoltSave.GameJoltID Then
' TempPokemon.OT = GameJoltSave.GameJoltID
' End If
item = TempString & TempPokemon.ToString()
End If
Next
' item = TempString & TempPokemon.ToString()
' End If
' Next
BoxData = String.Join(vbNewLine, TempBoxData)
End If
' BoxData = String.Join(vbNewLine, TempBoxData)
' End If
' Check Day Care.
If Not String.IsNullOrWhiteSpace(DaycareData) Then
Dim TempDaycareData As New List(Of String)
TempDaycareData.AddRange(DaycareData.SplitAtNewline())
' ' Check Day Care.
' If Not String.IsNullOrWhiteSpace(DaycareData) Then
' Dim TempDaycareData As New List(Of String)
' TempDaycareData.AddRange(DaycareData.SplitAtNewline())
For Each item As String In TempDaycareData
If Not String.IsNullOrWhiteSpace(item) AndAlso item.Contains("{") Then
Dim TempString As String = ItemData.Remove(item.IndexOf("{"))
Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
' For Each item As String In TempDaycareData
' If Not String.IsNullOrWhiteSpace(item) AndAlso item.Contains("{") Then
' Dim TempString As String = ItemData.Remove(item.IndexOf("{"))
' Dim TempPokemon As Pokemon = Pokemon.GetPokemonByData(item.Remove(0, item.IndexOf("{")))
If String.Equals(TempPokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso TempPokemon.OT <> GameJoltSave.GameJoltID Then
TempPokemon.OT = GameJoltSave.GameJoltID
End If
' If String.Equals(TempPokemon.CatchTrainerName, Core.Player.Name, StringComparison.OrdinalIgnoreCase) AndAlso TempPokemon.OT <> GameJoltSave.GameJoltID Then
' TempPokemon.OT = GameJoltSave.GameJoltID
' End If
item = TempString & TempPokemon.ToString()
End If
Next
' item = TempString & TempPokemon.ToString()
' End If
' Next
DaycareData = String.Join(vbNewLine, TempDaycareData)
End If
' DaycareData = String.Join(vbNewLine, TempDaycareData)
' End If
' Remove Duplicate data.
Core.Player.PokeFiles = Core.Player.PokeFiles.Distinct().ToList()
' ' Remove Duplicate data.
' Core.Player.PokeFiles = Core.Player.PokeFiles.Distinct().ToList()
ActionScript.RegisterID("PokemonIndev0542Update")
End If
' ActionScript.RegisterID("PokemonIndev0542Update")
'End If
loadedSave = True
End Sub
@ -698,7 +693,8 @@
If IsGameJoltSave = True Then
PokeData = GameJoltSave.Party.SplitAtNewline()
Else
PokeData = IO.File.ReadAllText(GameController.GamePath & "\Save\" & filePrefix & "\Party.dat").SplitAtNewline()
Dim PartyData As String = IO.File.ReadAllText(GameController.GamePath & "\Save\" & filePrefix & "\Party.dat")
PokeData = PartyData.SplitAtNewline()
End If
If PokeData.Count > 0 AndAlso PokeData(0) <> "" Then
@ -1743,7 +1739,7 @@
If CanFireStepEvent() = True Then
Screen.Level.CheckTrainerSights()
If CurrentScreen.Identification = Screen.Identifications.OverworldScreen Then
If CType(CurrentScreen, OverworldScreen).ActionScript.IsReady = False Then
If Construct.Controller.GetInstance().IsReady = False Then
_stepEventStartedTrainer = True
End If
End If
@ -1791,28 +1787,26 @@
If CanFireStepEvent() = True Then
Screen.Level.WalkedSteps = 0
Dim s As String = "version=2" & vbNewLine &
"@Text.Show(Your repel effect wore off.)" & vbNewLine &
":end"
Dim s As String = "@Text.Show(Your repel effect wore off.)"
If Temp.LastUsedRepel > -1 Then
Dim haveItemLeft As Boolean = Inventory.GetItemAmount(Temp.LastUsedRepel) > 0
If haveItemLeft = True Then
s = "version=2" & vbNewLine &
"@Text.Show(Your repel effect wore off.*Do you want to use~another <inventory.name(" & Temp.LastUsedRepel & ")>?)" & vbNewLine &
s = "@Text.Show(Your repel effect wore off.*Do you want to use~another <item.name(" & Temp.LastUsedRepel & ")>?)" & vbNewLine &
"@Options.Show(Yes,No)" & vbNewLine &
":select:<options.result>" & vbNewLine &
":when:Yes" & vbNewLine &
"@sound.play(repel_use)" & vbNewLine &
"@Text.Show(<player.name> used~a <inventory.name(" & Temp.LastUsedRepel & ")>.)" & vbNewLine &
"@item.repel(" & Temp.LastUsedRepel & ")" & vbNewLine &
"@Text.Show(<player.name> used~a <item.name(" & Temp.LastUsedRepel & ")>.)" & vbNewLine &
"@player.userepel(" & Temp.LastUsedRepel & ")" & vbNewLine &
"@item.remove(" & Temp.LastUsedRepel & ",1,0)" & vbNewLine &
":endwhen" & vbNewLine &
":end"
":endselect"
End If
End If
CType(CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {})
_stepEventRepelMessage = True
Else
_repelSteps = 1

@ -1487,7 +1487,7 @@
Case Else
'Try to load a GameMode move.
Dim gameModeMove As Attack = GameModeAttackLoader.GetAttackByID(ID)
If Not gameModeMove Is Nothing And OldGameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
If Not gameModeMove Is Nothing And GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
returnMove = gameModeMove.Copy()
Else
returnMove = New Moves.Normal.Pound()

@ -18,8 +18,8 @@
Public Shared Sub Load()
LoadedMoves.Clear()
If OldGameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & OldGameModeManager.ActiveGameMode.ContentPath & "\" & PATH, "*.dat")
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & "\" & GameModeManager.ActiveGameMode.ContentPath & "\" & PATH, "*.dat")
LoadMove(file)
Next
End If

@ -21,7 +21,7 @@ Namespace Items.Berries
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -19,7 +19,7 @@ Namespace Items.Berries
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.KeyItems
Public Overrides Sub Use()
If OldRod.IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
Dim s As String = "version=2"
Dim s As String = ""
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
Core.CurrentScreen = Core.CurrentScreen.PreScreen
@ -22,8 +22,8 @@ Namespace Items.KeyItems
Dim p As Pokemon = Nothing
Dim pokeFile As String = "poke\" & Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If OldGameModeManager.MapFileExists(pokeFile) = True Then
Dim pokeFile As String = Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If System.IO.File.Exists(GameModeManager.GetPokeFilePath(pokeFile)) = True Then
p = Spawner.GetPokemon(Screen.Level.LevelFile, Spawner.EncounterMethods.GoodRod, False)
End If
@ -38,10 +38,13 @@ Namespace Items.KeyItems
PokemonShiny = "S"
End If
If Core.Random.Next(0, 3) <> 0 Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
If Core.Random.Next(0, 3) <> 0 Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
Dim LookingOffset As New Vector3(0)
Select Case Screen.Camera.GetPlayerFacingDirection()
Select Case Screen.Camera.GetPlayerFacingDirection()
Case 0
LookingOffset.Z = -1
Case 1
@ -54,12 +57,12 @@ Namespace Items.KeyItems
Dim spawnPosition As Vector3 = New Vector3(Screen.Camera.Position.X + LookingOffset.X, Screen.Camera.Position.Y, Screen.Camera.Position.Z + LookingOffset.Z)
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
If endRotation > 3 Then
endRotation = endRotation - 4
End If
s &= vbNewLine & "@player.showrod(1)" & vbNewLine &
s &= "@player.showrod(1)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(Oh!~A bite!)" & vbNewLine &
"@player.hiderod" & vbNewLine &
@ -70,17 +73,15 @@ Namespace Items.KeyItems
"@text.show(The wild " & p.OriginalName & "~attacked!)" & vbNewLine &
"@npc.remove(1337)" & vbNewLine &
"@battle.setvar(divebattle,true)" & vbNewLine &
"@battle.wild(" & p.GetSaveData() & ")" & vbNewLine &
":end"
"@battle.wild(" & p.GetSaveData() & ")"
Else
s &= vbNewLine & "@player.showrod(1)" & vbNewLine &
s &= "@player.showrod(1)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(No, there's nothing here...)" & vbNewLine &
"@player.hiderod" & vbNewLine &
":end"
"@player.hiderod"
End If
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Screen.TextBox.Show("Now is not the time~to use that.", {}, True, True)
End If

@ -14,16 +14,16 @@ Namespace Items.KeyItems
Public Overrides Sub Use()
If IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
Dim s As String = "version=2"
Dim s As String = ""
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
Core.CurrentScreen = Core.CurrentScreen.PreScreen
End While
Dim p As Pokemon = Nothing
Dim pokeFile As String = "poke\" & Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If OldGameModeManager.MapFileExists(pokeFile) = True Then
Dim pokeFile As String = Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If System.IO.File.Exists(GameModeManager.GetPokeFilePath(pokeFile)) = True Then
p = Spawner.GetPokemon(Screen.Level.LevelFile, Spawner.EncounterMethods.OldRod, False)
End If
@ -38,10 +38,13 @@ Namespace Items.KeyItems
PokemonShiny = "S"
End If
If Core.Random.Next(0, 3) <> 0 Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
If Core.Random.Next(0, 3) <> 0 Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
Dim LookingOffset As New Vector3(0)
Select Case Screen.Camera.GetPlayerFacingDirection()
Select Case Screen.Camera.GetPlayerFacingDirection()
Case 0
LookingOffset.Z = -1
Case 1
@ -54,12 +57,12 @@ Namespace Items.KeyItems
Dim spawnPosition As Vector3 = New Vector3(Screen.Camera.Position.X + LookingOffset.X, Screen.Camera.Position.Y, Screen.Camera.Position.Z + LookingOffset.Z)
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
If endRotation > 3 Then
endRotation = endRotation - 4
End If
s &= vbNewLine & "@player.showrod(0)" & vbNewLine &
s &= "@player.showrod(0)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(Oh!~A bite!)" & vbNewLine &
"@player.hiderod" & vbNewLine &
@ -70,17 +73,15 @@ Namespace Items.KeyItems
"@text.show(The wild " & p.OriginalName & "~attacked!)" & vbNewLine &
"@npc.remove(1337)" & vbNewLine &
"@battle.setvar(divebattle,true)" & vbNewLine &
"@battle.wild(" & p.GetSaveData() & ")" & vbNewLine &
":end"
"@battle.wild(" & p.GetSaveData() & ")"
Else
s &= vbNewLine & "@player.showrod(0)" & vbNewLine &
s &= "@player.showrod(0)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(No, there's nothing here...)" & vbNewLine &
"@player.hiderod" & vbNewLine &
":end"
"@player.hiderod"
End If
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Screen.TextBox.Show("Now is not the time~to use that.", {}, True, True)
End If

@ -14,16 +14,16 @@ Namespace Items.KeyItems
Public Overrides Sub Use()
If OldRod.IsInfrontOfWater() = True And Screen.Level.Surfing = False And Screen.Level.Riding = False Then
Dim s As String = "version=2"
Dim s As String = ""
While Core.CurrentScreen.Identification <> Screen.Identifications.OverworldScreen
Core.CurrentScreen = Core.CurrentScreen.PreScreen
End While
Dim p As Pokemon = Nothing
Dim pokeFile As String = "poke\" & Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If OldGameModeManager.MapFileExists(pokeFile) = True Then
Dim pokeFile As String = Screen.Level.LevelFile.Remove(Screen.Level.LevelFile.Length - 4, 4) & ".poke"
If System.IO.File.Exists(GameModeManager.GetPokeFilePath(pokeFile)) = True Then
p = Spawner.GetPokemon(Screen.Level.LevelFile, Spawner.EncounterMethods.SuperRod, False)
End If
@ -38,10 +38,13 @@ Namespace Items.KeyItems
PokemonShiny = "S"
End If
If Core.Random.Next(0, 3) <> 0 Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
If Core.Random.Next(0, 3) <> 0 Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "suction cups" Or
Core.Player.Pokemons(0).Ability.Name.ToLower() = "sticky hold" Then
Dim LookingOffset As New Vector3(0)
Select Case Screen.Camera.GetPlayerFacingDirection()
Select Case Screen.Camera.GetPlayerFacingDirection()
Case 0
LookingOffset.Z = -1
Case 1
@ -54,12 +57,12 @@ Namespace Items.KeyItems
Dim spawnPosition As Vector3 = New Vector3(Screen.Camera.Position.X + LookingOffset.X, Screen.Camera.Position.Y, Screen.Camera.Position.Z + LookingOffset.Z)
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
Dim endRotation As Integer = Screen.Camera.GetPlayerFacingDirection() + 2
If endRotation > 3 Then
endRotation = endRotation - 4
End If
s &= vbNewLine & "@player.showrod(2)" & vbNewLine &
s &= "@player.showrod(2)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(Oh!~A bite!)" & vbNewLine &
"@player.hiderod" & vbNewLine &
@ -70,17 +73,15 @@ Namespace Items.KeyItems
"@text.show(The wild " & p.OriginalName & "~attacked!)" & vbNewLine &
"@npc.remove(1337)" & vbNewLine &
"@battle.setvar(divebattle,true)" & vbNewLine &
"@battle.wild(" & p.GetSaveData() & ")" & vbNewLine &
":end"
"@battle.wild(" & p.GetSaveData() & ")"
Else
s &= vbNewLine & "@player.showrod(2)" & vbNewLine &
s &= "@player.showrod(2)" & vbNewLine &
"@text.show(. . . . . . . . . .)" & vbNewLine &
"@text.show(No, there's nothing here...)" & vbNewLine &
"@player.hiderod" & vbNewLine &
":end"
"@player.hiderod"
End If
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Screen.TextBox.Show("Now is not the time~to use that.", {}, True, True)
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -23,17 +23,16 @@ Namespace Items.Medicine
Public Overrides Function UseOnPokemon(ByVal PokeIndex As Integer) As Boolean
Dim Pokemon As Pokemon = Core.Player.Pokemons(PokeIndex)
If Pokemon.Level < CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) And Pokemon.IsEgg() = False Then
If Pokemon.Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) And Pokemon.IsEgg() = False Then
Dim beforeHP As Integer = Pokemon.MaxHP
Pokemon.LevelUp(False)
Pokemon.Experience = Pokemon.NeedExperience(Pokemon.Level)
If Pokemon.Status = net.Pokemon3D.Game.Pokemon.StatusProblems.Fainted Then
Pokemon.Status = net.Pokemon3D.Game.Pokemon.StatusProblems.None
If Pokemon.Status = Pokemon.StatusProblems.Fainted Then
Pokemon.Status = Pokemon.StatusProblems.None
Pokemon.HP = (Pokemon.MaxHP - beforeHP).Clamp(1, 999)
End If
Dim s As String =
"version=2" & vbNewLine &
"@sound.play(success_small)" & vbNewLine &
"@text.show(" & Pokemon.GetDisplayName() & " reached~level " & Pokemon.Level & "!)" & vbNewLine
@ -80,7 +79,7 @@ Namespace Items.Medicine
Core.SetScreen(sc)
CType(sc, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {})
PlayerStatistics.Track("[17]Medicine Items used", 1)
Return True

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -14,7 +14,7 @@ Namespace Items.Medicine
End Sub
Public Overrides Sub Use()
If CBool(OldGameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
If CBool(GameModeManager.GetGameRuleValue("CanUseHealItem", "1")) = False Then
Screen.TextBox.Show("Cannot use heal items.", {}, False, False)
Exit Sub
End If

@ -26,8 +26,7 @@ Namespace Items.Standard
Dim yFinish As String = (Screen.Camera.Position.Y + 2.9F).ToString().ReplaceDecSeparator()
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & t & ")
Dim s As String = "@text.show(" & t & ")
@level.wait(20)
@camera.activatethirdperson
@camera.reset
@ -49,10 +48,9 @@ Namespace Items.Standard
End If
s &= vbNewLine &
"@level.update
@screen.fadein
:end"
@screen.fadein"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Screen.TextBox.Show("Cannot use the Escape~Rope here!", {}, True, True)
End If

@ -1224,7 +1224,7 @@ Public Class Pokemon
''' Checks if a requested Pokémon data file exists.
''' </summary>
Public Shared Function PokemonDataExists(ByVal Number As Integer) As Boolean
Return System.IO.File.Exists(OldGameModeManager.GetPokemonDataFilePath(Number.ToString() & ".dat"))
Return IO.File.Exists(GameModeManager.GetDataFilePath("Pokemon\" & Number.ToString() & ".dat"))
End Function
''' <summary>
@ -1552,7 +1552,7 @@ Public Class Pokemon
Case "nickname"
Me.NickName = tagValue
Case "level"
Me.Level = CInt(tagValue).Clamp(1, CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")))
Me.Level = CInt(tagValue).Clamp(1, CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")))
Case "ot"
Me.OT = tagValue
Case "ability"
@ -2087,8 +2087,8 @@ Public Class Pokemon
Return "Egg"
Else
If Me.NickName = "" Then
If OldLocalization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return OldLocalization.GetString("pokemon_name_" & Me.Name)
If Localization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return Localization.GetString("pokemon_name_" & Me.Name)
Else
Return Me.Name
End If
@ -2102,8 +2102,8 @@ Public Class Pokemon
''' Returns the properly translated name of a Pokémon if defined in the language files.
''' </summary>
Public Function GetName() As String
If OldLocalization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return OldLocalization.GetString("pokemon_name_" & Me.Name)
If Localization.TokenExists("pokemon_name_" & Me.Name) = True Then
Return Localization.GetString("pokemon_name_" & Me.Name)
Else
Return Me.Name
End If
@ -2133,7 +2133,7 @@ Public Class Pokemon
While Me.Experience >= NeedExperience(Me.Level + 1)
Me.LevelUp(LearnRandomAttack)
End While
Me.Level = Me.Level.Clamp(1, CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")))
Me.Level = Me.Level.Clamp(1, CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")))
End Sub
''' <summary>

@ -48,8 +48,7 @@
Dim newPosition As New Vector2(0, 1)
Dim s As String = "version=2" & vbNewLine &
"@pokemon.cry(" & p.Number & ")" & vbNewLine
Dim s As String = "@pokemon.cry(" & p.Number & ")" & vbNewLine
If CType(Screen.Camera, OverworldCamera).ThirdPerson = False Then
If reaction.HasNotification = True Then
@ -60,7 +59,7 @@
s &= "@camera.deactivatethirdperson" & vbNewLine
End If
s &= "@text.show(" & reaction.GetMessage(p) & ")" & vbNewLine
s &= "@text.show(" & reaction.GetMessage(p) & ")"
Else
Dim preYaw As Single = Screen.Camera.Yaw
If reaction.HasNotification = True Then
@ -72,9 +71,8 @@
End If
s &= "@text.show(" & reaction.GetMessage(p) & ")" & vbNewLine
s &= "@camera.activatethirdperson" & vbNewLine
s &= "@camera.setyaw(" & preYaw & ")" & vbNewLine
s &= "@camera.setyaw(" & preYaw & ")"
End If
s &= ":end"
Return s
End Function
@ -110,6 +108,7 @@
s &= "@camera.deactivatethirdperson" & vbNewLine
s &= "@text.show(" & message & ")" & vbNewLine &
"@options.show(Yes,No)" & vbNewLine &
":select:<options.result>" & vbNewLine &
":when:Yes" & vbNewLine &
"@text.show(Your Pokémon handed over~the " & item.Name & "!)" & vbNewLine &
"@item.give(" & PickupItemID & ",1)" & vbNewLine &
@ -117,7 +116,7 @@
":when:No" & vbNewLine &
"@text.show(Your Pokémon kept~the item happily.)" & vbNewLine &
"@pokemon.addfriendship(0,10)" & vbNewLine &
":endwhen" & vbNewLine
":endselect" & vbNewLine
Else
s &= "@camera.setposition(" & newPosition.X & ",1," & newPosition.Y & ")" & vbNewLine
s &= "@entity.showmessagebulb(" & CInt(MessageBulb.NotifcationTypes.Question).ToString() & "|" & cPosition.X + offset.X & "|" & cPosition.Y + 0.7F & "|" & cPosition.Z + offset.Y & ")" & vbNewLine
@ -126,6 +125,7 @@
s &= "@text.show(" & message & ")" & vbNewLine &
"@options.show(Yes,No)" & vbNewLine &
":select:<options.result>" & vbNewLine &
":when:Yes" & vbNewLine &
"@text.show(Your Pokémon handed over~the " & item.Name & "!)" & vbNewLine &
"@item.give(" & PickupItemID & ",1)" & vbNewLine &
@ -133,7 +133,7 @@
":when:No" & vbNewLine &
"@text.show(Your Pokémon kept~the item happily.)" & vbNewLine &
"@pokemon.addfriendship(0,10)" & vbNewLine &
":endwhen" & vbNewLine
":endselect" & vbNewLine
s &= "@camera.activatethirdperson" & vbNewLine
End If
s &= ":end"
@ -229,7 +229,7 @@
Private Shared Function GetStatusConditionReaction(ByVal p As Pokemon) As ReactionContainer
Select Case p.Status
Case Pokemon.StatusProblems.BadPoison, Pokemon.StatusProblems.Poison
Return New ReactionContainer("<name> is shivering~with the effects of being~poisoned.", MessageBulb.NotifcationTypes.Poisoned)
Return New ReactionContainer("<name> is~shivering with the effects~of being poisoned.", MessageBulb.NotifcationTypes.Poisoned)
Case Pokemon.StatusProblems.Burn
Return New ReactionContainer("<name>'s burn~looks painful!", MessageBulb.NotifcationTypes.Poisoned)
Case Pokemon.StatusProblems.Freeze
@ -398,13 +398,13 @@
r = New ReactionContainer("<name> is sniffing~at the floor.", MessageBulb.NotifcationTypes.Question)
End If
Case 18
r = New ReactionContainer("<name> is peering~down.", MessageBulb.NotifcationTypes.Question)
r = New ReactionContainer("<name> is~peering down.", MessageBulb.NotifcationTypes.Question)
Case 19
r = New ReactionContainer("<name> seems~to be wandering around.", MessageBulb.NotifcationTypes.Note)
Case 20
r = New ReactionContainer("<name> is looking~around absentmindedly.", MessageBulb.NotifcationTypes.Waiting)
r = New ReactionContainer("<name> is~looking around absentmindedly.", MessageBulb.NotifcationTypes.Waiting)
Case 21
r = New ReactionContainer("<name> is relaxing~comfortably.", MessageBulb.NotifcationTypes.Friendly)
r = New ReactionContainer("<name> is~relaxing comfortably.", MessageBulb.NotifcationTypes.Friendly)
Case 22
If IsInside() = True Then
r = New ReactionContainer("<name> is sniffing~at the floor.", MessageBulb.NotifcationTypes.Waiting)
@ -481,7 +481,7 @@
r = New ReactionContainer("Your Pokémon was surprised~that you suddenly spoke to it!", MessageBulb.NotifcationTypes.Exclamation)
Case 42
If Not p.Item Is Nothing Then
r = New ReactionContainer("<name> almost forgot~it was holding~that " & p.Item.Name & "!", MessageBulb.NotifcationTypes.Question)
r = New ReactionContainer("<name> almost~forgot it was holding~that " & p.Item.Name & "!", MessageBulb.NotifcationTypes.Question)
End If
Case 43
If IceAround() = True Then
@ -492,7 +492,7 @@
r = New ReactionContainer("Your Pokémon almost slipped~and fell over!", MessageBulb.NotifcationTypes.Exclamation)
End If
Case 45
r = New ReactionContainer("<name> sensed something~strange and was surprised!", MessageBulb.NotifcationTypes.Question)
r = New ReactionContainer("<name> sensed~something strange and~was surprised!", MessageBulb.NotifcationTypes.Question)
Case 46
r = New ReactionContainer("Your Pokémon is looking~around restlessly for~something.", MessageBulb.NotifcationTypes.Question)
Case 47
@ -502,7 +502,7 @@
r = New ReactionContainer("Sniff, sniff!~Is there something nearby?", MessageBulb.NotifcationTypes.Question)
End If
Case 49
r = New ReactionContainer("<name> is wandering~around and searching~for something.", MessageBulb.NotifcationTypes.Question)
r = New ReactionContainer("<name> is~wandering around and~searching for something.", MessageBulb.NotifcationTypes.Question)
Case 50
r = New ReactionContainer("<name> is sniffing~at <player.name>.", MessageBulb.NotifcationTypes.Friendly)
Case 51
@ -694,7 +694,7 @@
Public Shared Sub Load()
SpecialReactionList.Clear()
Dim path As String = OldGameModeManager.GetContentFilePath("Data\interactions.dat")
Dim path As String = GameModeManager.GetDataFilePath("interactions.dat")
Security.FileValidation.CheckFileValid(path, False, "PokemonInteractions.vb")
Dim data() As String = System.IO.File.ReadAllLines(path)
@ -819,11 +819,8 @@
Public Function Match(ByVal p As Pokemon) As Boolean
If MapFiles.Count > 0 Then
If MapFiles.Any(Function(m As String)
Return m.ToLowerInvariant() = Screen.Level.LevelFile.ToLowerInvariant()
End Function) Then
If MapFiles.Contains(Screen.Level.LevelFile) = False Then
Return False
End If
End If
@ -879,7 +876,7 @@
Public Shared Sub CheckForRandomPickup()
'Checks if the first Pokémon in the party is following the player:
If Screen.Level.ShowOverworldPokemon = True And CBool(OldGameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
If Screen.Level.ShowOverworldPokemon = True And CBool(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then
'Checks if the player has a Pokémon:
If Core.Player.Pokemons.Count > 0 And Screen.Level.Surfing = False And Screen.Level.Riding = False And Screen.Level.ShowOverworldPokemon = True And Not Core.Player.GetWalkPokemon() Is Nothing Then
If Core.Player.GetWalkPokemon().Status = Pokemon.StatusProblems.None Then
@ -1046,7 +1043,7 @@
'If an item got generated, assign it to the global value to store it until the player interacts with the Pokémon. Also store the individual value.
If newItemID > -1 Then
Logger.Debug("Pokémon picks up item (" & Item.GetItemByID(newItemID).Name & ")")
Logger.Debug("152", "Pokémon picks up item (" & Item.GetItemByID(newItemID).Name & ")")
PickupItemID = newItemID
PickupIndividualValue = Core.Player.GetWalkPokemon().IndividualValue
SoundManager.PlaySound("pickup")

@ -113,7 +113,7 @@ Public Class PokemonForms
''' <param name="Number">The number of the Pokémon.</param>
''' <param name="AdditionalData">The additional data of the Pokémon.</param>
Public Shared Function GetPokemonDataFile(ByVal Number As Integer, ByVal AdditionalData As String) As String
Dim FileName As String = OldGameModeManager.GetPokemonDataFilePath(Number.ToString() & ".dat")
Dim FileName As String = GameModeManager.GetDataFilePath("Pokemon\" & Number.ToString() & ".dat")
Dim Addition As String = ""
@ -129,7 +129,7 @@ Public Class PokemonForms
If System.IO.File.Exists(FileName) = False Then
Number = 10
FileName = OldGameModeManager.GetPokemonDataFilePath(Number.ToString() & ".dat")
FileName = GameModeManager.GetDataFilePath("Pokemon\" & Number.ToString() & ".dat")
End If
Return FileName

@ -36,7 +36,7 @@ Public Class RoamingPokemon
End If
If CInt(data(2)) = worldID Or worldID = -1 Then
Dim regionsFile As String = OldGameModeManager.GetScriptPath("worldmap\roaming_regions.dat")
Dim regionsFile As String = GameModeManager.GetScriptPath("worldmap\roaming_regions.dat")
Security.FileValidation.CheckFileValid(regionsFile, False, "RoamingPokemon.vb")
Dim worldList As List(Of String) = System.IO.File.ReadAllLines(regionsFile).ToList()

@ -41,7 +41,7 @@ Public Class Spawner
pokeFile = InputPokeFile
End If
Dim pokeFilePath As String = OldGameModeManager.GetPokeFilePath(pokeFile)
Dim pokeFilePath As String = GameModeManager.GetPokeFilePath(pokeFile)
If System.IO.File.Exists(pokeFilePath) = True Then
Security.FileValidation.CheckFileValid(pokeFilePath, False, "Spawner.vb")
@ -170,8 +170,8 @@ Public Class Spawner
addLevel = CInt(Math.Floor(level / 5))
End If
level += addLevel
If level > CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
level = CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100"))
If level > CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
level = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100"))
End If
Dim p As Pokemon = Pokemon.GetPokemonByID(Pokemons(i))

@ -114,7 +114,9 @@ Public Class FontManager
Return loadedGameJoltFont
Else
hasLoadedGameJoltFont = True
loadedGameJoltFont = Content.Load(Of SpriteFont)("SharedResources\Fonts\GameJolt")
Dim contentmanager As ContentManager = New ContentManager(GameInstance.Services, "SharedResources\Fonts")
loadedGameJoltFont = contentmanager.Load(Of SpriteFont)("Gamejolt")
'loadedGameJoltFont = Content.Load(Of SpriteFont)("SharedResources\Fonts\GameJolt")
loadedGameJoltFont.DefaultCharacter = " "c
Return loadedGameJoltFont
End If

@ -1,6 +1,6 @@
Public Class OldGameModeManager
Public Class GameModeManager
Private Shared GameModeList As New List(Of OldGameMode)
Private Shared GameModeList As New List(Of GameMode)
Private Shared GameModePointer As Integer = 0
Public Shared Initialized As Boolean = False
@ -23,8 +23,8 @@ Public Class OldGameModeManager
Initialized = True
End Sub
Public Shared Function GetGameMode(ByVal GameModeDirectory As String) As OldGameMode
For Each GameMode As OldGameMode In GameModeList
Public Shared Function GetGameMode(ByVal GameModeDirectory As String) As GameMode
For Each GameMode As GameMode In GameModeList
If GameMode.DirectoryName = GameModeDirectory Then
Return GameMode
End If
@ -48,7 +48,7 @@ Public Class OldGameModeManager
''' <param name="GameModeDirectoryName">The directory resembeling the new GameMode.</param>
Public Shared Sub SetGameModePointer(ByVal GameModeDirectoryName As String)
For i = 0 To GameModeList.Count - 1
Dim GameMode As OldGameMode = GameModeList(i)
Dim GameMode As GameMode = GameModeList(i)
If GameMode.DirectoryName = GameModeDirectoryName Then
GameModePointer = i
Logger.Debug("---Set pointer to """ & GameModeDirectoryName & """!---")
@ -71,7 +71,7 @@ Public Class OldGameModeManager
''' Checks if a GameMode exists.
''' </summary>
Public Shared Function GameModeExists(ByVal GameModePath As String) As Boolean
For Each GameMode As OldGameMode In GameModeList
For Each GameMode As GameMode In GameModeList
If GameMode.DirectoryName = GameModePath Then
Return True
End If
@ -85,7 +85,7 @@ Public Class OldGameModeManager
''' </summary>
''' <param name="Path">The path of the GameMode directory.</param>
Private Shared Sub AddGameMode(ByVal Path As String)
Dim newGameMode As New OldGameMode(Path & "\GameMode.dat")
Dim newGameMode As New GameMode(Path & "\GameMode.dat")
If newGameMode.IsValid = True Then
GameModeList.Add(newGameMode)
End If
@ -110,7 +110,7 @@ Public Class OldGameModeManager
End If
If doCreateKolbenMode = True Then
Dim kolbenMode As OldGameMode = OldGameMode.GetKolbenGameMode()
Dim kolbenMode As GameMode = GameMode.GetKolbenGameMode()
kolbenMode.SaveToFile(GameController.GamePath & "\GameModes\Kolben\GameMode.dat")
End If
End Sub
@ -120,7 +120,7 @@ Public Class OldGameModeManager
''' <summary>
''' Returns the currently active GameMode.
''' </summary>
Public Shared ReadOnly Property ActiveGameMode() As OldGameMode
Public Shared ReadOnly Property ActiveGameMode() As GameMode
Get
If GameModeList.Count - 1 >= GameModePointer Then
Return GameModeList(GameModePointer)
@ -132,7 +132,7 @@ Public Class OldGameModeManager
''' <summary>
''' Returns the GameRules of the currently active GameMode.
''' </summary>
Public Shared Function GetGameRules() As List(Of OldGameMode.GameRule)
Public Shared Function GetGameRules() As List(Of GameMode.GameRule)
Return ActiveGameMode.GameRules
End Function
@ -142,14 +142,14 @@ Public Class OldGameModeManager
''' <param name="RuleName">The RuleName to search for.</param>
Public Shared Function GetGameRuleValue(ByVal RuleName As String, ByVal DefaultValue As String) As String
start:
Dim rules As List(Of OldGameMode.GameRule) = GetGameRules()
For Each rule As OldGameMode.GameRule In rules
Dim rules As List(Of GameMode.GameRule) = GetGameRules()
For Each rule As GameMode.GameRule In rules
If rule.RuleName.ToLower() = RuleName.ToLower() Then
Return rule.RuleValue
End If
Next
ActiveGameMode.GameRules.Add(New OldGameMode.GameRule(RuleName, DefaultValue))
ActiveGameMode.GameRules.Add(New GameMode.GameRule(RuleName, DefaultValue))
GoTo start
Return ""
@ -161,18 +161,18 @@ start:
''' <param name="levelfile">The levelfile containing the map.</param>
Public Shared Function GetMapPath(ByVal levelFile As String) As String
If ActiveGameMode.IsDefaultGamemode = True Then
Return GameController.GamePath & OldGameMode.DefaultMapPath & levelFile
Return GameController.GamePath & GameMode.DefaultMapPath & levelFile
End If
If System.IO.File.Exists(GameController.GamePath & ActiveGameMode.MapPath & levelFile) = True Then
Return GameController.GamePath & ActiveGameMode.MapPath & levelFile
End If
If GameController.GamePath & OldGameMode.DefaultMapPath & levelFile <> GameController.GamePath & ActiveGameMode.MapPath & levelFile Then
If GameController.GamePath & GameMode.DefaultMapPath & levelFile <> GameController.GamePath & ActiveGameMode.MapPath & levelFile Then
Logger.Log(Logger.LogTypes.Message, "Map file: """ & ActiveGameMode.MapPath & levelFile & """ does not exist in the GameMode. The game tries to load the normal file at ""\maps\" & levelFile & """.")
End If
Return GameController.GamePath & OldGameMode.DefaultMapPath & levelFile
Return GameController.GamePath & GameMode.DefaultMapPath & levelFile
End Function
''' <summary>
@ -181,18 +181,18 @@ start:
''' <param name="scriptFile">The file that contains the script information.</param>
Public Shared Function GetScriptPath(ByVal scriptFile As String) As String
If ActiveGameMode.IsDefaultGamemode = True Then
Return GameController.GamePath & OldGameMode.DefaultScriptPath & scriptFile
Return GameController.GamePath & GameMode.DefaultScriptPath & scriptFile
End If
If System.IO.File.Exists(GameController.GamePath & ActiveGameMode.ScriptPath & scriptFile) = True Then
Return GameController.GamePath & ActiveGameMode.ScriptPath & scriptFile
End If
If GameController.GamePath & OldGameMode.DefaultScriptPath & scriptFile <> GameController.GamePath & ActiveGameMode.ScriptPath & scriptFile Then
If GameController.GamePath & GameMode.DefaultScriptPath & scriptFile <> GameController.GamePath & ActiveGameMode.ScriptPath & scriptFile Then
Logger.Log(Logger.LogTypes.Message, "Script file: """ & ActiveGameMode.ScriptPath & scriptFile & """ does not exist in the GameMode. The game tries to load the normal file at ""\Scripts\" & scriptFile & """.")
End If
Return GameController.GamePath & OldGameMode.DefaultScriptPath & scriptFile
Return GameController.GamePath & GameMode.DefaultScriptPath & scriptFile
End Function
''' <summary>
@ -201,18 +201,18 @@ start:
''' <param name="pokeFile">The file that contains the Wild Pokémon Definitions.</param>
Public Shared Function GetPokeFilePath(ByVal pokeFile As String) As String
If ActiveGameMode.IsDefaultGamemode = True Then
Return GameController.GamePath & OldGameMode.DefaultPokeFilePath & pokeFile
Return GameController.GamePath & GameMode.DefaultPokeFilePath & pokeFile
End If
If System.IO.File.Exists(GameController.GamePath & ActiveGameMode.PokeFilePath & pokeFile) = True Then
Return GameController.GamePath & ActiveGameMode.PokeFilePath & pokeFile
End If
If GameController.GamePath & OldGameMode.DefaultPokeFilePath & pokeFile <> GameController.GamePath & ActiveGameMode.PokeFilePath & pokeFile Then
If GameController.GamePath & GameMode.DefaultPokeFilePath & pokeFile <> GameController.GamePath & ActiveGameMode.PokeFilePath & pokeFile Then
Logger.Log(Logger.LogTypes.Message, "Poke file: """ & ActiveGameMode.PokeFilePath & pokeFile & """ does not exist in the GameMode. The game tries to load the normal file at ""\maps\poke\" & pokeFile & """.")
End If
Return GameController.GamePath & OldGameMode.DefaultPokeFilePath & pokeFile
Return GameController.GamePath & GameMode.DefaultPokeFilePath & pokeFile
End Function
''' <summary>
@ -221,18 +221,18 @@ start:
''' <param name="PokemonDataFile">The file which contains the Pokémon information.</param>
Public Shared Function GetPokemonDataFilePath(ByVal PokemonDataFile As String) As String
If ActiveGameMode.IsDefaultGamemode = True Then
Return GameController.GamePath & OldGameMode.DefaultPokemonDataPath & PokemonDataFile
Return GameController.GamePath & GameMode.DefaultPokemonDataPath & PokemonDataFile
End If
If System.IO.File.Exists(GameController.GamePath & ActiveGameMode.PokemonDataPath & PokemonDataFile) = True Then
Return GameController.GamePath & ActiveGameMode.PokemonDataPath & PokemonDataFile
End If
If GameController.GamePath & OldGameMode.DefaultPokemonDataPath & PokemonDataFile <> GameController.GamePath & ActiveGameMode.PokemonDataPath & PokemonDataFile Then
If GameController.GamePath & GameMode.DefaultPokemonDataPath & PokemonDataFile <> GameController.GamePath & ActiveGameMode.PokemonDataPath & PokemonDataFile Then
'Logger.Log(Logger.LogTypes.Message, "Pokemon data file: """ & ActiveGameMode.PokemonDataPath & PokemonDataFile & """ does not exist in the GameMode. The game tries to load the normal file at ""\Content\Pokemon\Data\" & PokemonDataFile & """.")
End If
Return GameController.GamePath & OldGameMode.DefaultPokemonDataPath & PokemonDataFile
Return GameController.GamePath & GameMode.DefaultPokemonDataPath & PokemonDataFile
End Function
Public Shared Function GetLocalizationsPath(ByVal TokensFile As String) As String
@ -240,7 +240,7 @@ start:
Return GameController.GamePath & ActiveGameMode.LocalizationsPath & TokensFile
End If
Return GameController.GamePath & OldGameMode.DefaultLocalizationsPath & TokensFile
Return GameController.GamePath & GameMode.DefaultLocalizationsPath & TokensFile
End Function
''' <summary>
@ -249,14 +249,14 @@ start:
''' <param name="ContentFile">The stub file path to the Content file.</param>
Public Shared Function GetContentFilePath(ByVal ContentFile As String) As String
If ActiveGameMode.IsDefaultGamemode = True Then
Return GameController.GamePath & OldGameMode.DefaultContentPath & ContentFile
Return GameController.GamePath & GameMode.DefaultContentPath & ContentFile
End If
If System.IO.File.Exists(GameController.GamePath & ActiveGameMode.ContentPath & ContentFile) = True Then
Return GameController.GamePath & ActiveGameMode.ContentPath & ContentFile
End If
Return GameController.GamePath & OldGameMode.DefaultContentPath & ContentFile
Return GameController.GamePath & GameMode.DefaultContentPath & ContentFile
End Function
''' <summary>
@ -265,9 +265,9 @@ start:
''' <param name="levelFile">The map file to look for.</param>
Public Shared Function MapFileExists(ByVal levelFile As String) As Boolean
Dim path As String = GameController.GamePath & ActiveGameMode.MapPath & levelFile
Dim defaultPath As String = GameController.GamePath & OldGameMode.DefaultMapPath & levelFile
Dim defaultPath As String = GameController.GamePath & GameMode.DefaultMapPath & levelFile
If ActiveGameMode.IsDefaultGamemode = True Then
path = GameController.GamePath & OldGameMode.DefaultMapPath & levelFile
path = GameController.GamePath & GameMode.DefaultMapPath & levelFile
End If
Return System.IO.File.Exists(path) Or System.IO.File.Exists(defaultPath)
@ -279,9 +279,9 @@ start:
''' <param name="contentFile">The Content file to look for.</param>
Public Shared Function ContentFileExists(ByVal contentFile As String) As Boolean
Dim path As String = GameController.GamePath & ActiveGameMode.ContentPath & contentFile
Dim defaultPath As String = GameController.GamePath & OldGameMode.DefaultContentPath & contentFile
Dim defaultPath As String = GameController.GamePath & GameMode.DefaultContentPath & contentFile
If ActiveGameMode.IsDefaultGamemode = True Then
path = GameController.GamePath & OldGameMode.DefaultContentPath & contentFile
path = GameController.GamePath & GameMode.DefaultContentPath & contentFile
End If
Return System.IO.File.Exists(path) Or System.IO.File.Exists(defaultPath)
@ -291,7 +291,7 @@ start:
End Class
Public Class OldGameMode
Public Class GameMode
Private _loaded As Boolean = False
Private _usedFileName As String = ""
@ -542,12 +542,12 @@ Public Class OldGameMode
''' <summary>
''' Returns the default Kolben Game Mode.
''' </summary>
Public Shared Function GetKolbenGameMode() As OldGameMode
Public Shared Function GetKolbenGameMode() As GameMode
Dim SkinColors As List(Of Color) = {New Color(248, 176, 32), New Color(248, 216, 88), New Color(56, 88, 200), New Color(216, 96, 112), New Color(56, 88, 152), New Color(239, 90, 156)}.ToList()
Dim SkinFiles As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
Dim SkinNames As List(Of String) = {"Ethan", "Lyra", "Nate", "Rosa", "Hilbert", "Hilda"}.ToList()
Dim gameMode As New OldGameMode("Pokemon 3D", "The normal game mode.", GameController.GAMEVERSION, "Kolben Games", "\maps\", "\Scripts\", "\maps\poke\", "\Content\Pokemon\Data\", "\Content\", "\Content\Localization\", New List(Of GameRule),
Dim gameMode As New GameMode("Pokemon 3D", "The normal game mode.", GameController.GAMEVERSION, "Kolben Games", "\maps\", "\Scripts\", "\maps\poke\", "\Content\Pokemon\Data\", "\Content\", "\Content\Localization\", New List(Of GameRule),
"yourroom.dat", New Vector3(1.0F, 0.1F, 3.0F), MathHelper.PiOver2, "Your Room", "", New Color(59, 123, 165), "0", "welcome", SkinColors, SkinFiles, SkinNames)
Dim gameRules As New List(Of GameRule)

@ -135,8 +135,8 @@
End Function
Private Shared Function TryAddGameModeMusic(ByVal Name As String) As Boolean
Dim musicfileXNB As String = GameController.GamePath & OldGameModeManager.ActiveGameMode.ContentPath & "Songs\" & Name & ".xnb"
Dim musicfileMP3 As String = GameController.GamePath & OldGameModeManager.ActiveGameMode.ContentPath & "Songs\" & Name & ".mp3"
Dim musicfileXNB As String = GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & "Songs\" & Name & ".xnb"
Dim musicfileMP3 As String = GameController.GamePath & GameModeManager.ActiveGameMode.ContentPath & "Songs\" & Name & ".mp3"
If System.IO.File.Exists(musicfileXNB) = True Or System.IO.File.Exists(musicfileMP3) = True Then
Return AddSong(Name, False)
End If
@ -315,12 +315,12 @@
If MediaPlayer.IsMuted = True Then
MediaPlayer.Pause()
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_music_off"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_music_off"), 12, FontManager.MainFont, Color.White)
Else
If SongExistFlag = True Then
MediaPlayer.Resume()
End If
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_music_on"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_music_on"), 12, FontManager.MainFont, Color.White)
End If
End If
End Sub

@ -45,7 +45,7 @@ Public Class NewMusicManager
Dim filePath As String = GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & ".mp3"
s = CType(ctor.Invoke({songName, filePath, 0}), Song)
Else
Logger.Log("296", Logger.LogTypes.ErrorMessage, "MusicManager.vb: Song """ & GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & """ was not found!")
Logger.Log("296", Logger.LogTypes.ErrorMessage, "NewMusicManager.vb: Song """ & GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & songName & """ was not found!")
Return Nothing
End If
Else
@ -57,7 +57,7 @@ Public Class NewMusicManager
Return _songs(tKey.ToLower())
Catch ex As Exception
Logger.Log("269", Logger.LogTypes.Warning, "MusicManager.vb: File at ""Songs\" & songName & """ is not a valid song file!")
Logger.Log("269", Logger.LogTypes.Warning, "NewMusicManager.vb: File at ""Songs\" & songName & """ is not a valid song file!")
Return Nothing
End Try
End Function
@ -365,12 +365,12 @@ Public Class MusicPlayer
If MediaPlayer.IsMuted = True Then
MediaPlayer.Pause()
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_music_off"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_music_off"), 12, FontManager.MainFont, Color.White)
Else
If _currentSong <> "" Then
MediaPlayer.Resume()
End If
Core.GameMessage.ShowMessage(OldLocalization.GetString("game_message_music_on"), 12, FontManager.MainFont, Color.White)
Core.GameMessage.ShowMessage(Localization.GetString("game_message_music_on"), 12, FontManager.MainFont, Color.White)
End If
End If
End Sub

@ -1,211 +1,104 @@
Public Class SoundManager
Shared Muted As Boolean = False
#Region "Resource Management"
Private Shared SoundFiles As New Dictionary(Of String, CSound)
Public Shared Volume As Single = 1.0F
Private Shared _sounds As New Dictionary(Of String, SoundEffect)
Class CSound
''' <summary>
''' Returns a sound object from the sound's name.
''' </summary>
''' <param name="soundName">The sound name.</param>
''' <returns></returns>
Public Shared Function GetSound(ByVal soundName As String) As SoundEffect
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Sounds\" & soundName, ".xnb,.wav")
Private _sound As SoundEffect
Private _origin As String
Dim tKey As String = cContent.RootDirectory & "\Sounds\" & soundName
Public Sub New(ByVal Sound As SoundEffect, ByVal Origin As String)
Me._sound = Sound
Me._origin = Origin
End Sub
If _sounds.ContainsKey(tKey.ToLower()) = False Then
Dim s As SoundEffect = Nothing
Public Property Sound() As SoundEffect
Get
Return Me._sound
End Get
Set(value As SoundEffect)
Me._sound = value
End Set
End Property
Public Property Origin() As String
Get
Return Me._origin
End Get
Set(value As String)
Me._origin = value
End Set
End Property
Public ReadOnly Property IsStandardSong() As Boolean
Get
Return (Me.Origin = "Content")
End Get
End Property
End Class
Private Shared Function AddSound(ByVal Name As String, ByVal forceReplace As Boolean) As Boolean
Try
Dim cContent As ContentManager = ContentPackManager.GetContentManager("Sounds\" & Name, ".xnb,.wav")
Dim loadSound As Boolean = False
Dim removeSound As Boolean = False
If SoundFiles.ContainsKey(Name.ToLower()) = False Then
loadSound = True
ElseIf forceReplace = True And SoundFiles(Name.ToLower()).IsStandardSong = True Then
removeSound = True
loadSound = True
End If
If loadSound = True Then
Dim sound As SoundEffect = Nothing
If System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & Name & ".xnb") = False Then
If System.IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & Name & ".wav") = True Then
Using stream As System.IO.Stream = System.IO.File.Open(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & Name & ".wav", IO.FileMode.OpenOrCreate)
sound = SoundEffect.FromStream(stream)
End Using
Else
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Sound at """ & GameController.GamePath & "\" & cContent.RootDirectory & "\Songs\" & Name & """ was not found!")
Return False
End If
If IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & soundName & ".xnb") = False Then
If IO.File.Exists(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & soundName & ".wav") = True Then
Using stream As IO.Stream = IO.File.Open(GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & soundName & ".wav", IO.FileMode.OpenOrCreate)
s = SoundEffect.FromStream(stream)
End Using
Else
sound = cContent.Load(Of SoundEffect)("Sounds\" & Name)
End If
If Not sound Is Nothing Then
If removeSound = True Then
SoundFiles.Remove(Name.ToLower())
End If
SoundFiles.Add(Name.ToLower(), New CSound(sound, cContent.RootDirectory))
Logger.Log("263", Logger.LogTypes.Warning, "SoundManager.vb: Sound at """ & GameController.GamePath & "\" & cContent.RootDirectory & "\Sounds\" & soundName & """ was not found!")
Return Nothing
End If
Else
s = cContent.Load(Of SoundEffect)("Sounds\" & soundName)
End If
Catch ex As Exception
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: File at ""Sounds\" & Name & """ is not a valid sound file. They have to be a PCM wave file, mono or stereo, 8 or 16 bit and have to have a sample rate between 8k and 48k Hz.")
Return False
End Try
Return True
_sounds.Add(tKey.ToLower(), s)
End If
Return _sounds(tKey.ToLower())
End Function
''' <summary>
''' Clears loaded sounds.
''' </summary>
Public Shared Sub Clear()
SoundFiles.Clear()
_sounds.Clear()
End Sub
Private Shared Function GetSoundEffect(ByVal Name As String) As SoundEffect
Select Case Name.ToLower()
Case "healing"
Name = "pokemon_heal"
End Select
#End Region
If SoundFiles.ContainsKey(Name.ToLower()) = True Then
Return SoundFiles(Name.ToLower()).Sound
Else
If TryAddGameModeSound(Name) = True Then
Return SoundFiles(Name.ToLower()).Sound
Else
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Cannot find sound file """ & Name & """. Return nothing.")
Return Nothing
End If
End If
End Function
Public Shared Property Volume() As Single = 1.0F
Private Shared Function TryAddGameModeSound(ByVal Name As String) As Boolean
Dim soundfile As String = GameController.GamePath & OldGameModeManager.ActiveGameMode.ContentPath & "Sounds\" & Name & ".xnb"
If System.IO.File.Exists(soundfile) = True Then
Return AddSound(Name, False)
End If
Return False
End Function
Private Shared _muted As Boolean = False
Public Shared Sub LoadSounds(ByVal forceReplace As Boolean)
For Each soundfile As String In System.IO.Directory.GetFiles(GameController.GamePath & "\Content\Sounds\")
If soundfile.EndsWith(".xnb") = True Then
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
AddSound(soundfile, forceReplace)
End If
Next
If Core.GameOptions.ContentPackNames.Count > 0 Then
For Each c As String In Core.GameOptions.ContentPackNames
Dim path As String = GameController.GamePath & "\ContentPacks\" & c & "\Sounds\"
If System.IO.Directory.Exists(path) = True Then
For Each soundfile As String In System.IO.Directory.GetFiles(path, "*.*", IO.SearchOption.AllDirectories)
If soundfile.EndsWith(".xnb") = True Then
soundfile = System.IO.Path.GetFileNameWithoutExtension(soundfile)
AddSound(soundfile, forceReplace)
End If
Next
End If
Next
End If
Public Shared Sub PlaySound(ByVal sound As String)
InternalPlay(sound, 0F, 0F, _Volume, False)
End Sub
Public Shared Sub PlaySound(ByVal Sound As String, ByVal Pitch As Single, ByVal Pan As Single, ByVal Volume As Single, ByVal stopMusic As Boolean)
If Muted = False Then
Dim s As SoundEffect = Nothing
Public Shared Sub PlaySound(ByVal sound As String, ByVal stopMusic As Boolean)
InternalPlay(sound, 0F, 0F, _Volume, stopMusic)
End Sub
s = GetSoundEffect(Sound)
Public Shared Sub PlaySound(ByVal sound As String, ByVal pitch As Single, ByVal pan As Single, ByVal volume As Single, ByVal stopMusic As Boolean)
InternalPlay(sound, pitch, pan, volume, stopMusic)
End Sub
If Not s Is Nothing Then
Logger.Debug("SoundEffect [" & Sound & "]")
Public Shared Sub PlayPokemonCry(ByVal number As Integer)
InternalPlay("Cries\" & number.ToString(), 0F, 0F, _Volume * 0.6F, False)
End Sub
Public Shared Sub PlayPokemonCry(ByVal number As Integer, ByVal pitch As Single, ByVal pan As Single)
InternalPlay("Cries\" & number.ToString(), pitch, pan, _Volume * 0.6F, False)
End Sub
Public Shared Sub PlayPokemonCry(ByVal number As Integer, ByVal pitch As Single, ByVal pan As Single, ByVal volume As Single)
InternalPlay("Cries\" & number.ToString(), pitch, pan, volume * 0.6F, False)
End Sub
Private Shared Sub InternalPlay(ByVal sound As String, ByVal pitch As Single, ByVal pan As Single, ByVal volume As Single, ByVal stopMusic As Boolean)
If _muted = False Then
Dim s As SoundEffect = GetSound(sound)
If s IsNot Nothing Then
If CanPlaySound() = True Then
s.Play(Volume, Pitch, Pan)
s.Play(volume, pitch, pan)
If stopMusic = True Then
MusicManager.PauseForSound(s)
MusicPlayer.GetInstance().PauseForSound(s)
End If
Else
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Failed to play sound: No audio devices found.")
Logger.Log("267", Logger.LogTypes.Warning, "SoundManager.vb: Failed to play sound: No audio devices found.")
End If
End If
End If
End Sub
Public Shared Sub PlayPokemonCry(ByVal Number As Integer)
PlayPokemonCry(Number, 0.0F, 0F, Volume)
''' <summary>
''' Mutes the sound player.
''' </summary>
''' <param name="muted">The mute state.</param>
Public Shared Sub Mute(ByVal muted As Boolean)
_muted = muted
End Sub
Public Shared Sub PlayPokemonCry(ByVal Number As Integer, ByVal Pitch As Single, ByVal Pan As Single)
PlayPokemonCry(Number, Pitch, Pan, Volume)
End Sub
Public Shared Sub PlayPokemonCry(ByVal Number As Integer, ByVal Pitch As Single, ByVal Pan As Single, ByVal Volume As Single)
If Muted = False Then
Dim soundfile As String = "Cries\" & Number & ".xnb"
If OldGameModeManager.ContentFileExists("Sounds\" & soundfile) = True Then
AddSound("Cries\" & Number, False)
Dim s As SoundEffect = GetSoundEffect("Cries\" & Number.ToString())
If CanPlaySound() = True Then
If Not s Is Nothing Then
s.Play(Volume * 0.6F, Pitch, Pan)
End If
Else
Logger.Log(Logger.LogTypes.Warning, "SoundManager.vb: Failed to play sound: No audio devices found.")
End If
End If
End If
End Sub
Public Shared Sub Mute(ByVal mute As Boolean)
Muted = mute
End Sub
Public Shared Sub PlaySound(ByVal Sound As String)
PlaySound(Sound, 0.0F, 0.0F, Volume, False)
End Sub
Public Shared Sub PlaySound(ByVal Sound As String, ByVal stopMusic As Boolean)
PlaySound(Sound, 0.0F, 0.0F, Volume, stopMusic)
End Sub
Public Shared Sub ReloadSounds()
SoundFiles.Clear()
LoadSounds(False)
End Sub
#Region "Can play sound"
Private Declare Function GetAudioOutputDevices Lib "winmm.dll" Alias "waveOutGetNumDevs" () As Integer
@ -213,4 +106,6 @@
Return GetAudioOutputDevices() > 0
End Function
#End Region
End Class

@ -5,7 +5,7 @@
Dim BattleScreen As BattleSystem.BattleScreen
Dim index As Integer = 0
Dim textIndex As Integer = 0
Dim Text() As String = {OldLocalization.GetString("black_out_screen_line1"), vbNewLine, " ", OldLocalization.GetString("black_out_screen_line2"), OldLocalization.GetString("black_out_screen_line3"), OldLocalization.GetString("black_out_screen_line4"), OldLocalization.GetString("black_out_screen_line5")}
Dim Text() As String = {Localization.GetString("black_out_screen_line1"), vbNewLine, " ", Localization.GetString("black_out_screen_line2"), Localization.GetString("black_out_screen_line3"), Localization.GetString("black_out_screen_line4"), Localization.GetString("black_out_screen_line5")}
Dim ready As Boolean = False
Dim delay As Single = 0.2F
@ -17,7 +17,7 @@
Me.BattleScreen = BattleScreen
Me.Identification = Identifications.BlackOutScreen
Me.IsGameOver = CBool(OldGameModeManager.GetGameRuleValue("GameOverAt0Pokemon", "0"))
Me.IsGameOver = CBool(GameModeManager.GetGameRuleValue("GameOverAt0Pokemon", "0"))
FromBattle = True
End Sub
@ -26,7 +26,7 @@
Me.PreScreen = currentScreen
Me.Identification = Identifications.BlackOutScreen
Me.IsGameOver = CBool(OldGameModeManager.GetGameRuleValue("GameOverAt0Pokemon", "0"))
Me.IsGameOver = CBool(GameModeManager.GetGameRuleValue("GameOverAt0Pokemon", "0"))
FromBattle = False
End Sub
@ -63,7 +63,7 @@
CType(BattleScreen.SavedOverworld.Camera, OverworldCamera).YawLocked = False
Screen.Camera.Yaw = MathHelper.Pi
Screen.Camera.Position = New Vector3(CSng(positionString(0).Replace(".", GameController.DecSeparator)), CSng(positionString(1).Replace(".", GameController.DecSeparator)), CSng(positionString(2).Replace(".", GameController.DecSeparator)))
CType(BattleScreen.SavedOverworld.OverworldScreen, OverworldScreen).ActionScript.Scripts.Clear()
Construct.Controller.GetInstance().Reset()
Core.SetScreen(New TransitionScreen(Me, BattleScreen.SavedOverworld.OverworldScreen, Color.Black, False))
Else
@ -79,7 +79,7 @@
CType(BattleScreen.SavedOverworld.Camera, OverworldCamera).YawLocked = False
Screen.Camera.Yaw = MathHelper.Pi
Screen.Camera.Position = New Vector3(CSng(positionString(0).Replace(".", GameController.DecSeparator)), CSng(positionString(1).Replace(".", GameController.DecSeparator)), CSng(positionString(2).Replace(".", GameController.DecSeparator)))
CType(BattleScreen.SavedOverworld.OverworldScreen, OverworldScreen).ActionScript.Scripts.Clear()
Construct.Controller.GetInstance().Reset()
While Core.CurrentScreen.Identification <> Identifications.OverworldScreen
Core.SetScreen(Core.CurrentScreen.PreScreen)

@ -52,10 +52,10 @@ Public Class CreditsScreen
Private Sub InitializeCreditsPages(ByVal ending As String)
CreditsPages.Add(New CreditsPage("Pokémon3D Staff", Color.White, Color.Black))
CreditsPages.Add(New CreditsPage("Pokémon", Color.White, Color.Black, {"made by", "Nintendo", "Game Freak", "The Pokémon Company"}.ToList()))
If OldGameModeManager.ActiveGameMode.IsDefaultGamemode = True Then
If GameModeManager.ActiveGameMode.IsDefaultGamemode = True Then
CreditsPages.Add(New CreditsPage("Pokémon 3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games"}.ToList()))
Else
CreditsPages.Add(New CreditsPage("Pokémon 3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games", "", "GameMode made by", OldGameModeManager.ActiveGameMode.Author}.ToList()))
CreditsPages.Add(New CreditsPage("Pokémon 3D", Color.White, Color.Black, {"Trademark (TM) 2012 - " & COPYRIGHTYEAR, "made by Kolben Games", "", "GameMode made by", GameModeManager.ActiveGameMode.Author}.ToList()))
End If
CreditsPages.Add(New CreditsPage("Team Kolben", Color.White, Color.Black, {"Nils Drescher", "Andrew Leach", "Marc Boisvert-Dupras", "Grant Garrett", "Jason Houston", "Daniel Billing", "Benjamin Smith", "Hunter Graves"}.ToList()))
CreditsPages.Add(New CreditsPage("Director", Color.White, Color.Black, {"Nils Drescher"}.ToList()))

@ -65,8 +65,8 @@
Core.SpriteBatch.DrawString(FontManager.MainFont, t, New Vector2(CInt(Core.windowSize.Width / 2) - 180, 100), Color.Black)
Canvas.DrawRectangle(New Rectangle(CInt(Core.windowSize.Width / 2) - 285, 0, 570, 57), New Color(56, 56, 56))
Core.SpriteBatch.DrawString(FontManager.MainFont, OldLocalization.GetString("donation_screen_donators") & ": ", New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Donators:").X / 2, 20), Color.White)
Core.SpriteBatch.DrawString(FontManager.MainFont, OldLocalization.GetString("donation_screen_backadvice"), New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Press E to close").X / 2, 640), Color.White)
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("donation_screen_donators") & ": ", New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Donators:").X / 2, 20), Color.White)
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("donation_screen_backadvice"), New Vector2(CInt(Core.windowSize.Width / 2) - FontManager.MainFont.MeasureString("Press E to close").X / 2, 640), Color.White)
End Sub
End Class

@ -52,16 +52,16 @@
Me.Buttons.Clear()
Me.Labels.Clear()
Me.Labels.Add(New Label(OldLocalization.GetString("apricorn_screen_apricorns"), New Vector2(80, 128), FontManager.MainFont))
Me.Labels.Add(New Label(Localization.GetString("apricorn_screen_apricorns"), New Vector2(80, 128), FontManager.MainFont))
Select Case Me.State
Case States.Wait
Me.Labels.Add(New Label(OldLocalization.GetString("apricorn_screen_producing").Replace("~", vbNewLine), New Vector2(100, 200), FontManager.MainFont))
Me.Labels.Add(New Label(OldLocalization.GetString("apricorn_screen_backadvice"), New Vector2(100, 260), Color.DarkGray, FontManager.MainFont))
Me.Labels.Add(New Label(Localization.GetString("apricorn_screen_producing").Replace("~", vbNewLine), New Vector2(100, 200), FontManager.MainFont))
Me.Labels.Add(New Label(Localization.GetString("apricorn_screen_backadvice"), New Vector2(100, 260), Color.DarkGray, FontManager.MainFont))
Case States.CanGive
Dim T As Texture2D = TextureManager.GetTexture("Items\ItemSheet")
Me.Labels.Add(New Label(OldLocalization.GetString("apricorn_screen_choose_apricorns"), New Vector2(100, 200), FontManager.MainFont))
Me.Labels.Add(New Label(Localization.GetString("apricorn_screen_choose_apricorns"), New Vector2(100, 200), FontManager.MainFont))
Dim RedApricorn As ButtonIcon = New ButtonIcon(AddressOf Me.GiveApricorn, "0 / " & Core.Player.Inventory.GetItemAmount(85), FontManager.MainFont, T, New Rectangle(240, 72, 24, 24), New Vector2(98, 240), New Size(48, 48), "85")
Dim BlueApricorn As ButtonIcon = New ButtonIcon(AddressOf Me.GiveApricorn, "0 / " & Core.Player.Inventory.GetItemAmount(89), FontManager.MainFont, T, New Rectangle(336, 72, 24, 24), New Vector2(98, 304), New Size(48, 48), "89")
Dim YellowApricorn As ButtonIcon = New ButtonIcon(AddressOf Me.GiveApricorn, "0 / " & Core.Player.Inventory.GetItemAmount(92), FontManager.MainFont, T, New Rectangle(384, 72, 24, 24), New Vector2(98, 368), New Size(48, 48), "92")
@ -70,15 +70,15 @@
Dim BlackApricorn As ButtonIcon = New ButtonIcon(AddressOf Me.GiveApricorn, "0 / " & Core.Player.Inventory.GetItemAmount(99), FontManager.MainFont, T, New Rectangle(48, 96, 24, 24), New Vector2(162, 240), New Size(48, 48), "99")
Dim PinkApricorn As ButtonIcon = New ButtonIcon(AddressOf Me.GiveApricorn, "0 / " & Core.Player.Inventory.GetItemAmount(101), FontManager.MainFont, T, New Rectangle(72, 96, 24, 24), New Vector2(162, 304), New Size(48, 48), "101")
Dim GiveButton As ButtonIcon = New ButtonIcon(AddressOf Me.Give, OldLocalization.GetString("apricorn_screen_ok"), FontManager.MainFont, mainTexture, New Rectangle(48, 128, 16, 16), New Vector2(162, 496), New Size(48, 48), "OK")
Dim GiveButton As ButtonIcon = New ButtonIcon(AddressOf Me.Give, Localization.GetString("apricorn_screen_ok"), FontManager.MainFont, mainTexture, New Rectangle(48, 128, 16, 16), New Vector2(162, 496), New Size(48, 48), "OK")
GiveButton.Enabled = False
Dim ClearButton As ButtonIcon = New ButtonIcon(AddressOf Me.ClearApricorns, OldLocalization.GetString("apricorn_screen_clear"), FontManager.MainFont, mainTexture, New Rectangle(64, 128, 16, 16), New Vector2(162, 432), New Size(48, 48), "Clear")
Dim ClearButton As ButtonIcon = New ButtonIcon(AddressOf Me.ClearApricorns, Localization.GetString("apricorn_screen_clear"), FontManager.MainFont, mainTexture, New Rectangle(64, 128, 16, 16), New Vector2(162, 432), New Size(48, 48), "Clear")
Buttons.AddRange({RedApricorn, BlueApricorn, YellowApricorn, GreenApricorn, WhiteApricorn, BlackApricorn, PinkApricorn, ClearButton, GiveButton})
Case States.CanTake
Dim TakeButton As ButtonIcon = New ButtonIcon(AddressOf Me.Take, OldLocalization.GetString("apricorn_screen_take"), FontManager.MainFont, mainTexture, New Rectangle(48, 128, 16, 16), New Vector2(98, 450), New Size(48, 48))
Dim TakeButton As ButtonIcon = New ButtonIcon(AddressOf Me.Take, Localization.GetString("apricorn_screen_take"), FontManager.MainFont, mainTexture, New Rectangle(48, 128, 16, 16), New Vector2(98, 450), New Size(48, 48))
Buttons.AddRange({TakeButton})
Me.Labels.Add(New Label(OldLocalization.GetString("apricorn_screen_ready"), New Vector2(100, 200), FontManager.MainFont))
Me.Labels.Add(New Label(Localization.GetString("apricorn_screen_ready"), New Vector2(100, 200), FontManager.MainFont))
End Select
End If
End Sub
@ -316,7 +316,7 @@
Private Sub Take()
Me.State = States.CanGive
Dim text As String = Core.Player.Name & OldLocalization.GetString("apricorn_screen_obtain")
Dim text As String = Core.Player.Name & Localization.GetString("apricorn_screen_obtain")
If CInt(Apricorns(0)) > 0 Then
Core.Player.Inventory.AddItem(159, CInt(Apricorns(0)))

@ -178,7 +178,7 @@
Dim mPressed As Boolean = False
Private Sub ShowMenu()
Me.MenuID = 0
ChooseBox.Show({"Select", OldLocalization.GetString("pokemon_screen_summary"), OldLocalization.GetString("pokemon_screen_back")}, 0, {})
ChooseBox.Show({"Select", Localization.GetString("pokemon_screen_summary"), Localization.GetString("pokemon_screen_back")}, 0, {})
End Sub
Public Overrides Sub Draw()

@ -243,9 +243,9 @@
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\BagPack"), New Rectangle(592, 126, 48, 48), New Rectangle(24 * bagIndex, 150, 24, 24), Color.White)
Core.SpriteBatch.DrawString(FontManager.InGameFont, OldLocalization.GetString("inventory_menu_bag"), New Vector2(646, 134), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("inventory_menu_backadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(OldLocalization.GetString("inventory_menu_backadvice")).X - 330, 580), Color.DarkGray)
Core.SpriteBatch.DrawString(FontManager.MainFont, OldLocalization.GetString("inventory_menu_items") & ":" & vbNewLine & OldLocalization.GetString("item_category_" & Me.bagIdentifier.ToString()), New Vector2(640, 446), Color.Black)
Core.SpriteBatch.DrawString(FontManager.InGameFont, Localization.GetString("inventory_menu_bag"), New Vector2(646, 134), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("inventory_menu_backadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(Localization.GetString("inventory_menu_backadvice")).X - 330, 580), Color.DarkGray)
Core.SpriteBatch.DrawString(FontManager.MainFont, Localization.GetString("inventory_menu_items") & ":" & vbNewLine & Localization.GetString("item_category_" & Me.bagIdentifier.ToString()), New Vector2(640, 446), Color.Black)
Canvas.DrawScrollBar(New Vector2(555, 120), cItems.Count, 6, scrollIndex(bagIndex), New Size(4, 390), False, TextureManager.GetTexture(mainTexture, New Rectangle(112, 12, 1, 1)), TextureManager.GetTexture(mainTexture, New Rectangle(113, 12, 1, 1)))

@ -70,7 +70,7 @@
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(Core.windowSize.Width / 2) - 180 + offSetX, 240 + offSetY, 320, 64))
Core.SpriteBatch.DrawString(FontManager.InGameFont, Text, New Vector2(CInt(Core.windowSize.Width / 2) - (FontManager.InGameFont.MeasureString(Text).X / 2) - 10 + offSetX, 276 + offSetY), Color.Black)
If MenuItems(i) = OldLocalization.GetString("item_detail_screen_trash") Then
If MenuItems(i) = Localization.GetString("item_detail_screen_trash") Then
Dim trashText As String = trashValue & "/" & Core.Player.Inventory.GetItemAmount(Me.Item.ID)
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(Core.windowSize.Width / 2) + 180 + offSetX, 240 + offSetY, 128, 64))
@ -93,7 +93,7 @@
If Controls.Down(True, True, False, True) = True Then
If Controls.ShiftDown() = True Then
If MenuItems(index) = OldLocalization.GetString("item_detail_screen_trash") Then
If MenuItems(index) = Localization.GetString("item_detail_screen_trash") Then
trashValue += 1
End If
Else
@ -102,7 +102,7 @@
End If
If Controls.Up(True, True, False, True) = True Then
If Controls.ShiftDown() = True Then
If MenuItems(index) = OldLocalization.GetString("item_detail_screen_trash") Then
If MenuItems(index) = Localization.GetString("item_detail_screen_trash") Then
trashValue -= 1
End If
Else
@ -123,7 +123,7 @@
index = CInt(MathHelper.Clamp(index, 0, MenuItems.Count - 1))
If MenuItems(index) = OldLocalization.GetString("item_detail_screen_trash") Then
If MenuItems(index) = Localization.GetString("item_detail_screen_trash") Then
If Controls.Right(True, False, True, False) = True Then
trashValue += 1
End If
@ -136,16 +136,16 @@
If Controls.Accept() = True Then
Select Case MenuItems(index)
Case OldLocalization.GetString("item_detail_screen_use")
Case Localization.GetString("item_detail_screen_use")
Item.Use()
Case OldLocalization.GetString("item_detail_screen_give")
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me.Item, AddressOf GiveItem, OldLocalization.GetString("item_detail_screen_give_item") & Me.Item.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
Case Localization.GetString("item_detail_screen_give")
Dim selScreen = New PartyScreen(Core.CurrentScreen, Me.Item, AddressOf GiveItem, Localization.GetString("item_detail_screen_give_item") & Me.Item.Name, True) With {.Mode = Screens.UI.ISelectionScreen.ScreenMode.Selection, .CanExit = True}
AddHandler selScreen.SelectedObject, AddressOf GiveItemHandler
Core.SetScreen(selScreen)
Case OldLocalization.GetString("item_detail_screen_trash")
Case Localization.GetString("item_detail_screen_trash")
Core.Player.Inventory.RemoveItem(Me.Item.ID, trashValue)
Case OldLocalization.GetString("item_detail_screen_back")
Case Localization.GetString("item_detail_screen_back")
Core.SetScreen(Me.PreScreen)
End Select
End If
@ -175,9 +175,9 @@
TextBox.reDelay = 0.0F
Dim t As String = OldLocalization.GetString("pokemon_screen_give_item_1") & Item.Name & OldLocalization.GetString("pokemon_screen_give_item_2") & Pokemon.GetDisplayName() & OldLocalization.GetString("pokemon_screen_give_item_3")
Dim t As String = Localization.GetString("pokemon_screen_give_item_1") & Item.Name & Localization.GetString("pokemon_screen_give_item_2") & Pokemon.GetDisplayName() & Localization.GetString("pokemon_screen_give_item_3")
If Not reItem Is Nothing Then
t &= OldLocalization.GetString("pokemon_screen_give_item_4") & reItem.Name & OldLocalization.GetString("pokemon_screen_give_item_5")
t &= Localization.GetString("pokemon_screen_give_item_4") & reItem.Name & Localization.GetString("pokemon_screen_give_item_5")
Else
t &= "."
End If
@ -189,14 +189,14 @@
Private Sub CreateMenuItems()
If Item.CanBeUsed = True And canUse = True Then
MenuItems.Add(OldLocalization.GetString("item_detail_screen_use"))
MenuItems.Add(Localization.GetString("item_detail_screen_use"))
End If
If Item.CanBeHold = True Then
MenuItems.Add(OldLocalization.GetString("item_detail_screen_give"))
MenuItems.Add(Localization.GetString("item_detail_screen_give"))
End If
If Item.ItemType <> Game.Items.ItemTypes.KeyItems And Item.CanBeTossed = True Then
MenuItems.Add(OldLocalization.GetString("item_detail_screen_trash"))
MenuItems.Add(Localization.GetString("item_detail_screen_trash"))
End If
MenuItems.Add(OldLocalization.GetString("item_detail_screen_back"))
MenuItems.Add(Localization.GetString("item_detail_screen_back"))
End Sub
End Class

@ -4,8 +4,8 @@
Inherits Screen
Public Shared TradeRequestData As Integer = -1 ' This data gets set to the network ID of the user that requests a trade.
Public Shared BattleRequestData As Integer = -1 ' This data gets set to the network ID of the user that requests a battle.
Public Shared TradeRequestData As Integer = -1 'This data gets set to the network ID of the user that requests a trade.
Public Shared BattleRequestData As Integer = -1 'This data gets set to the network ID of the user that requests a battle.
Enum MenuScreens As Integer
Main = 0
@ -42,31 +42,31 @@
Me.MouseVisible = True
If Core.Player.IsGamejoltSave = True Then
If Core.Player.IsGameJoltSave = True Then
Me.UserBanned = LogInScreen.UserBanned(Core.GameJoltSave.GameJoltID)
Dim APICall As New APICall(AddressOf GotPublicKeys)
APICall.GetKeys(False, "saveStorageV" & GameJolt.GamejoltSave.Version & "|*|*")
APICall.GetKeys(False, "saveStorageV" & GameJolt.GamejoltSave.VERSION & "|*|*")
End If
If Me.UserBanned = False Then
FunctionList.Add("PSS")
If API.LoggedIn = True And Core.Player.IsGamejoltSave = True And Core.Player.Pokemons.Count > 0 Then
If API.LoggedIn = True And Core.Player.IsGameJoltSave = True And Core.Player.Pokemons.Count > 0 Then
FunctionList.Add("Battle Spot")
End If
If (ActionScript.IsRegistered("pokegear_card_GTS") = True Or GameController.IS_DEBUG_ACTIVE = True) = True And API.LoggedIn = True And Core.Player.IsGamejoltSave = True Then
If (Construct.Framework.RegisterHandler.IsRegistered("pokegear_card_GTS") = True Or GameController.IS_DEBUG_ACTIVE = True) = True And API.LoggedIn = True And Core.Player.IsGameJoltSave = True Then
FunctionList.Add("GTS")
End If
If API.LoggedIn = True And Core.Player.IsGamejoltSave = True And Core.Player.Pokemons.Count > 0 Then
If API.LoggedIn = True And Core.Player.IsGameJoltSave = True And Core.Player.Pokemons.Count > 0 Then
FunctionList.Add("Wondertrade")
End If
End If
FunctionList.Add("Phone")
If ActionScript.IsRegistered("pokegear_card_radio") = True Or GameController.IS_DEBUG_ACTIVE = True Then
If Construct.Framework.RegisterHandler.IsRegistered("pokegear_card_radio") = True Or GameController.IS_DEBUG_ACTIVE = True Then
FunctionList.Add("Radio")
End If
FunctionList.Add("Worldmap")
If ActionScript.IsRegistered("pokegear_card_minimap") = True Or GameController.IS_DEBUG_ACTIVE = True Then
If Construct.Framework.RegisterHandler.IsRegistered("pokegear_card_minimap") = True Or GameController.IS_DEBUG_ACTIVE = True Then
FunctionList.Add("Minimap")
End If
@ -74,7 +74,7 @@
FunctionList.Add("Statistics")
End If
If ActionScript.IsRegistered("pokegear_card_frontier") = True Or GameController.IS_DEBUG_ACTIVE = True Then
If Construct.Framework.RegisterHandler.IsRegistered("pokegear_card_frontier") = True Or GameController.IS_DEBUG_ACTIVE = True Then
FunctionList.Add("Frontier")
End If
@ -83,7 +83,7 @@
Select Case EntryMode
Case EntryModes.MainMenu
SoundManager.PlaySound("Pokegear\pokegear_on")
Me.menuIndex = Player.Temp.LastPokegearPage
Me.menuIndex = Core.Player.Temp.PokegearPage
Case EntryModes.DisplayUser
InitializeUserView(Data)
Case EntryModes.TradeRequest
@ -94,7 +94,7 @@
End Sub
Private Sub InitializeUserView(ByVal Data() As Object)
' Data: NetworkID, GameJoltID, Name, Sprite
'Data: NetworkID, GameJoltID, Name, Sprite
UserEmblem = Nothing
UserSprite = CType(Data(3), Texture2D)
@ -107,7 +107,7 @@
End Sub
Private Sub InitializeTradeRequest(ByVal Data() As Object)
' Data: NetworkID of the requester, GameJoltID
'Data: NetworkID of the requester, GameJoltID
menuIndex = MenuScreens.TradeRequest
Me.TradeRequestNetworkID = CInt(Data(0))
@ -117,7 +117,7 @@
End Sub
Private Sub InitializeBattleRequest(ByVal Data() As Object)
' Data: NetworkID of the requester, GameJoltID
'Data: NetworkID of the requester, GameJoltID
menuIndex = MenuScreens.BattleRequest
Me.BattleRequestNetworkID = CInt(Data(0))
@ -181,7 +181,7 @@
If Me.menuIndex <> MenuScreens.TradeRequest Then
If KeyBoardHandler.KeyPressed(KeyBindings.SpecialKey) = True Or ControllerHandler.ButtonPressed(Buttons.Y) = True Then
If Me.menuIndex <> MenuScreens.UserView Then Player.Temp.LastPokegearPage = Me.menuIndex
If Me.menuIndex <> MenuScreens.UserView Then Core.Player.Temp.PokegearPage = Me.menuIndex
SoundManager.PlaySound("Pokegear\pokegear_off")
Core.SetScreen(Me.PreScreen)
End If
@ -427,8 +427,8 @@
Core.SpriteBatch.DrawString(FontManager.MiniFont, "PSS Ranklist", New Vector2(CInt(startPos.X + 50), CInt(startPos.Y + 45)), Color.Black)
If Core.Player.IsGamejoltSave = True Then
' Draw own information:
If Core.Player.IsGameJoltSave = True Then
'Draw own information:
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220), CInt(startPos.Y + 40), 16, 32), New Rectangle(96, 112, 8, 16), Color.White)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220 + 16), CInt(startPos.Y + 40), 304, 32), New Rectangle(102, 112, 4, 16), Color.White)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220 + 16 + 304), CInt(startPos.Y + 40), 16, 32), New Rectangle(104, 112, 8, 16), Color.White)
@ -555,7 +555,7 @@
Me.RankingList.Clear()
InitializedRanklist = True
If Core.Player.IsGamejoltSave = True And UserBanned = False Then
If Core.Player.IsGameJoltSave = True And UserBanned = False Then
Dim APICall As New APICall(AddressOf GotDataRanklist)
APICall.FetchTable(100, "14908")
@ -621,8 +621,8 @@
Core.SpriteBatch.DrawString(FontManager.MiniFont, "PSS Friendlist", New Vector2(CInt(startPos.X + 50), CInt(startPos.Y + 45)), Color.Black)
If Core.Player.IsGamejoltSave = True Then
' Draw own information:
If Core.Player.IsGameJoltSave = True Then
'Draw own information:
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220), CInt(startPos.Y + 40), 16, 32), New Rectangle(96, 112, 8, 16), Color.White)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220 + 16), CInt(startPos.Y + 40), 304, 32), New Rectangle(102, 112, 4, 16), Color.White)
Core.SpriteBatch.Draw(TextureManager.GetTexture("GUI\Menus\pokegear"), New Rectangle(CInt(startPos.X + 220 + 16 + 304), CInt(startPos.Y + 40), 16, 32), New Rectangle(104, 112, 8, 16), Color.White)
@ -1009,7 +1009,7 @@
Dim sameServer As Boolean = False
Dim sameConnection As Boolean = False
If Core.Player.IsGamejoltSave = True Then
If Core.Player.IsGameJoltSave = True Then
If Not UserEmblem Is Nothing Then
sameConnection = True
End If
@ -1089,7 +1089,7 @@
Dim sameServer As Boolean = False
Dim sameConnection As Boolean = False
If Core.Player.IsGamejoltSave = True Then
If Core.Player.IsGameJoltSave = True Then
If Not UserEmblem Is Nothing Then
sameConnection = True
End If
@ -1252,9 +1252,8 @@
Call_Flag = "calling"
Player.Temp.PokegearPage = Me.menuIndex
Core.SetScreen(Me.PreScreen)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript("phone\" & chosenID, 0)
Construct.Controller.GetInstance().RunFromFile("phone\" & chosenID, {})
End Sub
Private Sub InitializePhone()
@ -1262,7 +1261,7 @@
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
Dim contactData() As String = System.IO.File.ReadAllLines(GameController.GamePath & "\Scripts\phone\contacts.dat")
Dim contactData() As String = System.IO.File.ReadAllLines(GameModeManager.GetDataFilePath("contacts.dat"))
For Each r As String In reg
If r.StartsWith("phone_contact_") = True Then
@ -1292,10 +1291,12 @@
End Structure
Public Shared Sub CallID(ByVal ID As String, ByVal checkRegistered As Boolean, ByVal checkLocation As Boolean)
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
Dim reg() As String = Core.Player.RegisterData.Split(CChar(", "))
Security.FileValidation.CheckFileValid(GameController.GamePath & "\Scripts\phone\contacts.dat", False, "PokegearScreen.vb")
Dim contactData() As String = System.IO.File.ReadAllLines(GameController.GamePath & "\Scripts\phone\contacts.dat")
Dim contactsFile As String = GameModeManager.GetDataFilePath("contacts.dat")
Security.FileValidation.CheckFileValid(contactsFile, False, "PokegearScreen.vb")
Dim contactData() As String = System.IO.File.ReadAllLines(contactsFile)
Dim tempContacs As New List(Of Contact)
@ -1336,7 +1337,7 @@
Call_Flag = "receiving"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript("phone\" & chosenID, 0)
Construct.Controller.GetInstance().RunFromFile("phone\" & chosenID, {})
End If
End Sub
@ -1345,10 +1346,12 @@
Exit Sub
End If
Dim reg() As String = Core.Player.RegisterData.Split(CChar(","))
Dim reg() As String = Core.Player.RegisterData.Split(CChar(", "))
Security.FileValidation.CheckFileValid(GameController.GamePath & "\Scripts\phone\contacts.dat", False, "PokegearScreen.vb")
Dim contactData() As String = System.IO.File.ReadAllLines(GameController.GamePath & "\Scripts\phone\contacts.dat")
Dim contactsFile As String = GameModeManager.GetDataFilePath("contacts.dat")
Security.FileValidation.CheckFileValid(contactsFile, False, "PokegearScreen.vb")
Dim contactData() As String = System.IO.File.ReadAllLines(contactsFile)
Dim tempContacs As New List(Of Contact)
@ -1387,7 +1390,7 @@
Call_Flag = "receiving"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript("phone\" & chosenID, 0)
Construct.Controller.GetInstance().RunFromFile("phone\" & chosenID, {})
End If
End Sub
@ -1460,17 +1463,17 @@
Me.InitializedFrontier = True
If ActionScript.IsRegistered("gold ability") = True Then
If Construct.Framework.RegisterHandler.IsRegistered("gold ability") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Gold Ability", .Description = "You defeated the Frontier Brain of" & vbNewLine & "Battle Tower a second time and you've" & vbNewLine & "your real strength when it comes to battles.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(50, 200, 50, 50), "")})
Else
If ActionScript.IsRegistered("silver ability") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Silver Ability", .Description = "You defeated the Frontier Brain of" & vbNewLine & "Battle Tower and showed him how" & vbNewLine & "you and your Pokémon really are.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(0, 200, 50, 50), "")})
If Construct.Framework.RegisterHandler.IsRegistered("silver ability") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Silver Ability", .Description = "You defeated the Frontier Brain of" & vbNewLine & "Battle Tower and showed him how" & vbNewLine & "you and your POKéMON really are.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(0, 200, 50, 50), "")})
End If
End If
If ActionScript.IsRegistered("gold knowledge") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Gold Knowledge", .Description = "This Emblem displays how great you can" & vbNewLine & "interact with Pokémon and how well" & vbNewLine & "you can adapt your strategy to a new situation.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(150, 200, 50, 50), "")})
If Construct.Framework.RegisterHandler.IsRegistered("gold knowledge") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Gold Knowledge", .Description = "This Emblem displays how great you can" & vbNewLine & "interact with POKéMON and how well" & vbNewLine & "you can adapt your strategy to a new situation.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(150, 200, 50, 50), "")})
Else
If ActionScript.IsRegistered("silver knowledge") = True Then
If Construct.Framework.RegisterHandler.IsRegistered("silver knowledge") = True Then
Me.FrontierList.Add(New FrontierSymbol() With {.Name = "Silver Knowledge", .Description = "Only few trainers achieved this emblem" & vbNewLine & "which shows what strength lies" & vbNewLine & "inside them.", .Texture = TextureManager.GetTexture("GUI\Badges", New Rectangle(100, 200, 50, 50), "")})
End If
End If
@ -1582,7 +1585,7 @@
End Sub
Public Function CanListen() As Boolean
' Need to check: Daytime, Region, Expansion Card, Activation
'Need to check: Daytime, Region, Expansion Card, Activation
If Me.DayTimes.Contains(World.GetTime) = False Then
Return False
@ -1595,23 +1598,23 @@
For Each exp As String In Me.Expansions
If exp.ToLower <> "radio" Then
If ActionScript.IsRegistered("pokegear_card_radio" & exp) = False Then
If Construct.Framework.RegisterHandler.IsRegistered("pokegear_card_radio" & exp) = False Then
Return False
End If
End If
Next
Select Case Activation
Case "1" ' Needs register in the level channels (only works when minChannel = maxChannel)
Case "1" 'needs register in the level channels (only works when minChannel = maxChannel)
If Screen.Level.AllowedRadioChannels.Contains(Me.ChannelMin) = False Then
Return False
End If
Case "0"
' Channel is always available.
'Channel is always available.
End Select
If Me.ActivationRegister <> "0" Then
If ActionScript.IsRegistered(Me.ActivationRegister) = False Then
If Construct.Framework.RegisterHandler.IsRegistered(Me.ActivationRegister) = False Then
Return False
End If
End If
@ -1667,7 +1670,7 @@
If chosenID > -1 Then
Dim p As Pokemon = Pokemon.GetPokemonByID(chosenID)
output = "Welcome to the Pokédex Show! Today, we are going to look at the entry of " & p.GetName() & "! Its entry reads:~""" & p.PokedexEntry.Text & """~Wow, that is interesting! Also, " & p.GetName() & " is " & p.PokedexEntry.Height & "m high and weights " & p.PokedexEntry.Weight & "kg.~Isn't that amazing?~" & p.GetName() & " is part of the " & p.PokedexEntry.Species & " species.~That's all the information we have. Tune in next time!"
output = "Welcome to the POKéDEX Show! Today, we are going to look at the entry of " & p.GetName() & "! Its entry reads:~""" & p.PokedexEntry.Text & """~Wow, that is interesting! Also, " & p.GetName() & " is " & p.PokedexEntry.Height & "m high and weights " & p.PokedexEntry.Weight & "kg.~Isn't that amazing?~" & p.GetName() & " is part of the " & p.PokedexEntry.Species & " species.~That's all the information we have. Tune in next time!"
End If
Case "[randompokemon]"
Dim levels() As String = {"route29.dat", "route30.dat", "route31.dat", "route32.dat", "route33.dat", "route36.dat", "route37.dat", "route38.dat", "route39.dat", "routes\route34.dat", "routes\route35.dat", "routes\route42.dat", "routes\route43.dat", "routes\route44.dat", "routes\route45.dat", "routes\route46.dat"}
@ -1683,7 +1686,7 @@
levelName = levelName.Substring(0, 5) & " " & levelName.Remove(0, 5)
If Not p Is Nothing Then
output = "Professor Oak's Pokémon Talk! With Mary!~~Professor Oak: " & p.GetName() & " has been spotted on " & levelName & ".~Mary: " & p.GetName() & "! How smart! How inspiring!"
output = "Professor Oak's POKéMON Talk! With Mary!~~Professor Oak: " & p.GetName() & " has been spotted on " & levelName & ".~Mary: " & p.GetName() & "! How smart! How inspiring!"
End If
Case "[unown]"
Dim words() As String = {"doom", "dark", "help", "join us", "stay", "lost", "vanish", "always there", "no eyes"}
@ -1823,7 +1826,7 @@
Else
Screen.Level.IsRadioOn = Not Screen.Level.IsRadioOn
Screen.Level.SelectedRadioStation = CurrentStation
Player.Temp.RadioStation = Me.RadioCursor
Core.Player.Temp.RadioStation = Me.RadioCursor
End If
End If
End If
@ -1862,7 +1865,7 @@
CurrentSong = ""
For Each station As RadioStation In Me.RadioStations
If station.IsInterfering(RadioCursor) = True Then
MusicManager.PlayMusic(station.Music, True)
MusicPlayer.GetInstance().Play(station.Music, True)
CurrentSong = station.Music
CurrentStation = station
Exit For
@ -1870,7 +1873,7 @@
Next
If CurrentSong = "" Then
MusicManager.PlayMusic("nomusic", False)
MusicPlayer.GetInstance().Play("nomusic", False)
CurrentStation = Nothing
End If
End Sub
@ -1878,7 +1881,7 @@
Private Sub InitializeRadio()
Me.InitializedRadio = True
Dim radioData() As String = System.IO.File.ReadAllLines(OldGameModeManager.GetContentFilePath("Data\channels.dat"))
Dim radioData() As String = System.IO.File.ReadAllLines(GameModeManager.GetDataFilePath("channels.dat"))
For Each line As String In radioData
If line.StartsWith("{") = True And line.EndsWith("}") = True Then
line = line.Remove(line.Length - 1, 1).Remove(0, 1)
@ -1888,16 +1891,16 @@
End If
Next
Me.RadioCursor = Player.Temp.RadioStation
Me.RadioCursor = Core.Player.Temp.RadioStation
CheckForStation()
Logger.Debug("Initialized Radio with " & Me.RadioStations.Count & " stations.")
Logger.Debug("134", "Initialized Radio with " & Me.RadioStations.Count & " stations.")
End Sub
Public Shared Function StationCanPlay(ByVal station As RadioStation) As Boolean
Dim stations As New List(Of RadioStation)
Dim file As String = OldGameModeManager.GetContentFilePath("Data\channels.dat")
Dim file As String = GameModeManager.GetDataFilePath("channels.dat")
Security.FileValidation.CheckFileValid(file, False, "PokegearScreen.vb")
Dim radioData() As String = System.IO.File.ReadAllLines(file)
@ -2037,7 +2040,7 @@
End If
End Sub
Private Sub DownloadTradeRequestSprite()
Private Sub DownloadTradeRequestSprite(ByVal obj As Object)
If Me.TradeRequestGameJoltID <> "" Then
Dim t As Texture2D = Emblem.GetOnlineSprite(Me.TradeRequestGameJoltID)
If Not t Is Nothing Then
@ -2168,7 +2171,7 @@
End If
End Sub
Private Sub DownloadBattleRequestSprite()
Private Sub DownloadBattleRequestSprite(ByVal obj As Object)
If Me.BattleRequestGameJoltID <> "" Then
Dim t As Texture2D = Emblem.GetOnlineSprite(Me.BattleRequestGameJoltID)
If Not t Is Nothing Then

@ -47,7 +47,7 @@
CanBePaused = False
MouseVisible = True
CanChat = False
currentLanguage = OldLocalization.LanguageSuffix
currentLanguage = Localization.LanguageSuffix
TextBox.Showing = False
PokemonImageView.Showing = False
@ -314,13 +314,13 @@
Dim Text As String = ""
Select Case i
Case 0
Text = OldLocalization.GetString("main_menu_continue")
Text = Localization.GetString("main_menu_continue")
Case 1
Text = OldLocalization.GetString("main_menu_load_game")
Text = Localization.GetString("main_menu_load_game")
Case 2
Text = OldLocalization.GetString("main_menu_new_game")
Text = Localization.GetString("main_menu_new_game")
Case 3
Text = OldLocalization.GetString("main_menu_quit_game")
Text = Localization.GetString("main_menu_quit_game")
Case 7
Text = "Play online"
End Select
@ -633,11 +633,11 @@
End If
Next
tempLoadDisplay = OldLocalization.GetString("load_menu_name") & ": " & dispName & vbNewLine &
OldLocalization.GetString("load_menu_gamemode") & ": " & dispGameMode & vbNewLine &
OldLocalization.GetString("load_menu_badges") & ": " & dispBadges & vbNewLine &
OldLocalization.GetString("load_menu_location") & ": " & OldLocalization.GetString("Places_" & dispLocation) & vbNewLine &
OldLocalization.GetString("load_menu_time") & ": " & dispPlayTime
tempLoadDisplay = Localization.GetString("load_menu_name") & ": " & dispName & vbNewLine &
Localization.GetString("load_menu_gamemode") & ": " & dispGameMode & vbNewLine &
Localization.GetString("load_menu_badges") & ": " & dispBadges & vbNewLine &
Localization.GetString("load_menu_location") & ": " & Localization.GetString("Places_" & dispLocation) & vbNewLine &
Localization.GetString("load_menu_time") & ": " & dispPlayTime
End If
SpriteBatch.DrawInterfaceString(FontManager.MiniFont, tempLoadDisplay, New Vector2(CInt(ScreenSize.Width / 2) - 252, 416), Color.Black)
@ -646,11 +646,11 @@
Dim Text As String = ""
Select Case i
Case 0
Text = OldLocalization.GetString("load_menu_load")
Text = Localization.GetString("load_menu_load")
Case 1
Text = OldLocalization.GetString("load_menu_delete")
Text = Localization.GetString("load_menu_delete")
Case 2
Text = OldLocalization.GetString("load_menu_back")
Text = Localization.GetString("load_menu_back")
End Select
If i = loadMenuIndex(1) Then
@ -934,9 +934,9 @@
Dim Text As String = ""
Select Case i
Case 0
Text = OldLocalization.GetString("language_menu_apply")
Text = Localization.GetString("language_menu_apply")
Case 1
Text = OldLocalization.GetString("language_menu_back")
Text = Localization.GetString("language_menu_back")
End Select
If i = languageMenuIndex(1) Then
@ -978,7 +978,7 @@
Core.GameOptions.Save()
menuIndex = 0
Case 1
OldLocalization.Load(currentLanguage)
Localization.Load(currentLanguage)
menuIndex = 0
End Select
End If
@ -998,7 +998,7 @@
languageMenuIndex(2) = CInt(MathHelper.Clamp(languageMenuIndex(2), 0, Languages.Count - 4))
If languageMenuIndex(0) <> currentIndex Then
OldLocalization.Load(Languages(languageMenuIndex(0)))
Localization.Load(Languages(languageMenuIndex(0)))
End If
If Controls.Right(True, True, False) = True Then
@ -1017,7 +1017,7 @@
Core.GameOptions.Save()
menuIndex = 0
Case 1
OldLocalization.Load(currentLanguage)
Localization.Load(currentLanguage)
menuIndex = 0
End Select
End If
@ -1061,7 +1061,7 @@
Dim textColor As Color = Color.Gray
If EnabledPackNames.Contains(Name) = True Then
Name &= " (" & OldLocalization.GetString("pack_menu_enabled") & ")"
Name &= " (" & Localization.GetString("pack_menu_enabled") & ")"
textColor = Color.Black
End If
@ -1080,9 +1080,9 @@
Dim Text As String = ""
Select Case i
Case 0
Text = OldLocalization.GetString("pack_menu_apply")
Text = Localization.GetString("pack_menu_apply")
Case 1
Text = OldLocalization.GetString("pack_menu_back")
Text = Localization.GetString("pack_menu_back")
End Select
If i = packsMenuIndex(1) Then
@ -1098,17 +1098,17 @@
Dim Text As String = ""
Select Case i
Case 2
Text = OldLocalization.GetString("pack_menu_up")
Text = Localization.GetString("pack_menu_up")
Case 3
Text = OldLocalization.GetString("pack_menu_down")
Text = Localization.GetString("pack_menu_down")
Case 4
If isSelectedEnabled = True Then
Text = OldLocalization.GetString("pack_menu_toggle_off")
Text = Localization.GetString("pack_menu_toggle_off")
Else
Text = OldLocalization.GetString("pack_menu_toggle_on")
Text = Localization.GetString("pack_menu_toggle_on")
End If
Case 5
Text = OldLocalization.GetString("pack_menu_information")
Text = Localization.GetString("pack_menu_information")
End Select
If i = packsMenuIndex(1) Then
@ -1267,7 +1267,7 @@
Next
If hasMP3 = True Or hasWMA = True And hasXNB = True Then
PInfoContent = OldLocalization.GetString("pack_menu_songs")
PInfoContent = Localization.GetString("pack_menu_songs")
End If
End If
If IO.Directory.Exists(contentPackPath & "Sounds") = True Then
@ -1291,7 +1291,7 @@
PInfoContent &= ", "
End If
PInfoContent &= OldLocalization.GetString("pack_menu_sounds")
PInfoContent &= Localization.GetString("pack_menu_sounds")
End If
End If
@ -1314,7 +1314,7 @@
PInfoContent &= ", "
End If
PInfoContent &= OldLocalization.GetString("pack_menu_textures")
PInfoContent &= Localization.GetString("pack_menu_textures")
Exit For
End If
End If
@ -1355,10 +1355,10 @@
Dim CanvasTexture As Texture2D = TextureManager.GetTexture("GUI\Menus\Menu", New Rectangle(0, 0, 48, 48), "")
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(ScreenSize.Width / 2) - 256, 160, 480, 64), True)
SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("pack_menu_name") & ": " & PInfoName, New Vector2(CInt(ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(OldLocalization.GetString("pack_menu_name") & ": " & PInfoName).X / 2), 195), Color.Black)
SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pack_menu_name") & ": " & PInfoName, New Vector2(CInt(ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pack_menu_name") & ": " & PInfoName).X / 2), 195), Color.Black)
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(ScreenSize.Width / 2) - 256, 288, 480, 224), True)
SpriteBatch.DrawInterfaceString(FontManager.MiniFont, OldLocalization.GetString("pack_menu_version") & ": " & PInfoVersion & vbNewLine & OldLocalization.GetString("pack_menu_by") & ": " & PInfoAuthor & vbNewLine & OldLocalization.GetString("pack_menu_content") & ": " & PInfoContent & vbNewLine & OldLocalization.GetString("pack_menu_description") & ": " & PInfoDescription.Replace("<br>", vbNewLine), New Vector2(CInt(ScreenSize.Width / 2) - 220, 323), Color.Black)
SpriteBatch.DrawInterfaceString(FontManager.MiniFont, Localization.GetString("pack_menu_version") & ": " & PInfoVersion & vbNewLine & Localization.GetString("pack_menu_by") & ": " & PInfoAuthor & vbNewLine & Localization.GetString("pack_menu_content") & ": " & PInfoContent & vbNewLine & Localization.GetString("pack_menu_description") & ": " & PInfoDescription.Replace("<br>", vbNewLine), New Vector2(CInt(ScreenSize.Width / 2) - 220, 323), Color.Black)
For i = 0 To 1
If i = packInfoIndex Then
@ -1367,17 +1367,17 @@
CanvasTexture = TextureManager.GetTexture("GUI\Menus\Menu", New Rectangle(0, 0, 48, 48), "")
End If
Dim Text As String = OldLocalization.GetString("pack_menu_back")
Dim Text As String = Localization.GetString("pack_menu_back")
Select Case i
Case 0
If isEnabled = True Then
Text = OldLocalization.GetString("pack_menu_toggle_off")
Text = Localization.GetString("pack_menu_toggle_off")
Else
Text = OldLocalization.GetString("pack_menu_toggle_on")
Text = Localization.GetString("pack_menu_toggle_on")
End If
Case 1
Text = OldLocalization.GetString("pack_menu_back")
Text = Localization.GetString("pack_menu_back")
End Select
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(ScreenSize.Width / 2) - 180 + (200 * i), 550, 128, 64), True)
@ -1495,15 +1495,15 @@
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(ScreenSize.Width / 2 - 352), 172, 704, 96), Color.White, True)
SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("delete_menu_delete_confirm"), New Vector2(CInt(ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(OldLocalization.GetString("delete_menu_delete_confirm")).X / 2), 200), Color.Black)
SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("delete_menu_delete_confirm"), New Vector2(CInt(ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("delete_menu_delete_confirm")).X / 2), 200), Color.Black)
SpriteBatch.DrawInterfaceString(FontManager.InGameFont, """" & SaveNames(loadMenuIndex(0)) & """ ?", New Vector2(CInt(ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString("""" & SaveNames(loadMenuIndex(0)) & """ ?").X / 2), 240), Color.Black)
For i = 0 To 1
Dim Text As String = OldLocalization.GetString("delete_menu_delete")
Dim Text As String = Localization.GetString("delete_menu_delete")
If i = 1 Then
Text = OldLocalization.GetString("delete_menu_cancel")
Text = Localization.GetString("delete_menu_cancel")
End If
If i = deleteIndex Then
@ -1655,11 +1655,11 @@
Dim dispAuthor As String = GameMode.Author
Dim dispContentPath As String = GameMode.ContentPath
tempGameModesDisplay = OldLocalization.GetString("gamemode_menu_name") & ": " & dispName & vbNewLine &
OldLocalization.GetString("gamemode_menu_version") & ": " & dispVersion & vbNewLine &
OldLocalization.GetString("gamemode_menu_author") & ": " & dispAuthor & vbNewLine &
OldLocalization.GetString("gamemode_menu_contentpath") & ": " & dispContentPath & vbNewLine &
OldLocalization.GetString("gamemode_menu_description") & ": " & dispDescription
tempGameModesDisplay = Localization.GetString("gamemode_menu_name") & ": " & dispName & vbNewLine &
Localization.GetString("gamemode_menu_version") & ": " & dispVersion & vbNewLine &
Localization.GetString("gamemode_menu_author") & ": " & dispAuthor & vbNewLine &
Localization.GetString("gamemode_menu_contentpath") & ": " & dispContentPath & vbNewLine &
Localization.GetString("gamemode_menu_description") & ": " & dispDescription
End If
SpriteBatch.DrawInterfaceString(FontManager.MiniFont, tempGameModesDisplay, New Vector2(CInt(ScreenSize.Width / 2) - 252, 416), Color.Black)
@ -1671,13 +1671,13 @@
CanvasTexture = TextureManager.GetTexture("GUI\Menus\Menu", New Rectangle(0, 0, 48, 48), "")
End If
Dim Text As String = OldLocalization.GetString("gamemode_menu_back")
Dim Text As String = Localization.GetString("gamemode_menu_back")
Select Case i
Case 0
Text = OldLocalization.GetString("gamemode_menu_create")
Text = Localization.GetString("gamemode_menu_create")
Case 1
Text = OldLocalization.GetString("gamemode_menu_back")
Text = Localization.GetString("gamemode_menu_back")
End Select
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(CInt(ScreenSize.Width / 2) - 180 + (200 * i), 550, 128, 64), True)

@ -34,7 +34,7 @@
s = s.PreScreen
End While
If s.Identification = Identifications.OverworldScreen Then
If CType(s, OverworldScreen).ActionScript.IsReady = False Then
If Construct.Controller.GetInstance.IsReady = False Then
Me.canCreateAutosave = False
End If
End If
@ -47,9 +47,9 @@
Me.PreScreen.Draw()
Canvas.DrawRectangle(New Rectangle(0, 0, Core.ScreenSize.Width, Core.ScreenSize.Height), New Color(0, 0, 0, 150))
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(OldLocalization.GetString("pause_menu_title")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("pause_menu_title"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 6.8) + 3), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("pause_menu_title"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 6.8)), Color.White)
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pause_menu_title")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_title"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 6.8) + 3), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_title"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 6.8)), Color.White)
If Me.menuIndex = 0 Then
DrawMenu()
@ -58,7 +58,7 @@
End If
If Me.canCreateAutosave = False Then
Dim text As String = OldLocalization.GetString("pause_menu_autosave_fail")
Dim text As String = Localization.GetString("pause_menu_autosave_fail")
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, text, New Vector2(9, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(text).Y), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, text, New Vector2(5, Core.ScreenSize.Height - FontManager.InGameFont.MeasureString(text).Y - 4), Color.White)
@ -92,9 +92,9 @@
Dim Text As String = ""
Select Case i
Case 0
Text = OldLocalization.GetString("pause_menu_back_to_game")
Text = Localization.GetString("pause_menu_back_to_game")
Case 1
Text = OldLocalization.GetString("pause_menu_quit_to_menu")
Text = Localization.GetString("pause_menu_quit_to_menu")
End Select
If i = mainIndex Then
@ -170,19 +170,19 @@
#Region "QuitMenu"
Private Sub DrawQuit()
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(OldLocalization.GetString("pause_menu_confirmation")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("pause_menu_confirmation"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 6.8) + 3 + 110), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, OldLocalization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 6.8) + 110), Color.White)
Dim pX As Integer = CInt(Core.ScreenSize.Width / 2) - CInt(FontManager.InGameFont.MeasureString(Localization.GetString("pause_menu_confirmation")).X / 2)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 7, CInt(Core.ScreenSize.Height / 6.8) + 3 + 110), Color.Black)
Core.SpriteBatch.DrawInterfaceString(FontManager.InGameFont, Localization.GetString("pause_menu_confirmation"), New Vector2(pX - 10, CInt(Core.ScreenSize.Height / 6.8) + 110), Color.White)
For i = 0 To 1
Dim Text As String = ""
Dim x As Integer = 0
Select Case i
Case 0
Text = OldLocalization.GetString("pause_menu_no")
Text = Localization.GetString("pause_menu_no")
x = -200
Case 1
Text = OldLocalization.GetString("pause_menu_yes")
Text = Localization.GetString("pause_menu_yes")
x = 200
End Select
@ -260,8 +260,8 @@
If Core.Player.loadedSave = True And Me.canCreateAutosave = True Then
Core.Player.SaveGame(True)
End If
ScriptStorage.Clear()
Core.SetScreen(New MainMenuScreen())
Construct.Controller.GetInstance().Reset()
Core.SetScreen(New PressStartScreen())
Core.Player.loadedSave = False
End Sub

@ -581,7 +581,10 @@ Public Class NewMainMenuScreen
_isGameJolt = True
_loaded = False
_sprite = Content.Load(Of Texture2D)("SharedResources\Textures\UI\GameJolt\gameJoltIcon")
Dim contentmanager As ContentManager = New ContentManager(GameInstance.Services, "SharedResources\Textures\UI\GameJolt")
_sprite = contentmanager.Load(Of Texture2D)("gameJoltIcon")
'_sprite = Content.Load(Of Texture2D)("SharedResources\Textures\UI\GameJolt\gameJoltIcon")
LoadGameJolt()
Else

@ -90,7 +90,7 @@
Dim TempPoke As New List(Of Roaming)
Dim RoamingPokeName As New List(Of String)
Dim path As String = OldGameModeManager.GetScriptPath("worldmap\" & Me.currentRegion & ".dat")
Dim path As String = GameModeManager.GetScriptPath("worldmap\" & Me.currentRegion & ".dat")
Security.FileValidation.CheckFileValid(path, False, "MapScreen.vb")
Dim InputData() As String = System.IO.File.ReadAllLines(path)
@ -471,14 +471,14 @@
End If
If Me.hoverText <> "" And Me.pokehoverText <> "" Then
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("pokemon_name_" & Me.pokehoverText) & " at " & OldLocalization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 32, Me.CursorPosition.Y - 29), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("pokemon_name_" & Me.pokehoverText) & " at " & OldLocalization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 29, Me.CursorPosition.Y - 32), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("pokemon_name_" & Me.pokehoverText) & " at " & Localization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 32, Me.CursorPosition.Y - 29), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("pokemon_name_" & Me.pokehoverText) & " at " & Localization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 29, Me.CursorPosition.Y - 32), Color.White)
ElseIf Me.hoverText <> "" And Me.pokehoverText = "" Then
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 32, Me.CursorPosition.Y - 29), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 29, Me.CursorPosition.Y - 32), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 32, Me.CursorPosition.Y - 29), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("Places_" & Me.hoverText), New Vector2(Me.CursorPosition.X + 29, Me.CursorPosition.Y - 32), Color.White)
End If
Dim regionString As String = OldLocalization.GetString(Me.currentRegion(0).ToString().ToUpper() & Me.currentRegion.Remove(0, 1))
Dim regionString As String = Localization.GetString(Me.currentRegion(0).ToString().ToUpper() & Me.currentRegion.Remove(0, 1))
If Me.regions.Count > 1 Then
regionString &= " (Press the Shift/Shoulder Buttons to switch between regions.)"
End If
@ -497,32 +497,32 @@
r = New Rectangle(116, 0, 12, 12)
End If
Core.SpriteBatch.Draw(Me.objectsTexture, New Rectangle(Core.windowSize.Width - 170, 100, 24, 24), r, New Color(255, 255, 255, 220))
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_cities"), New Vector2(Core.windowSize.Width - 137, 103), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_cities"), New Vector2(Core.windowSize.Width - 140, 100), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_cities"), New Vector2(Core.windowSize.Width - 137, 103), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_cities"), New Vector2(Core.windowSize.Width - 140, 100), Color.White)
' Routes:
r = New Rectangle(104, 12, 12, 12)
If drawObjects(1) = False Then
r = New Rectangle(116, 12, 12, 12)
End If
Core.SpriteBatch.Draw(Me.objectsTexture, New Rectangle(Core.windowSize.Width - 170, 130, 24, 24), r, New Color(255, 255, 255, 220))
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_routes"), New Vector2(Core.windowSize.Width - 137, 133), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_routes"), New Vector2(Core.windowSize.Width - 140, 130), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_routes"), New Vector2(Core.windowSize.Width - 137, 133), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_routes"), New Vector2(Core.windowSize.Width - 140, 130), Color.White)
' Places:
r = New Rectangle(104, 24, 12, 12)
If drawObjects(2) = False Then
r = New Rectangle(116, 24, 12, 12)
End If
Core.SpriteBatch.Draw(Me.objectsTexture, New Rectangle(Core.windowSize.Width - 170, 160, 24, 24), r, New Color(255, 255, 255, 220))
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_places"), New Vector2(Core.windowSize.Width - 137, 163), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_places"), New Vector2(Core.windowSize.Width - 140, 160), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_places"), New Vector2(Core.windowSize.Width - 137, 163), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_places"), New Vector2(Core.windowSize.Width - 140, 160), Color.White)
' Roaming:
r = New Rectangle(111, 64, 17, 16)
If drawObjects(3) = False Then
r = New Rectangle(111, 80, 17, 16)
End If
Core.SpriteBatch.Draw(Me.objectsTexture, New Rectangle(Core.windowSize.Width - 170, 190, 24, 24), r, New Color(255, 255, 255, 220))
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_roaming"), New Vector2(Core.windowSize.Width - 137, 193), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("map_screen_roaming"), New Vector2(Core.windowSize.Width - 140, 190), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_roaming"), New Vector2(Core.windowSize.Width - 137, 193), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("map_screen_roaming"), New Vector2(Core.windowSize.Width - 140, 190), Color.White)
End Sub
Private Sub DrawCursor()
@ -553,8 +553,7 @@
End If
End If
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & p.GetDisplayName() & " used~Fly.)" & vbNewLine
Dim s As String = "@text.show(" & p.GetDisplayName() & " used~Fly.)" & vbNewLine
If CType(Screen.Camera, OverworldCamera).ThirdPerson = False Then
s &= "@camera.activateThirdPerson" & vbNewLine
@ -602,11 +601,10 @@
s &= "@camera.deactivatethirdperson" & vbNewLine
End If
s &= "@level.wait(1)" & vbNewLine &
":end"
s &= "@level.wait(1)"
PlayerStatistics.Track("Fly used", 1)
Core.Player.IsFlying = True
CType(CType(Core.CurrentScreen, TransitionScreen).NewScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End Sub
Private Function GetPlayerPosition() As Vector2

@ -51,7 +51,7 @@
OldLocalization.ReloadGameModeTokens()
If OldGameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
If GameModeManager.ActiveGameMode.IsDefaultGamemode = False Then
MusicManager.LoadMusic(True)
SoundManager.LoadSounds(True)
End If
@ -84,7 +84,7 @@
End Sub
Private Sub LoadIntroValues()
Dim GameMode As OldGameMode = OldGameModeManager.ActiveGameMode
Dim GameMode As GameMode = GameModeManager.ActiveGameMode
Me.skinNames = GameMode.SkinNames.ToArray()
Me.startSkins = GameMode.SkinFiles.ToArray()
@ -474,12 +474,12 @@
"RepelSteps|0" & vbNewLine & _
"LastSavePlace|yourroom.dat" & vbNewLine & _
"LastSavePlacePosition|1,0.1,3" & vbNewLine & _
"Difficulty|" & OldGameModeManager.GetGameRuleValue("Difficulty", "0") & vbNewLine & _
"Difficulty|" & GameModeManager.GetGameRuleValue("Difficulty", "0") & vbNewLine & _
"BattleStyle|0" & vbNewLine & _
"saveCreated|" & GameController.GAMEDEVELOPMENTSTAGE & " " & GameController.GAMEVERSION & vbNewLine & _
"LastPokemonPosition|999,999,999" & vbNewLine & _
"DaycareSteps|0" & vbNewLine & _
"GameMode|" & OldGameModeManager.ActiveGameMode.DirectoryName & vbNewLine &
"GameMode|" & GameModeManager.ActiveGameMode.DirectoryName & vbNewLine &
"PokeFiles|" & vbNewLine &
"VisitedMaps|yourroom.dat" & vbNewLine &
"TempSurfSkin|Hilbert" & vbNewLine &

@ -286,24 +286,14 @@
End Sub
Private Sub ShowBalls()
''' Requires new scripting system
'Dim s As Screen = Me.PreScreen
'Construct.Controller.GetInstance().RunFromFile(Screen.Level.BugCatchingContestData.GetSplit(1))
'Core.SetScreen(s)
Dim s As Screen = Me.PreScreen
CType(s, OverworldScreen).ActionScript.StartScript(Screen.Level.BugCatchingContestData.GetSplit(1), 0)
Construct.Controller.GetInstance().RunFromFile(Screen.Level.BugCatchingContestData.GetSplit(1))
Core.SetScreen(s)
End Sub
Private Sub EndContest()
''' Requires new scripting system
'Dim s As Screen = Me.PreScreen
'Construct.Controller.GetInstance().RunFromFile(Screen.Level.BugCatchingContestData.GetSplit(0))
'Core.SetScreen(s)
Dim s As Screen = Me.PreScreen
CType(s, OverworldScreen).ActionScript.StartScript(Screen.Level.BugCatchingContestData.GetSplit(0), 0)
Construct.Controller.GetInstance().RunFromFile(Screen.Level.BugCatchingContestData.GetSplit(0))
Core.SetScreen(s)
End Sub

@ -157,7 +157,7 @@
End Sub
Private Sub DrawBadges()
_textBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("trainer_screen_collected_badges") & ": " & Core.Player.Badges.Count, New Vector2(50, 360), Color.Black)
_textBatch.DrawString(FontManager.MiniFont, Localization.GetString("trainer_screen_collected_badges") & ": " & Core.Player.Badges.Count, New Vector2(50, 360), Color.Black)
Dim selectedRegion As String = Badge.GetRegion(_badgeRegionIndex)
Dim badgesCount As Integer = Badge.GetBadgesCount(selectedRegion)
@ -167,11 +167,11 @@
Dim badgeID As Integer = Badge.GetBadgeID(selectedRegion, i)
Dim c As Color = Color.White
Dim t As String = Badge.GetBadgeName(badgeID) & OldLocalization.GetString("trainer_screen_badge")
Dim t As String = Badge.GetBadgeName(badgeID) & Localization.GetString("trainer_screen_badge")
Dim shake As Single = 0F
If Badge.PlayerHasBadge(badgeID) = False Then
c = Color.Black
t = OldLocalization.GetString("trainer_screen_empty_badge")
t = Localization.GetString("trainer_screen_empty_badge")
End If
If i = CInt(_badgeIndex) Then

@ -72,7 +72,7 @@
Core.SpriteBatch.DrawString(FontManager.InGameFont, Me.CurrentPath, New Vector2(80, 130), Color.Black)
If savedOptions = False Then
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("option_screen_warning"), New Vector2(90 + FontManager.InGameFont.MeasureString(OldLocalization.GetString("option_screen_title")).X, 138), Color.DarkRed)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("option_screen_warning"), New Vector2(90 + FontManager.InGameFont.MeasureString(Localization.GetString("option_screen_title")).X, 138), Color.DarkRed)
End If
For Each C As Control In ControlList

@ -173,9 +173,9 @@ Public Class PokedexHabitatScreen
Me.CanMuteMusic = True
Me.CanBePaused = True
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & OldGameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
If file.EndsWith(".poke") = True Then
Dim fileName As String = file.Remove(0, (GameController.GamePath & OldGameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
Dim fileName As String = file.Remove(0, (GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
Dim newHabitat As New PokedexScreen.Habitat(file)
Dim exists As Boolean = False
For Each h As PokedexScreen.Habitat In Me.HabitatList
@ -1321,9 +1321,9 @@ Public Class PokedexViewScreen
End Sub
Private Sub FillHabitats()
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & OldGameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
For Each file As String In System.IO.Directory.GetFiles(GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath, "*.*", IO.SearchOption.AllDirectories)
If file.EndsWith(".poke") = True Then
Dim fileName As String = file.Remove(0, (GameController.GamePath & OldGameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
Dim fileName As String = file.Remove(0, (GameController.GamePath & GameModeManager.ActiveGameMode.PokeFilePath & "\").Length - 1)
Dim newHabitat As New PokedexScreen.Habitat(file)
Dim exists As Boolean = False
For Each h As PokedexScreen.Habitat In Me.HabitatList

@ -580,17 +580,17 @@
End Sub
Public Shared Sub TriggerCall(ByVal daycareID As Integer)
If ActionScript.IsRegistered("daycare_callid_" & daycareID.ToString()) = True Then
Dim c() As Object = ActionScript.GetRegisterValue("daycare_callid_" & daycareID.ToString())
If Not c(0) Is Nothing And Not c(1) Is Nothing Then
Dim callID As String = CStr(c(0))
If Construct.Framework.RegisterHandler.IsRegistered("daycare_callid_" & daycareID.ToString()) = True Then
Dim registerValue = Construct.Framework.RegisterHandler.GetRegisterValue("daycare_callid_" & daycareID.ToString())
If registerValue <> "" Then
Dim callID As String = registerValue
GameJolt.PokegearScreen.CallID(callID, True, False)
Else
Logger.Debug("Cannot initialize call for Daycare ID " & daycareID.ToString() & ".")
Logger.Debug("109", "Cannot initialize call for Daycare ID " & daycareID.ToString() & ".")
End If
Else
Logger.Debug("Cannot initialize call for Daycare ID " & daycareID.ToString() & ".")
Logger.Debug("110", "Cannot initialize call for Daycare ID " & daycareID.ToString() & ".")
End If
End Sub

@ -169,7 +169,7 @@ Public Class NameObjectScreen
End Sub
Public Overrides Sub Update()
If CBool(OldGameModeManager.GetGameRuleValue("ForceRename", "0")) = True Then
If CBool(GameModeManager.GetGameRuleValue("ForceRename", "0")) = True Then
Me._askedRename = True
Me._canChooseNo = False
End If

@ -770,179 +770,107 @@ Public Class PartyScreen
#Region "Field Moves"
'TEMPORARY
Private Sub UseFlash()
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
If Screen.Level.IsDark = True Then
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & PokemonList(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
"@environment.toggledarkness" & vbNewLine &
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
"@text.show(The area got lit up!)" & vbNewLine &
":end"
PlayerStatistics.Track("Flash used", 1)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Private Sub UseFly()
If Level.CanFly Or GameController.IS_DEBUG_ACTIVE Or Core.Player.SandBoxMode Then
SetScreen(OverworldScreen.GetCurrentInstance())
If Screen.Level.CurrentRegion.Contains(",") Then
Dim regions As List(Of String) = Screen.Level.CurrentRegion.Split(CChar(",")).ToList()
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, regions, 0, {"Fly", Core.Player.Pokemons(_index)}), Color.White, False))
Else
Dim startRegion As String = Screen.Level.CurrentRegion
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, startRegion, {"Fly", Core.Player.Pokemons(_index)}), Color.White, False))
End If
Else
Dim s As String = "version=2" & vbNewLine &
"@text.show(" & PokemonList(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
"@text.show(The area is already~lit up!)" & vbNewLine &
":end"
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
ShowMessage(_translation.MESSAGE_FIELDMOVE_ERROR("Fly"))
End If
End Sub
Private Sub UseFly()
If Level.CanFly = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
Private Sub UseFlash()
SetScreen(OverworldScreen.GetCurrentInstance())
If Screen.Level.CurrentRegion.Contains(",") = True Then
Dim regions As List(Of String) = Screen.Level.CurrentRegion.Split(CChar(",")).ToList()
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, regions, 0, {"Fly", PokemonList(_index)}), Color.White, False))
Else
Dim startRegion As String = Screen.Level.CurrentRegion
Core.SetScreen(New TransitionScreen(Core.CurrentScreen, New MapScreen(Core.CurrentScreen, startRegion, {"Fly", PokemonList(_index)}), Color.White, False))
If Screen.Level.IsDark Then
Dim s As String = "@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
"@environment.toggledarkness" & vbNewLine &
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
"@text.show(The area got lit up!)"
PlayerStatistics.Track("Flash used", 1)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
Dim s As String = "@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used~Flash!)" & vbNewLine &
"@sound.play(Battle\Effects\effect_thunderbolt)" & vbNewLine &
"@text.show(The area is already~lit up!)"
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
End If
End Sub
Private Sub UseRide()
If Screen.Level.Riding Then
Screen.Level.Riding = False
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
Core.Player.Skin = Core.Player.TempRideSkin
Core.SetScreen(OverworldScreen.GetCurrentInstance())
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicPlayer.GetInstance().Play(Level.MusicLoop)
End If
Else
TextBox.Show("You cannot Fly~from here!", {}, True, False)
If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Level.CanRide() Then
Core.SetScreen(OverworldScreen.GetCurrentInstance())
Screen.Level.Riding = True
Core.Player.TempRideSkin = Core.Player.Skin
Dim skin As String = "[POKEMON|"
If Core.Player.Pokemons(_index).IsShiny Then
skin &= "S]"
Else
skin &= "N]"
End If
skin &= Core.Player.Pokemons(_index).Number & PokemonForms.GetOverworldAddition(Core.Player.Pokemons(_index))
Screen.Level.OwnPlayer.SetTexture(skin, False)
SoundManager.PlayPokemonCry(Core.Player.Pokemons(_index).Number)
TextBox.Show(Core.Player.Pokemons(_index).GetDisplayName() & " used~Ride!", {}, True, False)
PlayerStatistics.Track("Ride used", 1)
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicPlayer.GetInstance().Play("system\ride", True)
End If
Else
ShowMessage(_translation.MESSAGE_FIELDMOVE_ERROR("Ride"))
End If
End If
End Sub
Private Sub UseCut()
Dim grassEntities = Grass.GetGrassTilesAroundPlayer(2.4F)
If grassEntities.Count > 0 Then
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
Core.SetScreen(OverworldScreen.GetCurrentInstance())
PlayerStatistics.Track("Cut used", 1)
TextBox.Show(PokemonList(_index).GetDisplayName() & "~used Cut!", {}, True, False)
PokemonList(_index).PlayCry()
TextBox.Show(Core.Player.Pokemons(_index).GetDisplayName() & "~used Cut!", {}, True, False)
Core.Player.Pokemons(_index).PlayCry()
For Each e As Entity In grassEntities
Screen.Level.Entities.Remove(e)
Next
Else
TextBox.Show("There is nothing~to be Cut!", {}, True, False)
End If
End Sub
Private Sub UseRide()
If Screen.Level.Riding = True Then
Screen.Level.Riding = False
Screen.Level.OwnPlayer.SetTexture(Core.Player.TempRideSkin, True)
Core.Player.Skin = Core.Player.TempRideSkin
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicManager.PlayMusic(Level.MusicLoop)
End If
Else
If Screen.Level.Surfing = False And Screen.Camera.IsMoving() = False And Screen.Camera.Turning = False And Level.CanRide() = True Then
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
Screen.Level.Riding = True
Core.Player.TempRideSkin = Core.Player.Skin
Dim skin As String = "[POKEMON|"
If PokemonList(_index).IsShiny = True Then
skin &= "S]"
Else
skin &= "N]"
End If
skin &= PokemonList(_index).Number & PokemonForms.GetOverworldAddition(PokemonList(_index))
Screen.Level.OwnPlayer.SetTexture(skin, False)
SoundManager.PlayPokemonCry(PokemonList(_index).Number)
TextBox.Show(PokemonList(_index).GetDisplayName() & " used~Ride!", {}, True, False)
PlayerStatistics.Track("Ride used", 1)
If Screen.Level.IsRadioOn = False OrElse GameJolt.PokegearScreen.StationCanPlay(Screen.Level.SelectedRadioStation) = False Then
MusicManager.PlayMusic("ride", True)
End If
Else
TextBox.Show("You cannot Ride here!", {}, True, False)
End If
End If
End Sub
Private Sub UseDig()
If Screen.Level.CanDig = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
Dim setToFirstPerson As Boolean = Not CType(Screen.Camera, OverworldCamera).ThirdPerson
Dim s As String = "version=2
@text.show(" & PokemonList(_index).GetDisplayName() & " used Dig!)
@level.wait(20)
@camera.activatethirdperson
@camera.reset
@camera.fix
@player.turnto(0)
@sound.play(destroy)
:while:<player.position(y)>>" & (Screen.Camera.Position.Y - 1.4).ToString().ReplaceDecSeparator() & "
@player.turn(1)
@player.warp(~,~-0.1,~)
@level.wait(1)
:endwhile
@screen.fadeout
@camera.defix
@player.warp(" & Core.Player.LastRestPlace & "," & Core.Player.LastRestPlacePosition & ",0)" & vbNewLine &
"@player.turnto(2)"
If setToFirstPerson = True Then
s &= vbNewLine & "@camera.deactivatethirdperson"
End If
s &= vbNewLine &
"@level.update
@screen.fadein
:end"
PlayerStatistics.Track("Dig used", 1)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Else
TextBox.Show("Cannot use Dig here.", {}, True, False)
ShowMessage(_translation.MESSAGE_FIELDMOVE_ERROR("Cut"))
End If
End Sub
Private Sub UseTeleport()
If Screen.Level.CanTeleport = True Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
ChooseBox.Showing = False
Core.SetScreen(Me.PreScreen)
If Core.CurrentScreen.Identification = Identifications.MenuScreen Then
Core.SetScreen(Core.CurrentScreen.PreScreen)
End If
If Screen.Level.CanTeleport Or GameController.IS_DEBUG_ACTIVE Or Core.Player.SandBoxMode Then
Core.SetScreen(OverworldScreen.GetCurrentInstance())
Dim setToFirstPerson As Boolean = Not CType(Screen.Camera, OverworldCamera).ThirdPerson
Dim yFinish As String = (Screen.Camera.Position.Y + 2.9F).ToString().ReplaceDecSeparator()
Dim s As String = "version=2
@text.show(" & PokemonList(_index).GetDisplayName() & "~used Teleport!)
Dim s As String = "@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & "~used Teleport!)
@level.wait(20)
@camera.activatethirdperson
@camera.reset
@ -959,23 +887,60 @@ Public Class PartyScreen
@player.warp(" & Core.Player.LastRestPlace & "," & Core.Player.LastRestPlacePosition & ",0)
@player.turnto(2)"
If setToFirstPerson = True Then
If setToFirstPerson Then
s &= vbNewLine & "@camera.deactivatethirdperson"
End If
s &= vbNewLine &
"@level.update
@screen.fadein
:end"
@screen.fadein"
PlayerStatistics.Track("Teleport used", 1)
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
TextBox.Show("Cannot use Teleport here.", {}, True, False)
ShowMessage(_translation.MESSAGE_FIELDMOVE_ERROR("Teleport"))
End If
End Sub
Private Sub UseDig()
If Screen.Level.CanDig Or GameController.IS_DEBUG_ACTIVE Or Core.Player.SandBoxMode Then
Core.SetScreen(OverworldScreen.GetCurrentInstance())
Dim setToFirstPerson As Boolean = Not CType(Screen.Camera, OverworldCamera).ThirdPerson
Dim s As String = "@text.show(" & Core.Player.Pokemons(_index).GetDisplayName() & " used Dig!)
@level.wait(20)
@camera.activatethirdperson
@camera.reset
@camera.fix
@player.turnto(0)
@sound.play(destroy)
:while:<player.position(y)>>" & (Screen.Camera.Position.Y - 1.4).ToString().ReplaceDecSeparator() & "
@player.turn(1)
@player.warp(~,~-0.1,~)
@level.wait(1)
:endwhile
@screen.fadeout
@camera.defix
@player.warp(" & Core.Player.LastRestPlace & "," & Core.Player.LastRestPlacePosition & ",0)" & vbNewLine &
"@player.turnto(2)"
If setToFirstPerson Then
s &= vbNewLine & "@camera.deactivatethirdperson"
End If
s &= vbNewLine &
"@level.update
@screen.fadein"
PlayerStatistics.Track("Dig used", 1)
Construct.Controller.GetInstance().RunFromString(s, {Construct.Controller.ScriptRunOptions.CheckDelay})
Else
ShowMessage(_translation.MESSAGE_FIELDMOVE_ERROR("Dig"))
End If
End Sub
#End Region
Private _mode As ISelectionScreen.ScreenMode = ISelectionScreen.ScreenMode.Default
Private _canExit As Boolean = True

@ -169,26 +169,26 @@
If Me.Pokemon.EggSteps = 0 Then
DrawPage1()
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_stats_page"), New Vector2(676, 138), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_stats_page"), New Vector2(676, 138), Color.Black)
TexturePositionPage = New Vector2(32, 96)
Case 1
DrawPage2()
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_details_page"), New Vector2(676, 138), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_details_page"), New Vector2(676, 138), Color.Black)
TexturePositionPage = New Vector2(32, 112)
Case 2
If Me.Pokemon.EggSteps = 0 Then
DrawPage3()
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_moves_page"), New Vector2(676, 138), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_moves_page"), New Vector2(676, 138), Color.Black)
TexturePositionPage = New Vector2(80, 96)
End Select
Core.SpriteBatch.Draw(MainTexture, New Rectangle(574, 132, 96, 32), New Rectangle(CInt(TexturePositionPage.X), CInt(TexturePositionPage.Y), 48, 16), Color.White)
If Me.AttackToggle = False Then
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_backadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(OldLocalization.GetString("poke_status_screen_backadvice")).X - 360, 580), Color.DarkGray)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_backadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(Localization.GetString("poke_status_screen_backadvice")).X - 360, 580), Color.DarkGray)
Else
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_closeadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(OldLocalization.GetString("poke_status_screen_closeadvice")).X - 360, 580), Color.DarkGray)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_closeadvice"), New Vector2(1200 - FontManager.MiniFont.MeasureString(Localization.GetString("poke_status_screen_closeadvice")).X - 360, 580), Color.DarkGray)
End If
End Sub
@ -265,7 +265,7 @@
Core.SpriteBatch.Draw(MainTexture, New Rectangle(180, 376, 12, 20), r, Color.White)
End If
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("Level") & ": " & Me.Pokemon.Level & vbNewLine & OldLocalization.GetString("poke_status_screen_number") & Pokemon.Number & vbNewLine & vbNewLine & OldLocalization.GetString("poke_status_screen_nature") & ":" & vbNewLine & Me.Pokemon.Nature.ToString(), New Vector2(76, 410), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("Level") & ": " & Me.Pokemon.Level & vbNewLine & Localization.GetString("poke_status_screen_number") & Pokemon.Number & vbNewLine & vbNewLine & Localization.GetString("poke_status_screen_nature") & ":" & vbNewLine & Me.Pokemon.Nature.ToString(), New Vector2(76, 410), Color.Black)
Dim StatusTexture As Texture2D = BattleStats.GetStatImage(Pokemon.Status)
If Not StatusTexture Is Nothing Then
@ -310,25 +310,25 @@
Dim redText As String = vbNewLine & vbNewLine
Dim blueText As String = vbNewLine & vbNewLine
Dim blackText As String = OldLocalization.GetString("HP") & vbNewLine & vbNewLine
Dim blackText As String = Localization.GetString("HP") & vbNewLine & vbNewLine
For i = 0 To 4
Dim statText As String = ""
Dim stat As String = ""
Select Case i
Case 0
statText = OldLocalization.GetString("Attack")
statText = Localization.GetString("Attack")
stat = "Attack"
Case 1
statText = OldLocalization.GetString("Defense")
statText = Localization.GetString("Defense")
stat = "Defense"
Case 2
statText = OldLocalization.GetString("Special_Attack")
statText = Localization.GetString("Special_Attack")
stat = "SpAttack"
Case 3
statText = OldLocalization.GetString("Special_Defense")
statText = Localization.GetString("Special_Defense")
stat = "SpDefense"
Case 4
statText = OldLocalization.GetString("Speed")
statText = Localization.GetString("Speed")
stat = "Speed"
End Select
@ -354,7 +354,7 @@
.DrawString(FontManager.MiniFont, Pokemon.HP & " / " & Pokemon.MaxHP & vbNewLine & vbNewLine & Pokemon.Attack & vbNewLine & vbNewLine & Pokemon.Defense & vbNewLine & vbNewLine & Pokemon.SpAttack & vbNewLine & vbNewLine & Pokemon.SpDefense & vbNewLine & vbNewLine & Pokemon.Speed, New Vector2(CInt(p.X + 280), CInt(p.Y + 68)), Color.Black)
' Experience Points:
If Pokemon.Level < CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
If Pokemon.Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(220, 484, 320, 96))
Dim NextLvExp As Integer = Pokemon.NeedExperience(Me.Pokemon.Level + 1) - Pokemon.NeedExperience(Me.Pokemon.Level)
@ -366,14 +366,14 @@
Dim NeedExp As Integer = NextLvExp - currentExp
If Pokemon.Level = CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
If Pokemon.Level = CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
NextLvExp = 0
Else
barPercentage = CInt((currentExp / NextLvExp) * 100)
barX = CInt((currentExp / NextLvExp) * 150).Clamp(0, 150)
End If
.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_all_exp") & ": " & Pokemon.Experience & vbNewLine & OldLocalization.GetString("poke_status_screen_nxt_lv") & ": " & NextLvExp - currentExp, New Vector2(240, 504), Color.Black)
.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_all_exp") & ": " & Pokemon.Experience & vbNewLine & Localization.GetString("poke_status_screen_nxt_lv") & ": " & NextLvExp - currentExp, New Vector2(240, 504), Color.Black)
Dim i As Integer = 0
For x = 0 To barX - 1
@ -407,7 +407,7 @@
' Capture Information:
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(220, 196, 320, 96))
With Core.SpriteBatch
.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_OT") & ": " & Pokemon.OT & " /" & Pokemon.CatchTrainerName & vbNewLine & vbNewLine & Pokemon.CatchMethod & vbNewLine & Pokemon.CatchLocation, New Vector2(238, 214), Color.DarkBlue)
.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_OT") & ": " & Pokemon.OT & " /" & Pokemon.CatchTrainerName & vbNewLine & vbNewLine & Pokemon.CatchMethod & vbNewLine & Pokemon.CatchLocation, New Vector2(238, 214), Color.DarkBlue)
End With
' Item:
@ -415,10 +415,10 @@
If Me.Pokemon.EggSteps = 0 Then
If Not Pokemon.Item Is Nothing Then
Core.SpriteBatch.Draw(Pokemon.Item.Texture, New Rectangle(232, 338, 24, 24), Color.White)
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_Item") & ": " & Pokemon.Item.Name, New Vector2(262, 342), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_Item") & ": " & Pokemon.Item.Name, New Vector2(262, 342), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Pokemon.Item.Description.CropStringToWidth(FontManager.MiniFont, 300), New Vector2(234, 360), Color.Black)
Else
Core.SpriteBatch.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_Item") & ": " & OldLocalization.GetString("poke_status_screen_no_item"), New Vector2(262, 342), Color.Black)
Core.SpriteBatch.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_Item") & ": " & Localization.GetString("poke_status_screen_no_item"), New Vector2(262, 342), Color.Black)
End If
End If
@ -426,7 +426,7 @@
Canvas.DrawImageBorder(CanvasTexture, 2, New Rectangle(220, 484, 320, 96))
If Me.Pokemon.EggSteps = 0 Then
With Core.SpriteBatch
.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_ability") & ": " & Me.Pokemon.Ability.Name & vbNewLine & vbNewLine & Me.Pokemon.Ability.Description.CropStringToWidth(FontManager.MiniFont, 300), New Vector2(234, 500), Color.Black)
.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_ability") & ": " & Me.Pokemon.Ability.Name & vbNewLine & vbNewLine & Me.Pokemon.Ability.Description.CropStringToWidth(FontManager.MiniFont, 300), New Vector2(234, 500), Color.Black)
End With
Else
With Core.SpriteBatch
@ -485,7 +485,7 @@
acc = "-"
End If
.DrawString(FontManager.MiniFont, OldLocalization.GetString("poke_status_screen_power") & ": " & power & vbNewLine & OldLocalization.GetString("poke_status_screen_accuracy") & ": " & acc & vbNewLine & vbNewLine & t, New Vector2(CInt(572 - 300 + AttackPos), 218), Color.Black)
.DrawString(FontManager.MiniFont, Localization.GetString("poke_status_screen_power") & ": " & power & vbNewLine & Localization.GetString("poke_status_screen_accuracy") & ": " & acc & vbNewLine & vbNewLine & t, New Vector2(CInt(572 - 300 + AttackPos), 218), Color.Black)
.Draw(A.GetDamageCategoryImage(), New Rectangle(CInt(572 - 150 + AttackPos), 222, 56, 28), Color.White)
End With
@ -523,7 +523,7 @@
c = Color.IndianRed
End If
.DrawString(FontManager.MiniFont, OldLocalization.GetString("PP") & " " & A.CurrentPP & " / " & A.MaxPP, New Vector2(400, CInt(p.Y + 58)), c)
.DrawString(FontManager.MiniFont, Localization.GetString("PP") & " " & A.CurrentPP & " / " & A.MaxPP, New Vector2(400, CInt(p.Y + 58)), c)
.Draw(TextureManager.GetTexture("GUI\Menus\Types", A.Type.GetElementImage(), ""), New Rectangle(270, CInt(p.Y + 54), 48, 16), Color.White)
End With

@ -381,7 +381,7 @@
SpriteBatch.DrawString(FontManager.ChatFont, "Exp. Points", New Vector2(826, 462), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade)))
SpriteBatch.DrawString(FontManager.ChatFont, .Experience.ToString(), New Vector2(980, 462), New Color(255, 255, 255, CInt(220 * _fadeIn * _pageFade)))
If .Level < CInt(OldGameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
If .Level < CInt(GameModeManager.GetGameRuleValue("MaxLevel", "100")) Then
Canvas.DrawRectangle(New Rectangle(816, 490, 300, 64), New Color(0, 0, 0, CInt(70 * _interfaceFade * _pageFade)))
SpriteBatch.DrawString(FontManager.ChatFont, "To Next Lv.", New Vector2(826, 494), New Color(255, 255, 255, CInt(220 * _interfaceFade * _pageFade)))

@ -168,7 +168,7 @@
c = Color.IndianRed
End If
.DrawString(FontManager.MiniFont, OldLocalization.GetString("PP") & " " & A.CurrentPP & " / " & A.MaxPP, New Vector2(p.X + 130, CInt(p.Y + 58)), c)
.DrawString(FontManager.MiniFont, Localization.GetString("PP") & " " & A.CurrentPP & " / " & A.MaxPP, New Vector2(p.X + 130, CInt(p.Y + 58)), c)
.Draw(TextureManager.GetTexture("GUI\Menus\Types", A.Type.GetElementImage(), ""), New Rectangle(CInt(p.X), CInt(p.Y + 54), 48, 16), Color.White)
End With

@ -15,7 +15,7 @@
Me.PreScreen = currentScreen
Me.mainTexture = TextureManager.GetTexture("GUI\Menus\Menu")
ChooseBox.Show({OldLocalization.GetString("save_screen_yes"), OldLocalization.GetString("save_screen_no")}, 0, {})
ChooseBox.Show({Localization.GetString("save_screen_yes"), Localization.GetString("save_screen_no")}, 0, {})
SaveGameHelpers.ResetSaveCounter()
End Sub
@ -47,7 +47,7 @@
End If
Else
If ready = True Then
.DrawString(FontManager.InGameFont, OldLocalization.GetString("save_screen_success"), New Vector2(188, 186), Color.DarkBlue)
.DrawString(FontManager.InGameFont, Localization.GetString("save_screen_success"), New Vector2(188, 186), Color.DarkBlue)
Else
If SaveGameHelpers.GameJoltSaveDone() = False And savingStarted = True Then
If SaveGameHelpers.StartedDownloadCheck = True Then
@ -56,7 +56,7 @@
.DrawString(FontManager.InGameFont, "Saving, please wait" & LoadingDots.Dots, New Vector2(188, 186), Color.Black)
End If
Else
.DrawString(FontManager.InGameFont, OldLocalization.GetString("save_screen_title"), New Vector2(188, 186), Color.Black)
.DrawString(FontManager.InGameFont, Localization.GetString("save_screen_title"), New Vector2(188, 186), Color.Black)
End If
End If
@ -68,7 +68,7 @@
End If
Next
.DrawString(FontManager.MiniFont, OldLocalization.GetString("save_screen_name") & ": " & Core.Player.Name & vbNewLine & vbNewLine & OldLocalization.GetString("save_screen_badges") & ": " & Core.Player.Badges.Count.ToString() & vbNewLine & vbNewLine & OldLocalization.GetString("save_screen_money") & ": " & Core.Player.Money & vbNewLine & vbNewLine & OldLocalization.GetString("save_screen_time") & ": " & TimeHelpers.GetDisplayTime(TimeHelpers.GetCurrentPlayTime(), True), New Vector2(192, 350), Color.DarkBlue)
.DrawString(FontManager.MiniFont, Localization.GetString("save_screen_name") & ": " & Core.Player.Name & vbNewLine & vbNewLine & Localization.GetString("save_screen_badges") & ": " & Core.Player.Badges.Count.ToString() & vbNewLine & vbNewLine & Localization.GetString("save_screen_money") & ": " & Core.Player.Money & vbNewLine & vbNewLine & Localization.GetString("save_screen_time") & ": " & TimeHelpers.GetDisplayTime(TimeHelpers.GetCurrentPlayTime(), True), New Vector2(192, 350), Color.DarkBlue)
End If
End With

@ -1,3 +1,5 @@
Imports net.Pokemon3D.Game.Construct.Framework
Public Class TradeScreen
Inherits Screen
@ -148,7 +150,7 @@ Public Class TradeScreen
Dim itemData = lItem.Split(CChar("|"))
Me.TradeItems.Add(New TradeItem(ScriptConversion.ToInteger(itemData(0)), ScriptConversion.ToInteger(itemData(1)), ScriptConversion.ToInteger(itemData(2)), Me.Currency))
TradeItems.Add(New TradeItem(Converter.ToInteger(itemData(0)), Converter.ToInteger(itemData(1)), Converter.ToInteger(itemData(2)), Currency))
Next
Me.texture = TextureManager.GetTexture("GUI\Menus\General")

Some files were not shown because too many files have changed in this diff Show More