Update 6.8

This commit is contained in:
chardub
2026-07-10 15:42:06 -04:00
parent 5b85e72cb2
commit 6a6f126a18
7871 changed files with 493194 additions and 224826 deletions
@@ -7,22 +7,32 @@ class OutfitsMartAdapter < PokemonMartAdapter
WORN_ITEM_SHADOW_COLOR = MessageConfig::BLUE_TEXT_SHADOW_COLOR
REGIONAL_SET_BASE_COLOR = Color.new(76,72,104)
REGIONAL_SET_SHADOW_COLOR = Color.new(173,165,189)
CITY_EXCLUSIVE_BASE_COLOR = Color.new(61 , 125, 70) #Color.new(72 , 104, 83)
CITY_EXCLUSIVE_SHADOW_COLOR = Color.new(165, 189, 178)
def initialize(stock = [], isShop = true, isSecondaryHat = false)
def initialize(stock = [], isShop = true, isSecondaryHat = false, prices_override = {})
@is_secondary_hat = isSecondaryHat
@items = stock
@worn_clothes = get_current_clothes()
@isShop = isShop
@version = nil
@prices_override = prices_override
$Trainer.dyed_hats = {} if !$Trainer.dyed_hats
$Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes
@REGIONAL_SET_BASE_COLOR = Color.new(76,72,104)
@REGIONAL_SET_SHADOW_COLOR = Color.new(173,165,189)
@CITY_EXCLUSIVE_BASE_COLOR = Color.new(61 , 125, 70) #Color.new(72 , 104, 83)
@CITY_EXCLUSIVE_SHADOW_COLOR = Color.new(165, 189, 178)
if isDarkMode
@REGIONAL_SET_BASE_COLOR, @REGIONAL_SET_SHADOW_COLOR = @REGIONAL_SET_SHADOW_COLOR, @REGIONAL_SET_BASE_COLOR
@CITY_EXCLUSIVE_BASE_COLOR, @CITY_EXCLUSIVE_SHADOW_COLOR = @CITY_EXCLUSIVE_SHADOW_COLOR, @CITY_EXCLUSIVE_BASE_COLOR
end
end
def list_regional_set_items()
return []
end
@@ -69,6 +79,9 @@ class OutfitsMartAdapter < PokemonMartAdapter
def getPrice(item, selling = nil)
return 0 if !@isShop
if @prices_override && @prices_override.has_key?(item.id)
return @prices_override[item.id]
end
return nil if itemOwned(item)
return item.price.to_i
end
@@ -101,6 +114,7 @@ class OutfitsMartAdapter < PokemonMartAdapter
end
def isItemInRegionalSet(item)
return false if Settings::HOENN
return item.is_in_regional_set
end
@@ -109,27 +123,40 @@ class OutfitsMartAdapter < PokemonMartAdapter
end
def getBaseColorOverride(item)
return REGIONAL_SET_BASE_COLOR if isItemInRegionalSet(item)
return CITY_EXCLUSIVE_BASE_COLOR if isItemCityExclusive(item)
return @REGIONAL_SET_BASE_COLOR if isItemInRegionalSet(item)
return @CITY_EXCLUSIVE_BASE_COLOR if isItemCityExclusive(item)
return nil
end
def getShadowColorOverride(item)
return REGIONAL_SET_SHADOW_COLOR if isItemInRegionalSet(item)
return CITY_EXCLUSIVE_SHADOW_COLOR if isItemCityExclusive(item)
return @REGIONAL_SET_SHADOW_COLOR if isItemInRegionalSet(item)
return @CITY_EXCLUSIVE_SHADOW_COLOR if isItemCityExclusive(item)
return nil
end
def getMoney
super
if Settings::HOENN
return $Trainer.cosmetics_money
else
super
end
end
def getMoneyString
super
if Settings::HOENN
$Trainer.cosmetics_money = 0 unless $Trainer.cosmetics_money
return pbGetCosmeticsMoneyString
else
super
end
end
def setMoney(value)
super
if Settings::HOENN
$Trainer.cosmetics_money = value
else
super
end
end
def getItemIconRect(_item)
@@ -10,8 +10,8 @@ class ClothesMartAdapter < OutfitsMartAdapter
end
end
def initialize(stock = nil, isShop = nil)
super
def initialize(stock = nil, isShop = nil, prices_override = {})
super(stock,isShop,false,prices_override)
end
def getName(item)
@@ -22,6 +22,7 @@ class ClothesMartAdapter < OutfitsMartAdapter
def getDescription(item)
return DEFAULT_DESCRIPTION if !item.description
return item.description
end
@@ -1,4 +1,4 @@
def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false, isShop=true, message=nil)
def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false, isShop=true, message=nil, price_overrides = {})
commands = []
commands[cmdBuy = commands.length] = _INTL("Buy")
commands[cmdQuit = commands.length] = _INTL("Quit")
@@ -6,13 +6,13 @@ def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false, isShop=
cmd = pbMessage(message, commands, cmdQuit + 1)
loop do
if cmdBuy >= 0 && cmd == cmdBuy
adapter = getAdapter(itemType, stock, isShop)
adapter = getAdapter(itemType, stock, isShop,false,price_overrides)
view = ClothesShopView.new()
presenter = getPresenter(itemType, view, stock, adapter, versions)
presenter.pbBuyScreen
break
else
pbMessage(_INTL("Please come again!"))
pbMessage(_INTL("Please come again!")) unless message
break
end
end
@@ -29,14 +29,14 @@ def getPresenter(itemType, view, stock, adapter, versions)
end
end
def getAdapter(itemType, stock, isShop, is_secondary=false)
def getAdapter(itemType, stock, isShop, is_secondary=false, prices_override={})
case itemType
when :CLOTHES
return ClothesMartAdapter.new(stock, isShop)
return ClothesMartAdapter.new(stock, isShop,prices_override)
when :HAT
return HatsMartAdapter.new(stock, isShop,is_secondary)
return HatsMartAdapter.new(stock, isShop,is_secondary,prices_override)
when :HAIR
return HairMartAdapter.new(stock, isShop)
return HairMartAdapter.new(stock, isShop,prices_override)
end
end
@@ -60,7 +60,7 @@ def hatShop(outfits_list = [], free=false, customMessage=nil)
genericOutfitsShopMenu(stock, :HAT,false,!free,customMessage)
end
def hairShop(outfits_list = [],free=false, customMessage=nil)
def hairShop(outfits_list = [],free=false, customMessage=nil,price_overrides={})
currentHair = getSimplifiedHairIdFromFullID($Trainer.hair)
stock = [:SWAP_COLOR]
#always add current hairstyle as first option (in case the player just wants to swap the color)
@@ -70,7 +70,19 @@ def hairShop(outfits_list = [],free=false, customMessage=nil)
outfit = get_hair_by_id(outfit_id)
stock << outfit if outfit
}
genericOutfitsShopMenu(stock, :HAIR, true,!free,customMessage)
genericOutfitsShopMenu(stock, :HAIR, true,!free,customMessage, price_overrides)
end
def pokemonHairstylesShop()
hairShop([HAIR_EEVEE,HAIR_TORCHIC,
HAIR_MUDKIP, HAIR_MAWILE,
HAIR_ROSERADE_M,HAIR_ROSERADE_F,
HAIR_LYCANROC, HAIR_HAPPINY,
HAIR_GARDEVOIR, HAIR_LEAFEON,
HAIR_ORICORIO,HAIR_TYRANITAR,
HAIR_HOOH,HAIR_CRESSELIA,
HAIR_LATIAS,])
end
def switchHatsPosition()
@@ -24,18 +24,10 @@ class ClothesShopPresenter < PokemonMartScreen
end
def swapHats()
echoln "hat 1: #{$Trainer.hat}"
echoln "hat 2: #{$Trainer.hat2}"
$Trainer.hat, $Trainer.hat2 = $Trainer.hat2, $Trainer.hat
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
@@ -1,7 +1,8 @@
class ClothesShopView < PokemonMart_Scene
def initialize(currency_name = "Money")
def initialize(currency_name = _INTL("Money"))
@currency_name = currency_name
@currency_name = COSMETIC_CURRENCY_NAME if Settings::HOENN
end
def pbStartBuyOrSellScene(buying, stock, adapter)
@@ -18,8 +19,9 @@ class ClothesShopView < PokemonMart_Scene
@sprites["trainerPreview"].show()
@sprites["moneywindow"].visible = false if !@adapter.isShop?
@sprites["itemwindow"].setAllowPageJump(false)
Kernel.pbDisplayText(@adapter.toggleText, 80, 200, 99999) if @adapter.toggleText
Kernel.pbDisplayText(@adapter.toggleText, 100, 240, 99999) if @adapter.toggleText
end
@@ -46,13 +48,27 @@ class ClothesShopView < PokemonMart_Scene
@initial_direction = $game_player.direction
$game_player.turn_down
pbRefreshSceneMap
# pbSEPlay("GUI menu open")
# $game_player.center($game_player.x+7, $game_player.y-5)
# @initial_direction = $game_player.direction
# $game_player.turn_down
# Graphics.update
# Input.update
# pbRefreshSceneMap
end
def scroll_back_map
@adapter.reset_player_clothes()
pbScrollMap(DIRECTION_LEFT, 7, 6)
pbScrollMap(DIRECTION_DOWN, 5, 6)
$game_player.turn_generic(@initial_direction)
# $game_player.center($game_player.x, $game_player.y)
# Graphics.update
# Input.update
# pbRefreshSceneMap
end
def refreshStock(adapter)
@@ -75,7 +91,7 @@ class ClothesShopView < PokemonMart_Scene
text = @adapter.getDescription(item)
end
else
text = _INTL("Quit.")
text = getQuitDescription
end
@sprites["itemtextwindow"].text = text
itemwindow.refresh
@@ -98,11 +114,14 @@ class ClothesShopView < PokemonMart_Scene
end
@adapter.updateTrainerPreview(itemwindow.item, @sprites["trainerPreview"])
else
description = _INTL("Quit.")
description = getQuitDescription
end
@sprites["itemtextwindow"].text = description
end
def getQuitDescription
return _INTL("Outfits are submitted by the community. More will be added with future updates.")
end
def updatePreviewWindow
itemwindow= @sprites["itemwindow"]
@adapter.updateTrainerPreview(itemwindow.item, @sprites["trainerPreview"])
@@ -123,15 +142,15 @@ class ClothesShopView < PokemonMart_Scene
if itemwindow.item != olditem
displayNewItem(itemwindow)
end
if Input.trigger?(Input::AUX1) #L button - disabled because same key as speed up...
#@adapter.switchVersion(itemwindow.item, -1)
#updateTrainerPreview()
if Input.trigger?(Input::L) #X button
@adapter.switchVersion(itemwindow.item, -1)
updateTrainerPreview()
end
if Input.trigger?(Input::AUX2) || Input.trigger?(Input::SHIFT) #R button
if Input.trigger?(Input::R) #Y button
switchItemVersion(itemwindow)
end
if Input.trigger?(Input::SPECIAL) #R button
if Input.trigger?(Input::SPECIAL) #Z button
@adapter.toggleEvent(itemwindow.item)
updateTrainerPreview()
end
@@ -4,9 +4,8 @@ class HairMartAdapter < OutfitsMartAdapter
POSSIBLE_VERSIONS = (1..9).to_a
def initialize(stock = nil, isShop = nil)
super
def initialize(stock = nil, isShop = nil, prices_override = {})
super(stock,isShop,false,prices_override)
@version = getCurrentHairVersion().to_i
@worn_hair = $Trainer.hair
@worn_hat = $Trainer.hat
@@ -61,9 +60,10 @@ class HairMartAdapter < OutfitsMartAdapter
def getPrice(item, selling = nil)
return 0 if !@isShop
if @prices_override && @prices_override.has_key?(item.id)
return @prices_override[item.id]
end
trainer_hair_id = getSplitHairFilenameAndVersionFromID(@worn_hair)[1]
return nil if item.id == trainer_hair_id
return item.price.to_i
end
@@ -87,7 +87,6 @@ class HairMartAdapter < OutfitsMartAdapter
end
def getName(item)
echoln $Trainer.hair
return item.id
end
@@ -2,7 +2,7 @@
class HatShopView < ClothesShopView
def initialize(currency_name = "Money")
def initialize(currency_name = _INTL("Money"))
@currency_name = currency_name
end
@@ -97,11 +97,15 @@ class HatShopView < ClothesShopView
@adapter.updateTrainerPreview(itemwindow.item, @sprites["trainerPreview"])
displayLayerIcons(item)
else
description = _INTL("Quit.")
description = getQuitDescription
end
@sprites["itemtextwindow"].text = description
end
def getQuitDescription
return _INTL("Hats are submitted by the community. More will be added with future updates.")
end
def updateTrainerPreview()
super
updateSelectedLayerGraphicsVisibility
@@ -5,14 +5,14 @@ class HatsMartAdapter < OutfitsMartAdapter
DEFAULT_NAME = "[unknown]"
DEFAULT_DESCRIPTION = "A headgear that trainers can wear."
def initialize(stock = nil, isShop = nil, isSecondaryHat = false)
super(stock,isShop,isSecondaryHat)
@worn_clothes = $Trainer.hat
@worn_clothes2 = $Trainer.hat2
def initialize(stock = nil, isShop = nil, isSecondaryHat = false, prices_override = {})
super(stock, isShop, isSecondaryHat, prices_override)
@worn_clothes = $Trainer.hat
@worn_clothes2 = $Trainer.hat2
@second_hat_visible = true
end
#Used in shops only
# Used in shops only
def toggleSecondHat()
@second_hat_visible = !@second_hat_visible
$Trainer.hat2 = @second_hat_visible ? @worn_clothes2 : nil
@@ -22,7 +22,7 @@ class HatsMartAdapter < OutfitsMartAdapter
if isShop?
toggleSecondHat
else
$Trainer.set_hat(nil,@is_secondary_hat)
$Trainer.set_hat(nil, @is_secondary_hat)
@worn_clothes = nil
end
end
@@ -42,7 +42,7 @@ class HatsMartAdapter < OutfitsMartAdapter
# return "Remove hat: #{toggleKey}"
end
def switchVersion(item,delta=1)
def switchVersion(item, delta = 1)
pbSEPlay("GUI storage put down", 80, 100)
return toggleSecondHat if isShop?
@is_secondary_hat = !@is_secondary_hat
@@ -67,12 +67,12 @@ class HatsMartAdapter < OutfitsMartAdapter
hat1 = @is_secondary_hat ? get_hat_by_id($Trainer.hat) : item
hat2 = @is_secondary_hat ? item : get_hat_by_id($Trainer.hat2)
previewWindow.set_hat(hat1.id,false) if hat1
previewWindow.set_hat(hat2.id,true) if hat2
previewWindow.set_hat(nil,true) if !@second_hat_visible #for toggling in shops
previewWindow.set_hat(hat1.id, false) if hat1
previewWindow.set_hat(hat2.id, true) if hat2
previewWindow.set_hat(nil, true) if !@second_hat_visible # for toggling in shops
hat1_color=0
hat2_color=0
hat1_color = 0
hat2_color = 0
hat1_color = $Trainer.dyed_hats[hat1.id] if hat1 && $Trainer.dyed_hats.include?(hat1.id)
hat2_color = $Trainer.dyed_hats[hat2.id] if hat2 && $Trainer.dyed_hats.include?(hat2.id)
previewWindow.hat_color = hat1_color
@@ -84,36 +84,34 @@ class HatsMartAdapter < OutfitsMartAdapter
$Trainer.hat2_color = hat2_color
else
$Trainer.set_hat(nil,@is_secondary_hat)
previewWindow.set_hat(nil,@is_secondary_hat)
$Trainer.set_hat(nil, @is_secondary_hat)
previewWindow.set_hat(nil, @is_secondary_hat)
end
pbRefreshSceneMap
previewWindow.updatePreview()
end
def get_dye_color(item_id)
return if !item_id
return 0 if isShop?
$Trainer.dyed_hats= {} if ! $Trainer.dyed_hats
$Trainer.dyed_hats = {} if !$Trainer.dyed_hats
if $Trainer.dyed_hats.include?(item_id)
return $Trainer.dyed_hats[item_id]
end
return 0
end
def set_dye_color(item,previewWindow,is_secondary_hat=false)
def set_dye_color(item, previewWindow, is_secondary_hat = false)
return if !item
if !isShop?
else
$Trainer.set_hat_color(0,is_secondary_hat)
previewWindow.hat_color=0
$Trainer.set_hat_color(0, is_secondary_hat)
previewWindow.hat_color = 0
end
end
# def set_dye_color(item,previewWindow,is_secondary_hat=false)
# return if !item
# if !isShop?
@@ -138,10 +136,9 @@ class HatsMartAdapter < OutfitsMartAdapter
# end
# end
def addItem(item)
return unless item.is_a?(Outfit)
changed_clothes = obtainHat(item.id,@is_secondary_hat)
changed_clothes = obtainHat(item.id, @is_secondary_hat)
if changed_clothes
@worn_clothes = item.id
end
@@ -159,8 +156,8 @@ class HatsMartAdapter < OutfitsMartAdapter
def putOnSelectedOutfit()
putOnHat($Trainer.hat,true,false) if $Trainer.hat
putOnHat($Trainer.hat2,true,true) if $Trainer.hat2
putOnHat($Trainer.hat, true, false) if $Trainer.hat
putOnHat($Trainer.hat2, true, true) if $Trainer.hat2
@worn_clothes = $Trainer.hat
@worn_clothes2 = $Trainer.hat2
@@ -171,16 +168,16 @@ class HatsMartAdapter < OutfitsMartAdapter
def putOnOutfit(item)
return unless item.is_a?(Outfit)
putOnHat(item.id,false,@is_secondary_hat)
putOnHat(item.id, false, @is_secondary_hat)
@worn_clothes = item.id
end
def reset_player_clothes()
$Trainer.set_hat(@worn_clothes,false)
$Trainer.set_hat(@worn_clothes2,true)
$Trainer.set_hat(@worn_clothes, false)
$Trainer.set_hat(@worn_clothes2, true)
$Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes],false) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes]
$Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes2],true) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes2]
$Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes], false) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes]
$Trainer.set_hat_color($Trainer.dyed_hats[@worn_clothes2], true) if $Trainer.dyed_hats && $Trainer.dyed_hats[@worn_clothes2]
end
def get_unlocked_items_list()
@@ -190,7 +187,7 @@ class HatsMartAdapter < OutfitsMartAdapter
def getSpecialItemCaption(specialType)
case specialType
when :REMOVE_HAT
return "Remove hat"
return _INTL("Remove hat")
end
return nil
end
@@ -210,13 +207,18 @@ class HatsMartAdapter < OutfitsMartAdapter
end
return nil
end
def isBald?
return true unless $Trainer.hair
bald_ids = [HAIR_BALD, HAIR_BALD_POLISHED]
hair_id = getSimplifiedHairIdFromFullID($Trainer.hair)
return bald_ids.include?(hair_id)
end
def getSpecialItemDescription(specialType)
hair_situation = !$Trainer.hair || getSimplifiedHairIdFromFullID($Trainer.hair) == HAIR_BALD ? "bald head" : "fabulous hair"
return "Go without a hat and show off your #{hair_situation}!"
hair_situation = isBald?() ? "bald head" : "fabulous hair"
return _INTL("Go without a hat and show off your {1}!",hair_situation)
end
def doSpecialItemAction(specialType,item=nil)
def doSpecialItemAction(specialType, item = nil)
toggleEvent(item)
end
end