mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 22:24:58 +00:00
6.4 update (minus sprites)
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false)
|
||||
def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false, isShop=true, message=nil)
|
||||
commands = []
|
||||
commands[cmdBuy = commands.length] = _INTL("Buy")
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||
cmd = pbMessage(_INTL("Welcome! How may I serve you?"), commands, cmdQuit + 1)
|
||||
message = _INTL("Welcome! How may I serve you?") if !message
|
||||
cmd = pbMessage(message, commands, cmdQuit + 1)
|
||||
loop do
|
||||
if cmdBuy >= 0 && cmd == cmdBuy
|
||||
adapter = getAdapter(itemType, stock, true)
|
||||
adapter = getAdapter(itemType, stock, isShop)
|
||||
view = ClothesShopView.new()
|
||||
presenter = getPresenter(itemType, view, stock, adapter, versions)
|
||||
presenter.pbBuyScreen
|
||||
@@ -14,8 +15,6 @@ def genericOutfitsShopMenu(stock = [], itemType = nil, versions = false)
|
||||
pbMessage(_INTL("Please come again!"))
|
||||
break
|
||||
end
|
||||
cmd = pbMessage(_INTL("Is there anything else I can help you with?"),
|
||||
commands, cmdQuit + 1)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -41,32 +40,35 @@ end
|
||||
|
||||
def list_all_possible_outfits() end
|
||||
|
||||
def clothesShop(outfits_list = [])
|
||||
def clothesShop(outfits_list = [], free=false,customMessage=nil)
|
||||
stock = []
|
||||
outfits_list.each { |outfit_id|
|
||||
outfit = get_clothes_by_id(outfit_id)
|
||||
stock << outfit if outfit
|
||||
}
|
||||
genericOutfitsShopMenu(stock, :CLOTHES)
|
||||
genericOutfitsShopMenu(stock, :CLOTHES,false,!free,customMessage)
|
||||
end
|
||||
|
||||
def hatShop(outfits_list = [])
|
||||
def hatShop(outfits_list = [], free=false, customMessage=nil)
|
||||
stock = []
|
||||
outfits_list.each { |outfit_id|
|
||||
outfit = get_hat_by_id(outfit_id)
|
||||
stock << outfit if outfit
|
||||
}
|
||||
genericOutfitsShopMenu(stock, :HAT)
|
||||
genericOutfitsShopMenu(stock, :HAT,false,!free,customMessage)
|
||||
end
|
||||
|
||||
def hairShop(outfits_list = [])
|
||||
stock = []
|
||||
def hairShop(outfits_list = [],free=false, customMessage=nil)
|
||||
currentHair = getSimplifiedHairIdFromFullID($Trainer.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
|
||||
outfits_list.each { |outfit_id|
|
||||
echoln outfit_id
|
||||
next if outfit_id == currentHair
|
||||
outfit = get_hair_by_id(outfit_id)
|
||||
stock << outfit if outfit
|
||||
}
|
||||
genericOutfitsShopMenu(stock, :HAIR, true)
|
||||
genericOutfitsShopMenu(stock, :HAIR, true,!free,customMessage)
|
||||
end
|
||||
|
||||
def openSelectOutfitMenu(stock = [], itemType)
|
||||
@@ -91,13 +93,14 @@ def changeHatMenu()
|
||||
outfit = get_hat_by_id(outfit_id)
|
||||
stock << outfit if outfit
|
||||
}
|
||||
stock << :REMOVE_HAT
|
||||
openSelectOutfitMenu(stock, :HAT)
|
||||
end
|
||||
|
||||
def changeOutfit()
|
||||
commands = []
|
||||
commands[cmdClothes = commands.length] = _INTL("Change clothes")
|
||||
commands[cmdHat = commands.length] = _INTL("Change hat")
|
||||
commands[cmdClothes = commands.length] = _INTL("Change clothes")
|
||||
commands[cmdQuit = commands.length] = _INTL("Quit")
|
||||
|
||||
cmd = pbMessage(_INTL("What would you like to do?"), commands, cmdQuit + 1)
|
||||
@@ -112,4 +115,7 @@ def changeOutfit()
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user