mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Fixes hairstyles with more than 4 versions causing players to go bald when swapping hairstyle
This commit is contained in:
Binary file not shown.
@@ -148,4 +148,12 @@ class OutfitsMartAdapter < PokemonMartAdapter
|
||||
def showQuantity?(item)
|
||||
super
|
||||
end
|
||||
|
||||
def updateVersion(item)
|
||||
@version = 1 if !currentVersionExists?(item)
|
||||
end
|
||||
|
||||
def currentVersionExists?(item)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -94,6 +94,7 @@ class ClothesShopView < PokemonMart_Scene
|
||||
description = @adapter.getSpecialItemDescription(itemwindow.item)
|
||||
else
|
||||
description = @adapter.getDescription(itemwindow.item)
|
||||
@adapter.updateVersion(itemwindow.item)
|
||||
end
|
||||
@adapter.updateTrainerPreview(itemwindow.item, @sprites["trainerPreview"])
|
||||
else
|
||||
|
||||
@@ -107,7 +107,6 @@ class HairMartAdapter < OutfitsMartAdapter
|
||||
|
||||
def getItemIcon(item)
|
||||
return Settings::BACK_ITEM_ICON_PATH if !item
|
||||
itemId = getCurrentHairId(item.id)
|
||||
return getOverworldHatFilename(item.id)
|
||||
end
|
||||
|
||||
@@ -115,6 +114,7 @@ class HairMartAdapter < OutfitsMartAdapter
|
||||
item = @previous_item if !item
|
||||
item = @previous_item if item.is_a?(Symbol)
|
||||
@previous_item = find_first_item() if !item.is_a?(Symbol)
|
||||
|
||||
displayed_hat = @hat_visible ? @worn_hat : nil
|
||||
displayed_hat2 = @hat_visible ? @worn_hat2 : nil
|
||||
|
||||
@@ -200,4 +200,10 @@ class HairMartAdapter < OutfitsMartAdapter
|
||||
switchVersion(nil,1)
|
||||
end
|
||||
|
||||
def currentVersionExists?(item)
|
||||
hairId = getCurrentHairId(item.id)
|
||||
filename = getOverworldHairFilename(hairId)
|
||||
return pbResolveBitmap(filename)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -1299,7 +1299,7 @@ end
|
||||
def exit_pokemart()
|
||||
pokemart_entrances = {
|
||||
:PEWTER => [380, 43, 24],
|
||||
:CERULEAN => [1, 19, 22],
|
||||
:CERULEAN => [1, 24, 22],
|
||||
:VERMILLION => [19, 32, 13],
|
||||
:LAVENDER => [50, 20, 23],
|
||||
:CELADON => [95, 18, 15], # not a real pokemart
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user