public static int GetLabel(Liquor liquor, bool strong) { if(strong) return 1150718 + (int)liquor; return 1150442 + (int)liquor; }
public BottleOfLiquor(Liquor liquor, string label, bool isstrong, Mobile distiller) : base(BeverageType.Liquor) { Quantity = MaxQuantity; m_Liquor = liquor; m_Label = label; m_IsStrong = isstrong; m_Distiller = distiller; }
public DistillationContext() { m_LastGroup = Group.WheatBased; m_LastLiquor = Liquor.None; m_MakeStrong = false; m_Mark = true; m_Label = null; }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Liquor = (Liquor)reader.ReadInt(); m_Label = reader.ReadString(); m_Distiller = reader.ReadMobile(); }
public DistillationContext(GenericReader reader) { int version = reader.ReadInt(); m_LastGroup = (Group)reader.ReadInt(); m_LastLiquor = (Liquor)reader.ReadInt(); m_MakeStrong = reader.ReadBool(); m_Mark = reader.ReadBool(); m_Label = reader.ReadString(); }
public CraftDefinition(Group group, Liquor liquor, Type[] ingredients, int[] amounts, TimeSpan matureperiod) { m_Group = group; m_Liquor = liquor; m_Ingredients = ingredients; m_Amounts = amounts; m_MaturationDuration = matureperiod; m_Labels = new int[m_Ingredients.Length]; for(int i = 0; i < m_Ingredients.Length; i++) { Type type = m_Ingredients[i]; if(type == typeof(Yeast)) m_Labels[i] = 1150453; else if (type == typeof(WheatWort)) m_Labels[i] = 1150275; else if (type == typeof(PewterBowlOfCorn)) m_Labels[i] = 1025631; else if (type == typeof(PewterBowlOfPotatos)) m_Labels[i] = 1025634; else if (type == typeof(TribalBerry)) m_Labels[i] = 1040001; else if (type == typeof(HoneydewMelon)) m_Labels[i] = 1023189; else if (type == typeof(JarHoney)) m_Labels[i] = 1022540; else if (type == typeof(Pitcher)) { if(m_Liquor == Liquor.Brandy) m_Labels[i] = 1028091; // pitcher of wine else m_Labels[i] = 1024088; // pitcher of water } else if (type == typeof(Dates)) m_Labels[i] = 1025927; else if (type == typeof(PewterBowlOfCorn)) m_Labels[i] = 1025631; else { Item item = Loot.Construct(type); if(item != null) { m_Labels[i] = item.LabelNumber; item.Delete(); } } } }
public static int GetAmount(Mobile from, Type type, Liquor liquor) { if (from == null || from.Backpack == null) return 0; Container pack = from.Backpack; if (type == typeof(Pitcher)) { int amount = 0; BeverageType bType = liquor == Liquor.Brandy ? BeverageType.Wine : BeverageType.Water; Item[] items = pack.FindItemsByType(type); foreach (Item item in items) { Pitcher Pitcher = item as Pitcher; if (Pitcher != null && Pitcher.Content == bType && Pitcher.Quantity >= Pitcher.MaxQuantity) amount++; } return amount; } else if (type == typeof(PewterBowlOfCorn)) { return pack.GetAmount(type) + pack.GetAmount(typeof(WoodenBowlOfCorn)); } return pack.GetAmount(type); }
public LiquorBarrel() : base(4014) { m_Liquor = Liquor.None; m_UsesRemaining = 0; }
public CraftDefinition(Group group, Liquor liquor, Type[] ingredients, int[] amounts, TimeSpan matureperiod) { m_Group = group; m_Liquor = liquor; m_Ingredients = ingredients; m_Amounts = amounts; m_MaturationDuration = matureperiod; m_Labels = new int[m_Ingredients.Length]; for (int i = 0; i < m_Ingredients.Length; i++) { Type type = m_Ingredients[i]; if (type == typeof(Yeast)) { m_Labels[i] = 1150453; } else if (type == typeof(WheatWort)) { m_Labels[i] = 1150275; } else if (type == typeof(PewterBowlOfCorn)) { m_Labels[i] = 1025631; } else if (type == typeof(PewterBowlOfPotatos)) { m_Labels[i] = 1025634; } else if (type == typeof(TribalBerry)) { m_Labels[i] = 1040001; } else if (type == typeof(HoneydewMelon)) { m_Labels[i] = 1023189; } else if (type == typeof(JarHoney)) { m_Labels[i] = 1022540; } else if (type == typeof(Pitcher)) { if (m_Liquor == Liquor.Brandy) { m_Labels[i] = 1028091; // pitcher of wine } else { m_Labels[i] = 1024088; // pitcher of water } } else if (type == typeof(Dates)) { m_Labels[i] = 1025927; } else { Item item = Loot.Construct(type); if (item != null) { m_Labels[i] = item.LabelNumber; item.Delete(); } } } }
// helper public bool ChangesWereNotMade(int id, LiquorCreate updatedLiquor) { Liquor liquor = _context.Liquors.Find(id); return(liquor.Type == updatedLiquor.Type && liquor.Subtype == updatedLiquor.Subtype); }
protected override void Seed(LiquorBarn.Data.ApplicationDbContext context) { // This method will be called after migrating to the latest version. // You can use the DbSet<T>.AddOrUpdate() helper extension method // to avoid creating duplicate seed data. var abs = new Liquor() { Type = "Absinthe" }; var bra = new Liquor() { Type = "Brandy" }; var appBra = new Liquor() { Type = "Brandy", Subtype = "Apple Brandy" }; var aprBra = new Liquor() { Type = "Brandy", Subtype = "Apricot Brandy" }; var cogn = new Liquor() { Type = "Brandy", Subtype = "Cognac" }; var pis = new Liquor() { Type = "Brandy", Subtype = "Pisco" }; var kir = new Liquor() { Type = "Brandy", Subtype = "Kirsch" }; var cach = new Liquor() { Type = "Cachaca" }; var gin = new Liquor() { Type = "Gin" }; var mez = new Liquor() { Type = "Mezcal" }; var rum = new Liquor() { Type = "Rum" }; var darRum = new Liquor() { Type = "Rum", Subtype = "Dark Rum" }; var golRum = new Liquor() { Type = "Rum", Subtype = "Gold Rum" }; var ligRum = new Liquor() { Type = "Rum", Subtype = "Light Rum" }; var teq = new Liquor() { Type = "Tequila" }; var vod = new Liquor() { Type = "Vodka" }; var lemVod = new Liquor() { Type = "Vodka", Subtype = "Lemon Vodka" }; var whis = new Liquor() { Type = "Whiskey" }; var bour = new Liquor() { Type = "Whiskey", Subtype = "Bourbon" }; var iriWhis = new Liquor() { Type = "Whiskey", Subtype = "Irish Whiskey" }; var ryeWhis = new Liquor() { Type = "Whiskey", Subtype = "Rye Whiskey" }; var sco = new Liquor() { Type = "Whiskey", Subtype = "Scotch" }; var ama = new Liquor() { Type = "Liqueur", Subtype = "Amaretto" }; var ape = new Liquor() { Type = "Liqueur", Subtype = "Aperol" }; var aprLiq = new Liquor() { Type = "Liqueur", Subtype = "Apricot Liqueur" }; var ben = new Liquor() { Type = "Liqueur", Subtype = "Benedictine" }; var cam = new Liquor() { Type = "Liqueur", Subtype = "Campari" }; var cofLiq = new Liquor() { Type = "Liqueur", Subtype = "Coffee Liqueur" }; var cherLiq = new Liquor() { Type = "Liqueur", Subtype = "Cherry Liqueur" }; var creCac = new Liquor() { Type = "Liqueur", Subtype = "Creme de Cacao" }; var wcreCac = new Liquor() { Type = "Liqueur", Subtype = "White Creme de Cacao" }; var creCas = new Liquor() { Type = "Liqueur", Subtype = "Creme de Cassis" }; var creMen = new Liquor() { Type = "Liqueur", Subtype = "Creme de Menthe" }; var creMur = new Liquor() { Type = "Liqueur", Subtype = "Creme de Mure" }; var creViol = new Liquor() { Type = "Liqueur", Subtype = "Creme de Violette" }; var dra = new Liquor() { Type = "Liqueur", Subtype = "Drambuie" }; var gal = new Liquor() { Type = "Liqueur", Subtype = "Galliano" }; var iriCre = new Liquor() { Type = "Liqueur", Subtype = "Irish Cream" }; var lilBla = new Liquor() { Type = "Liqueur", Subtype = "Lillet Blanc" }; var marLiq = new Liquor() { Type = "Liqueur", Subtype = "Maraschino Liqueur" }; var oraLiq = new Liquor() { Type = "Liqueur", Subtype = "Orange Liqueur" }; var rasLiq = new Liquor() { Type = "Liqueur", Subtype = "Raspberry Liqueur" }; var peachSchna = new Liquor() { Type = "Schnapps", Subtype = "Peach Schnapps" }; var dryVer = new Liquor() { Type = "Vermouth", Subtype = "Dry Vermouth" }; var sweVer = new Liquor() { Type = "Vermouth", Subtype = "Sweet Vermouth" }; context.Liquors.AddOrUpdate(x => x.Id, abs, bra, appBra, aprBra, cogn, pis, kir, cach, gin, mez, rum, darRum, golRum, ligRum, teq, vod, lemVod, whis, bour, iriWhis, ryeWhis, sco, ama, ape, aprLiq, ben, cam, cofLiq, cherLiq, creCac, wcreCac, creCas, creMen, creMur, creViol, dra, gal, iriCre, marLiq, oraLiq, rasLiq, peachSchna, dryVer, sweVer ); context.Cocktails.AddOrUpdate(x => x.Id, new Cocktail() { Name = "Alexander", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = wcreCac } }, Ingredients = "Cream, Nutmeg" }, new Cocktail() { Name = "Americano", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cam }, new CocktailLiquor() { Liquor = sweVer } }, Ingredients = "Soda Water" }, new Cocktail() { Name = "Angel Face", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = appBra }, new CocktailLiquor() { Liquor = aprLiq } }, Ingredients = "N/A" }, new Cocktail() { Name = "Aviation", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = marLiq }, new CocktailLiquor() { Liquor = creViol } }, Ingredients = "Lemon Juice" }, new Cocktail() { Name = "B 52", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cofLiq }, new CocktailLiquor() { Liquor = iriCre }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "N/A" }, new Cocktail() { Name = "Bacardi", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum } }, Ingredients = "Lime Juice, Grenadine" }, new Cocktail() { Name = "Between The Sheets", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = cogn }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lemon Juice" }, new Cocktail() { Name = "Black Russian", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = cofLiq } }, Ingredients = "N/A" }, new Cocktail() { Name = "Bloody Mary", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod } }, Ingredients = "Tomato Juice, Lemon Juice, Worcestershire Sauce, Tabasco Sauce, Celery Salt, Pepper" }, new Cocktail() { Name = "Bramble", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = creMur } }, Ingredients = "Lemon Juice, Simple Syrup" }, new Cocktail() { Name = "Caipirinha", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cach } }, Ingredients = "Sugar, Lime" }, new Cocktail() { Name = "Casino", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = marLiq } }, Ingredients = "Lemon Juice, Orange Bitters" }, new Cocktail() { Name = "Clover Club", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin } }, Ingredients = "Egg White, Lemon Juice, Raspberry Syrup" }, new Cocktail() { Name = "Cosmopolitan", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = lemVod }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Cranberry Juice, Lime Juice" }, new Cocktail() { Name = "Cuba Libre", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = rum } }, Ingredients = "Cola, Lime" }, new Cocktail() { Name = "Daiquiri", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum } }, Ingredients = "Lime Juice, Simple Syrup" }, new Cocktail() { Name = "Dark N Stormy", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = darRum } }, Ingredients = "Ginger Beer, Lime Juice" }, new Cocktail() { Name = "Derby", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin } }, Ingredients = "Peach Bitters, Mint" }, new Cocktail() { Name = "Dirty Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = dryVer } }, Ingredients = "Olive Juice" }, new Cocktail() { Name = "Dry Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = dryVer } }, Ingredients = "N/A" }, new Cocktail() { Name = "Espresso Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = cofLiq } }, Ingredients = "Espresso, Simple Syrup" }, new Cocktail() { Name = "French Connection", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cogn }, new CocktailLiquor() { Liquor = ama } }, Ingredients = "N/A" }, new Cocktail() { Name = "French Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = rasLiq } }, Ingredients = "Pineapple Juice" }, new Cocktail() { Name = "Gin Fizz", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin } }, Ingredients = "Lemon Juice, Simple Syrup, Soda Water" }, new Cocktail() { Name = "Godfather", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = sco }, new CocktailLiquor() { Liquor = ama } }, Ingredients = "N/A" }, new Cocktail() { Name = "Godmother", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = ama } }, Ingredients = "N/A" }, new Cocktail() { Name = "Golden Dream", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gal }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Orange Juice, Cream" }, new Cocktail() { Name = "Grasshopper", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = creMen }, new CocktailLiquor() { Liquor = wcreCac } }, Ingredients = "Cream" }, new Cocktail() { Name = "Harvey Wallbanger", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = gal } }, Ingredients = "Orange Juice" }, new Cocktail() { Name = "Hemingway Special", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = marLiq } }, Ingredients = "Grapefruit Juice, Lime Juice" }, new Cocktail() { Name = "Horses Neck", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = bra } }, Ingredients = "Ginger Ale, Angostura Bitters" }, new Cocktail() { Name = "Irish Coffee", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = iriWhis } }, Ingredients = "Hot Coffee, Sugar, Cream" }, new Cocktail() { Name = "John Collins", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin } }, Ingredients = "Simple Syrup, Lemon Juice, Soda Water" }, new Cocktail() { Name = "Kamikaze", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lime Juice" }, new Cocktail() { Name = "Lemon Drop Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = lemVod }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lemon Juice, Simple Syrup" }, new Cocktail() { Name = "Long Island Iced Tea", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = teq }, new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lemon Juice, Simple Syrup, Cola" }, new Cocktail() { Name = "Mai Tai", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = darRum }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Orgeat Syrup, Lime Juice" }, new Cocktail() { Name = "Manhattan", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ryeWhis }, new CocktailLiquor() { Liquor = sweVer } }, Ingredients = "Angostura Bitters" }, new Cocktail() { Name = "Margarita", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = teq }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lime Juice" }, new Cocktail() { Name = "Mary Pickford", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = marLiq } }, Ingredients = "Grenadine, Pineapple Juice" }, new Cocktail() { Name = "Mint Julep", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = bour } }, Ingredients = "Mint, Powdered Sugar, Water" }, new Cocktail() { Name = "Mojito", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum } }, Ingredients = "Lime Juice, Mint, Sugar, Soda Water" }, new Cocktail() { Name = "Monkey Gland", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = abs } }, Ingredients = "Orange Juice, Grenadine" }, new Cocktail() { Name = "Moscow Mule", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod } }, Ingredients = "Ginger Beer, Lime Juice" }, new Cocktail() { Name = "Negroni", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = cam }, new CocktailLiquor() { Liquor = sweVer } }, Ingredients = "N/A" }, new Cocktail() { Name = "Old Fashioned", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = whis } }, Ingredients = "Angostura Bitters, Sugar, Water" }, new Cocktail() { Name = "Paradise", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = aprBra } }, Ingredients = "Orange Juice" }, new Cocktail() { Name = "Pina Colada", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum } }, Ingredients = "Pineapple Juice, Coconut Cream" }, new Cocktail() { Name = "Pisco Sour", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = pis } }, Ingredients = "Simple Syrup, Lemon Juice, Egg White" }, new Cocktail() { Name = "Planters Punch", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = darRum } }, Ingredients = "Lime Juice, Sugar, Water" }, new Cocktail() { Name = "Ramos Gin Fizz", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin } }, Ingredients = "Simple Syrup, Lime Juice, Lemon Juice, Cream, Egg White, Orange Flower Water, Vanilla Extract, Soda Water" }, new Cocktail() { Name = "Rose", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = kir }, new CocktailLiquor() { Liquor = dryVer } }, Ingredients = "Strawberry Syrup" }, new Cocktail() { Name = "Rusty Nail", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = sco }, new CocktailLiquor() { Liquor = dra } }, Ingredients = "N/A" }, new Cocktail() { Name = "Sazerac", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cogn }, new CocktailLiquor() { Liquor = abs } }, Ingredients = "Sugar, Peychaud's Bitters" }, new Cocktail() { Name = "Screwdriver", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod } }, Ingredients = "Orange Juice" }, new Cocktail() { Name = "Sea Breeze", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod } }, Ingredients = "Cranberry Juice, Grapefruit Juice" }, new Cocktail() { Name = "Sex On The Beach", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = peachSchna } }, Ingredients = "Cranberry Juice, Orange Juice" }, new Cocktail() { Name = "Sidecar", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cogn }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lemon Juice" }, new Cocktail() { Name = "Singapore Sling", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = cherLiq }, new CocktailLiquor() { Liquor = oraLiq }, new CocktailLiquor() { Liquor = ben } }, Ingredients = "Grenadine, Pineapple Juice, Lime Juice, Angostura Bitters" }, new Cocktail() { Name = "Stinger", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = cogn }, new CocktailLiquor() { Liquor = creMen } }, Ingredients = "N/A" }, new Cocktail() { Name = "Tequila Sunrise", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = teq } }, Ingredients = "Orange Juice, Grenadine" }, new Cocktail() { Name = "Tommys Margarita", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = teq } }, Ingredients = "Lime Juice, Agave Nectar" }, new Cocktail() { Name = "Tuxedo", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = dryVer }, new CocktailLiquor() { Liquor = marLiq }, new CocktailLiquor() { Liquor = abs } }, Ingredients = "Orange Bitters" }, new Cocktail() { Name = "Vampiro", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = teq } }, Ingredients = "Tomato Juice, Orange Juice, Lime Juice, Grenadine, Hot Sauce, Salt, Pepper" }, new Cocktail() { Name = "Vesper Martini", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = vod }, new CocktailLiquor() { Liquor = lilBla } }, Ingredients = "N/A" }, new Cocktail() { Name = "Whiskey Sour", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = bour } }, Ingredients = "Simple Syrup, Lemon Juice, Egg White" }, new Cocktail() { Name = "White Lady", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = gin }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lemon Juice, Egg White" }, new Cocktail() { Name = "Yellow Bird", LiquorsInCocktail = new List <CocktailLiquor>() { new CocktailLiquor() { Liquor = ligRum }, new CocktailLiquor() { Liquor = gal }, new CocktailLiquor() { Liquor = oraLiq } }, Ingredients = "Lime Juice" } ); }
//****EVENTS******************************************* //Submit and Update Button private void BtnSubmit_Click(object sender, EventArgs e) { if (noChange == false) { if (token == 0) { itemType = DrpBoxType.Text; if (itemType == "Beer") { Beer temp = new Beer(); token++; DropBoxEmpty(DrpBoxStyle); DropBoxEmpty(DrpBoxSize); TypeAdd(temp.BeerTypes, DrpBoxStyle); TypeAdd(temp.BeerSizes, DrpBoxSize); Show(itemType, "on"); } else if (itemType == "Food") { token++; DropBoxEmpty(DrpBoxStyle); DropBoxEmpty(DrpBoxSize); Show(itemType, "on"); LblSize.Visible = false; DrpBoxSize.Visible = false; } else if (itemType == "Liquor" || itemType == "Wine") { token++; DropBoxEmpty(DrpBoxStyle); DropBoxEmpty(DrpBoxSize); if (itemType == "Liquor") { Liquor temp = new Liquor(); TypeAdd(temp.LiquorTypes, DrpBoxStyle); TypeAdd(temp.LiquorSizes, DrpBoxSize); } else { Wine temp = new Wine(); TypeAdd(temp.WineTypes, DrpBoxStyle); TypeAdd(temp.WineSizes, DrpBoxSize); } Show(itemType, "on"); } else { LblErrType.Text = "*Pick One*"; } if (token == 1) { LblErrType.Text = ""; } } else if (token == 1) { if (itemType == "Beer") { Beer temp = new Beer(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; temp.Season = TxtSeason.Text; if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); Show(itemType, "off"); MessageBox.Show(temp.SendData(itemType)); } LblErrMsg.Text = temp.ErrMsg; } else if (itemType == "Food") { Item temp = new Item(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); Show(itemType, "off"); MessageBox.Show(temp.SendData(itemType)); } LblErrMsg.Text = temp.ErrMsg; } else if (itemType == "Liquor") { Liquor temp = new Liquor(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); Show(itemType, "off"); MessageBox.Show(temp.SendData(itemType)); } LblErrMsg.Text = temp.ErrMsg; } else { Wine temp = new Wine(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); Show(itemType, "off"); MessageBox.Show(temp.SendData(itemType)); } LblErrMsg.Text = temp.ErrMsg; } } } else { if (itemType == "Food") { Item temp = new Item(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; temp.Markup = temp.GetMark(temp.Price, temp.Cost); temp.Profit = temp.GetProfit(temp.Stock, temp.Price, temp.Cost); if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); MessageBox.Show(temp.UpdateData(indexSQL)); this.Close(); } LblErrMsg.Text = temp.ErrMsg; } else if (itemType == "Beer") { Beer temp = new Beer(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; temp.Season = TxtSeason.Text; temp.Markup = temp.GetMark(temp.Price, temp.Cost); temp.Profit = temp.GetProfit(temp.Stock, temp.Price, temp.Cost); if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); MessageBox.Show(temp.UpdateData(indexSQL)); this.Close(); } LblErrMsg.Text = temp.ErrMsg; } else if (itemType == "Liquor") { Liquor temp = new Liquor(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; temp.Markup = temp.GetMark(temp.Price, temp.Cost); temp.Profit = temp.GetProfit(temp.Stock, temp.Price, temp.Cost); if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); MessageBox.Show(temp.UpdateData(indexSQL)); this.Close(); } LblErrMsg.Text = temp.ErrMsg; } else { Wine temp = new Wine(); temp.Brand = TxtBrand.Text; temp.Name = TxtName.Text; temp.Style = DrpBoxStyle.Text; temp.Size = DrpBoxSize.Text; temp.Stock = TxtStock.Text; temp.Price = TxtPrice.Text; temp.Cost = TxtCost.Text; temp.Markup = temp.GetMark(temp.Price, temp.Cost); temp.Profit = temp.GetProfit(temp.Stock, temp.Price, temp.Cost); if (temp.ErrMsg.Length < 1) { token = 0; MessageBox.Show(temp.Display()); MessageBox.Show(temp.UpdateData(indexSQL)); this.Close(); } LblErrMsg.Text = temp.ErrMsg; } } }
public void DgvResults_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { string type = DGVResults.Rows[e.RowIndex].Cells[1].Value.ToString(); if (type == "Food") { Item nItem = new Item(); string itemID = DGVResults.Rows[e.RowIndex].Cells[0].Value.ToString(); nItem.Brand = DGVResults.Rows[e.RowIndex].Cells[2].Value.ToString(); nItem.Name = DGVResults.Rows[e.RowIndex].Cells[3].Value.ToString(); nItem.Stock = DGVResults.Rows[e.RowIndex].Cells[6].Value.ToString(); nItem.Price = DGVResults.Rows[e.RowIndex].Cells[8].Value.ToString(); nItem.Markup = DGVResults.Rows[e.RowIndex].Cells[9].Value.ToString(); nItem.Profit = DGVResults.Rows[e.RowIndex].Cells[10].Value.ToString(); nItem.Cost = DGVResults.Rows[e.RowIndex].Cells[11].Value.ToString(); FormData show = new FormData(type, nItem, itemID); show.ShowDialog(); } else if (type == "Beer") { Beer nItem = new Beer(); string itemID = DGVResults.Rows[e.RowIndex].Cells[0].Value.ToString(); nItem.Brand = DGVResults.Rows[e.RowIndex].Cells[2].Value.ToString(); nItem.Name = DGVResults.Rows[e.RowIndex].Cells[3].Value.ToString(); nItem.Style = DGVResults.Rows[e.RowIndex].Cells[4].Value.ToString(); nItem.Season = DGVResults.Rows[e.RowIndex].Cells[5].Value.ToString(); nItem.Stock = DGVResults.Rows[e.RowIndex].Cells[6].Value.ToString(); nItem.Size = DGVResults.Rows[e.RowIndex].Cells[7].Value.ToString(); nItem.Price = DGVResults.Rows[e.RowIndex].Cells[8].Value.ToString(); nItem.Markup = DGVResults.Rows[e.RowIndex].Cells[9].Value.ToString(); nItem.Profit = DGVResults.Rows[e.RowIndex].Cells[10].Value.ToString(); nItem.Cost = DGVResults.Rows[e.RowIndex].Cells[11].Value.ToString(); FormData show = new FormData(type, nItem, itemID); show.ShowDialog(); } else if (type == "Liquor") { Liquor nItem = new Liquor(); string itemID = DGVResults.Rows[e.RowIndex].Cells[0].Value.ToString(); nItem.Brand = DGVResults.Rows[e.RowIndex].Cells[2].Value.ToString(); nItem.Name = DGVResults.Rows[e.RowIndex].Cells[3].Value.ToString(); nItem.Style = DGVResults.Rows[e.RowIndex].Cells[4].Value.ToString(); nItem.Stock = DGVResults.Rows[e.RowIndex].Cells[6].Value.ToString(); nItem.Size = DGVResults.Rows[e.RowIndex].Cells[7].Value.ToString(); nItem.Price = DGVResults.Rows[e.RowIndex].Cells[8].Value.ToString(); nItem.Markup = DGVResults.Rows[e.RowIndex].Cells[9].Value.ToString(); nItem.Profit = DGVResults.Rows[e.RowIndex].Cells[10].Value.ToString(); nItem.Cost = DGVResults.Rows[e.RowIndex].Cells[11].Value.ToString(); FormData show = new FormData(type, nItem, itemID); show.ShowDialog(); } else { Wine nItem = new Wine(); string itemID = DGVResults.Rows[e.RowIndex].Cells[0].Value.ToString(); nItem.Brand = DGVResults.Rows[e.RowIndex].Cells[2].Value.ToString(); nItem.Name = DGVResults.Rows[e.RowIndex].Cells[3].Value.ToString(); nItem.Style = DGVResults.Rows[e.RowIndex].Cells[4].Value.ToString(); nItem.Stock = DGVResults.Rows[e.RowIndex].Cells[6].Value.ToString(); nItem.Size = DGVResults.Rows[e.RowIndex].Cells[7].Value.ToString(); nItem.Price = DGVResults.Rows[e.RowIndex].Cells[8].Value.ToString(); nItem.Markup = DGVResults.Rows[e.RowIndex].Cells[9].Value.ToString(); nItem.Profit = DGVResults.Rows[e.RowIndex].Cells[10].Value.ToString(); nItem.Cost = DGVResults.Rows[e.RowIndex].Cells[11].Value.ToString(); FormData show = new FormData(type, nItem, itemID); show.ShowDialog(); } DGVResults.DataSource = null; }
static void Main(string[] args) { Connector snapshot = new Connector(); List <Liqueur> liqueur = snapshot.liqueur(); List <Cocktail> cocktail = snapshot.cocktail(); List <Liquor> liquor = snapshot.liquor(); List <Mocktail> mocktails = snapshot.mocktail(); List <Cocktail> abs = new List <Cocktail>(); foreach (Cocktail item in cocktail) { if (item.pk == 5) { abs.Add(item); print(item.name); print(item.url); Console.WriteLine(item.percentage); } } Liquor whiskey = new Liquor(); foreach (Liquor item in liquor) { if (item.name == "Whiskey") { whiskey = item; print(item.name); print(item.url); } } //foreach (Liqueur item in liqueur) //{ // print(item.name); // print(item.url); // print(item.liquor_base.name); // Console.WriteLine(item.abv); // item.special = "None"; // item.save(); ////} //Liqueur soco = new Liqueur(); //soco.name = "Southern Comfort"; //soco.abv = 35.0f; //soco.liquor_base = whiskey; //soco.cocktails = abs; //soco.origin = "USA"; //soco.flavour = "Dry Peach"; //print(soco._liquor_base); //var json = JsonConvert.SerializeObject(soco); //Console.WriteLine(json); //soco.save(); //PUT Test //foreach (Mocktail item in mocktails) //{ // print(item.name); // print(item.url); // print(item.garnish); // item.garnish = "Lime"; // item.save(); // print(item.garnish); //} ////POST Test //Mocktail mock = new Mocktail() //{ // name = "Virgin Peach Bellini", // garnish = "Apple", // glassware = "Flute", // ice = false //}; //mock.save(); Console.ReadLine(); }
public ActionResult Edit(long id) { Liquor liquor = db.Liquors.Find(id); return(View(liquor)); }
public void BeginDistillation(Liquor liquor) { TimeSpan ts; if (liquor == Liquor.Spirytus || liquor == Liquor.Akvavit) ts = TimeSpan.MinValue; else ts = DistillationSystem.MaturationPeriod; BeginDistillation(liquor, ts, m_Label, m_IsStrong, m_Distiller); }
public void BeginDistillation(Liquor liquor, TimeSpan duration, string label, bool isStrong, Mobile distiller) { m_Liquor = liquor; m_MaturationDuration = duration; m_Label = label; m_IsStrong = isStrong; m_Distiller = distiller; m_MaturationBegin = DateTime.UtcNow; m_UsesRemaining = m_Exceptional ? 20 : 10; InvalidateProperties(); }
public override void Deserialize(GenericReader reader) { base.Deserialize(reader); int version = reader.ReadInt(); m_Liquor = (Liquor)reader.ReadInt(); m_MaturationBegin = reader.ReadDateTime(); m_MaturationDuration = reader.ReadTimeSpan(); m_Label = reader.ReadString(); m_IsStrong = reader.ReadBool(); m_UsesRemaining = reader.ReadInt(); m_Exceptional = reader.ReadBool(); m_Crafter = reader.ReadMobile(); m_Distiller = reader.ReadMobile(); }
public DistillationGump(Mobile from) : base(35, 35) { from.CloseGump(typeof(DistillationGump)); m_Context = DistillationSystem.GetContext(from); Group group = m_Context.LastGroup; Liquor liquor = m_Context.LastLiquor; if (liquor == Liquor.None) { liquor = DistillationSystem.GetFirstLiquor(group); } m_Def = DistillationSystem.GetDefinition(liquor, group); if (m_Def == null) { return; } if (m_Def.Liquor != liquor) { liquor = m_Def.Liquor; } AddBackground(0, 0, 500, 500, 5054); AddImageTiled(10, 10, 480, 30, 2624); AddImageTiled(10, 50, 230, 120, 2624); AddImageTiled(10, 180, 230, 200, 2624); AddImageTiled(250, 50, 240, 200, 2624); AddImageTiled(250, 260, 240, 120, 2624); AddImageTiled(10, 390, 480, 60, 2624); AddImageTiled(10, 460, 480, 30, 2624); AddAlphaRegion(10, 10, 480, 480); AddHtmlLocalized(10, 16, 510, 20, 1150682, LabelColor, false, false); // <center>DISTILLERY MENU</center> AddHtmlLocalized(10, 55, 230, 20, 1150683, LabelColor, false, false); // <center>Select the group</center> AddButton(15, 80, 4005, 4007, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(55, 80, 200, 20, DistillationSystem.GetLabel(Group.WheatBased), LabelColor, false, false); // WHEAT BASED AddButton(15, 106, 4005, 4007, 2, GumpButtonType.Reply, 0); AddHtmlLocalized(55, 106, 200, 20, DistillationSystem.GetLabel(Group.WaterBased), LabelColor, false, false); // WATER BASED AddButton(15, 132, 4005, 4007, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(55, 132, 200, 20, DistillationSystem.GetLabel(Group.Other), LabelColor, false, false); // OTHER AddHtmlLocalized(10, 184, 230, 20, 1150684, LabelColor, false, false); // <center>Select the liquor type</center> int y = 210; for (int i = 0; i < DistillationSystem.CraftDefs.Count; i++) { CraftDefinition def = DistillationSystem.CraftDefs[i]; if (def.Group == group) { AddButton(15, y, 4005, 4007, 1000 + i, GumpButtonType.Reply, 0); AddHtmlLocalized(55, y, 200, 20, DistillationSystem.GetLabel(def.Liquor, false), LabelColor, false, false); y += 26; } } AddHtmlLocalized(250, 54, 240, 20, 1150735, String.Format("#{0}", DistillationSystem.GetLabel(liquor, false)), LabelColor, false, false); // <center>Ingredients of ~1_NAME~</center> y = 80; for (int i = 0; i < m_Def.Ingredients.Length; i++) { Type type = m_Def.Ingredients[i]; int amt = m_Def.Amounts[i]; bool strong = m_Context.MakeStrong; if (i == 0 && type == typeof(Yeast)) { for (int j = 0; j < amt; j++) { Yeast yeast = m_Context.SelectedYeast[j]; AddHtmlLocalized(295, y, 200, 20, yeast == null ? 1150778 : 1150779, "#1150453", LabelColor, false, false); // Yeast: ~1_VAL~ AddButton(255, y, 4005, 4007, 2000 + j, GumpButtonType.Reply, 0); y += 26; } continue; } else { int total = strong ? amt * 2 : amt; int amount = DistillationTarget.GetAmount(from, type, liquor); if (amount > total) { amount = total; } AddHtmlLocalized(295, y, 200, 20, 1150733, String.Format("#{0}\t{1}", m_Def.Labels[i], String.Format("{0}/{1}", amount.ToString(), total.ToString())), LabelColor, false, false); // ~1_NAME~ : ~2_NUMBER~ } y += 26; } AddHtmlLocalized(250, 264, 240, 20, 1150770, LabelColor, false, false); // <center>Distillery Options</center> AddButton(255, 290, 4005, 4007, 4, GumpButtonType.Reply, 0); AddHtmlLocalized(295, 290, 200, 20, m_Context.MakeStrong ? 1150730 : 1150729, LabelColor, false, false); // Double Distillation - Standard Distillation AddButton(255, 316, 4005, 4007, 5, GumpButtonType.Reply, 0); AddHtmlLocalized(295, 320, 200, 20, m_Context.Mark ? 1150731 : 1150732, LabelColor, false, false); // Mark Distiller Name - Do Not Mark AddButton(15, 395, 4005, 4007, 6, GumpButtonType.Reply, 0); AddHtmlLocalized(55, 395, 200, 20, 1150733, String.Format("Label\t{0}", m_Context.Label == null ? "None" : m_Context.Label), LabelColor, false, false); // ~1_NAME~ : ~2_NUMBER~ AddButton(15, 465, 4005, 4007, 7, GumpButtonType.Reply, 0); AddHtmlLocalized(55, 465, 200, 20, 1150771, LabelColor, false, false); // Execute Distillation AddButton(455, 465, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtmlLocalized(400, 465, 100, 20, 1060675, LabelColor, false, false); // CLOSE }
public static CraftDefinition GetDefinition(Liquor liquor, Group group) { foreach(CraftDefinition def in m_CraftDefs) { if(def.Liquor == liquor && def.Group == group) return def; } return GetFirstDefForGroup(group); }