From 4fca486fab4c269bf5565d0381802f4bee20c2a0 Mon Sep 17 00:00:00 2001 From: JappaWakka Date: Fri, 20 Sep 2024 19:33:19 +0200 Subject: [PATCH] Add RandomFollowItemPickup GameRule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This controls the random item pickup for all follower pokémon --- P3D/Pokemon/Monster/PokemonInteractions.vb | 2 +- P3D/Resources/GameModeManager.vb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/P3D/Pokemon/Monster/PokemonInteractions.vb b/P3D/Pokemon/Monster/PokemonInteractions.vb index 9581743f3..04d8d93d0 100644 --- a/P3D/Pokemon/Monster/PokemonInteractions.vb +++ b/P3D/Pokemon/Monster/PokemonInteractions.vb @@ -894,7 +894,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(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True Then + If Screen.Level.ShowOverworldPokemon = True And CBool(GameModeManager.GetGameRuleValue("ShowFollowPokemon", "1")) = True AndAlso CBool(GameModeManager.GetGameRuleValue("RandomFollowItemPickup", "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 diff --git a/P3D/Resources/GameModeManager.vb b/P3D/Resources/GameModeManager.vb index 1a8350b8f..503befcb1 100644 --- a/P3D/Resources/GameModeManager.vb +++ b/P3D/Resources/GameModeManager.vb @@ -643,6 +643,7 @@ Public Class GameMode gameRules.Add(New GameRule("GameOverAt0Pokemon", "0")) gameRules.Add(New GameRule("CanGetAchievements", "1")) gameRules.Add(New GameRule("ShowFollowPokemon", "1")) + gameRules.Add(New GameRule("RandomFollowItemPickup", "1")) gameRules.Add(New GameRule("OverworldPoison", "0")) gameRules.Add(New GameRule("SavingDisabled", "0")) gameRules.Add(New GameRule("SingleUseTM", "0"))