Renames $Trainer to $player

This commit is contained in:
chardub
2025-04-24 19:57:12 -04:00
parent 95ef337de8
commit 7de024dafd
34 changed files with 391 additions and 391 deletions

View File

@@ -62,32 +62,32 @@ def get_current_outfit_position(currentOutfit_id, available_outfits)
end
def setHairColor(hue_shift)
$Trainer.hair_color = hue_shift
$player.hair_color = hue_shift
refreshPlayerOutfit()
end
def shiftHatColor(incr,secondary_hat=false)
if secondary_hat
$Trainer.hat2_color = 0 if !$Trainer.hat2_color
$Trainer.hat2_color += incr
$player.hat2_color = 0 if !$player.hat2_color
$player.hat2_color += incr
else
$Trainer.hat_color = 0 if !$Trainer.hat_color
$Trainer.hat_color += incr
$player.hat_color = 0 if !$player.hat_color
$player.hat_color += incr
end
refreshPlayerOutfit()
end
def shiftClothesColor(incr)
$Trainer.clothes_color = 0 if !$Trainer.clothes_color
$Trainer.clothes_color += incr
$player.clothes_color = 0 if !$player.clothes_color
$player.clothes_color += incr
refreshPlayerOutfit()
end
def shiftHairColor(incr)
$Trainer.hair_color = 0 if !$Trainer.hair_color
$Trainer.hair_color += incr
echoln "Hair color: #{$Trainer.hair_color}"
$player.hair_color = 0 if !$player.hair_color
$player.hair_color += incr
echoln "Hair color: #{$player.hair_color}"
refreshPlayerOutfit()
end
@@ -101,11 +101,11 @@ def pbLoadOutfitBitmap(outfitFileName)
end
def setOutfit(outfit_id)
$Trainer.clothes = outfit_id
$player.clothes = outfit_id
end
def setHat(hat_id)
$Trainer.hat = hat_id
$player.hat = hat_id
end
def getEasterEggHeldItem()
@@ -134,7 +134,7 @@ end
def getCurrentPokeball(allowEasterEgg=true)
otherItem = getEasterEggHeldItem() if allowEasterEgg
return otherItem if otherItem
firstPokemon = $Trainer.party[0]
firstPokemon = $player.party[0]
return firstPokemon.poke_ball if firstPokemon
return nil
end
@@ -152,19 +152,19 @@ def generate_front_trainer_sprite_bitmap(allowEasterEgg=true, pokeball = nil,
skin_tone_id = nil, hair_color = nil, hat_color = nil, clothes_color = nil,
hat2_color = nil)
clothes_id = $Trainer.clothes if !clothes_id
hat_id = $Trainer.hat if !hat_id
hat2_id = $Trainer.hat2 if !hat2_id
clothes_id = $player.clothes if !clothes_id
hat_id = $player.hat if !hat_id
hat2_id = $player.hat2 if !hat2_id
hair_id = $Trainer.hair if !hair_id
skin_tone_id = $Trainer.skin_tone if !skin_tone_id
hair_color = $Trainer.hair_color if !hair_color
hat_color = $Trainer.hat_color if !hat_color
hat2_color = $Trainer.hat2_color if !hat2_color
clothes_color = $Trainer.clothes_color if !clothes_color
hair_id = $player.hair if !hair_id
skin_tone_id = $player.skin_tone if !skin_tone_id
hair_color = $player.hair_color if !hair_color
hat_color = $player.hat_color if !hat_color
hat2_color = $player.hat2_color if !hat2_color
clothes_color = $player.clothes_color if !clothes_color
hairFilename = getTrainerSpriteHairFilename(hair_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_HAIR_FOLDER + "/hair_trainer_{1}", $Trainer.hair)
outfitFilename = getTrainerSpriteOutfitFilename(clothes_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_CLOTHES_FOLDER + "/clothes_trainer_{1}", $Trainer.clothes)
hairFilename = getTrainerSpriteHairFilename(hair_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_HAIR_FOLDER + "/hair_trainer_{1}", $player.hair)
outfitFilename = getTrainerSpriteOutfitFilename(clothes_id) #_INTL(Settings::PLAYER_GRAPHICS_FOLDER + Settings::PLAYER_CLOTHES_FOLDER + "/clothes_trainer_{1}", $player.clothes)
hatFilename = getTrainerSpriteHatFilename(hat_id)
hat2Filename = getTrainerSpriteHatFilename(hat2_id)

View File

@@ -134,39 +134,39 @@ class OutfitSelector
end
def changeToNextClothes(incr,all_unlocked=false)
$Trainer.unlocked_clothes = [] if !$Trainer.unlocked_clothes
$player.unlocked_clothes = [] if !$player.unlocked_clothes
currentOutfit = $Trainer.clothes
currentOutfit = $player.clothes
currentOutfit = 0 if !currentOutfit
nextOutfit = selectNextOutfit(currentOutfit, incr, @clothes_list, [], false,nil,$Trainer.unlocked_clothes,all_unlocked)
$Trainer.clothes = nextOutfit
$Trainer.clothes_color = 0
echoln $Trainer.clothes
nextOutfit = selectNextOutfit(currentOutfit, incr, @clothes_list, [], false,nil,$player.unlocked_clothes,all_unlocked)
$player.clothes = nextOutfit
$player.clothes_color = 0
echoln $player.clothes
end
def changeToNextHat(incr,all_unlocked=false)
$Trainer.unlocked_hats = [] if !$Trainer.unlocked_hats
$player.unlocked_hats = [] if !$player.unlocked_hats
currentHat = $Trainer.hat
currentHat = $player.hat
currentHat = 0 if !currentHat
nextOutfit = selectNextOutfit(currentHat, incr, @hats_list, [], true, "hat",$Trainer.unlocked_hats,all_unlocked)
$Trainer.hat = nextOutfit
$Trainer.hat_color = 0
echoln $Trainer.hat
nextOutfit = selectNextOutfit(currentHat, incr, @hats_list, [], true, "hat",$player.unlocked_hats,all_unlocked)
$player.hat = nextOutfit
$player.hat_color = 0
echoln $player.hat
end
def changeToNextHairstyle(incr,all_unlocked=false)
$Trainer.unlocked_hairstyles = [] if !$Trainer.unlocked_hairstyles
$player.unlocked_hairstyles = [] if !$player.unlocked_hairstyles
currentHair = $Trainer.hair
currentHair = $player.hair
currentHair = 0 if !currentHair
nextOutfit = selectNextOutfit(currentHair, incr, @hairstyles_list, ["a", "b", "c", "d"], true,nil,$Trainer.unlocked_hairstyles,all_unlocked)
$Trainer.hair_color = 0
$Trainer.hair = nextOutfit
echoln $Trainer.hair
nextOutfit = selectNextOutfit(currentHair, incr, @hairstyles_list, ["a", "b", "c", "d"], true,nil,$player.unlocked_hairstyles,all_unlocked)
$player.hair_color = 0
$player.hair = nextOutfit
echoln $player.hair
end

View File

@@ -6,7 +6,7 @@ def search_clothes(matching_tags = [], only_unlocked = false)
full_data_list = $PokemonGlobal.clothes_data
existing_files_list = selector.parse_clothes_folder()
unlocked_list = $Trainer.unlocked_clothes
unlocked_list = $player.unlocked_clothes
return search_outfits_by_tag(full_data_list, matching_tags, existing_files_list, unlocked_list, only_unlocked)
end
@@ -16,14 +16,14 @@ def filter_clothes(filter_tags = [], only_unlocked = false)
full_data_list = $PokemonGlobal.hats_data
existing_files_list = selector.parse_hats_folder()
unlocked_list = $Trainer.unlocked_hats
unlocked_list = $player.unlocked_hats
return filter_outfits_by_tag(full_data_list, filter_tags, existing_files_list, unlocked_list, only_unlocked)
end
def filter_clothes_only_not_owned(clothes_ids_list)
filtered_list = []
clothes_ids_list.each do|clothe_id|
filtered_list << clothe_id if !$Trainer.unlocked_clothes.include?(clothe_id)
filtered_list << clothe_id if !$player.unlocked_clothes.include?(clothe_id)
end
return filtered_list
end
@@ -31,7 +31,7 @@ end
def filter_clothes_only_owned(clothes_ids_list)
filtered_list = []
clothes_ids_list.each do|clothe_id|
filtered_list << clothe_id if $Trainer.unlocked_clothes.include?(clothe_id)
filtered_list << clothe_id if $player.unlocked_clothes.include?(clothe_id)
end
return filtered_list
end
@@ -45,7 +45,7 @@ def search_hats(matching_tags = [],excluding_tags=[], only_unlocked = false)
full_data_list = $PokemonGlobal.hats_data
existing_files_list = selector.parse_hats_folder()
unlocked_list = $Trainer.unlocked_hats
unlocked_list = $player.unlocked_hats
return search_outfits_by_tag(full_data_list, matching_tags, existing_files_list, unlocked_list, only_unlocked,excluding_tags)
end
@@ -55,14 +55,14 @@ def filter_hats(filter_tags = [], only_unlocked = false)
full_data_list = $PokemonGlobal.hats_data
existing_files_list = selector.parse_hats_folder()
unlocked_list = $Trainer.unlocked_hats
unlocked_list = $player.unlocked_hats
return filter_outfits_by_tag(full_data_list, filter_tags, existing_files_list, unlocked_list, only_unlocked)
end
def filter_hats_only_not_owned(hats_ids_list)
filtered_list = []
hats_ids_list.each do|hat_id|
filtered_list << hat_id if !$Trainer.unlocked_hats.include?(hat_id)
filtered_list << hat_id if !$player.unlocked_hats.include?(hat_id)
end
return filtered_list
end
@@ -70,7 +70,7 @@ end
def filter_hats_only_owned(hats_ids_list)
filtered_list = []
hats_ids_list.each do|hat_id|
filtered_list << hat_id if $Trainer.unlocked_hats.include?(hat_id)
filtered_list << hat_id if $player.unlocked_hats.include?(hat_id)
end
return filtered_list
end

View File

@@ -114,8 +114,8 @@ class CharacterSelectMenuPresenter
applyGender(@gender)
echoln @age
pbSet(VAR_TRAINER_AGE, @age)
$Trainer.skin_tone = @skinTone
$Trainer.name = @name
$player.skin_tone = @skinTone
$player.name = @name
end
def getOptionIndex(option_name)
@@ -201,7 +201,7 @@ class CharacterSelectMenuPresenter
@skinTone += incr
@skinTone = MIN_SKIN_COLOR if @skinTone > MAX_SKIN_COLOR
@skinTone = MAX_SKIN_COLOR if @skinTone < MIN_SKIN_COLOR
$Trainer.skin_tone = @skinTone
$player.skin_tone = @skinTone
label = SKIN_COLOR_IDS[@skinTone - 1]
@view.displayText(SKIN_TEXT_ID, label, current_index)
end
@@ -219,7 +219,7 @@ class CharacterSelectMenuPresenter
applyHairEasterEggs()
hairColorId = HAIR_COLOR_IDS[@hairColor]
hairId = hairColorId.to_s + "_" + @hairstyle.to_s
$Trainer.hair = hairId
$player.hair = hairId
end
def applyHairEasterEggs()
@@ -236,9 +236,9 @@ class CharacterSelectMenuPresenter
outfitId = get_outfit_id_from_index(gender_index)
@hairstyle = outfitId
applyHair()
#$Trainer.hair = outfitId
$Trainer.clothes = outfitId
$Trainer.hat = outfitId
#$player.hair = outfitId
$player.clothes = outfitId
$player.hat = outfitId
end
def get_outfit_id_from_index(gender_index)

View File

@@ -11,7 +11,7 @@ end
def selectHairstyle(all_unlocked = false)
selector = OutfitSelector.new
display_outfit_preview()
hat = $Trainer.hat
hat = $player.hat
commands = ["Next style", "Previous style", "Toggle hat", "Back"]
previous_input = 0
# To enable turning the common event that lets you turn around while in the dialog box
@@ -29,10 +29,10 @@ def selectHairstyle(all_unlocked = false)
display_outfit_preview()
when 2 #Toggle hat
pbSEPlay("GUI storage put down", 80, 100)
if hat == $Trainer.hat
$Trainer.hat = nil
if hat == $player.hat
$player.hat = nil
else
$Trainer.hat = hat
$player.hat = hat
end
display_outfit_preview()
else
@@ -40,11 +40,11 @@ def selectHairstyle(all_unlocked = false)
end
end
hide_outfit_preview()
$Trainer.hat = hat
$player.hat = hat
end
def swapToNextHairVersion()
split_hair = getSplitHairFilenameAndVersionFromID($Trainer.hair)
split_hair = getSplitHairFilenameAndVersionFromID($player.hair)
hair_version = split_hair[0]
hair_style = split_hair[1]
current_version = hair_version
@@ -53,16 +53,16 @@ def swapToNextHairVersion()
lastVersion = findLastHairVersion(hair_style)
newVersion = lastVersion if newVersion <= 0
newVersion = 1 if newVersion > lastVersion
$Trainer.hair = getFullHairId(hair_style,newVersion)
$player.hair = getFullHairId(hair_style,newVersion)
end
def selectHairColor
original_color = $Trainer.hair_color
original_hair = $Trainer.hair
original_color = $player.hair_color
original_hair = $player.hair
$game_switches[SWITCH_SELECTING_CLOTHES]=true
$game_map.update
display_outfit_preview()
hat = $Trainer.hat
hat = $player.hat
commands = ["Swap base color", "Shift up", "Shift down", "Toggle hat", "Remove dye", "Confirm", "Never Mind"]
previous_input = 0
@@ -87,28 +87,28 @@ def selectHairColor
ret = true
when 3 #Toggle hat
pbSEPlay("GUI storage put down", 80, 100)
if hat == $Trainer.hat
$Trainer.hat = nil
if hat == $player.hat
$player.hat = nil
else
$Trainer.hat = hat
$player.hat = hat
end
display_outfit_preview()
when 4 #Reset
pbSEPlay("GUI storage put down", 80, 100)
$Trainer.hair_color = 0
$player.hair_color = 0
display_outfit_preview()
ret = false
when 5 #Confirm
break
else
$Trainer.hair_color = original_color
$Trainer.hair = original_hair
$player.hair_color = original_color
$player.hair = original_hair
ret = false
break
end
end
hide_outfit_preview()
$Trainer.hat = hat
$player.hat = hat
$game_switches[SWITCH_SELECTING_CLOTHES]=false
$game_map.update
return ret
@@ -116,7 +116,7 @@ def selectHairColor
end
def selectHatColor(secondary_hat=false)
original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color
original_color = secondary_hat ? $player.hat2_color : $player.hat_color
display_outfit_preview()
commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
previous_input = 0
@@ -136,16 +136,16 @@ def selectHatColor(secondary_hat=false)
ret = true
when 2 #Reset
pbSEPlay("GUI storage put down", 80, 100)
$Trainer.hat_color = 0 if !secondary_hat
$Trainer.hat2_color = 0 if secondary_hat
$player.hat_color = 0 if !secondary_hat
$player.hat2_color = 0 if secondary_hat
display_outfit_preview
refreshPlayerOutfit
ret = false
when 3 #Confirm
break
else
$Trainer.hat_color = original_color if !secondary_hat
$Trainer.hat2_color = original_color if secondary_hat
$player.hat_color = original_color if !secondary_hat
$player.hat2_color = original_color if secondary_hat
ret = false
break
end
@@ -156,7 +156,7 @@ def selectHatColor(secondary_hat=false)
end
def selectClothesColor
original_color = $Trainer.clothes_color
original_color = $player.clothes_color
display_outfit_preview()
commands = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
previous_input = 0
@@ -177,14 +177,14 @@ def selectClothesColor
ret = true
when 2 #Reset
pbSEPlay("GUI storage pick up", 80, 100)
$Trainer.clothes_color = 0
$player.clothes_color = 0
display_outfit_preview()
refreshPlayerOutfit()
ret = false
when 3 #Confirm
break
else
$Trainer.clothes_color = original_color
$player.clothes_color = original_color
ret = false
break
end
@@ -213,7 +213,7 @@ def selectHat(all_unlocked = false)
display_outfit_preview()
when 2 #REMOVE HAT
playOutfitRemovedAnimation()
$Trainer.hat = nil
$player.hat = nil
selector.display_outfit_preview()
else
break
@@ -250,7 +250,7 @@ def selectClothes(all_unlocked = false)
when 2 #REMOVE CLOTHES
break if !$DEBUG
playOutfitRemovedAnimation()
$Trainer.clothes = nil
$player.clothes = nil
display_outfit_preview()
else
break

View File

@@ -47,8 +47,8 @@ class PokemonHatPresenter
loop do
Graphics.update
Input.update
@hat_id = selector.selectNextOutfit(@hat_id, 1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::RIGHT)
@hat_id = selector.selectNextOutfit(@hat_id, -1, selector.hats_list, [], false, "hat",$Trainer.unlocked_hats,false) if Input.trigger?(Input::LEFT)
@hat_id = selector.selectNextOutfit(@hat_id, 1, selector.hats_list, [], false, "hat",$player.unlocked_hats,false) if Input.trigger?(Input::RIGHT)
@hat_id = selector.selectNextOutfit(@hat_id, -1, selector.hats_list, [], false, "hat",$player.unlocked_hats,false) if Input.trigger?(Input::LEFT)
break if Input.trigger?(Input::USE)
return false if Input.trigger?(Input::BACK)
@view.update()

View File

@@ -29,15 +29,15 @@ class TrainerClothesPreview
end
def resetOutfits()
@clothes = $Trainer.clothes
@hat = $Trainer.hat
@hat2 = $Trainer.hat2
@hair = $Trainer.hair
@skin_tone = $Trainer.skin_tone
@hair_color = $Trainer.hair_color
@hat_color = $Trainer.hat_color
@hat2_color = $Trainer.hat2_color
@clothes_color = $Trainer.clothes_color
@clothes = $player.clothes
@hat = $player.hat
@hat2 = $player.hat2
@hair = $player.hair
@skin_tone = $player.skin_tone
@hair_color = $player.hair_color
@hat_color = $player.hat_color
@hat2_color = $player.hat2_color
@clothes_color = $player.clothes_color
end
def show()

View File

@@ -19,8 +19,8 @@ class OutfitsMartAdapter < PokemonMartAdapter
@worn_clothes = get_current_clothes()
@isShop = isShop
@version = nil
$Trainer.dyed_hats = {} if !$Trainer.dyed_hats
$Trainer.dyed_clothes = {} if !$Trainer.dyed_clothes
$player.dyed_hats = {} if !$player.dyed_hats
$player.dyed_clothes = {} if !$player.dyed_clothes
#todo: refactor to get the list from the first search when
# setting the stock instead of searching twice

View File

@@ -3,9 +3,9 @@ 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 !isShop? && $player.clothes_color != 0
if pbConfirmMessage(_INTL("Would you like to remove the dye?"))
$Trainer.clothes_color = 0
$player.clothes_color = 0
end
end
end
@@ -41,7 +41,7 @@ class ClothesMartAdapter < OutfitsMartAdapter
def updateTrainerPreview(item, previewWindow)
return if !item
previewWindow.clothes = item.id
$Trainer.clothes = item.id
$player.clothes = item.id
set_dye_color(item,previewWindow)
pbRefreshSceneMap
@@ -50,26 +50,26 @@ class ClothesMartAdapter < OutfitsMartAdapter
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]
$player.dyed_clothes= {} if ! $player.dyed_clothes
if $player.dyed_clothes.include?(item_id)
return $player.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
$player.dyed_clothes= {} if ! $player.dyed_clothes
if $player.dyed_clothes.include?(item.id)
dye_color = $player.dyed_clothes[item.id]
$player.clothes_color = dye_color
previewWindow.clothes_color = dye_color
else
$Trainer.clothes_color=0
$player.clothes_color=0
previewWindow.clothes_color=0
end
else
$Trainer.clothes_color=0
$player.clothes_color=0
previewWindow.clothes_color=0
end
end
@@ -82,16 +82,16 @@ class ClothesMartAdapter < OutfitsMartAdapter
end
def get_current_clothes()
return $Trainer.clothes
return $player.clothes
end
def player_changed_clothes?()
$Trainer.clothes != @worn_clothes
$player.clothes != @worn_clothes
end
def putOnSelectedOutfit()
putOnClothes($Trainer.clothes)
@worn_clothes = $Trainer.clothes
putOnClothes($player.clothes)
@worn_clothes = $player.clothes
end
def putOnOutfit(item)
@@ -100,12 +100,12 @@ class ClothesMartAdapter < OutfitsMartAdapter
end
def reset_player_clothes()
$Trainer.clothes = @worn_clothes
$Trainer.clothes_color = $Trainer.dyed_clothes[@worn_clothes] if $Trainer.dyed_clothes && $Trainer.dyed_clothes[@worn_clothes]
$player.clothes = @worn_clothes
$player.clothes_color = $player.dyed_clothes[@worn_clothes] if $player.dyed_clothes && $player.dyed_clothes[@worn_clothes]
end
def get_unlocked_items_list()
return $Trainer.unlocked_clothes
return $player.unlocked_clothes
end
def isWornItem?(item)

View File

@@ -61,10 +61,10 @@ def hatShop(outfits_list = [], free=false, customMessage=nil)
end
def hairShop(outfits_list = [],free=false, customMessage=nil)
currentHair = getSimplifiedHairIdFromFullID($Trainer.hair)
currentHair = getSimplifiedHairIdFromFullID($player.hair)
stock = [:SWAP_COLOR]
#always add current hairstyle as first option (in case the player just wants to swap the color)
stock << get_hair_by_id(currentHair) if $Trainer.hair
stock << get_hair_by_id(currentHair) if $player.hair
outfits_list.each { |outfit_id|
next if outfit_id == currentHair
outfit = get_hair_by_id(outfit_id)
@@ -74,15 +74,15 @@ def hairShop(outfits_list = [],free=false, customMessage=nil)
end
def switchHatsPosition()
hat1 = $Trainer.hat
hat2 = $Trainer.hat2
hat1_color = $Trainer.hat_color
hat2_color = $Trainer.hat2_color
hat1 = $player.hat
hat2 = $player.hat2
hat1_color = $player.hat_color
hat2_color = $player.hat2_color
$Trainer.hat = hat2
$Trainer.hat2 = hat1
$Trainer.hat_color = hat1_color
$Trainer.hat_color = hat2_color
$player.hat = hat2
$player.hat2 = hat1
$player.hat_color = hat1_color
$player.hat_color = hat2_color
pbSEPlay("GUI naming tab swap start")
end
@@ -108,7 +108,7 @@ end
def changeClothesMenu()
stock = []
$Trainer.unlocked_clothes.each { |outfit_id|
$player.unlocked_clothes.each { |outfit_id|
outfit = get_clothes_by_id(outfit_id)
stock << outfit if outfit
}
@@ -117,7 +117,7 @@ end
def changeHatMenu(is_secondary_hat = false)
stock = []
$Trainer.unlocked_hats.each { |outfit_id|
$player.unlocked_hats.each { |outfit_id|
outfit = get_hat_by_id(outfit_id)
stock << outfit if outfit
}

View File

@@ -15,7 +15,7 @@ class ClothesShopPresenter < PokemonMartScreen
def dyeClothes()
original_color = $Trainer.clothes_color
original_color = $player.clothes_color
options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
previous_input = 0
ret = false
@@ -33,12 +33,12 @@ class ClothesShopPresenter < PokemonMartScreen
ret = true
when 2 #Reset
pbSEPlay("GUI storage pick up", 80, 100)
$Trainer.clothes_color = 0
$player.clothes_color = 0
ret = false
when 3 #Confirm
break
else
$Trainer.clothes_color = original_color
$player.clothes_color = original_color
ret = false
break
end
@@ -60,7 +60,7 @@ class ClothesShopPresenter < PokemonMartScreen
if options[choice] == cmd_wear
putOnClothes(item,false)
$Trainer.clothes_color = @adapter.get_dye_color(item.id)
$player.clothes_color = @adapter.get_dye_color(item.id)
return true
elsif options[choice] == cmd_dye
dyeClothes()

View File

@@ -9,31 +9,31 @@ class ClothesShopPresenter < PokemonMartScreen
def wearAsHat1(item)
@adapter.set_secondary_hat(false)
putOnClothes(item)
$Trainer.set_hat_color(@adapter.get_dye_color(item.id),false)
$player.set_hat_color(@adapter.get_dye_color(item.id),false)
end
def wearAsHat2(item)
@adapter.set_secondary_hat(true)
putOnClothes(item)
$Trainer.set_hat_color(@adapter.get_dye_color(item.id),true)
$player.set_hat_color(@adapter.get_dye_color(item.id),true)
end
def removeDye(item)
if pbConfirm(_INTL("Are you sure you want to remove the dye from the {1}?", item.name))
$Trainer.set_hat_color(0,@adapter.is_secondary_hat)
$player.set_hat_color(0,@adapter.is_secondary_hat)
end
end
def swapHats()
echoln "hat 1: #{$Trainer.hat}"
echoln "hat 2: #{$Trainer.hat2}"
echoln "hat 1: #{$player.hat}"
echoln "hat 2: #{$player.hat2}"
$Trainer.hat, $Trainer.hat2 = $Trainer.hat2, $Trainer.hat
$player.hat, $player.hat2 = $player.hat2, $player.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}"
new_selected_hat = @adapter.is_secondary_hat ? $player.hat2 : $player.hat
echoln "hat 1: #{$player.hat}"
echoln "hat 2: #{$player.hat2}"
echoln "new selected hat: #{new_selected_hat}"
@scene.select_specific_item(new_selected_hat,true)
@@ -69,18 +69,18 @@ class ClothesShopPresenter < PokemonMartScreen
def putOnHats()
@adapter.worn_clothes = $Trainer.hat
@adapter.worn_clothes2 = $Trainer.hat2
@adapter.worn_clothes = $player.hat
@adapter.worn_clothes2 = $player.hat2
putOnHat($Trainer.hat,true,false)
putOnHat($Trainer.hat2,true,true)
putOnHat($player.hat,true,false)
putOnHat($player.hat2,true,true)
playOutfitChangeAnimation()
pbMessage(_INTL("You put on the hat(s)!\\wtnp[30]"))
end
def dyeOptions(secondary_hat=false,item)
original_color = secondary_hat ? $Trainer.hat2_color : $Trainer.hat_color
original_color = secondary_hat ? $player.hat2_color : $player.hat_color
options = ["Shift up", "Shift down", "Reset", "Confirm", "Never Mind"]
previous_input = 0
while (true)
@@ -97,14 +97,14 @@ class ClothesShopPresenter < PokemonMartScreen
ret = true
when 2 #Reset
pbSEPlay("GUI storage put down", 80, 100)
$Trainer.hat_color = 0 if !secondary_hat
$Trainer.hat2_color = 0 if secondary_hat
$player.hat_color = 0 if !secondary_hat
$player.hat2_color = 0 if secondary_hat
ret = false
when 3 #Confirm
break
else
$Trainer.hat_color = original_color if !secondary_hat
$Trainer.hat2_color = original_color if secondary_hat
$player.hat_color = original_color if !secondary_hat
$player.hat2_color = original_color if secondary_hat
ret = false
break
end
@@ -117,8 +117,8 @@ class ClothesShopPresenter < PokemonMartScreen
def confirmPutClothes(item)
if @adapter.is_a?(HatsMartAdapter)
putOnHats()
$Trainer.hat_color = @adapter.get_dye_color($Trainer.hat)
$Trainer.hat2_color = @adapter.get_dye_color($Trainer.hat2)
$player.hat_color = @adapter.get_dye_color($player.hat)
$player.hat2_color = @adapter.get_dye_color($player.hat2)
else
putOnClothes(item,false)
end

View File

@@ -8,9 +8,9 @@ class HairMartAdapter < OutfitsMartAdapter
super
@version = getCurrentHairVersion().to_i
@worn_hair = $Trainer.hair
@worn_hat = $Trainer.hat
@worn_hat2 = $Trainer.hat2
@worn_hair = $player.hair
@worn_hat = $player.hat
@worn_hat2 = $player.hat2
@hat_visible = false
@removable = true
@@ -34,7 +34,7 @@ class HairMartAdapter < OutfitsMartAdapter
end
def player_changed_clothes?()
$Trainer.hairstyle != @worn_hair
$player.hairstyle != @worn_hair
end
#player can't "own" hairstyles
@@ -85,7 +85,7 @@ class HairMartAdapter < OutfitsMartAdapter
def getCurrentHairVersion()
begin
return getSplitHairFilenameAndVersionFromID($Trainer.hair)[0]
return getSplitHairFilenameAndVersionFromID($player.hair)[0]
rescue
return 1
end
@@ -96,7 +96,7 @@ class HairMartAdapter < OutfitsMartAdapter
end
def getName(item)
echoln $Trainer.hair
echoln $player.hair
return item.id
end
@@ -121,12 +121,12 @@ class HairMartAdapter < OutfitsMartAdapter
previewWindow.hat = displayed_hat
previewWindow.hat2 = displayed_hat2
$Trainer.hat = displayed_hat
$Trainer.hat2 = displayed_hat2
$player.hat = displayed_hat
$player.hat2 = displayed_hat2
itemId = getCurrentHairId(item.id)
previewWindow.hair = itemId
$Trainer.hair = itemId
$player.hair = itemId
pbRefreshSceneMap
previewWindow.updatePreview()
end
@@ -139,7 +139,7 @@ class HairMartAdapter < OutfitsMartAdapter
end
def get_current_clothes()
return $Trainer.hair
return $player.hair
end
def putOnOutfit(item)
@@ -152,19 +152,19 @@ class HairMartAdapter < OutfitsMartAdapter
# can change hair color for free if not changing the style
if getVersionFromFullID(@worn_hair) != @version
worn_id = getSimplifiedHairIdFromFullID(@worn_hair)
if getSimplifiedHairIdFromFullID($Trainer.hair) == worn_id
if getSimplifiedHairIdFromFullID($player.hair) == worn_id
@worn_hair = getFullHairId(worn_id,@version)
end
end
$Trainer.hair = @worn_hair
$Trainer.hat = @worn_hat
$Trainer.hat2 = @worn_hat2
$player.hair = @worn_hair
$player.hat = @worn_hat
$player.hat2 = @worn_hat2
end
def get_unlocked_items_list()
return $Trainer.unlocked_hairstyles
return $player.unlocked_hairstyles
end

View File

@@ -27,7 +27,7 @@ class HatShopView < ClothesShopView
def switchItemVersion(itemwindow)
@adapter.switchVersion(itemwindow.item, 1)
new_selected_hat = @adapter.is_secondary_hat ? $Trainer.hat2 : $Trainer.hat
new_selected_hat = @adapter.is_secondary_hat ? $player.hat2 : $player.hat
select_specific_item(new_selected_hat,true)
updateTrainerPreview()
end
@@ -39,7 +39,7 @@ class HatShopView < ClothesShopView
end
def handleHatlessLayerIcons(selected_item)
other_hat = @adapter.is_secondary_hat ? $Trainer.hat : $Trainer.hat2
other_hat = @adapter.is_secondary_hat ? $player.hat : $player.hat2
if !selected_item.is_a?(Hat)
if @adapter.is_secondary_hat
@sprites["wornHat_layer2"].bitmap=nil
@@ -59,12 +59,12 @@ class HatShopView < ClothesShopView
def displayLayerIcons(selected_item=nil)
handleHatlessLayerIcons(selected_item)
hat1Filename = getOverworldHatFilename($Trainer.hat)
hat2Filename = getOverworldHatFilename($Trainer.hat2)
hat1Filename = getOverworldHatFilename($player.hat)
hat2Filename = getOverworldHatFilename($player.hat2)
hat_color_shift = $Trainer.dyed_hats[$Trainer.hat]
hat2_color_shift = $Trainer.dyed_hats[$Trainer.hat2]
hat_color_shift = $player.dyed_hats[$player.hat]
hat2_color_shift = $player.dyed_hats[$player.hat2]
hatBitmapWrapper = AnimatedBitmap.new(hat1Filename, hat_color_shift) if pbResolveBitmap(hat1Filename)
hat2BitmapWrapper = AnimatedBitmap.new(hat2Filename, hat2_color_shift) if pbResolveBitmap(hat2Filename)

View File

@@ -7,22 +7,22 @@ class HatsMartAdapter < OutfitsMartAdapter
def initialize(stock = nil, isShop = nil, isSecondaryHat = false)
super(stock,isShop,isSecondaryHat)
@worn_clothes = $Trainer.hat
@worn_clothes2 = $Trainer.hat2
@worn_clothes = $player.hat
@worn_clothes2 = $player.hat2
@second_hat_visible = true
end
#Used in shops only
def toggleSecondHat()
@second_hat_visible = !@second_hat_visible
$Trainer.hat2 = @second_hat_visible ? @worn_clothes2 : nil
$player.hat2 = @second_hat_visible ? @worn_clothes2 : nil
end
def toggleEvent(item)
if isShop?
toggleSecondHat
else
$Trainer.set_hat(nil,@is_secondary_hat)
$player.set_hat(nil,@is_secondary_hat)
@worn_clothes = nil
end
end
@@ -72,8 +72,8 @@ class HatsMartAdapter < OutfitsMartAdapter
def updateTrainerPreview(item, previewWindow)
if item.is_a?(Outfit)
hat1 = @is_secondary_hat ? get_hat_by_id($Trainer.hat) : item
hat2 = @is_secondary_hat ? item : get_hat_by_id($Trainer.hat2)
hat1 = @is_secondary_hat ? get_hat_by_id($player.hat) : item
hat2 = @is_secondary_hat ? item : get_hat_by_id($player.hat2)
previewWindow.set_hat(hat1.id,false) if hat1
previewWindow.set_hat(hat2.id,true) if hat2
@@ -81,18 +81,18 @@ class HatsMartAdapter < OutfitsMartAdapter
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)
hat1_color = $player.dyed_hats[hat1.id] if hat1 && $player.dyed_hats.include?(hat1.id)
hat2_color = $player.dyed_hats[hat2.id] if hat2 && $player.dyed_hats.include?(hat2.id)
previewWindow.hat_color = hat1_color
previewWindow.hat2_color = hat2_color
$Trainer.hat = hat1&.id
$Trainer.hat2 = hat2&.id
$Trainer.hat_color = hat1_color
$Trainer.hat2_color = hat2_color
$player.hat = hat1&.id
$player.hat2 = hat2&.id
$player.hat_color = hat1_color
$player.hat2_color = hat2_color
else
$Trainer.set_hat(nil,@is_secondary_hat)
$player.set_hat(nil,@is_secondary_hat)
previewWindow.set_hat(nil,@is_secondary_hat)
end
@@ -104,9 +104,9 @@ class HatsMartAdapter < OutfitsMartAdapter
def get_dye_color(item_id)
return if !item_id
return 0 if isShop?
$Trainer.dyed_hats= {} if ! $Trainer.dyed_hats
if $Trainer.dyed_hats.include?(item_id)
return $Trainer.dyed_hats[item_id]
$player.dyed_hats= {} if ! $player.dyed_hats
if $player.dyed_hats.include?(item_id)
return $player.dyed_hats[item_id]
end
return 0
end
@@ -117,7 +117,7 @@ class HatsMartAdapter < OutfitsMartAdapter
if !isShop?
else
$Trainer.set_hat_color(0,is_secondary_hat)
$player.set_hat_color(0,is_secondary_hat)
previewWindow.hat_color=0
end
end
@@ -125,23 +125,23 @@ class HatsMartAdapter < OutfitsMartAdapter
# def set_dye_color(item,previewWindow,is_secondary_hat=false)
# return if !item
# if !isShop?
# $Trainer.dyed_hats= {} if !$Trainer.dyed_hats
# $player.dyed_hats= {} if !$player.dyed_hats
#
# echoln item.id
# echoln $Trainer.dyed_hats.include?(item.id)
# echoln $Trainer.dyed_hats[item.id]
# echoln $player.dyed_hats.include?(item.id)
# echoln $player.dyed_hats[item.id]
#
# if $Trainer.dyed_hats.include?(item.id)
# dye_color = $Trainer.dyed_hats[item.id]
# $Trainer.set_hat_color(dye_color,is_secondary_hat)
# if $player.dyed_hats.include?(item.id)
# dye_color = $player.dyed_hats[item.id]
# $player.set_hat_color(dye_color,is_secondary_hat)
# previewWindow.hat_color = dye_color
# else
# $Trainer.set_hat_color(0,is_secondary_hat)
# $player.set_hat_color(0,is_secondary_hat)
# previewWindow.hat_color=0
# end
# #echoln $Trainer.dyed_hats
# #echoln $player.dyed_hats
# else
# $Trainer.set_hat_color(0,is_secondary_hat)
# $player.set_hat_color(0,is_secondary_hat)
# previewWindow.hat_color=0
# end
# end
@@ -156,22 +156,22 @@ class HatsMartAdapter < OutfitsMartAdapter
end
def get_current_clothes()
return $Trainer.hat(@is_secondary_hat)
return $player.hat(@is_secondary_hat)
end
def player_changed_clothes?()
echoln("Trainer hat: #{$Trainer.hat}, Worn hat: #{@worn_clothes}")
echoln("Trainer hat2: #{$Trainer.hat2}, Worn hat2: #{@worn_clothes2}")
$Trainer.hat != @worn_clothes || $Trainer.hat2 != @worn_clothes2
echoln("Trainer hat: #{$player.hat}, Worn hat: #{@worn_clothes}")
echoln("Trainer hat2: #{$player.hat2}, Worn hat2: #{@worn_clothes2}")
$player.hat != @worn_clothes || $player.hat2 != @worn_clothes2
end
def putOnSelectedOutfit()
putOnHat($Trainer.hat,true,false) if $Trainer.hat
putOnHat($Trainer.hat2,true,true) if $Trainer.hat2
putOnHat($player.hat,true,false) if $player.hat
putOnHat($player.hat2,true,true) if $player.hat2
@worn_clothes = $Trainer.hat
@worn_clothes2 = $Trainer.hat2
@worn_clothes = $player.hat
@worn_clothes2 = $player.hat2
playOutfitChangeAnimation()
pbMessage(_INTL("You put on the hat(s)!\\wtnp[30]"))
@@ -184,15 +184,15 @@ class HatsMartAdapter < OutfitsMartAdapter
end
def reset_player_clothes()
$Trainer.set_hat(@worn_clothes,false)
$Trainer.set_hat(@worn_clothes2,true)
$player.set_hat(@worn_clothes,false)
$player.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]
$player.set_hat_color($player.dyed_hats[@worn_clothes],false) if $player.dyed_hats && $player.dyed_hats[@worn_clothes]
$player.set_hat_color($player.dyed_hats[@worn_clothes2],true) if $player.dyed_hats && $player.dyed_hats[@worn_clothes2]
end
def get_unlocked_items_list()
return $Trainer.unlocked_hats
return $player.unlocked_hats
end
def getSpecialItemCaption(specialType)
@@ -220,7 +220,7 @@ class HatsMartAdapter < OutfitsMartAdapter
end
def getSpecialItemDescription(specialType)
hair_situation = !$Trainer.hair || getSimplifiedHairIdFromFullID($Trainer.hair) == HAIR_BALD ? "bald head" : "fabulous hair"
hair_situation = !$player.hair || getSimplifiedHairIdFromFullID($player.hair) == HAIR_BALD ? "bald head" : "fabulous hair"
return "Go without a hat and show off your #{hair_situation}!"
end

View File

@@ -16,14 +16,14 @@ class HairstyleSelectionMenuPresenter
def initialize(view)
@view = view
@hairstyle_full_id = $Trainer.hair
@hairstyle_full_id = $player.hair
hairstyle_split = getSplitHairFilenameAndVersionFromID(@hairstyle_full_id)
@hairstyle = hairstyle_split[0] if hairstyle_split[0]
@hair_version = hairstyle_split[1] if hairstyle_split[1]
@hairColor = $Trainer.hair_color
@hairColor = $player.hair_color
@available_styles= $Trainer.unlocked_hairstyles
@available_styles= $player.unlocked_hairstyles
@selected_hairstyle_index = 0
echoln @available_styles
@@ -74,8 +74,8 @@ class HairstyleSelectionMenuPresenter
def applyAllSelectedValues
$Trainer.hair = getFullHairId(@hairstyle,@hair_version)
$Trainer.hair_color = @hairColor
$player.hair = getFullHairId(@hairstyle,@hair_version)
$player.hair_color = @hairColor
end
def getOptionIndex(option_name)
@@ -182,6 +182,6 @@ class HairstyleSelectionMenuPresenter
hairstyle = @hairstyle
hair_version =@hair_version
hairId = getFullHairId(hairstyle,hair_version)
$Trainer.hair = hairId
$player.hair = hairId
end
end

View File

@@ -13,7 +13,7 @@ def obtainHat(outfit_id,secondary=false)
pbMessage(_INTL("The hat #{outfit_id} is invalid."))
return
end
$Trainer.unlocked_hats << outfit_id if !$Trainer.unlocked_hats.include?(outfit_id)
$player.unlocked_hats << outfit_id if !$player.unlocked_hats.include?(outfit_id)
obtainOutfitMessage(outfit)
if pbConfirmMessage("Would you like to put it on right now?")
putOnHat(outfit_id, false, false) if !secondary
@@ -31,7 +31,7 @@ def obtainClothes(outfit_id)
return
end
return if !outfit
$Trainer.unlocked_clothes << outfit_id if !$Trainer.unlocked_clothes.include?(outfit_id)
$player.unlocked_clothes << outfit_id if !$player.unlocked_clothes.include?(outfit_id)
obtainOutfitMessage(outfit)
if pbConfirmMessage("Would you like to put it on right now?")
putOnClothes(outfit_id)
@@ -50,16 +50,16 @@ def obtainNewHairstyle(full_outfit_id)
end
def putOnClothes(outfit_id, silent = false)
$Trainer.dyed_clothes= {} if ! $Trainer.dyed_clothes
$Trainer.last_worn_outfit = $Trainer.clothes
$player.dyed_clothes= {} if ! $player.dyed_clothes
$player.last_worn_outfit = $player.clothes
outfit = get_clothes_by_id(outfit_id)
$Trainer.clothes = outfit_id
$player.clothes = outfit_id
dye_color = $Trainer.dyed_clothes[outfit_id]
dye_color = $player.dyed_clothes[outfit_id]
if dye_color
$Trainer.clothes_color = dye_color
$player.clothes_color = dye_color
else
$Trainer.clothes_color = nil
$player.clothes_color = nil
end
$game_map.update
@@ -68,19 +68,19 @@ def putOnClothes(outfit_id, silent = false)
end
def putOnHat(outfit_id, silent = false, is_secondary=false)
$Trainer.dyed_hats= {} if ! $Trainer.dyed_hats
$Trainer.set_last_worn_hat($Trainer.hat,is_secondary)
$player.dyed_hats= {} if ! $player.dyed_hats
$player.set_last_worn_hat($player.hat,is_secondary)
outfit = get_hat_by_id(outfit_id)
$Trainer.set_hat(outfit_id,is_secondary)
$player.set_hat(outfit_id,is_secondary)
dye_color = $Trainer.dyed_hats[outfit_id]
dye_color = $player.dyed_hats[outfit_id]
if dye_color
$Trainer.hat_color = dye_color if !is_secondary
$Trainer.hat2_color = dye_color if is_secondary
$player.hat_color = dye_color if !is_secondary
$player.hat2_color = dye_color if is_secondary
else
$Trainer.hat_color = nil if !is_secondary
$Trainer.hat2_color = nil if is_secondary
$player.hat_color = nil if !is_secondary
$player.hat2_color = nil if is_secondary
end
$game_map.refreshPlayerOutfit()
@@ -91,7 +91,7 @@ end
def putOnHairFullId(full_outfit_id)
outfit_id = getSplitHairFilenameAndVersionFromID(full_outfit_id)[1]
outfit = get_hair_by_id(outfit_id)
$Trainer.hair = full_outfit_id
$player.hair = full_outfit_id
$game_map.update
refreshPlayerOutfit()
putOnOutfitMessage(outfit)
@@ -101,7 +101,7 @@ def putOnHair(outfit_id, version)
full_id = getFullHairId(outfit_id, version)
putOnHairFullId(full_id)
#outfit = get_hair_by_id(outfit_id)
#$Trainer.hair =
#$player.hair =
#putOnOutfitMessage(outfit)
end
@@ -173,15 +173,15 @@ def findLastHairVersion(hairId)
end
def isWearingClothes(outfitId)
return $Trainer.clothes == outfitId
return $player.clothes == outfitId
end
def isWearingHat(outfitId)
return $Trainer.hat == outfitId || $Trainer.hat2 == outfitId
return $player.hat == outfitId || $player.hat2 == outfitId
end
def isWearingHairstyle(outfitId, version = nil)
current_hair_split_id = getSplitHairFilenameAndVersionFromID($Trainer.hair)
current_hair_split_id = getSplitHairFilenameAndVersionFromID($player.hair)
current_id = current_hair_split_id.length >= 1 ? current_hair_split_id[1] : nil
current_version = current_hair_split_id[0]
if version
@@ -209,11 +209,11 @@ def getDefaultClothes()
end
def hasClothes?(outfit_id)
return $Trainer.unlocked_clothes.include?(outfit_id)
return $player.unlocked_clothes.include?(outfit_id)
end
def hasHat?(outfit_id)
return $Trainer.unlocked_hats.include?(outfit_id)
return $player.unlocked_hats.include?(outfit_id)
end
def getOutfitForPokemon(pokemonSpecies)
@@ -249,16 +249,16 @@ def getOutfitForPokemon(pokemonSpecies)
end
def hatUnlocked?(hatId)
return $Trainer.unlocked_hats.include?(hatId)
return $player.unlocked_hats.include?(hatId)
end
def export_current_outfit()
skinTone = $Trainer.skin_tone ? $Trainer.skin_tone : 0
hat = $Trainer.hat ? $Trainer.hat : "nil"
hair_color = $Trainer.hair_color || 0
clothes_color = $Trainer.clothes_color || 0
hat_color = $Trainer.hat_color || 0
exportedString = "TrainerAppearance.new(#{skinTone},\"#{hat}\",\"#{$Trainer.clothes}\",\"#{$Trainer.hair}\",#{hair_color},#{clothes_color},#{hat_color})"
skinTone = $player.skin_tone ? $player.skin_tone : 0
hat = $player.hat ? $player.hat : "nil"
hair_color = $player.hair_color || 0
clothes_color = $player.clothes_color || 0
hat_color = $player.hat_color || 0
exportedString = "TrainerAppearance.new(#{skinTone},\"#{hat}\",\"#{$player.clothes}\",\"#{$player.hair}\",#{hair_color},#{clothes_color},#{hat_color})"
Input.clipboard = exportedString
end
@@ -287,30 +287,30 @@ def setEventAppearance(event_id, trainerAppearance)
end
def getPlayerAppearance()
return TrainerAppearance.new($Trainer.skin_tone,$Trainer.hat,$Trainer.clothes, $Trainer.hair,
$Trainer.hair_color, $Trainer.clothes_color, $Trainer.hat_color)
return TrainerAppearance.new($player.skin_tone,$player.hat,$player.clothes, $player.hair,
$player.hair_color, $player.clothes_color, $player.hat_color)
end
def randomizePlayerOutfitUnlocked()
$Trainer.hat = $Trainer.unlocked_hats.sample
$Trainer.hat2 = $Trainer.unlocked_hats.sample
$Trainer.clothes = $Trainer.unlocked_clothes.sample
$player.hat = $player.unlocked_hats.sample
$player.hat2 = $player.unlocked_hats.sample
$player.clothes = $player.unlocked_clothes.sample
dye_hat = rand(2)==0
dye_hat2 = rand(2)==0
dye_clothes = rand(2)==0
dye_hair = rand(2)==0
$Trainer.hat2 = nil if rand(3)==0
$player.hat2 = nil if rand(3)==0
$Trainer.hat_color = dye_hat ? rand(255) : 0
$Trainer.hat2_color = dye_hat2 ? rand(255) : 0
$player.hat_color = dye_hat ? rand(255) : 0
$player.hat2_color = dye_hat2 ? rand(255) : 0
$Trainer.clothes_color = dye_clothes ? rand(255) : 0
$Trainer.hair_color = dye_hair ? rand(255) : 0
$player.clothes_color = dye_clothes ? rand(255) : 0
$player.hair_color = dye_hair ? rand(255) : 0
hair_id = $PokemonGlobal.hairstyles_data.keys.sample
hair_color = [1,2,3,4].sample
$Trainer.hair = getFullHairId(hair_id,hair_color)
$player.hair = getFullHairId(hair_id,hair_color)
end
@@ -389,21 +389,21 @@ def get_random_appearance()
end
def randomizePlayerOutfit()
$Trainer.hat = $PokemonGlobal.hats_data.keys.sample
$Trainer.hat2 = $PokemonGlobal.hats_data.keys.sample
$Trainer.hat2 = nil if(rand(3)==0)
$player.hat = $PokemonGlobal.hats_data.keys.sample
$player.hat2 = $PokemonGlobal.hats_data.keys.sample
$player.hat2 = nil if(rand(3)==0)
$Trainer.clothes = $PokemonGlobal.clothes_data.keys.sample
$Trainer.hat_color = rand(2)==0 ? rand(255) : 0
$Trainer.hat2_color = rand(2)==0 ? rand(255) : 0
$player.clothes = $PokemonGlobal.clothes_data.keys.sample
$player.hat_color = rand(2)==0 ? rand(255) : 0
$player.hat2_color = rand(2)==0 ? rand(255) : 0
$Trainer.clothes_color = rand(2)==0 ? rand(255) : 0
$Trainer.hair_color = rand(2)==0 ? rand(255) : 0
$player.clothes_color = rand(2)==0 ? rand(255) : 0
$player.hair_color = rand(2)==0 ? rand(255) : 0
hair_id = $PokemonGlobal.hairstyles_data.keys.sample
hair_color = [1,2,3,4].sample
$Trainer.skin_tone = [1,2,3,4,5,6].sample
$Trainer.hair = getFullHairId(hair_id,hair_color)
$player.skin_tone = [1,2,3,4,5,6].sample
$player.hair = getFullHairId(hair_id,hair_color)
end