mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-01-23 23:06:00 +00:00
Refactoring and Bugfixes (#127)
* Replacing nil + compact! with delete, delete_at and delete_if wherever possible * Fixed Terrain Tag editor not setting the correct terrain * Fixed Text Cursor in Animation Editor not going right
This commit is contained in:
@@ -588,12 +588,7 @@ class PokemonMartScreen
|
||||
pbDisplayPaused(_INTL("You have no more room in the Bag."))
|
||||
else
|
||||
@adapter.setMoney(@adapter.getMoney-price)
|
||||
for i in 0...@stock.length
|
||||
if GameData::Item.get(@stock[i]).is_important? && $PokemonBag.pbHasItem?(@stock[i])
|
||||
@stock[i]=nil
|
||||
end
|
||||
end
|
||||
@stock.compact!
|
||||
@stock.delete_if { |item| GameData::Item.get(item).is_important? && $PokemonBag.pbHasItem?(item) }
|
||||
pbDisplayPaused(_INTL("Here you are! Thank you!")) { pbSEPlay("Mart buy item") }
|
||||
if quantity >= 10 && $PokemonBag && GameData::Item.exists?(:PREMIERBALL)
|
||||
if Settings::MORE_BONUS_PREMIER_BALLS && GameData::Item.get(item).is_poke_ball?
|
||||
@@ -660,11 +655,7 @@ end
|
||||
#
|
||||
#===============================================================================
|
||||
def pbPokemonMart(stock,speech=nil,cantsell=false)
|
||||
for i in 0...stock.length
|
||||
stock[i] = GameData::Item.get(stock[i]).id
|
||||
stock[i] = nil if GameData::Item.get(stock[i]).is_important? && $PokemonBag.pbHasItem?(stock[i])
|
||||
end
|
||||
stock.compact!
|
||||
stock.delete_if { |item| GameData::Item.get(item).is_important? && $PokemonBag.pbHasItem?(item) }
|
||||
commands = []
|
||||
cmdBuy = -1
|
||||
cmdSell = -1
|
||||
|
||||
Reference in New Issue
Block a user