mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-06 06:01:46 +00:00
Adds option to swap base color in hair dye menu
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -43,32 +43,49 @@ def selectHairstyle(all_unlocked = false)
|
|||||||
$Trainer.hat = hat
|
$Trainer.hat = hat
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def swapToNextHairVersion()
|
||||||
|
split_hair = getSplitHairFilenameAndVersionFromID($Trainer.hair)
|
||||||
|
hair_version = split_hair[0]
|
||||||
|
hair_style = split_hair[1]
|
||||||
|
current_version = hair_version
|
||||||
|
pbSEPlay("GUI party switch", 80, 100)
|
||||||
|
newVersion = current_version.to_i + 1
|
||||||
|
lastVersion = findLastHairVersion(hair_style)
|
||||||
|
newVersion = lastVersion if newVersion <= 0
|
||||||
|
newVersion = 1 if newVersion > lastVersion
|
||||||
|
$Trainer.hair = getFullHairId(hair_style,newVersion)
|
||||||
|
end
|
||||||
|
|
||||||
def selectHairColor
|
def selectHairColor
|
||||||
original_color = $Trainer.hair_color
|
original_color = $Trainer.hair_color
|
||||||
|
original_hair = $Trainer.hair
|
||||||
$game_switches[SWITCH_SELECTING_CLOTHES]=true
|
$game_switches[SWITCH_SELECTING_CLOTHES]=true
|
||||||
$game_map.update
|
$game_map.update
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
hat = $Trainer.hat
|
hat = $Trainer.hat
|
||||||
commands = ["Shift up", "Shift down", "Toggle hat", "Reset", "Confirm", "Never Mind"]
|
commands = ["Swap base color", "Shift up", "Shift down", "Toggle hat", "Remove dye", "Confirm", "Never Mind"]
|
||||||
previous_input = 0
|
previous_input = 0
|
||||||
|
|
||||||
while (true)
|
while (true)
|
||||||
choice = pbShowCommands(nil, commands, commands.length, previous_input)
|
choice = pbShowCommands(nil, commands, commands.length, previous_input)
|
||||||
previous_input = choice
|
previous_input = choice
|
||||||
case choice
|
case choice
|
||||||
when 0 #NEXT
|
when 0 #change base
|
||||||
|
swapToNextHairVersion()
|
||||||
|
display_outfit_preview()
|
||||||
|
ret = false
|
||||||
|
when 1 #NEXT
|
||||||
#playOutfitChangeAnimation()
|
#playOutfitChangeAnimation()
|
||||||
pbSEPlay("GUI storage pick up", 80, 100)
|
pbSEPlay("GUI storage pick up", 80, 100)
|
||||||
shiftHairColor(10)
|
shiftHairColor(10)
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
ret = true
|
ret = true
|
||||||
when 1 #PREVIOUS
|
when 2 #PREVIOUS
|
||||||
pbSEPlay("GUI storage pick up", 80, 100)
|
pbSEPlay("GUI storage pick up", 80, 100)
|
||||||
shiftHairColor(-10)
|
shiftHairColor(-10)
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
ret = true
|
ret = true
|
||||||
when 2 #Toggle hat
|
when 3 #Toggle hat
|
||||||
pbSEPlay("GUI storage put down", 80, 100)
|
pbSEPlay("GUI storage put down", 80, 100)
|
||||||
if hat == $Trainer.hat
|
if hat == $Trainer.hat
|
||||||
$Trainer.hat = nil
|
$Trainer.hat = nil
|
||||||
@@ -76,15 +93,16 @@ def selectHairColor
|
|||||||
$Trainer.hat = hat
|
$Trainer.hat = hat
|
||||||
end
|
end
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
when 3 #Reset
|
when 4 #Reset
|
||||||
pbSEPlay("GUI storage put down", 80, 100)
|
pbSEPlay("GUI storage put down", 80, 100)
|
||||||
$Trainer.hair_color = 0
|
$Trainer.hair_color = 0
|
||||||
display_outfit_preview()
|
display_outfit_preview()
|
||||||
ret = false
|
ret = false
|
||||||
when 4 #Confirm
|
when 5 #Confirm
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
$Trainer.hair_color = original_color
|
$Trainer.hair_color = original_color
|
||||||
|
$Trainer.hair = original_hair
|
||||||
ret = false
|
ret = false
|
||||||
break
|
break
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -156,6 +156,8 @@ def findLastHairVersion(hairId)
|
|||||||
last_version = 0
|
last_version = 0
|
||||||
possible_versions.each { |version|
|
possible_versions.each { |version|
|
||||||
hair_id = getFullHairId(hairId, version)
|
hair_id = getFullHairId(hairId, version)
|
||||||
|
echoln hair_id
|
||||||
|
echoln pbResolveBitmap(getOverworldHairFilename(hair_id))
|
||||||
if pbResolveBitmap(getOverworldHairFilename(hair_id))
|
if pbResolveBitmap(getOverworldHairFilename(hair_id))
|
||||||
last_version = version
|
last_version = version
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -476,9 +476,6 @@ RandPokeNick = [
|
|||||||
"Carlos",
|
"Carlos",
|
||||||
"hm_slave",
|
"hm_slave",
|
||||||
"Varicelle",
|
"Varicelle",
|
||||||
"Google",
|
|
||||||
"Twitter",
|
|
||||||
"Facebook",
|
|
||||||
"Mia",
|
"Mia",
|
||||||
"miam",
|
"miam",
|
||||||
"Lame-o",
|
"Lame-o",
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ module Settings
|
|||||||
|
|
||||||
|
|
||||||
VERSION_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/VERSION"
|
VERSION_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/VERSION"
|
||||||
CUSTOM_DEX_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/infinitefusion-e18/main/Data/dex.json"
|
CUSTOM_DEX_FILE_URL = "https://raw.githubusercontent.com/infinitefusion/pif-downloadables/refs/heads/master/dex.json"
|
||||||
|
|
||||||
# CUSTOM SPRITES
|
# CUSTOM SPRITES
|
||||||
AUTOGEN_SPRITES_REPO_URL = ""
|
AUTOGEN_SPRITES_REPO_URL = ""
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user