Compare commits

..

1 Commits

Author SHA1 Message Date
NewSoupVi
4e08c48238 Revert "Core: update websockets (#4732)"
This reverts commit 42eaeb92f0.
2025-03-18 23:46:36 +01:00
8 changed files with 22 additions and 53 deletions

View File

@@ -506,7 +506,7 @@ class LinksAwakeningContext(CommonContext):
la_task = None
client = None
# TODO: does this need to re-read on reset?
found_checks = set()
found_checks = []
last_resend = time.time()
magpie_enabled = False
@@ -558,6 +558,10 @@ class LinksAwakeningContext(CommonContext):
self.ui = LADXManager(self)
self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI")
async def send_checks(self):
message = [{"cmd": "LocationChecks", "locations": self.found_checks}]
await self.send_msgs(message)
async def send_new_entrances(self, entrances: typing.Dict[str, str]):
# Store the entrances we find on the server for future sessions
@@ -609,8 +613,8 @@ class LinksAwakeningContext(CommonContext):
self.client.pending_deathlink = True
def new_checks(self, item_ids, ladxr_ids):
self.found_checks.update(item_ids)
create_task_log_exception(self.check_locations(self.found_checks))
self.found_checks += item_ids
create_task_log_exception(self.send_checks())
if self.magpie_enabled:
create_task_log_exception(self.magpie.send_new_checks(ladxr_ids))
@@ -717,7 +721,7 @@ class LinksAwakeningContext(CommonContext):
if self.last_resend + 5.0 < now:
self.last_resend = now
await self.check_locations(self.found_checks)
await self.send_checks()
if self.magpie_enabled:
try:
self.magpie.set_checks(self.client.tracker.all_checks)

View File

@@ -515,15 +515,10 @@ def _populate_sprite_table():
logging.debug(f"Spritefile {file} could not be loaded as a valid sprite.")
with concurrent.futures.ThreadPoolExecutor() as pool:
sprite_paths = [user_path('data', 'sprites', 'alttpr'), user_path('data', 'sprites', 'custom')]
for dir in [dir for dir in sprite_paths if os.path.isdir(dir)]:
for dir in [user_path('data', 'sprites', 'alttpr'), user_path('data', 'sprites', 'custom')]:
for file in os.listdir(dir):
pool.submit(load_sprite_from_file, os.path.join(dir, file))
if "link" not in _sprite_table:
logging.info("Link sprite was not loaded. Loading link from base rom")
load_sprite_from_file(get_base_rom_path())
class Sprite():
sprite_size = 28672
@@ -559,11 +554,6 @@ class Sprite():
self.sprite = filedata[0x80000:0x87000]
self.palette = filedata[0xDD308:0xDD380]
self.glove_palette = filedata[0xDEDF5:0xDEDF9]
h = hashlib.md5()
h.update(filedata)
if h.hexdigest() == LTTPJPN10HASH:
self.name = "Link"
self.author_name = "Nintendo"
elif filedata.startswith(b'ZSPR'):
self.from_zspr(filedata, filename)
else:

View File

@@ -1,10 +1,9 @@
from dataclasses import dataclass
import os
import io
from typing import TYPE_CHECKING, Dict, List, Optional, cast
import zipfile
from BaseClasses import Location
from worlds.Files import APContainer, AutoPatchRegister
from worlds.Files import APContainer
from .Enum import CivVICheckType
from .Locations import CivVILocation, CivVILocationData
@@ -26,22 +25,18 @@ class CivTreeItem:
ui_tree_row: int
class CivVIContainer(APContainer, metaclass=AutoPatchRegister):
class CivVIContainer(APContainer):
"""
Responsible for generating the dynamic mod files for the Civ VI multiworld
"""
game: Optional[str] = "Civilization VI"
patch_file_ending = ".apcivvi"
def __init__(self, patch_data: Dict[str, str] | io.BytesIO, base_path: str = "", output_directory: str = "",
def __init__(self, patch_data: Dict[str, str], base_path: str, output_directory: str,
player: Optional[int] = None, player_name: str = "", server: str = ""):
if isinstance(patch_data, io.BytesIO):
super().__init__(patch_data, player, player_name, server)
else:
self.patch_data = patch_data
self.file_path = base_path
container_path = os.path.join(output_directory, base_path + ".apcivvi")
super().__init__(container_path, player, player_name, server)
self.patch_data = patch_data
self.file_path = base_path
container_path = os.path.join(output_directory, base_path + ".apcivvi")
super().__init__(container_path, player, player_name, server)
def write_contents(self, opened_zipfile: zipfile.ZipFile) -> None:
for filename, yml in self.patch_data.items():

View File

@@ -8,14 +8,8 @@
## Installing the Archipelago Mod using Lumafly
1. Launch Lumafly and ensure it locates your Hollow Knight installation directory.
2. Install the Archipelago mods by doing either of the following:
* Click one of the links below to allow Lumafly to install the mods. Lumafly will prompt for confirmation.
* [Archipelago and dependencies only](https://themulhima.github.io/Lumafly/commands/download/?mods=Archipelago)
* [Archipelago with rando essentials](https://themulhima.github.io/Lumafly/commands/download/?mods=Archipelago/Archipelago%20Map%20Mod/RecentItemsDisplay/DebugMod/RandoStats/Additional%20Timelines/CompassAlwaysOn/AdditionalMaps/)
(includes Archipelago Map Mod, RecentItemsDisplay, DebugMod, RandoStats, AdditionalTimelines, CompassAlwaysOn,
and AdditionalMaps).
* Click the "Install" button near the "Archipelago" mod entry. If desired, also install "Archipelago Map Mod"
to use as an in-game tracker.
2. Click the "Install" button near the "Archipelago" mod entry.
* If desired, also install "Archipelago Map Mod" to use as an in-game tracker.
3. Launch the game, you're all set!
### What to do if Lumafly fails to find your installation directory

View File

@@ -28,7 +28,6 @@ class PortalPlando(PlandoConnections):
- entrance: Searing Crags
exit: Glacial Peak Portal
"""
display_name = "Portal Plando Connections"
portals = [f"{portal} Portal" for portal in PORTALS]
shop_points = [point for points in SHOP_POINTS.values() for point in points]
checkpoints = [point for points in CHECKPOINTS.values() for point in points]
@@ -49,7 +48,6 @@ class TransitionPlando(PlandoConnections):
exit: Dark Cave - Right
direction: both
"""
display_name = "Transition Plando Connections"
entrances = frozenset(RANDOMIZED_CONNECTIONS.keys())
exits = frozenset(RANDOMIZED_CONNECTIONS.values())

View File

@@ -32,7 +32,7 @@ class MessengerRules:
self.connection_rules = {
# from ToTHQ
"Artificer's Portal":
lambda state: state.has("Demon King Crown", self.player),
lambda state: state.has_all({"Demon King Crown", "Magic Firefly"}, self.player),
"Shrink Down":
lambda state: state.has_all(NOTES, self.player),
# the shop
@@ -267,8 +267,6 @@ class MessengerRules:
# tower of time
"Tower of Time Seal - Time Waster":
self.has_dart,
# corrupted future
"Corrupted Future - Key of Courage": lambda state: state.has("Magic Firefly", self.player),
# cloud ruins
"Time Warp Mega Shard":
lambda state: self.has_vertical(state) or self.can_dboost(state),
@@ -372,7 +370,7 @@ class MessengerRules:
add_rule(multiworld.get_entrance("Shrink Down", self.player), self.has_dart)
multiworld.completion_condition[self.player] = lambda state: state.has("Do the Thing!", self.player)
if self.world.options.accessibility: # not locations accessibility
set_self_locking_items(self.world)
set_self_locking_items(self.world, self.player)
class MessengerHardRules(MessengerRules):
@@ -532,11 +530,9 @@ class MessengerOOBRules(MessengerRules):
self.world.options.accessibility.value = MessengerAccessibility.option_minimal
def set_self_locking_items(world: "MessengerWorld") -> None:
def set_self_locking_items(world: "MessengerWorld", player: int) -> None:
# locations where these placements are always valid
allow_self_locking_items(world.get_location("Searing Crags - Key of Strength").parent_region, "Power Thistle")
allow_self_locking_items(world.get_location("Sunken Shrine - Key of Love"), "Sun Crest", "Moon Crest")
allow_self_locking_items(world.get_location("Corrupted Future - Key of Courage").parent_region, "Demon King Crown")
allow_self_locking_items(world.get_location("Elemental Skylands Seal - Water"), "Currents Master")
if not world.options.shuffle_transitions:
allow_self_locking_items(world.get_location("Corrupted Future - Key of Courage").parent_region,
"Demon King Crown")

View File

@@ -5,10 +5,6 @@
- New option `free_fly_blacklist` limits which cities can show up as a free fly location.
- Spoiler log and hint text for maps where a species can be found now use human-friendly labels.
- Added many item and location groups based on item type, location type, and location geography.
- Dexsanity locations for species which evolve via item use (Fire Stone, Metal Coat, etc.) now contribute those items to
the randomized item pool instead of Great Balls.
- Rock smash encounters are now randomized according to your wild pokemon randomization option. These encounters are
_not_ used for logical access (the seed will never require you to catch something through one of these encounters).
### Fixes

View File

@@ -262,10 +262,6 @@ def is_easter_time() -> bool:
# Thus, we just take a range from the earliest to latest possible easter dates.
today = date.today()
if today < date(2025, 3, 31): # Don't go live early if 0.6.0 RC3 happens, with a little leeway
return False
earliest_easter_day = date(today.year, 3, 20) # Earliest possible is 3/22 + 2 day buffer for Good Friday
last_easter_day = date(today.year, 4, 26) # Latest possible is 4/25 + 1 day buffer for Easter Monday