Skip to content

Commit

Permalink
Launcher: Allow for --nogui client launches (#4549)
Browse files Browse the repository at this point in the history
  • Loading branch information
qwint authored Feb 10, 2025
1 parent 910369a commit f520c1d
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions worlds/_bizhawk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
import abc
from typing import TYPE_CHECKING, Any, ClassVar

from worlds.LauncherComponents import Component, SuffixIdentifier, Type, components, launch_subprocess
from worlds.LauncherComponents import Component, SuffixIdentifier, Type, components, launch as launch_component

if TYPE_CHECKING:
from .context import BizHawkClientContext


def launch_client(*args) -> None:
from .context import launch
launch_subprocess(launch, name="BizHawkClient", args=args)
launch_component(launch, name="BizHawkClient", args=args)


component = Component("BizHawk Client", "BizHawkClient", component_type=Type.CLIENT, func=launch_client,
Expand Down
4 changes: 2 additions & 2 deletions worlds/ahit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
from worlds.AutoWorld import World, WebWorld, CollectionState
from worlds.generic.Rules import add_rule
from typing import List, Dict, TextIO
from worlds.LauncherComponents import Component, components, icon_paths, launch_subprocess, Type
from worlds.LauncherComponents import Component, components, icon_paths, launch as launch_component, Type
from Utils import local_path


def launch_client():
from .Client import launch
launch_subprocess(launch, name="AHITClient")
launch_component(launch, name="AHITClient")


components.append(Component("A Hat in Time Client", "AHITClient", func=launch_client,
Expand Down
4 changes: 2 additions & 2 deletions worlds/factorio/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import settings
from BaseClasses import Region, Location, Item, Tutorial, ItemClassification
from worlds.AutoWorld import World, WebWorld
from worlds.LauncherComponents import Component, components, Type, launch_subprocess
from worlds.LauncherComponents import Component, components, Type, launch as launch_component
from worlds.generic import Rules
from .Locations import location_pools, location_table
from .Mod import generate_mod
Expand All @@ -24,7 +24,7 @@

def launch_client():
from .Client import launch
launch_subprocess(launch, name="FactorioClient")
launch_component(launch, name="FactorioClient")


components.append(Component("Factorio Client", "FactorioClient", func=launch_client, component_type=Type.CLIENT))
Expand Down
4 changes: 2 additions & 2 deletions worlds/kh1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
from .Regions import connect_entrances, create_regions
from .Rules import set_rules
from .Presets import kh1_option_presets
from worlds.LauncherComponents import Component, components, Type, launch_subprocess
from worlds.LauncherComponents import Component, components, Type, launch as launch_component


def launch_client():
from .Client import launch
launch_subprocess(launch, name="KH1 Client")
launch_component(launch, name="KH1 Client")


components.append(Component("KH1 Client", "KH1Client", func=launch_client, component_type=Type.CLIENT))
Expand Down
4 changes: 2 additions & 2 deletions worlds/kh2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

from BaseClasses import Tutorial, ItemClassification
from Fill import fast_fill
from worlds.LauncherComponents import Component, components, Type, launch_subprocess
from worlds.LauncherComponents import Component, components, Type, launch as launch_component
from worlds.AutoWorld import World, WebWorld
from .Items import *
from .Locations import *
Expand All @@ -17,7 +17,7 @@

def launch_client():
from .Client import launch
launch_subprocess(launch, name="KH2Client")
launch_component(launch, name="KH2Client")


components.append(Component("KH2 Client", "KH2Client", func=launch_client, component_type=Type.CLIENT))
Expand Down
2 changes: 1 addition & 1 deletion worlds/zork_grand_inquisitor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

def launch_client() -> None:
from .client import main
LauncherComponents.launch_subprocess(main, name="ZorkGrandInquisitorClient")
LauncherComponents.launch(main, name="ZorkGrandInquisitorClient")


LauncherComponents.components.append(
Expand Down

0 comments on commit f520c1d

Please sign in to comment.