|
2 | 2 | Archipelago init file for The Witness
|
3 | 3 | """
|
4 | 4 | import dataclasses
|
5 |
| -from typing import Dict, Optional |
6 | 5 |
|
| 6 | +from typing import Dict, Optional |
7 | 7 | from BaseClasses import Region, Location, MultiWorld, Item, Entrance, Tutorial, CollectionState
|
8 | 8 | from Options import PerGameCommonOptions, Toggle
|
9 | 9 | from .presets import witness_option_presets
|
10 |
| -from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \ |
11 |
| - get_priority_hint_items, make_hints, generate_joke_hints |
12 | 10 | from worlds.AutoWorld import World, WebWorld
|
13 | 11 | from .player_logic import WitnessPlayerLogic
|
14 | 12 | from .static_logic import StaticWitnessLogic
|
| 13 | +from .hints import get_always_hint_locations, get_always_hint_items, get_priority_hint_locations, \ |
| 14 | + get_priority_hint_items, make_always_and_priority_hints, generate_joke_hints, make_area_hints, get_hintable_areas, \ |
| 15 | + make_extra_location_hints, create_all_hints |
15 | 16 | from .locations import WitnessPlayerLocations, StaticWitnessLocations
|
16 | 17 | from .items import WitnessItem, StaticWitnessItems, WitnessPlayerItems, ItemData
|
17 | 18 | from .regions import WitnessRegions
|
@@ -57,6 +58,7 @@ class WitnessWorld(World):
|
57 | 58 | }
|
58 | 59 | location_name_to_id = StaticWitnessLocations.ALL_LOCATIONS_TO_ID
|
59 | 60 | item_name_groups = StaticWitnessItems.item_groups
|
| 61 | + location_name_groups = StaticWitnessLocations.AREA_LOCATION_GROUPS |
60 | 62 |
|
61 | 63 | required_client_version = (0, 4, 4)
|
62 | 64 |
|
@@ -191,8 +193,8 @@ def create_regions(self):
|
191 | 193 | # Then, add checks in order until the required amount of sphere 1 checks is met.
|
192 | 194 |
|
193 | 195 | extra_checks = [
|
194 |
| - ("First Hallway Room", "First Hallway Bend"), |
195 |
| - ("First Hallway", "First Hallway Straight"), |
| 196 | + ("Tutorial First Hallway Room", "Tutorial First Hallway Bend"), |
| 197 | + ("Tutorial First Hallway", "Tutorial First Hallway Straight"), |
196 | 198 | ("Desert Outside", "Desert Surface 1"),
|
197 | 199 | ("Desert Outside", "Desert Surface 2"),
|
198 | 200 | ]
|
@@ -277,26 +279,35 @@ def fill_slot_data(self) -> dict:
|
277 | 279 | hint_amount = self.options.hint_amount.value
|
278 | 280 |
|
279 | 281 | credits_hint = (
|
280 |
| - "This Randomizer is brought to you by", |
281 |
| - "NewSoupVi, Jarno, blastron,", |
282 |
| - "jbzdarkid, sigma144, IHNN, oddGarrett, Exempt-Medic.", -1 |
| 282 | + "This Randomizer is brought to you by\n" |
| 283 | + "NewSoupVi, Jarno, blastron,\n", |
| 284 | + "jbzdarkid, sigma144, IHNN, oddGarrett, Exempt-Medic.", -1, -1 |
283 | 285 | )
|
284 | 286 |
|
285 | 287 | audio_logs = get_audio_logs().copy()
|
286 | 288 |
|
287 | 289 | if hint_amount:
|
288 |
| - generated_hints = make_hints(self, hint_amount, self.own_itempool) |
| 290 | + area_hints = round(self.options.area_hint_percentage / 100 * hint_amount) |
| 291 | + |
| 292 | + generated_hints = create_all_hints(self, hint_amount, area_hints) |
289 | 293 |
|
290 | 294 | self.random.shuffle(audio_logs)
|
291 | 295 |
|
292 | 296 | duplicates = min(3, len(audio_logs) // hint_amount)
|
293 | 297 |
|
294 |
| - for _ in range(0, hint_amount): |
295 |
| - hint = generated_hints.pop(0) |
| 298 | + for hint in generated_hints: |
| 299 | + location = hint.location |
| 300 | + area_amount = hint.area_amount |
| 301 | + |
| 302 | + # None if junk hint, address if location hint, area string if area hint |
| 303 | + arg_1 = location.address if location else (hint.area if hint.area else None) |
| 304 | + |
| 305 | + # self.player if junk hint, player if location hint, progression amount if area hint |
| 306 | + arg_2 = area_amount if area_amount is not None else (location.player if location else self.player) |
296 | 307 |
|
297 | 308 | for _ in range(0, duplicates):
|
298 | 309 | audio_log = audio_logs.pop()
|
299 |
| - self.log_ids_to_hints[int(audio_log, 16)] = hint |
| 310 | + self.log_ids_to_hints[int(audio_log, 16)] = (hint.wording, arg_1, arg_2) |
300 | 311 |
|
301 | 312 | if audio_logs:
|
302 | 313 | audio_log = audio_logs.pop()
|
|
0 commit comments