restructured data.json to differentiate edible and regular items
This commit is contained in:
parent
556bcefa33
commit
2fc0c32511
2 changed files with 56 additions and 45 deletions
25
data.json
25
data.json
|
@ -48,10 +48,15 @@
|
||||||
"I want to go on something more thrilling than {}."
|
"I want to go on something more thrilling than {}."
|
||||||
],
|
],
|
||||||
"items": [
|
"items": [
|
||||||
"I've already got a {}.",
|
|
||||||
"I can't afford {}.",
|
"I can't afford {}.",
|
||||||
"I'm not paying that much for {}!"
|
"I'm not paying that much for {}!"
|
||||||
],
|
],
|
||||||
|
"items-other": [
|
||||||
|
"I've already got a {}."
|
||||||
|
],
|
||||||
|
"items-edible": [
|
||||||
|
"I've not finished my {} yet."
|
||||||
|
],
|
||||||
"stalls": [
|
"stalls": [
|
||||||
"I can't find {}!"
|
"I can't find {}!"
|
||||||
],
|
],
|
||||||
|
@ -143,6 +148,7 @@
|
||||||
"Submarine Ride"
|
"Submarine Ride"
|
||||||
],
|
],
|
||||||
"stalls": {
|
"stalls": {
|
||||||
|
"edible": {
|
||||||
"Fruity Ices Stall": "Fruity Ice",
|
"Fruity Ices Stall": "Fruity Ice",
|
||||||
"Chip Shop": "Chips",
|
"Chip Shop": "Chips",
|
||||||
"Pizza Stall": "Pizza",
|
"Pizza Stall": "Pizza",
|
||||||
|
@ -150,18 +156,13 @@
|
||||||
"Drinks Stall": "Drink",
|
"Drinks Stall": "Drink",
|
||||||
"Candyfloss Stall": "Candyfloss",
|
"Candyfloss Stall": "Candyfloss",
|
||||||
"Popcorn Stall": "Popcorn",
|
"Popcorn Stall": "Popcorn",
|
||||||
"Balloon Stall": "Balloon",
|
|
||||||
"Souvenir Stall": "Cuddly Toy",
|
|
||||||
"Information Kiosk": "Park Map",
|
|
||||||
"Hot Dog Stall": "Hot Dog",
|
"Hot Dog Stall": "Hot Dog",
|
||||||
"Sea Food Stall": "Fried Tentacle",
|
"Sea Food Stall": "Fried Tentacle",
|
||||||
"Toffee Apple Stall": "Toffee Apple",
|
"Toffee Apple Stall": "Toffee Apple",
|
||||||
"Hat Stall": "Hat",
|
|
||||||
"Fried Chicken Stall": "Fried Chicken",
|
"Fried Chicken Stall": "Fried Chicken",
|
||||||
"Coffee Shop": "Coffee",
|
"Coffee Shop": "Coffee",
|
||||||
"Lemonade Stall": "Lemonade",
|
"Lemonade Stall": "Lemonade",
|
||||||
"Doughnut Shop": "Doughnut",
|
"Doughnut Shop": "Doughnut",
|
||||||
"T-Shirt Stall": "T-Shirt",
|
|
||||||
"Beef Noodles Stall": "Beef Noodles",
|
"Beef Noodles Stall": "Beef Noodles",
|
||||||
"Chicken Nuggets Stall": "Chicken Nuggets",
|
"Chicken Nuggets Stall": "Chicken Nuggets",
|
||||||
"Fried Rice Noodles Stall": "Fried Rice Noodles",
|
"Fried Rice Noodles Stall": "Fried Rice Noodles",
|
||||||
|
@ -177,14 +178,22 @@
|
||||||
"Soybean Milk Stall": "Soybean Milk",
|
"Soybean Milk Stall": "Soybean Milk",
|
||||||
"Star Fruit Drink Stall": "Star Fruit Drink",
|
"Star Fruit Drink Stall": "Star Fruit Drink",
|
||||||
"Sujeonggwa Stall": "Sujeonggwa",
|
"Sujeonggwa Stall": "Sujeonggwa",
|
||||||
"Sunglasses Stall": "Sunglasses",
|
|
||||||
"Art Deco Food Stall": "Noodles",
|
"Art Deco Food Stall": "Noodles",
|
||||||
"Neptune's Seafood Stall": "Tentacles",
|
"Neptune's Seafood Stall": "Tentacles",
|
||||||
"Toffee Apple Market Stall": "Toffee Apple",
|
"Toffee Apple Market Stall": "Toffee Apple",
|
||||||
"Witches Brew Soup": "Wonton Soup",
|
"Witches Brew Soup": "Wonton Soup",
|
||||||
"Lemonade Market Stall": "Lemonade",
|
"Lemonade Market Stall": "Lemonade",
|
||||||
"Moon Juice": "Moon Juice",
|
"Moon Juice": "Moon Juice"
|
||||||
|
},
|
||||||
|
"other": {
|
||||||
|
"Balloon Stall": "Balloon",
|
||||||
|
"Souvenir Stall": "Cuddly Toy",
|
||||||
|
"Information Kiosk": "Park Map",
|
||||||
|
"Hat Stall": "Hat",
|
||||||
|
"T-Shirt Stall": "T-Shirt",
|
||||||
|
"Sunglasses Stall": "Sunglasses",
|
||||||
"Soft Toy Stall": "Cuddly Toy"
|
"Soft Toy Stall": "Cuddly Toy"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
6
post.py
6
post.py
|
@ -37,6 +37,8 @@ def get_object(kind):
|
||||||
num = random.choice([1, 1, 1, 1, 1, 2, 2, 3])
|
num = random.choice([1, 1, 1, 1, 1, 2, 2, 3])
|
||||||
if kind == "rides":
|
if kind == "rides":
|
||||||
return "{} {}".format(random.choice(data['objects']['thrilling-rides'] + data['objects']['gentle-rides']), num)
|
return "{} {}".format(random.choice(data['objects']['thrilling-rides'] + data['objects']['gentle-rides']), num)
|
||||||
|
elif kind in ["gentle-rides", "thrilling-rides"]:
|
||||||
|
return "{} {}".format(random.choice(data['objects'][kind]), num)
|
||||||
|
|
||||||
thoughts_weighted = []
|
thoughts_weighted = []
|
||||||
for key in data['thoughts']:
|
for key in data['thoughts']:
|
||||||
|
@ -48,7 +50,7 @@ thought_type = "rides"
|
||||||
|
|
||||||
thought = random.choice(data['thoughts'][thought_type])
|
thought = random.choice(data['thoughts'][thought_type])
|
||||||
|
|
||||||
if thought_type == "rides":
|
if thought_type in ['rides', 'gentle-rides', 'thrilling-rides']:
|
||||||
thought = thought.format(get_object('rides'))
|
thought = thought.format(get_object(thought_type))
|
||||||
|
|
||||||
print(thought)
|
print(thought)
|
||||||
|
|
Loading…
Reference in a new issue