mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 04:01:32 -06:00
AHiT: Fix Client Argument Handling (#4992)
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import sys
|
||||||
from worlds.ahit.Client import launch
|
from worlds.ahit.Client import launch
|
||||||
import Utils
|
import Utils
|
||||||
import ModuleUpdate
|
import ModuleUpdate
|
||||||
@@ -5,4 +6,4 @@ ModuleUpdate.update()
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
Utils.init_logging("AHITClient", exception_logger="Client")
|
Utils.init_logging("AHITClient", exception_logger="Client")
|
||||||
launch()
|
launch(*sys.argv[1:])
|
||||||
|
@@ -238,10 +238,10 @@ async def proxy_loop(ctx: AHITContext):
|
|||||||
logger.info("Aborting AHIT Proxy Client due to errors")
|
logger.info("Aborting AHIT Proxy Client due to errors")
|
||||||
|
|
||||||
|
|
||||||
def launch():
|
def launch(*launch_args: str):
|
||||||
async def main():
|
async def main():
|
||||||
parser = get_base_parser()
|
parser = get_base_parser()
|
||||||
args = parser.parse_args()
|
args = parser.parse_args(launch_args)
|
||||||
|
|
||||||
ctx = AHITContext(args.connect, args.password)
|
ctx = AHITContext(args.connect, args.password)
|
||||||
logger.info("Starting A Hat in Time proxy server")
|
logger.info("Starting A Hat in Time proxy server")
|
||||||
|
@@ -16,9 +16,9 @@ from worlds.LauncherComponents import Component, components, icon_paths, launch
|
|||||||
from Utils import local_path
|
from Utils import local_path
|
||||||
|
|
||||||
|
|
||||||
def launch_client():
|
def launch_client(*args: str):
|
||||||
from .Client import launch
|
from .Client import launch
|
||||||
launch_component(launch, name="AHITClient")
|
launch_component(launch, name="AHITClient", args=args)
|
||||||
|
|
||||||
|
|
||||||
components.append(Component("A Hat in Time Client", "AHITClient", func=launch_client,
|
components.append(Component("A Hat in Time Client", "AHITClient", func=launch_client,
|
||||||
|
Reference in New Issue
Block a user