Fixed some minor bugs from previous commits

This commit is contained in:
Maruno17
2021-04-14 22:56:12 +01:00
parent 9f70b29795
commit 4bc744e3fb
7 changed files with 10 additions and 5 deletions

View File

@@ -363,7 +363,7 @@ class Interpreter
# * Else # * Else
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
def command_411 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) @branch.delete(@list[@index].indent)
return true return true
end end

View File

@@ -149,10 +149,10 @@ class Game_Event < Game_Character
end end
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 $game_system.map_interpreter.running?
return if @trigger != 2 # Event touch 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? return if jumping? || over_trigger?
start start
end end

View File

@@ -22,6 +22,8 @@ class Player < Trainer
attr_accessor :has_pokedex attr_accessor :has_pokedex
# @return [Boolean] whether the Pokégear has been obtained # @return [Boolean] whether the Pokégear has been obtained
attr_accessor :has_pokegear 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 # @return [Boolean] whether the creator of the Pokémon Storage System has been seen
attr_accessor :seen_storage_creator attr_accessor :seen_storage_creator
# @return [Boolean] whether Mystery Gift can be used from the load screen # @return [Boolean] whether Mystery Gift can be used from the load screen

View File

@@ -143,7 +143,7 @@ end
# @deprecated Use {Player#has_fateful_species?} instead. This alias is slated to be removed in v20. # @deprecated Use {Player#has_fateful_species?} instead. This alias is slated to be removed in v20.
def pbHasFatefulSpecies?(species) 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) return $Trainer.has_fateful_species?(species)
end end

View File

@@ -93,11 +93,13 @@ def hasConst?(mod,constant)
return mod.const_defined?(constant.to_sym) rescue false return mod.const_defined?(constant.to_sym) rescue false
end end
# Unused
def getConst(mod,constant) def getConst(mod,constant)
return nil if !mod || !constant || constant=="" return nil if !mod || !constant || constant==""
return mod.const_get(constant.to_sym) rescue nil return mod.const_get(constant.to_sym) rescue nil
end end
# Unused
def getID(mod,constant) def getID(mod,constant)
return nil if !mod || !constant || constant=="" return nil if !mod || !constant || constant==""
if constant.is_a?(Symbol) || constant.is_a?(String) if constant.is_a?(Symbol) || constant.is_a?(String)

View File

@@ -209,6 +209,7 @@ end
# Unused
class EnumProperty2 class EnumProperty2
def initialize(value) def initialize(value)
@module = value @module = value

View File

@@ -362,7 +362,7 @@ BattleBack = underwater
Environment = Underwater Environment = Underwater
#------------------------------- #-------------------------------
[071] [071]
# Harbour # Harbor
MapPosition = 0,13,13 MapPosition = 0,13,13
#------------------------------- #-------------------------------
[072] [072]