Added more save data conversions

This commit is contained in:
Maruno17
2021-03-01 19:12:32 +00:00
parent fa99c2bcd7
commit ec742ac5f2
9 changed files with 124 additions and 43 deletions

View File

@@ -18,7 +18,8 @@ end
class PokemonMail
attr_reader :item, :message, :sender, :poke1, :poke2, :poke3
def self.copy(mail)
def self.convert(mail)
return mail if mail.is_a?(Mail)
item.poke1[0] = GameData::Species.get(item.poke1[0]).id if item.poke1
item.poke2[0] = GameData::Species.get(item.poke2[0]).id if item.poke2
item.poke3[0] = GameData::Species.get(item.poke3[0]).id if item.poke3

View File

@@ -190,6 +190,8 @@ end
# The PC item storage object, which actually contains all the items
#===============================================================================
class PCItemStorage
attr_reader :items
MAX_SIZE = 999 # Number of different slots in storage
MAX_PER_SLOT = 999 # Max. number of items per slot