Compare commits
5 Commits
d8babf206a
...
3b73dcaaf8
Author | SHA1 | Date | |
---|---|---|---|
Lynne Megido | 3b73dcaaf8 | ||
Lynne Megido | b90b98015b | ||
Lynne Megido | 589fd4fe1c | ||
Lynne Megido | 2fc0c32511 | ||
Lynne Megido | 556bcefa33 |
|
@ -1,3 +1,5 @@
|
||||||
# rct-guest
|
# rct-guest
|
||||||
|
|
||||||
rct-guest looks too intense for me!
|
rct-guest looks too intense for me!
|
||||||
|
|
||||||
|
The information in `data.json` was obtained from [the RCT wiki](https://rct.fandom.com/wiki/RollerCoaster_Tycoon_Wiki). `data.json` is available under a [CC-BY-SA](https://creativecommons.org/licenses/by-sa/4.0/) license. The information was compiled from multiple pages and reorganised into the JSON format.
|
||||||
|
|
95
data.json
95
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-edible": [
|
||||||
|
"I've not finished my {} yet."
|
||||||
|
],
|
||||||
|
"items-other": [
|
||||||
|
"I've already got a {}."
|
||||||
|
],
|
||||||
"stalls": [
|
"stalls": [
|
||||||
"I can't find {}!"
|
"I can't find {}!"
|
||||||
],
|
],
|
||||||
|
@ -143,48 +148,52 @@
|
||||||
"Submarine Ride"
|
"Submarine Ride"
|
||||||
],
|
],
|
||||||
"stalls": {
|
"stalls": {
|
||||||
"Fruity Ices Stall": "Fruity Ice",
|
"edible": {
|
||||||
"Chip Shop": "Chips",
|
"Fruity Ices Stall": "Fruity Ice",
|
||||||
"Pizza Stall": "Pizza",
|
"Chip Shop": "Chips",
|
||||||
"Burger Bar": "Burger",
|
"Pizza Stall": "Pizza",
|
||||||
"Drinks Stall": "Drink",
|
"Burger Bar": "Burger",
|
||||||
"Candyfloss Stall": "Candyfloss",
|
"Drinks Stall": "Drink",
|
||||||
"Popcorn Stall": "Popcorn",
|
"Candyfloss Stall": "Candyfloss",
|
||||||
"Balloon Stall": "Balloon",
|
"Popcorn Stall": "Popcorn",
|
||||||
"Souvenir Stall": "Cuddly Toy",
|
"Hot Dog Stall": "Hot Dog",
|
||||||
"Information Kiosk": "Park Map",
|
"Sea Food Stall": "Fried Tentacle",
|
||||||
"Hot Dog Stall": "Hot Dog",
|
"Toffee Apple Stall": "Toffee Apple",
|
||||||
"Sea Food Stall": "Fried Tentacle",
|
"Fried Chicken Stall": "Fried Chicken",
|
||||||
"Toffee Apple Stall": "Toffee Apple",
|
"Coffee Shop": "Coffee",
|
||||||
"Hat Stall": "Hat",
|
"Lemonade Stall": "Lemonade",
|
||||||
"Fried Chicken Stall": "Fried Chicken",
|
"Doughnut Shop": "Doughnut",
|
||||||
"Coffee Shop": "Coffee",
|
"Beef Noodles Stall": "Beef Noodles",
|
||||||
"Lemonade Stall": "Lemonade",
|
"Chicken Nuggets Stall": "Chicken Nuggets",
|
||||||
"Doughnut Shop": "Doughnut",
|
"Fried Rice Noodles Stall": "Fried Rice Noodles",
|
||||||
"T-Shirt Stall": "T-Shirt",
|
"Funnel Cake Shop": "Funnel Cake",
|
||||||
"Beef Noodles Stall": "Beef Noodles",
|
"Ice Cream Cone Stall": "Ice Cream Cone",
|
||||||
"Chicken Nuggets Stall": "Chicken Nuggets",
|
"Meatball Soup Stall": "Meatball Soup",
|
||||||
"Fried Rice Noodles Stall": "Fried Rice Noodles",
|
"Pretzel Stall": "Pretzel",
|
||||||
"Funnel Cake Shop": "Funnel Cake",
|
"Roast Sausage Stall": "Roast Sausage",
|
||||||
"Ice Cream Cone Stall": "Ice Cream Cone",
|
"Sub Sandwich Stall": "Sub Sandwich",
|
||||||
"Meatball Soup Stall": "Meatball Soup",
|
"Wonton Soup Stall": "Wonton Soup",
|
||||||
"Pretzel Stall": "Pretzel",
|
"Hot Chocolate Stall": "Hot Chocolate",
|
||||||
"Roast Sausage Stall": "Roast Sausage",
|
"Iced Tea Stall": "Iced Tea",
|
||||||
"Sub Sandwich Stall": "Sub Sandwich",
|
"Soybean Milk Stall": "Soybean Milk",
|
||||||
"Wonton Soup Stall": "Wonton Soup",
|
"Star Fruit Drink Stall": "Star Fruit Drink",
|
||||||
"Hot Chocolate Stall": "Hot Chocolate",
|
"Sujeonggwa Stall": "Sujeonggwa",
|
||||||
"Iced Tea Stall": "Iced Tea",
|
"Art Deco Food Stall": "Noodles",
|
||||||
"Soybean Milk Stall": "Soybean Milk",
|
"Neptune's Seafood Stall": "Tentacles",
|
||||||
"Star Fruit Drink Stall": "Star Fruit Drink",
|
"Toffee Apple Market Stall": "Toffee Apple",
|
||||||
"Sujeonggwa Stall": "Sujeonggwa",
|
"Witches Brew Soup": "Wonton Soup",
|
||||||
"Sunglasses Stall": "Sunglasses",
|
"Lemonade Market Stall": "Lemonade",
|
||||||
"Art Deco Food Stall": "Noodles",
|
"Moon Juice": "Moon Juice"
|
||||||
"Neptune's Seafood Stall": "Tentacles",
|
},
|
||||||
"Toffee Apple Market Stall": "Toffee Apple",
|
"other": {
|
||||||
"Witches Brew Soup": "Wonton Soup",
|
"Balloon Stall": "Balloon",
|
||||||
"Lemonade Market Stall": "Lemonade",
|
"Souvenir Stall": "Cuddly Toy",
|
||||||
"Moon Juice": "Moon Juice",
|
"Information Kiosk": "Park Map",
|
||||||
"Soft Toy Stall": "Cuddly Toy"
|
"Hat Stall": "Hat",
|
||||||
|
"T-Shirt Stall": "T-Shirt",
|
||||||
|
"Sunglasses Stall": "Sunglasses",
|
||||||
|
"Soft Toy Stall": "Cuddly Toy"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,4 +31,47 @@ client = Mastodon(
|
||||||
api_base_url=cfg['site'])
|
api_base_url=cfg['site'])
|
||||||
|
|
||||||
# make a post!
|
# make a post!
|
||||||
# if you delete this line, you can also remove the random module from the imports list.
|
data = json.load(open('data.json', 'r'))
|
||||||
|
|
||||||
|
def get_object(kind):
|
||||||
|
num = random.choice([1, 1, 1, 1, 1, 2, 2, 3])
|
||||||
|
if kind == "rides":
|
||||||
|
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)
|
||||||
|
elif kind == "items":
|
||||||
|
return random.choice(list(data['objects']['stalls']['edible'].values()) + list(data['objects']['stalls']['other'].values()))
|
||||||
|
elif kind == "items-edible":
|
||||||
|
return random.choice(list(data['objects']['stalls']['edible'].values()))
|
||||||
|
elif kind == "items-other":
|
||||||
|
return random.choice(list(data['objects']['stalls']['other'].values()))
|
||||||
|
elif kind == "stalls":
|
||||||
|
return "{} {}".format(random.choice(list(data['objects']['stalls']['edible'].keys()) + list(data['objects']['stalls']['other'].keys())), num)
|
||||||
|
elif kind == "item-stall":
|
||||||
|
stalls_weighted = []
|
||||||
|
for key in data['objects']['stalls']:
|
||||||
|
for i in range(len(data['objects']['stalls'][key])):
|
||||||
|
stalls_weighted.append(key)
|
||||||
|
stall_type = random.choice(stalls_weighted)
|
||||||
|
choice = random.choice(list(data['objects']['stalls'][stall_type].items()))[::-1]
|
||||||
|
stall = "{} {}".format(choice[1], num)
|
||||||
|
return (choice[0], stall)
|
||||||
|
|
||||||
|
thoughts_weighted = []
|
||||||
|
for key in data['thoughts']:
|
||||||
|
for i in range(len(data['thoughts'][key])):
|
||||||
|
thoughts_weighted.append(key)
|
||||||
|
|
||||||
|
thought_type = random.choice(thoughts_weighted)
|
||||||
|
|
||||||
|
thought = random.choice(data['thoughts'][thought_type])
|
||||||
|
|
||||||
|
if thought_type == "plain":
|
||||||
|
pass
|
||||||
|
elif thought_type == "item-stall":
|
||||||
|
objects = get_object(thought_type)
|
||||||
|
thought = thought.format(objects[0], objects[1])
|
||||||
|
else:
|
||||||
|
thought = thought.format(get_object(thought_type))
|
||||||
|
|
||||||
|
client.status_post(thought)
|
||||||
|
|
Loading…
Reference in New Issue