|
14 | 14 | 'Biscotti', 'Oatmeal Cranberry', 'Chocolate Fudge', 'Peanut Butter', 'Pumpkin', 'Lemon Bar', |
15 | 15 | 'Chocolate Oatmeal Fudge', 'Toffee Peanut', 'Danish Sugar', 'Triple Chocolate', 'Oreo'] |
16 | 16 |
|
17 | | -# <Luke> Hey guys, any good ideas for plugins? |
18 | | -# <User> I don't know, something that lists every potato known to man? |
19 | | -# <Luke> BRILLIANT |
20 | | -potatoes = ['AC Belmont', 'AC Blue Pride', 'AC Brador', 'AC Chaleur', 'AC Domino', 'AC Dubuc', 'AC Glacier Chip', |
21 | | - 'AC Maple Gold', 'AC Novachip', 'AC Peregrine Red', 'AC Ptarmigan', 'AC Red Island', 'AC Saguenor', |
22 | | - 'AC Stampede Russet', 'AC Sunbury', 'Abeille', 'Abnaki', 'Acadia', 'Acadia Russet', 'Accent', |
23 | | - 'Adirondack Blue', 'Adirondack Red', 'Adora', 'Agria', 'All Blue', 'All Red', 'Alpha', 'Alta Russet', |
24 | | - 'Alturas Russet', 'Amandine', 'Amisk', 'Andover', 'Anoka', 'Anson', 'Aquilon', 'Arran Consul', 'Asterix', |
25 | | - 'Atlantic', 'Austrian Crescent', 'Avalanche', 'Banana', 'Bannock Russet', 'Batoche', 'BeRus', |
26 | | - 'Belle De Fonteney', 'Belleisle', 'Bintje', 'Blossom', 'Blue Christie', 'Blue Mac', 'Brigus', |
27 | | - 'Brise du Nord', 'Butte', 'Butterfinger', 'Caesar', 'CalWhite', 'CalRed', 'Caribe', 'Carlingford', |
28 | | - 'Carlton', 'Carola', 'Cascade', 'Castile', 'Centennial Russet', 'Century Russet', 'Charlotte', 'Cherie', |
29 | | - 'Cherokee', 'Cherry Red', 'Chieftain', 'Chipeta', 'Coastal Russet', 'Colorado Rose', 'Concurrent', |
30 | | - 'Conestoga', 'Cowhorn', 'Crestone Russet', 'Crispin', 'Cupids', 'Daisy Gold', 'Dakota Pearl', 'Defender', |
31 | | - 'Delikat', 'Denali', 'Desiree', 'Divina', 'Dundrod', 'Durango Red', 'Early Rose', 'Elba', 'Envol', |
32 | | - 'Epicure', 'Eramosa', 'Estima', 'Eva', 'Fabula', 'Fambo', 'Fremont Russet', 'French Fingerling', |
33 | | - 'Frontier Russet', 'Fundy', 'Garnet Chile', 'Gem Russet', 'GemStar Russet', 'Gemchip', 'German Butterball', |
34 | | - 'Gigant', 'Goldrush', 'Granola', 'Green Mountain', 'Haida', 'Hertha', 'Hilite Russet', 'Huckleberry', |
35 | | - 'Hunter', 'Huron', 'IdaRose', 'Innovator', 'Irish Cobbler', 'Island Sunshine', 'Ivory Crisp', |
36 | | - 'Jacqueline Lee', 'Jemseg', 'Kanona', 'Katahdin', 'Kennebec', "Kerr's Pink", 'Keswick', 'Keuka Gold', |
37 | | - 'Keystone Russet', 'King Edward VII', 'Kipfel', 'Klamath Russet', 'Krantz', 'LaRatte', 'Lady Rosetta', |
38 | | - 'Latona', 'Lemhi Russet', 'Liberator', 'Lili', 'MaineChip', 'Marfona', 'Maris Bard', 'Maris Piper', |
39 | | - 'Matilda', 'Mazama', 'McIntyre', 'Michigan Purple', 'Millenium Russet', 'Mirton Pearl', 'Modoc', 'Mondial', |
40 | | - 'Monona', 'Morene', 'Morning Gold', 'Mouraska', 'Navan', 'Nicola', 'Nipigon', 'Niska', 'Nooksack', |
41 | | - 'NorValley', 'Norchip', 'Nordonna', 'Norgold Russet', 'Norking Russet', 'Norland', 'Norwis', 'Obelix', |
42 | | - 'Ozette', 'Peanut', 'Penta', 'Peribonka', 'Peruvian Purple', 'Pike', 'Pink Pearl', 'Prospect', 'Pungo', |
43 | | - 'Purple Majesty', 'Purple Viking', 'Ranger Russet', 'Reba', 'Red Cloud', 'Red Gold', 'Red La Soda', |
44 | | - 'Red Pontiac', 'Red Ruby', 'Red Thumb', 'Redsen', 'Rocket', 'Rose Finn Apple', 'Rose Gold', 'Roselys', |
45 | | - 'Rote Erstling', 'Ruby Crescent', 'Russet Burbank', 'Russet Legend', 'Russet Norkotah', 'Russet Nugget', |
46 | | - 'Russian Banana', 'Saginaw Gold', 'Sangre', 'Satina', 'Saxon', 'Sebago', 'Shepody', 'Sierra', |
47 | | - 'Silverton Russet', 'Simcoe', 'Snowden', 'Spunta', "St. John's", 'Summit Russet', 'Sunrise', 'Superior', |
48 | | - 'Symfonia', 'Tolaas', 'Trent', 'True Blue', 'Ulla', 'Umatilla Russet', 'Valisa', 'Van Gogh', 'Viking', |
49 | | - 'Wallowa Russet', 'Warba', 'Western Russet', 'White Rose', 'Willamette', 'Winema', 'Yellow Finn', |
50 | | - 'Yukon Gold'] |
51 | | - |
52 | 17 |
|
53 | 18 | sandwich_data = {} |
54 | 19 | taco_data = {} |
|
77 | 42 | milkshake_data = {} |
78 | 43 | kebab_data = {} |
79 | 44 | cake_data = {} |
| 45 | +potato_data = {} |
80 | 46 |
|
81 | 47 |
|
82 | 48 | def is_valid(target): |
@@ -126,25 +92,28 @@ def load_foods(bot): |
126 | 92 | load_template_data(bot, "milkshake.json", milkshake_data) |
127 | 93 | load_template_data(bot, "kebab.json", kebab_data) |
128 | 94 | load_template_data(bot, "cake.json", cake_data) |
| 95 | + load_template_data(bot, "potato.json", potato_data) |
129 | 96 |
|
130 | 97 |
|
131 | 98 | @asyncio.coroutine |
132 | 99 | @hook.command |
133 | 100 | def potato(text, action): |
134 | 101 | """<user> - makes <user> a tasty little potato""" |
| 102 | + # Kept for posterity |
| 103 | + # <Luke> Hey guys, any good ideas for plugins? |
| 104 | + # <User> I don't know, something that lists every potato known to man? |
| 105 | + # <Luke> BRILLIANT |
135 | 106 | user = text.strip() |
136 | 107 |
|
137 | 108 | if not is_valid(user): |
138 | 109 | return "I can't give a potato to that user." |
139 | 110 |
|
140 | | - potato_type = random.choice(potatoes) |
141 | | - size = random.choice(['small', 'little', 'mid-sized', 'medium-sized', 'large', 'gigantic']) |
142 | | - flavor = random.choice(['tasty', 'delectable', 'delicious', 'yummy', 'toothsome', 'scrumptious', 'luscious']) |
143 | | - method = random.choice(['bakes', 'fries', 'boils', 'roasts']) |
144 | | - side_dish = random.choice(['side salad', 'dollop of sour cream', 'piece of chicken', 'bowl of shredded bacon']) |
| 111 | + generator = textgen.TextGenerator( |
| 112 | + potato_data["templates"], potato_data["parts"], variables={"user": user} |
| 113 | + ) |
145 | 114 |
|
146 | | - action("{} a {} {} {} potato for {} and serves it with a small {}!".format(method, flavor, size, potato_type, user, |
147 | | - side_dish)) |
| 115 | + # act out the message |
| 116 | + action(generator.generate_string()) |
148 | 117 |
|
149 | 118 |
|
150 | 119 | @asyncio.coroutine |
|
0 commit comments