@@ -61,5 +61,27 @@ def load_items() -> Iterable[Item]:
61
61
{item_case_mappings .get (k , k ): v for k , v in item .items ()}
62
62
for item in load_fixture ("items" )
63
63
]
64
- data_path = Path (__file__ ) / ".." / "simulator" / "data" / "items.json"
65
- json .dump (items , data_path .resolve ().open ("w" ), indent = 2 )
64
+ item_data_path = Path (__file__ ) / ".." / "simulator" / "data" / "items.json"
65
+ json .dump (items , item_data_path .resolve ().open ("w" ), indent = 2 , sort_keys = True )
66
+
67
+ locations = load_fixture ("locations" )
68
+
69
+ import droprates
70
+ import fishrates
71
+ import lemonade
72
+
73
+ rates = droprates .rates_per_stam ()
74
+ lemonade_rates = lemonade .drop_rates ()
75
+ net_rates = fishrates .net_rates ()
76
+ for loc in locations :
77
+ if loc ["type" ] == "explore" :
78
+ items = {it : rates .get (loc ["name" ], {}).get (it , 0 ) for it in loc ["items" ]}
79
+ loc ["explore_rates" ] = items
80
+ loc ["lemonade_rates" ] = lemonade_rates .get (loc ["name" ], {})
81
+ elif loc ["type" ] == "fishing" :
82
+ loc ["net_rates" ] = net_rates .get (loc ["name" ], {})
83
+
84
+ location_data_base = Path (__file__ ) / ".." / "simulator" / "data" / "locations.json"
85
+ json .dump (
86
+ locations , location_data_base .resolve ().open ("w" ), indent = 2 , sort_keys = True
87
+ )
0 commit comments