From 4bc744e3fb0bc18b44dab67870663a7c22d1a48b Mon Sep 17 00:00:00 2001 From: Maruno17 Date: Wed, 14 Apr 2021 22:56:12 +0100 Subject: [PATCH] Fixed some minor bugs from previous commits --- Data/Scripts/003_Game processing/003_Interpreter_Commands.rb | 2 +- Data/Scripts/004_Game classes/008_Game_Event.rb | 4 ++-- Data/Scripts/014_Trainers/004_Player.rb | 2 ++ Data/Scripts/014_Trainers/006_Player_Deprecated.rb | 2 +- .../Scripts/020_System and utilities/005_PSystem_Utilities.rb | 2 ++ Data/Scripts/021_Debug/007_Editor_DataTypes.rb | 1 + PBS/metadata.txt | 2 +- 7 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Data/Scripts/003_Game processing/003_Interpreter_Commands.rb b/Data/Scripts/003_Game processing/003_Interpreter_Commands.rb index 7c7ab2f2c..e19e3488f 100644 --- a/Data/Scripts/003_Game processing/003_Interpreter_Commands.rb +++ b/Data/Scripts/003_Game processing/003_Interpreter_Commands.rb @@ -363,7 +363,7 @@ class Interpreter # * Else #----------------------------------------------------------------------------- def command_411 - if !@branch[@list[@index].indent] + if @branch[@list[@index].indent] == false # Could be nil, so intentionally checks for false @branch.delete(@list[@index].indent) return true end diff --git a/Data/Scripts/004_Game classes/008_Game_Event.rb b/Data/Scripts/004_Game classes/008_Game_Event.rb index 565025883..4b405374b 100644 --- a/Data/Scripts/004_Game classes/008_Game_Event.rb +++ b/Data/Scripts/004_Game classes/008_Game_Event.rb @@ -149,10 +149,10 @@ class Game_Event < Game_Character end end - def check_event_trigger_touch(x, y) + def check_event_trigger_touch(check_x, check_y) return if $game_system.map_interpreter.running? return if @trigger != 2 # Event touch - return if !at_coordinate?($game_player.x, $game_player.y) + return if !at_coordinate?(check_x, check_y) return if jumping? || over_trigger? start end diff --git a/Data/Scripts/014_Trainers/004_Player.rb b/Data/Scripts/014_Trainers/004_Player.rb index b5f1bdd59..b632b973d 100644 --- a/Data/Scripts/014_Trainers/004_Player.rb +++ b/Data/Scripts/014_Trainers/004_Player.rb @@ -22,6 +22,8 @@ class Player < Trainer attr_accessor :has_pokedex # @return [Boolean] whether the Pokégear has been obtained attr_accessor :has_pokegear + # @return [Boolean] whether the player has running shoes (i.e. can run) + attr_accessor :has_running_shoes # @return [Boolean] whether the creator of the Pokémon Storage System has been seen attr_accessor :seen_storage_creator # @return [Boolean] whether Mystery Gift can be used from the load screen diff --git a/Data/Scripts/014_Trainers/006_Player_Deprecated.rb b/Data/Scripts/014_Trainers/006_Player_Deprecated.rb index 181686e98..c8b330007 100644 --- a/Data/Scripts/014_Trainers/006_Player_Deprecated.rb +++ b/Data/Scripts/014_Trainers/006_Player_Deprecated.rb @@ -143,7 +143,7 @@ end # @deprecated Use {Player#has_fateful_species?} instead. This alias is slated to be removed in v20. def pbHasFatefulSpecies?(species) - Deprecation.warn_method('pbHasSpecies?', 'v20', 'Player#has_fateful_species?') + Deprecation.warn_method('pbHasFatefulSpecies?', 'v20', 'Player#has_fateful_species?') return $Trainer.has_fateful_species?(species) end diff --git a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb index 24cd3a006..04e9ed1a9 100644 --- a/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb +++ b/Data/Scripts/020_System and utilities/005_PSystem_Utilities.rb @@ -93,11 +93,13 @@ def hasConst?(mod,constant) return mod.const_defined?(constant.to_sym) rescue false end +# Unused def getConst(mod,constant) return nil if !mod || !constant || constant=="" return mod.const_get(constant.to_sym) rescue nil end +# Unused def getID(mod,constant) return nil if !mod || !constant || constant=="" if constant.is_a?(Symbol) || constant.is_a?(String) diff --git a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb index 272cfa067..2d960e2e9 100644 --- a/Data/Scripts/021_Debug/007_Editor_DataTypes.rb +++ b/Data/Scripts/021_Debug/007_Editor_DataTypes.rb @@ -209,6 +209,7 @@ end +# Unused class EnumProperty2 def initialize(value) @module = value diff --git a/PBS/metadata.txt b/PBS/metadata.txt index d97c0fa73..35da38f12 100644 --- a/PBS/metadata.txt +++ b/PBS/metadata.txt @@ -362,7 +362,7 @@ BattleBack = underwater Environment = Underwater #------------------------------- [071] -# Harbour +# Harbor MapPosition = 0,13,13 #------------------------------- [072]