Track dyed clothes individually

This commit is contained in:
infinitefusion
2024-12-27 22:58:50 -05:00
parent 5e07802681
commit de8f9603dc
23 changed files with 3435 additions and 73 deletions

View File

@@ -19,6 +19,10 @@ class Player < Trainer
attr_accessor :unlocked_hairstyles
attr_accessor :unlocked_card_backgrounds
attr_accessor :dyed_hats
attr_accessor :dyed_clothes
attr_accessor :last_worn_outfit
attr_accessor :last_worn_hat
@@ -121,6 +125,19 @@ class Player < Trainer
refreshPlayerOutfit()
end
def clothes_color=(value)
@clothes_color=value
$Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes
$Trainer.dyed_clothes[@clothes] = value
refreshPlayerOutfit()
end
def hat_color=(value)
@hat_color=value
$Trainer.dyed_hats= {} if ! $Trainer.dyed_hats
$Trainer.dyed_hats[@hat] = value
refreshPlayerOutfit()
end
def unlock_clothes(outfitID,silent=false)
update_global_clothes_list()
@@ -265,6 +282,10 @@ class Player < Trainer
@last_worn_outfit = nil
@last_worn_hat = nil
@dyed_hats = {}
@dyed_clothes = {}
@card_background = Settings::DEFAULT_TRAINER_CARD_BG
@unlocked_card_backgrounds = [@card_background]
end