mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-11 15:15:00 +00:00
Renames $Trainer to $player
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user