mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Different colors for regional & city exclusive outfits in outfits shops
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -166,4 +166,56 @@ end
|
||||
def get_hair_by_id(id)
|
||||
update_global_outfit_lists()
|
||||
return $PokemonGlobal.hairstyles_data.has_key?(id) ? $PokemonGlobal.hairstyles_data[id] : nil
|
||||
end
|
||||
|
||||
|
||||
def generate_clothes_choice(baseOptions=true,additionalIds=[],additionalTags=[],filterOutTags=[])
|
||||
list = []
|
||||
list += additionalIds
|
||||
list += search_clothes(additionalTags)
|
||||
if baseOptions
|
||||
list += get_clothes_base_options()
|
||||
list += search_clothes(get_regional_sets_tags())
|
||||
end
|
||||
return list
|
||||
end
|
||||
|
||||
|
||||
CITY_OUTFIT_TAGS= [
|
||||
"pewter","cerulean","vermillion","lavender","celadon","fuchsia","cinnabar",
|
||||
"crimson","goldenrod","azalea", "violet", "blackthorn", "mahogany", "ecruteak",
|
||||
"olivine","cianwood", "kin"
|
||||
]
|
||||
def list_city_exclusive_clothes()
|
||||
tags_list = CITY_OUTFIT_TAGS
|
||||
echoln search_clothes(tags_list)
|
||||
return search_clothes(tags_list)
|
||||
end
|
||||
|
||||
def list_city_exclusive_hats()
|
||||
tags_list = CITY_OUTFIT_TAGS
|
||||
return search_hats(tags_list)
|
||||
end
|
||||
|
||||
def list_city_exclusive_hairstyles()
|
||||
tags_list = CITY_OUTFIT_TAGS
|
||||
return search_hairstyles(tags_list)
|
||||
end
|
||||
|
||||
def list_regional_clothes()
|
||||
selector = OutfitSelector.new
|
||||
tags_list = selector.get_regional_sets_tags()
|
||||
return search_clothes(tags_list)
|
||||
end
|
||||
|
||||
def list_regional_hats()
|
||||
selector = OutfitSelector.new
|
||||
tags_list = selector.get_regional_sets_tags()
|
||||
return search_hats(tags_list)
|
||||
end
|
||||
|
||||
def list_regional_hairstyles()
|
||||
selector = OutfitSelector.new
|
||||
tags_list = selector.get_regional_sets_tags()
|
||||
return search_hairstyles(tags_list)
|
||||
end
|
||||
@@ -6,6 +6,13 @@ class OutfitsMartAdapter < PokemonMartAdapter
|
||||
WORN_ITEM_BASE_COLOR = MessageConfig::BLUE_TEXT_MAIN_COLOR
|
||||
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(72 , 104, 83)
|
||||
CITY_EXCLUSIVE_SHADOW_COLOR = Color.new(165, 189, 178)
|
||||
|
||||
def initialize(stock = [], isShop = true, isSecondaryHat = false)
|
||||
@is_secondary_hat = isSecondaryHat
|
||||
@items = stock
|
||||
@@ -14,6 +21,19 @@ class OutfitsMartAdapter < PokemonMartAdapter
|
||||
@version = nil
|
||||
$Trainer.dyed_hats = {} if !$Trainer.dyed_hats
|
||||
$Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes
|
||||
|
||||
#todo: refactor to get the list from the first search when
|
||||
# setting the stock instead of searching twice
|
||||
@regional_set_items = @isShop ? list_regional_set_items : []
|
||||
@city_exclusive_items = @isShop ? list_city_exclusive_items : []
|
||||
end
|
||||
|
||||
def list_regional_set_items()
|
||||
return []
|
||||
end
|
||||
|
||||
def list_city_exclusive_items()
|
||||
return []
|
||||
end
|
||||
|
||||
def getDisplayName(item)
|
||||
@@ -85,13 +105,23 @@ class OutfitsMartAdapter < PokemonMartAdapter
|
||||
super
|
||||
end
|
||||
|
||||
def isItemInRegionalSet(item)
|
||||
return @regional_set_items.include?(item.id)
|
||||
end
|
||||
|
||||
def isItemCityExclusive(item)
|
||||
return @city_exclusive_items.include?(item.id)
|
||||
end
|
||||
|
||||
def getBaseColorOverride(item)
|
||||
return WORN_ITEM_BASE_COLOR if isWornItem?(item)
|
||||
return nil
|
||||
return REGIONAL_SET_BASE_COLOR if isItemInRegionalSet(item)
|
||||
return CITY_EXCLUSIVE_BASE_COLOR if isItemCityExclusive(item)
|
||||
return nil
|
||||
end
|
||||
|
||||
def getShadowColorOverride(item)
|
||||
return WORN_ITEM_SHADOW_COLOR if isWornItem?(item)
|
||||
return REGIONAL_SET_SHADOW_COLOR if isItemInRegionalSet(item)
|
||||
return CITY_EXCLUSIVE_SHADOW_COLOR if isItemCityExclusive(item)
|
||||
return nil
|
||||
end
|
||||
|
||||
|
||||
@@ -10,6 +10,14 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
||||
end
|
||||
end
|
||||
|
||||
def list_regional_set_items()
|
||||
return list_regional_clothes
|
||||
end
|
||||
|
||||
def list_city_exclusive_items
|
||||
return list_city_exclusive_clothes
|
||||
end
|
||||
|
||||
def initialize(stock = nil, isShop = nil)
|
||||
super
|
||||
end
|
||||
@@ -103,4 +111,6 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
||||
def isWornItem?(item)
|
||||
super
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
@@ -143,4 +143,4 @@ def changeOutfit()
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -43,6 +43,15 @@ class HairMartAdapter < OutfitsMartAdapter
|
||||
return false
|
||||
end
|
||||
|
||||
def list_regional_set_items()
|
||||
return list_regional_hairstyles
|
||||
end
|
||||
|
||||
def list_city_exclusive_items
|
||||
return list_city_exclusive_hairstyles
|
||||
end
|
||||
|
||||
|
||||
def toggleEvent(item)
|
||||
pbSEPlay("GUI storage put down", 80, 100)
|
||||
toggleHatVisibility()
|
||||
|
||||
@@ -27,6 +27,14 @@ class HatsMartAdapter < OutfitsMartAdapter
|
||||
end
|
||||
end
|
||||
|
||||
def list_regional_set_items()
|
||||
return list_regional_hats
|
||||
end
|
||||
|
||||
def list_city_exclusive_items
|
||||
return list_city_exclusive_hats
|
||||
end
|
||||
|
||||
def set_secondary_hat(value)
|
||||
@is_secondary_hat = value
|
||||
end
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 446 KiB After Width: | Height: | Size: 447 KiB |
Reference in New Issue
Block a user