Fixes issue with hat swapping

This commit is contained in:
chardub
2025-03-09 15:38:16 -04:00
parent dc4ec939cd
commit 071621b8dd
9 changed files with 36 additions and 11 deletions

View File

@@ -63,11 +63,11 @@ class Sprite_Player < Sprite_Character
outfitFilename = getOverworldOutfitFilename(Settings::PLAYER_TEMP_OUTFIT_FALLBACK) if !pbResolveBitmap(outfitFilename)
hairFilename = getOverworldHairFilename($Trainer.hair)
hatFilename = getOverworldHatFilename($Trainer.hat)
hat2Filename = getOverworldHatFilename($Trainer.hat(true))
hat2Filename = getOverworldHatFilename($Trainer.hat2)
hair_color_shift = $Trainer.hair_color
hat_color_shift = $Trainer.hat_color
hat2_color_shift = $Trainer.hat_color(true)
hat2_color_shift = $Trainer.hat2_color
clothes_color_shift = $Trainer.clothes_color

View File

@@ -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

View File

@@ -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

View File

@@ -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") {

View File

@@ -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)

Binary file not shown.

View File

@@ -1,2 +1,7 @@
1741542225
1741542225
1741548975
1741548979
1741548983
1741548990
1741549010
1741549014
1741549014

View File

@@ -709,3 +709,17 @@ Graphics/CustomBattlers/spritesheets/spritesheets_custom/468/468a.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/296/296a.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/418.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/418/418.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/454/454.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/491.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/491/491.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/407.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/407/407.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/193/193.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/168.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/405.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/405/405.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/268.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/336.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/246/246.png
Graphics/CustomBattlers/spritesheets/spritesheets_base/317.png
Graphics/CustomBattlers/spritesheets/spritesheets_custom/317/317.png

View File

@@ -699,6 +699,8 @@
691,PINKANBERRY,Pinkan Berry,Pinkan Berries,5,0,"A type of Berry that is only found on Pinkan Island. This berry turns Pokémon that eats it pink.",0,0,5,
692,EMERGENCYWHISTLE,Emergency Whistle,Emergency Whistle,8,0,"A small whistle that emits a loud, high-pitched noise. It can be used to alert others.",0,0,6,
693,FAVORITEOUTFIT,Favorite Outfit,Favorite Outfits,8,0,"Allows you to quickly switch to the outfit you've marked as your favorite.",2,0,6,
694,HATSDYEKIT,Hats Dye Kit,Hats Dye Kits,8,0,"A nifty kit that can be used to dye your hats in different colours from the Outfits menu",2,0,6,
695,CLOTHESDYEKIT,Clothes Dye Kit,Hats Dye Kits,8,0,"A nifty kit that can be used to dye your clothes in different colours from the Outfits menu",2,0,6,