mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes swapping hats visual glitch when only wearing one hat
This commit is contained in:
@@ -81,6 +81,11 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
|||||||
$Trainer.clothes != @worn_clothes
|
$Trainer.clothes != @worn_clothes
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def putOnSelectedOutfit()
|
||||||
|
putOnClothes($Trainer.clothes)
|
||||||
|
@worn_clothes = $Trainer.clothes
|
||||||
|
end
|
||||||
|
|
||||||
def putOnOutfit(item)
|
def putOnOutfit(item)
|
||||||
putOnClothes(item.id) if item
|
putOnClothes(item.id) if item
|
||||||
@worn_clothes = item.id if item
|
@worn_clothes = item.id if item
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# returns if should stay in the menu
|
# returns true if should stay in the menu
|
||||||
def playerClothesActionsMenu(item)
|
def playerClothesActionsMenu(item)
|
||||||
cmd_wear = "Wear"
|
cmd_wear = "Wear"
|
||||||
cmd_dye = "Dye Kit"
|
cmd_dye = "Dye Kit"
|
||||||
@@ -59,9 +59,9 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
choice = pbMessage("What would you like to do?", options, -1)
|
choice = pbMessage("What would you like to do?", options, -1)
|
||||||
|
|
||||||
if options[choice] == cmd_wear
|
if options[choice] == cmd_wear
|
||||||
putOnClothes(item)
|
putOnClothes(item,false)
|
||||||
$Trainer.clothes_color = @adapter.get_dye_color(item.id)
|
$Trainer.clothes_color = @adapter.get_dye_color(item.id)
|
||||||
return false
|
return true
|
||||||
elsif options[choice] == cmd_dye
|
elsif options[choice] == cmd_dye
|
||||||
dyeClothes()
|
dyeClothes()
|
||||||
end
|
end
|
||||||
@@ -72,8 +72,8 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
putOnClothes(item)
|
putOnClothes(item)
|
||||||
end
|
end
|
||||||
|
|
||||||
def quitMenuPrompt(item)
|
def quitMenuPrompt()
|
||||||
return true if !@adapter.is_a?(HatsMartAdapter)
|
return true if !(@adapter.is_a?(HatsMartAdapter) || @adapter.is_a?(ClothesMartAdapter))
|
||||||
boolean_changes_detected = @adapter.player_changed_clothes?
|
boolean_changes_detected = @adapter.player_changed_clothes?
|
||||||
return true if !boolean_changes_detected
|
return true if !boolean_changes_detected
|
||||||
pbPlayCancelSE
|
pbPlayCancelSE
|
||||||
@@ -81,10 +81,10 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
cmd_discard = "Discard changes"
|
cmd_discard = "Discard changes"
|
||||||
cmd_cancel = "Cancel"
|
cmd_cancel = "Cancel"
|
||||||
options = [cmd_confirm,cmd_discard,cmd_cancel]
|
options = [cmd_confirm,cmd_discard,cmd_cancel]
|
||||||
choice = pbMessage("You have unsaved changes!",options,2)
|
choice = pbMessage("You have unsaved changes!",options,3)
|
||||||
case options[choice]
|
case options[choice]
|
||||||
when cmd_confirm
|
when cmd_confirm
|
||||||
confirmPutClothes(item)
|
@adapter.putOnSelectedOutfit
|
||||||
pbPlayDecisionSE
|
pbPlayDecisionSE
|
||||||
return true
|
return true
|
||||||
when cmd_discard
|
when cmd_discard
|
||||||
@@ -104,7 +104,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
#break if !item
|
#break if !item
|
||||||
if !item
|
if !item
|
||||||
break if @adapter.isShop?
|
break if @adapter.isShop?
|
||||||
quit_menu_choice = quitMenuPrompt(item)
|
quit_menu_choice = quitMenuPrompt()
|
||||||
break if quit_menu_choice
|
break if quit_menu_choice
|
||||||
item = @scene.pbChooseBuyItem
|
item = @scene.pbChooseBuyItem
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ class ClothesShopPresenter < PokemonMartScreen
|
|||||||
end
|
end
|
||||||
|
|
||||||
def playerHatActionsMenu(item)
|
def playerHatActionsMenu(item)
|
||||||
|
echoln caller
|
||||||
|
|
||||||
cmd_confirm = "Confirm"
|
cmd_confirm = "Confirm"
|
||||||
cmd_remove = "Remove hat"
|
cmd_remove = "Remove hat"
|
||||||
cmd_cancel = "Cancel"
|
cmd_cancel = "Cancel"
|
||||||
|
|||||||
@@ -38,15 +38,28 @@ class HatShopView < ClothesShopView
|
|||||||
return @stock[itemwindow.index]
|
return @stock[itemwindow.index]
|
||||||
end
|
end
|
||||||
|
|
||||||
def displayLayerIcons(selected_item=nil)
|
def handleHatlessLayerIcons(selected_item)
|
||||||
|
other_hat = @adapter.is_secondary_hat ? $Trainer.hat : $Trainer.hat2
|
||||||
if !selected_item.is_a?(Hat)
|
if !selected_item.is_a?(Hat)
|
||||||
if @adapter.is_secondary_hat
|
if @adapter.is_secondary_hat
|
||||||
@sprites["wornHat_layer2"].bitmap=nil
|
@sprites["wornHat_layer2"].bitmap=nil
|
||||||
else
|
else
|
||||||
@sprites["wornHat_layer1"].bitmap=nil
|
@sprites["wornHat_layer1"].bitmap=nil
|
||||||
end
|
end
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
if !other_hat.is_a?(Hat)
|
||||||
|
if @adapter.is_secondary_hat
|
||||||
|
@sprites["wornHat_layer1"].bitmap=nil
|
||||||
|
else
|
||||||
|
@sprites["wornHat_layer2"].bitmap=nil
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
def displayLayerIcons(selected_item=nil)
|
||||||
|
echoln selected_item
|
||||||
|
handleHatlessLayerIcons(selected_item)
|
||||||
|
|
||||||
hat1Filename = getOverworldHatFilename($Trainer.hat)
|
hat1Filename = getOverworldHatFilename($Trainer.hat)
|
||||||
hat2Filename = getOverworldHatFilename($Trainer.hat2)
|
hat2Filename = getOverworldHatFilename($Trainer.hat2)
|
||||||
|
|
||||||
@@ -65,6 +78,10 @@ class HatShopView < ClothesShopView
|
|||||||
|
|
||||||
@sprites["wornHat_layer1"].src_rect.set(0, 0, frame_width, frame_height) if hatBitmapWrapper
|
@sprites["wornHat_layer1"].src_rect.set(0, 0, frame_width, frame_height) if hatBitmapWrapper
|
||||||
@sprites["wornHat_layer2"].src_rect.set(0, 0, frame_width, frame_height) if hat2BitmapWrapper
|
@sprites["wornHat_layer2"].src_rect.set(0, 0, frame_width, frame_height) if hat2BitmapWrapper
|
||||||
|
|
||||||
|
echoln hatBitmapWrapper
|
||||||
|
echoln hat2BitmapWrapper
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,14 @@ class HatsMartAdapter < OutfitsMartAdapter
|
|||||||
$Trainer.hat != @worn_clothes || $Trainer.hat2 != @worn_clothes2
|
$Trainer.hat != @worn_clothes || $Trainer.hat2 != @worn_clothes2
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def putOnSelectedOutfit()
|
||||||
|
putOnHat($Trainer.hat,true,false) if $Trainer.hat
|
||||||
|
putOnHat($Trainer.hat2,true,true) if $Trainer.hat2
|
||||||
|
|
||||||
|
@worn_clothes = $Trainer.hat
|
||||||
|
@worn_clothes2 = $Trainer.hat2
|
||||||
|
end
|
||||||
|
|
||||||
def putOnOutfit(item)
|
def putOnOutfit(item)
|
||||||
return unless item.is_a?(Outfit)
|
return unless item.is_a?(Outfit)
|
||||||
putOnHat(item.id,false,@is_secondary_hat)
|
putOnHat(item.id,false,@is_secondary_hat)
|
||||||
|
|||||||
Binary file not shown.
14814
Data/pokedex/dex.json
14814
Data/pokedex/dex.json
File diff suppressed because it is too large
Load Diff
@@ -1,2 +1 @@
|
|||||||
1741877280
|
1741964572
|
||||||
1741877284
|
|
||||||
@@ -499,3 +499,131 @@ Graphics/CustomBattlers/spritesheets/spritesheets_custom/400/400.png
|
|||||||
Graphics/CustomBattlers/spritesheets/spritesheets_base/146.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/146.png
|
||||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/33/33.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/33/33.png
|
||||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/62/62.png
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/62/62.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/257.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/322/322.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/239.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/480.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/307/307.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/353.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/494.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/315.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/315/315.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/276.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/487.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/487/487.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/148.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/79.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/421/421.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/12/12.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/416.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/416/416.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/445.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/445/445.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/39.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/87.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/87/87.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/72.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/72/72a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/395.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/404.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/404/404.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/208/208.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/477.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/12/12a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/316/316.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/203.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/203/203a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/64.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/64/64.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/124/124.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/9/9.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/388.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/388/388.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/325.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/482.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/482/482.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/479.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/156.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/156/156.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/394.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/394/394.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/90.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/90/90.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/326.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/21.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/309/309.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/357.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/151.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/433.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/249/249.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/195.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/195/195.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/130.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/455/455.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/373/373.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/129/129a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/463/463.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/241.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/419.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/39/39.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/148/148.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/294.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/294/294.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/221.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/221/221.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/202/202.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/190.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/467.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/467/467.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/470.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/432.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/45.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/45/45.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/28/28.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/276/276.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/226/226a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/187.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/187/187.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/435.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/435/435b.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/34.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/59.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/139.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/189.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/96.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/96/96.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/3.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/323.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/323/323a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/358.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/358/358a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/491.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/491/491.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/46/46a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/327.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/23.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/23/23.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/189/189.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/267/267.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/17.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/17/17.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/449.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/449/449.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/434/434.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/320.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/320/320.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/406/406.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/425/425.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/56.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/56/56.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/36/36a.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/285.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/442.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/286.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/501.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/94/94c.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/303.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/303/303.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_base/35.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/162/162.png
|
||||||
|
Graphics/CustomBattlers/spritesheets/spritesheets_custom/372/372.png
|
||||||
|
|||||||
Reference in New Issue
Block a user