mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes issue with hat swapping
This commit is contained in:
@@ -70,6 +70,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
|
||||
def pbBuyScreen
|
||||
@scene.pbStartBuyScene(@stock, @adapter)
|
||||
@scene.select_specific_item(@adapter.worn_clothes) if !@adapter.isShop?
|
||||
item = nil
|
||||
loop do
|
||||
item = @scene.pbChooseBuyItem
|
||||
|
||||
@@ -24,13 +24,18 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
end
|
||||
|
||||
def swapHats()
|
||||
echoln "hat 1: #{$Trainer.hat}"
|
||||
echoln "hat 2: #{$Trainer.hat2}"
|
||||
|
||||
|
||||
$Trainer.hat, $Trainer.hat2 = $Trainer.hat2, $Trainer.hat
|
||||
#$Trainer.hat_color,$Trainer.hat2_color=$Trainer.hat2_color,$Trainer.hat_color
|
||||
|
||||
pbSEPlay("GUI naming tab swap start")
|
||||
|
||||
|
||||
new_selected_hat = @adapter.is_secondary_hat ? $Trainer.hat2 : $Trainer.hat
|
||||
echoln "hat 1: #{$Trainer.hat}"
|
||||
echoln "hat 2: #{$Trainer.hat2}"
|
||||
echoln "new selected hat: #{new_selected_hat}"
|
||||
|
||||
@scene.select_specific_item(new_selected_hat,true)
|
||||
@scene.updatePreviewWindow
|
||||
end
|
||||
|
||||
@@ -29,7 +29,6 @@ class ClothesShopView < PokemonMart_Scene
|
||||
itemwindow.index=@adapter.items.length-1
|
||||
itemwindow.refresh
|
||||
end
|
||||
|
||||
i=0
|
||||
for item in @adapter.items
|
||||
next if !item.is_a?(Outfit)
|
||||
@@ -117,7 +116,6 @@ class ClothesShopView < PokemonMart_Scene
|
||||
def pbChooseBuyItem
|
||||
itemwindow = @sprites["itemwindow"]
|
||||
refreshStock(@adapter) if !itemwindow
|
||||
select_specific_item(@adapter.worn_clothes) if !@adapter.isShop?
|
||||
displayNewItem(itemwindow)
|
||||
@sprites["helpwindow"].visible = false
|
||||
pbActivateWindow(@sprites, "itemwindow") {
|
||||
|
||||
@@ -7,8 +7,8 @@ class HatsMartAdapter < OutfitsMartAdapter
|
||||
|
||||
def initialize(stock = nil, isShop = nil, isSecondaryHat = false)
|
||||
super(stock,isShop,isSecondaryHat)
|
||||
@worn_clothes = $Trainer.hat(false)
|
||||
@worn_clothes2 = $Trainer.hat(true)
|
||||
@worn_clothes = $Trainer.hat
|
||||
@worn_clothes2 = $Trainer.hat2
|
||||
end
|
||||
|
||||
def toggleEvent(item)
|
||||
|
||||
Reference in New Issue
Block a user