mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-10 06:34:59 +00:00
Track dyed clothes individually
This commit is contained in:
@@ -2,6 +2,14 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
||||
DEFAULT_NAME = "[unknown]"
|
||||
DEFAULT_DESCRIPTION = "A piece of clothing that trainers can wear."
|
||||
|
||||
def toggleEvent(item)
|
||||
if !isShop? && $Trainer.clothes_color != 0
|
||||
if pbConfirmMessage(_INTL("Would you like to remove the dye?"))
|
||||
$Trainer.clothes_color = 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def initialize(stock = nil, isShop = nil)
|
||||
super
|
||||
end
|
||||
@@ -29,10 +37,34 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
||||
return if !item
|
||||
previewWindow.clothes = item.id
|
||||
$Trainer.clothes = item.id
|
||||
set_dye_color(item,previewWindow)
|
||||
|
||||
pbRefreshSceneMap
|
||||
previewWindow.updatePreview()
|
||||
end
|
||||
|
||||
def get_dye_color(item)
|
||||
$Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes
|
||||
if $Trainer.dyed_clothes.include?(item.id)
|
||||
return $Trainer.dyed_clothes[item.id]
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
def set_dye_color(item,previewWindow)
|
||||
if !isShop?
|
||||
$Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes
|
||||
if $Trainer.dyed_clothes.include?(item.id)
|
||||
dye_color = $Trainer.dyed_clothes[item.id]
|
||||
$Trainer.clothes_color = dye_color
|
||||
previewWindow.clothes_color = dye_color
|
||||
else
|
||||
$Trainer.clothes_color=0
|
||||
previewWindow.clothes_color=0
|
||||
end
|
||||
echoln $Trainer.dyed_clothes
|
||||
end
|
||||
end
|
||||
|
||||
def addItem(item)
|
||||
changed_clothes = obtainClothes(item.id)
|
||||
|
||||
Reference in New Issue
Block a user