Fixed demo party not clearing the party before adding itself, fixed Pokémon icon renamer/mover not moving shiny Pokémon icons properly, added GameData#Something#keys method

This commit is contained in:
Maruno17
2021-04-28 23:27:11 +01:00
parent 1685bbc4d4
commit 5130b097ce
3 changed files with 22 additions and 1 deletions

View File

@@ -46,6 +46,12 @@ module GameData
return (self::DATA.has_key?(other)) ? self::DATA[other] : nil
end
# Returns the array of keys for the data.
# @return [Array]
def keys
return self::DATA.keys
end
# Yields all data in order of their id_number.
def each
keys = self::DATA.keys.sort { |a, b| self::DATA[a].id_number <=> self::DATA[b].id_number }
@@ -102,6 +108,12 @@ module GameData
return (self::DATA.has_key?(other)) ? self::DATA[other] : nil
end
# Returns the array of keys for the data.
# @return [Array]
def keys
return self::DATA.keys
end
# Yields all data in alphabetical order.
def each
keys = self::DATA.keys.sort { |a, b| self::DATA[a].real_name <=> self::DATA[b].real_name }
@@ -153,6 +165,12 @@ module GameData
return (self::DATA.has_key?(other)) ? self::DATA[other] : nil
end
# Returns the array of keys for the data.
# @return [Array]
def keys
return self::DATA.keys
end
# Yields all data in numberical order.
def each
keys = self::DATA.keys.sort