Implemented GameData BagPocket

This commit is contained in:
Maruno17
2024-09-14 01:27:17 +01:00
parent d8263da05e
commit 801c2d35c6
15 changed files with 268 additions and 95 deletions

View File

@@ -375,6 +375,14 @@ module Compiler
end
def validate_compiled_item(hash)
# Support for pockets still being numbers
if hash[:pocket] && hash[:pocket].is_a?(Integer)
all_pockets = GameData::BagPocket.all_pockets
if hash[:pocket] <= 0 || !all_pockets[hash[:pocket] - 1]
raise _INTL("Invalid pocket number {1} for item {2}.", hash[:pocket], hash[:id])
end
hash[:pocket] = all_pockets[hash[:pocket] - 1]
end
end
def validate_all_compiled_items