Removed all uses of ID numbers for species, some other code changes for abolishing ID numbers

This commit is contained in:
Maruno17
2021-06-16 22:42:20 +01:00
parent 8c67127f06
commit e9457a3ea8
22 changed files with 965 additions and 1750 deletions

View File

@@ -114,8 +114,13 @@ module GameData
return self::DATA.keys
end
# Yields all data in alphabetical order.
# Yields all data in the order they were defined.
def each
self::DATA.each_value { |value| yield value }
end
# Yields all data in alphabetical order.
def each_alphabetically
keys = self::DATA.keys.sort { |a, b| self::DATA[a].real_name <=> self::DATA[b].real_name }
keys.each { |key| yield self::DATA[key] }
end