mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Implemented GameData BagPocket
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user