Skip to content

Commit f34b87c

Browse files
Merge branch 'ArchipelagoMW:main' into main
2 parents d5a7e2e + 60a192b commit f34b87c

File tree

106 files changed

+5484
-1138
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+5484
-1138
lines changed

.run/Build APWorld.run.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<option name="IS_MODULE_SDK" value="true" />
1313
<option name="ADD_CONTENT_ROOTS" value="true" />
1414
<option name="ADD_SOURCE_ROOTS" value="true" />
15-
<option name="SCRIPT_NAME" value="$ContentRoot$/Launcher.py" />
16-
<option name="PARAMETERS" value="\&quot;Build APWorlds\&quot;" />
15+
<option name="SCRIPT_NAME" value="$PROJECT_DIR$/Launcher.py" />
16+
<option name="PARAMETERS" value="&quot;Build APWorlds&quot;" />
1717
<option name="SHOW_COMMAND_LINE" value="false" />
1818
<option name="EMULATE_TERMINAL" value="false" />
1919
<option name="MODULE_MODE" value="false" />

CommonClient.py

100644100755
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ def update_game(self, game: str, name_to_id_lookup_table: typing.Dict[str, int])
323323
hint_cost: int | None
324324
"""Current Hint Cost per Hint from the server"""
325325
hint_points: int | None
326-
"""Current avaliable Hint Points from the server"""
326+
"""Current available Hint Points from the server"""
327327
player_names: dict[int, str]
328328
"""Current lookup of slot number to player display name from server (includes aliases)"""
329329

@@ -572,6 +572,10 @@ def is_uninteresting_item_send(self, print_json_packet: dict) -> bool:
572572
return print_json_packet.get("type", "") == "ItemSend" \
573573
and not self.slot_concerns_self(print_json_packet["receiving"]) \
574574
and not self.slot_concerns_self(print_json_packet["item"].player)
575+
576+
def is_connection_change(self, print_json_packet: dict) -> bool:
577+
"""Helper function for filtering out connection changes."""
578+
return print_json_packet.get("type", "") in ["Join","Part"]
575579

576580
def on_print(self, args: dict):
577581
logger.info(args["text"])

Options.py

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,12 @@ class Range(NumericOption):
688688
range_start = 0
689689
range_end = 1
690690

691+
_RANDOM_OPTS = [
692+
"random", "random-low", "random-middle", "random-high",
693+
"random-range-low-<min>-<max>", "random-range-middle-<min>-<max>",
694+
"random-range-high-<min>-<max>", "random-range-<min>-<max>",
695+
]
696+
691697
def __init__(self, value: int):
692698
if value < self.range_start:
693699
raise Exception(f"{value} is lower than minimum {self.range_start} for option {self.__class__.__name__}")
@@ -713,9 +719,26 @@ def from_text(cls, text: str) -> Range:
713719
# these are the conditions where "true" and "false" make sense
714720
if text == "true":
715721
return cls.from_any(cls.default)
716-
else: # "false"
717-
return cls(0)
718-
return cls(int(text))
722+
# "false"
723+
return cls(0)
724+
725+
try:
726+
num = int(text)
727+
except ValueError:
728+
# text is not a number
729+
# Handle conditionally acceptable values here rather than in the f-string
730+
default = ""
731+
truefalse = ""
732+
if hasattr(cls, "default"):
733+
default = ", default"
734+
if cls.range_start == 0 and cls.default != 0:
735+
truefalse = ", \"true\", \"false\""
736+
raise Exception(f"Invalid range value {text!r}. Acceptable values are: "
737+
f"<int>{default}, high, low{truefalse}, "
738+
f"{', '.join(cls._RANDOM_OPTS)}.")
739+
740+
return cls(num)
741+
719742

720743
@classmethod
721744
def weighted_range(cls, text) -> Range:
@@ -731,9 +754,7 @@ def weighted_range(cls, text) -> Range:
731754
return cls(random.randint(cls.range_start, cls.range_end))
732755
else:
733756
raise Exception(f"random text \"{text}\" did not resolve to a recognized pattern. "
734-
f"Acceptable values are: random, random-high, random-middle, random-low, "
735-
f"random-range-low-<min>-<max>, random-range-middle-<min>-<max>, "
736-
f"random-range-high-<min>-<max>, or random-range-<min>-<max>.")
757+
f"Acceptable values are: {', '.join(cls._RANDOM_OPTS)}.")
737758

738759
@classmethod
739760
def custom_range(cls, text) -> Range:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ Currently, the following games are supported:
8282
* Paint
8383
* Celeste (Open World)
8484
* Choo-Choo Charles
85+
* APQuest
8586

8687
For setup and instructions check out our [tutorials page](https://archipelago.gg/tutorial/).
8788
Downloads can be found at [Releases](https://github.com/ArchipelagoMW/Archipelago/releases), including compiled

WebHostLib/templates/tracker__Starcraft2.html

Lines changed: 917 additions & 917 deletions
Large diffs are not rendered by default.

docs/CODEOWNERS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
# A Link to the Past
1616
/worlds/alttp/ @Berserker66
1717

18+
# APQuest
19+
# NewSoupVi is acting maintainer, but world belongs to core with the exception of the music
20+
/worlds/apquest/ @NewSoupVi
21+
1822
# Sudoku (APSudoku)
1923
/worlds/apsudoku/ @EmilyV99
2024

docs/options api.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ placed on them.
269269

270270
### PriorityLocations
271271
Marks locations given here as `LocationProgressType.Priority` forcing progression items on them if any are available in
272-
the pool.
272+
the pool. Progression items without a deprioritized flag will be used first when filling priority_locations. Progression items with
273+
a deprioritized flag will be used next.
273274

274275
### ItemLinks
275276
Allows users to share their item pool with other players. Currently item links are per game. A link of one game between

requirements.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
colorama>=0.4.6
22
websockets>=13.0.1,<14
3-
PyYAML>=6.0.2
4-
jellyfish>=1.1.3
3+
PyYAML>=6.0.3
4+
jellyfish>=1.2.1
55
jinja2>=3.1.6
6-
schema>=0.7.7
6+
schema>=0.7.8
77
kivy>=2.3.1
88
bsdiff4>=1.2.6
9-
platformdirs>=4.3.6
10-
certifi>=2025.4.26
11-
cython>=3.0.12
12-
cymem>=2.0.11
13-
orjson>=3.10.15
14-
typing_extensions>=4.12.2
15-
pyshortcuts>=1.9.1
9+
platformdirs>=4.5.0
10+
certifi>=2025.11.12
11+
cython>=3.2.1
12+
cymem>=2.0.13
13+
orjson>=3.11.4
14+
typing_extensions>=4.15.0
15+
pyshortcuts>=1.9.6
1616
kivymd @ git+https://github.com/kivymd/KivyMD@5ff9d0d
1717
kivymd>=2.0.1.dev0

test/general/test_options.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ def test_item_links_name_groups(self):
4444
}],
4545
[{
4646
"name": "ItemLinkGroup",
47-
"item_pool": ["Hammer", "Bow"],
47+
"item_pool": ["Hammer", "Sword"],
4848
"link_replacement": False,
4949
"replacement_item": None,
5050
}]
5151
]
5252
# we really need some sort of test world but generic doesn't have enough items for this
53-
world = AutoWorldRegister.world_types["A Link to the Past"]
53+
world = AutoWorldRegister.world_types["APQuest"]
5454
plando_options = PlandoOptions.from_option_string("bosses")
5555
item_links = [ItemLinks.from_any(item_link_groups[0]), ItemLinks.from_any(item_link_groups[1])]
5656
for link in item_links:
5757
link.verify(world, "tester", plando_options)
5858
self.assertIn("Hammer", link.value[0]["item_pool"])
59-
self.assertIn("Bow", link.value[0]["item_pool"])
59+
self.assertIn("Sword", link.value[0]["item_pool"])
6060

6161
# TODO test that the group created using these options has the items
6262

test/hosting/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ def expect_equal(first: Any, second: Any, msg: str = "") -> None:
7070
empty_file = str(Path(tempdir) / "empty")
7171
open(empty_file, "w").close()
7272
sys.argv += ["--config_override", empty_file] # tests #5541
73-
multis = [["VVVVVV"], ["Temp World"], ["VVVVVV", "Temp World"]]
73+
multis = [["APQuest"], ["Temp World"], ["APQuest", "Temp World"]]
7474
p1_games: list[str] = []
7575
data_paths: list[Path | None] = []
7676
rooms: list[str] = []
7777
multidata: Path | None
7878

79-
copy_world("VVVVVV", "Temp World")
79+
copy_world("APQuest", "Temp World")
8080
try:
8181
for n, games in enumerate(multis, 1):
8282
print(f"Generating [{n}] {', '.join(games)} offline")

0 commit comments

Comments
 (0)