Renamed variables and methods relating to the Bag, renamed $PokemonBag to $Bag, $bag.has? can now check for a minimum quantity

This commit is contained in:
Maruno17
2021-10-17 23:02:58 +01:00
parent 72c50db6c0
commit 36ff7c4ba3
30 changed files with 502 additions and 426 deletions

View File

@@ -1873,7 +1873,7 @@ class PokemonStorageScreen
if pokemon.item
itemname = pokemon.item.name
if pbConfirm(_INTL("Take this {1}?",itemname))
if !$PokemonBag.pbStoreItem(pokemon.item)
if !$bag.add(pokemon.item)
pbDisplay(_INTL("Can't store the {1}.",itemname))
else
pbDisplay(_INTL("Took the {1}.",itemname))
@@ -1882,11 +1882,11 @@ class PokemonStorageScreen
end
end
else
item = scene.pbChooseItem($PokemonBag)
item = scene.pbChooseItem($bag)
if item
itemname = GameData::Item.get(item).name
pokemon.item = item
$PokemonBag.pbDeleteItem(item)
$bag.remove(item)
pbDisplay(_INTL("{1} is now being held.",itemname))
@scene.pbHardRefresh
end