Skip to content

Commit

Permalink
add option to launch with -publiclobby
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinnn101 committed Mar 15, 2024
1 parent d459f4f commit 2fff84f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/utility/palworld_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def __init__(
rotate_after_x_backups: int = 5, # Delete oldest backups after we have this many.
operating_system: str = "windows", # "windows" or "linux".
terminal: str = "gnome-terminal", # Only used if `operating_system = "linux"`
public_server: bool = False, # If True, add `-publiclobby` to launch args.
) -> None:
self.steamcmd_dir = Path(steamcmd_dir)
self.server_name = server_name
Expand All @@ -49,6 +50,7 @@ def __init__(
self.max_players = max_players

self.server_launch_args = []
self.public_server = public_server

if self.operating_system == "windows":
self.palworld_server_proc_name = palworld_server_proc_name
Expand Down Expand Up @@ -80,6 +82,10 @@ def __init__(
self.server_launch_args.append("--")
self.server_launch_args.append(self.palserver_executable)
self.server_launch_args.append(f"port={self.server_port}")

# Add public server launch arg if needed
if self.public_server:
self.server_launch_args.append("-publiclobby")

# Overwrite palworld_server_dir if set by user
if palword_server_dir:
Expand Down

0 comments on commit 2fff84f

Please sign in to comment.