mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds Dye Kit item
This commit is contained in:
Binary file not shown.
@@ -40,11 +40,11 @@ class ClothesMartAdapter < OutfitsMartAdapter
|
||||
previewWindow.updatePreview()
|
||||
end
|
||||
|
||||
def get_dye_color(item)
|
||||
def get_dye_color(item_id)
|
||||
return 0 if isShop?
|
||||
$Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes
|
||||
if $Trainer.dyed_clothes.include?(item.id)
|
||||
return $Trainer.dyed_clothes[item.id]
|
||||
if $Trainer.dyed_clothes.include?(item_id)
|
||||
return $Trainer.dyed_clothes[item_id]
|
||||
end
|
||||
return 0
|
||||
end
|
||||
|
||||
@@ -14,33 +14,56 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
end
|
||||
|
||||
|
||||
def dyeClothes()
|
||||
original_color = $Trainer.clothes_color
|
||||
options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
|
||||
previous_input = 0
|
||||
ret = false
|
||||
while (true)
|
||||
choice = pbShowCommands(nil, options, options.length, previous_input,200)
|
||||
previous_input = choice
|
||||
case choice
|
||||
when 0 #NEXT
|
||||
pbSEPlay("GUI storage pick up", 80, 100)
|
||||
shiftClothesColor(10)
|
||||
ret = true
|
||||
when 1 #PREVIOUS
|
||||
pbSEPlay("GUI storage pick up", 80, 100)
|
||||
shiftClothesColor(-10)
|
||||
ret = true
|
||||
when 2 #Reset
|
||||
pbSEPlay("GUI storage pick up", 80, 100)
|
||||
$Trainer.clothes_color = 0
|
||||
ret = false
|
||||
when 3 #Confirm
|
||||
break
|
||||
else
|
||||
$Trainer.clothes_color = original_color
|
||||
ret = false
|
||||
break
|
||||
end
|
||||
@scene.updatePreviewWindow
|
||||
end
|
||||
return ret
|
||||
end
|
||||
|
||||
|
||||
# returns if should stay in the menu
|
||||
def playerClothesActionsMenu(item)
|
||||
cmd_wear = "Wear"
|
||||
cmd_dye = "Dye Kit"
|
||||
options = []
|
||||
options << "Wear"
|
||||
options << "Remove dye" if $Trainer.clothes_color != 0
|
||||
options << "Mark as favorite" if $Trainer.favorite_hat != item.id
|
||||
options << "Unmark as favorite" if $Trainer.favorite_hat == item.id
|
||||
options << cmd_wear
|
||||
options << cmd_dye if $PokemonBag.pbHasItem?(:CLOTHESDYEKIT)
|
||||
options << "Cancel"
|
||||
choice = pbMessage("What would you like to do?", options, -1)
|
||||
|
||||
if choice == 0
|
||||
if options[choice] == cmd_wear
|
||||
putOnClothes(item)
|
||||
$Trainer.clothes_color = @adapter.get_dye_color(item.id)
|
||||
return false
|
||||
elsif options[choice] == "Remove dye"
|
||||
if pbConfirm(_INTL("Are you sure you want to remove the dye from the {1}?", item.name))
|
||||
$Trainer.clothes_color = 0
|
||||
end
|
||||
elsif options[choice] == "Mark as favorite"
|
||||
$Trainer.favorite_clothes = item.id
|
||||
pbSEPlay("GUI storage show party panel")
|
||||
pbMessage("The #{item.name} is now your favorite!")
|
||||
elsif options[choice] == "Unmark favorite"
|
||||
$Trainer.favorite_clothes = nil
|
||||
pbSEPlay("GUI storage show party panel")
|
||||
pbMessage("The #{item.name} is no longer marked as your favorite!")
|
||||
elsif options[choice] == cmd_dye
|
||||
dyeClothes()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -42,8 +42,7 @@ class ClothesShopPresenter < PokemonMartScreen
|
||||
options << cmd_remove
|
||||
|
||||
options << cmd_swap
|
||||
dye_option_available = true#$Trainer.dyed_hats.include?(item.id) && $Trainer.dyed_hats[item.id] != 0
|
||||
options << cmd_dye if dye_option_available
|
||||
options << cmd_dye if $PokemonBag.pbHasItem?(:HATSDYEKIT)
|
||||
options << cmd_cancel
|
||||
end
|
||||
|
||||
|
||||
@@ -374,7 +374,7 @@ ItemHandlers::UseFromBag.add(:ODDKEYSTONE, proc { |item|
|
||||
})
|
||||
|
||||
def useFavoriteOutfit()
|
||||
cmd_switch = "Switch to favorite outfit"
|
||||
cmd_switch = isWearingFavoriteOutfit() ? "Take off favorite outfit" : "Switch to favorite outfit"
|
||||
cmd_mark_favorite = "Mark current outfit as favorite"
|
||||
cmd_cancel = "Cancel"
|
||||
|
||||
@@ -406,9 +406,9 @@ def switchToFavoriteOutfit()
|
||||
$Trainer.last_worn_outfit = getDefaultClothes()
|
||||
end
|
||||
playOutfitChangeAnimation()
|
||||
putOnClothes($Trainer.last_worn_outfit, true) if $Trainer.favorite_clothes
|
||||
putOnHat($Trainer.last_worn_hat, true,false) if $Trainer.favorite_hat
|
||||
putOnHat($Trainer.last_worn_hat2, true,true) if $Trainer.favorite_hat2
|
||||
putOnClothes($Trainer.last_worn_outfit, true) #if $Trainer.favorite_clothes
|
||||
putOnHat($Trainer.last_worn_hat, true,false) #if $Trainer.favorite_hat
|
||||
putOnHat($Trainer.last_worn_hat2, true,true) #if $Trainer.favorite_hat2
|
||||
|
||||
else
|
||||
return 0
|
||||
|
||||
Binary file not shown.
BIN
Data/items.dat
BIN
Data/items.dat
Binary file not shown.
Binary file not shown.
@@ -1 +1,2 @@
|
||||
1741538447
|
||||
1741542225
|
||||
1741542225
|
||||
@@ -697,3 +697,15 @@ Graphics/CustomBattlers/spritesheets/spritesheets_custom/24/24.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_base/494.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/494/494.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/225/225.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/270/270.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/271/271.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/61/61.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/338/338.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_base/244.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/467/467.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/453/453a.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/437/437.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/468/468a.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/296/296a.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_base/418.png
|
||||
Graphics/CustomBattlers/spritesheets/spritesheets_custom/418/418.png
|
||||
|
||||
Reference in New Issue
Block a user