mirror of
https://github.com/ArchipelagoMW/Archipelago.git
synced 2026-03-23 10:33:24 -07:00
Added hint generation at generation time
Harddrive locations now go from 1-100 rather then 0-99
This commit is contained in:
@@ -146,7 +146,7 @@ class HardDrive(LocationData):
|
||||
return logic_rule
|
||||
|
||||
super().__init__(
|
||||
get_region(data.gassed, data.radioactive), f"Hard drive random check {locationId - 1338600}", locationId,
|
||||
get_region(data.gassed, data.radioactive), f"Hard drive random check {(locationId - 1338600) + 1}", locationId,
|
||||
non_progression = not can_hold_progression, rule = get_rule(data.item, data.power))
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
from typing import TextIO, ClassVar, Any
|
||||
from BaseClasses import Item, ItemClassification, CollectionState
|
||||
from collections.abc import Sequence
|
||||
from .GameLogic import GameLogic
|
||||
from .Items import Items
|
||||
from .Locations import Locations, LocationData
|
||||
@@ -9,6 +10,8 @@ from .Regions import SatisfactoryLocation, create_regions_and_return_locations
|
||||
from .CriticalPathCalculator import CriticalPathCalculator
|
||||
from .Web import SatisfactoryWebWorld
|
||||
from ..AutoWorld import World
|
||||
from NetUtils import Hint
|
||||
from BaseClasses import ItemClassification
|
||||
|
||||
|
||||
class SatisfactoryWorld(World):
|
||||
@@ -235,6 +238,23 @@ class SatisfactoryWorld(World):
|
||||
return Items.create_item_uninitialized(name, self.player)
|
||||
|
||||
|
||||
def modify_multidata(self, multidata: dict[str, Any]) -> None:
|
||||
locations_visiable_from_start: list[int] = [] #list(range(1338000, 1338099)) # ids of Hub 1-1,1 to 2-5,10
|
||||
|
||||
if "Building: AWESOME Shop" in self.options.start_inventory \
|
||||
or "Building: AWESOME Shop" in self.options.start_inventory_from_pool \
|
||||
or 1338622 in multidata["precollected_items"][self.player]: # id of Building: AWESOME Shop
|
||||
locations_visiable_from_start.extend(range(1338700, 1338709)) # ids of shop locations 1 to 10
|
||||
|
||||
for location_id in locations_visiable_from_start:
|
||||
if location_id in multidata["locations"][self.player]:
|
||||
item_id, player_id, flags = multidata["locations"][self.player][location_id]
|
||||
|
||||
if player_id != self.player and flags & (ItemClassification.progression|ItemClassification.useful) > 0:
|
||||
hint = Hint(player_id, self.player, location_id, item_id, False, item_flags=flags)
|
||||
multidata["precollected_hints"][self.player].add(hint)
|
||||
|
||||
|
||||
def push_precollected(self, item_name: str) -> None:
|
||||
item = self.create_item(item_name)
|
||||
self.multiworld.push_precollected(item)
|
||||
|
||||
Reference in New Issue
Block a user