Skip to content

Commit

Permalink
disable menu entry if tracker feature flag if False (which it is)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jouramie committed Jun 28, 2024
1 parent 14f3c61 commit 77e818b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
22 changes: 12 additions & 10 deletions worlds/stardew_valley/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from .strings.region_names import Region as RegionName

client_version = 0
TRACKER_ENABLED = False


class StardewLocation(Location):
Expand Down Expand Up @@ -55,19 +56,20 @@ class StardewWebWorld(WebWorld):
)]


def launch_client():
from .client import launch
launch_subprocess(launch, name="Stardew Valley Tracker")
if TRACKER_ENABLED:
def launch_client():
from .client import launch
launch_subprocess(launch, name="Stardew Valley Tracker")


components.append(Component(
"Stardew Valley Tracker",
func=launch_client,
component_type=Type.CLIENT,
icon='stardew'
))
components.append(Component(
"Stardew Valley Tracker",
func=launch_client,
component_type=Type.CLIENT,
icon='stardew'
))

icon_paths['stardew'] = local_path('data', 'stardew.png')
icon_paths['stardew'] = local_path('data', 'stardew.png')


class StardewValleyWorld(World):
Expand Down
6 changes: 2 additions & 4 deletions worlds/stardew_valley/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class BaseContext(CommonContext, TrackerGameContextMixin):

tracker_loaded = False

DEBUG = False


class StardewCommandProcessor(ClientCommandProcessor):

Expand All @@ -50,7 +48,7 @@ class StardewManager(GameManager):
logging_pairs = [
("Client", "Archipelago")
]
base_title = "Stardew Valley Archipelago Tracking Client"
base_title = "Stardew Valley Archipelago Tracker"
ctx: StardewClientContext

def build(self):
Expand Down Expand Up @@ -78,7 +76,7 @@ async def server_auth(self, password_requested: bool = False):

def launch():
async def main():
parser = get_base_parser(description="Stardew Valley Archipelago Tracking Client")
parser = get_base_parser(description="Stardew Valley Archipelago Tracker")
args = parser.parse_args()

ctx = StardewClientContext(args.connect, args.password)
Expand Down

0 comments on commit 77e818b

Please sign in to comment.