Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into kivymd
Browse files Browse the repository at this point in the history
  • Loading branch information
Silvris committed Sep 13, 2024
2 parents fd022fb + 7621889 commit 77f12e3
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CommonClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def handle_connection_loss(self, msg: str) -> None:
logger.exception(msg, exc_info=exc_info, extra={'compact_gui': True})
self._messagebox_connection_loss = self.gui_error(msg, exc_info[1])

def make_gui(self) -> type:
def make_gui(self) -> typing.Type["kvui.GameManager"]:
"""To return the Kivy App class needed for run_gui so it can be overridden before being built"""
from kvui import GameManager

Expand Down
14 changes: 14 additions & 0 deletions Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,14 +973,28 @@ def from_any(cls, data: PlandoTextsFromAnyType) -> Self:
if random.random() < float(text.get("percentage", 100)/100):
at = text.get("at", None)
if at is not None:
if isinstance(at, dict):
if at:
at = random.choices(list(at.keys()),
weights=list(at.values()), k=1)[0]
else:
raise OptionError("\"at\" must be a valid string or weighted list of strings!")
given_text = text.get("text", [])
if isinstance(given_text, dict):
if not given_text:
given_text = []
else:
given_text = random.choices(list(given_text.keys()),
weights=list(given_text.values()), k=1)
if isinstance(given_text, str):
given_text = [given_text]
texts.append(PlandoText(
at,
given_text,
text.get("percentage", 100)
))
else:
raise OptionError("\"at\" must be a valid string or weighted list of strings!")
elif isinstance(text, PlandoText):
if random.random() < float(text.percentage/100):
texts.append(text)
Expand Down
2 changes: 1 addition & 1 deletion docs/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
/worlds/clique/ @ThePhar

# Dark Souls III
/worlds/dark_souls_3/ @Marechal-L
/worlds/dark_souls_3/ @Marechal-L @nex3

# Donkey Kong Country 3
/worlds/dkc3/ @PoryGone
Expand Down
12 changes: 4 additions & 8 deletions worlds/_bizhawk/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,10 @@ def __init__(self, server_address: Optional[str], password: Optional[str]):
self.bizhawk_ctx = BizHawkContext()
self.watcher_timeout = 0.5

def run_gui(self):
from kvui import GameManager

class BizHawkManager(GameManager):
base_title = "Archipelago BizHawk Client"

self.ui = BizHawkManager(self)
self.ui_task = asyncio.create_task(self.ui.async_run(), name="UI")
def make_gui(self):
ui = super().make_gui()
ui.base_title = "Archipelago BizHawk Client"
return ui

def on_package(self, cmd, args):
if cmd == "Connected":
Expand Down
2 changes: 1 addition & 1 deletion worlds/alttp/Options.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ class ALttPPlandoConnections(PlandoConnections):
entrances = set([connection[0] for connection in (
*default_connections, *default_dungeon_connections, *inverted_default_connections,
*inverted_default_dungeon_connections)])
exits = set([connection[1] for connection in (
exits = set([connection[0] for connection in (
*default_connections, *default_dungeon_connections, *inverted_default_connections,
*inverted_default_dungeon_connections)])

Expand Down
1 change: 1 addition & 0 deletions worlds/pokemon_emerald/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,6 +711,7 @@ def fill_slot_data(self) -> Dict[str, Any]:
"trainersanity",
"modify_118",
"death_link",
"normalize_encounter_rates",
)
slot_data["free_fly_location_id"] = self.free_fly_location_id
slot_data["hm_requirements"] = self.hm_requirements
Expand Down
2 changes: 1 addition & 1 deletion worlds/witness/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class WitnessWorld(World):
item_name_groups = static_witness_items.ITEM_GROUPS
location_name_groups = static_witness_locations.AREA_LOCATION_GROUPS

required_client_version = (0, 4, 5)
required_client_version = (0, 5, 1)

player_logic: WitnessPlayerLogic
player_locations: WitnessPlayerLocations
Expand Down
4 changes: 2 additions & 2 deletions worlds/witness/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def try_getting_location_group_for_location(world: "WitnessWorld", hint_loc: Loc
def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint) -> WitnessWordedHint:
location_name = hint.location.name
if hint.location.player != world.player:
location_name += " (" + world.player_name + ")"
location_name += " (" + world.multiworld.get_player_name(hint.location.player) + ")"

item = hint.location.item

Expand All @@ -229,7 +229,7 @@ def word_direct_hint(world: "WitnessWorld", hint: WitnessLocationHint) -> Witnes
item_name = item.name

if item.player != world.player:
item_name += " (" + world.player_name + ")"
item_name += " (" + world.multiworld.get_player_name(item.player) + ")"

hint_text = ""
area: Optional[str] = None
Expand Down
3 changes: 3 additions & 0 deletions worlds/yachtdice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,9 @@ def create_regions(self):
menu.exits.append(connection)
connection.connect(board)
self.multiworld.regions += [menu, board]

def get_filler_item_name(self) -> str:
return "Good RNG"

def set_rules(self):
"""
Expand Down

0 comments on commit 77f12e3

Please sign in to comment.