Skip to content

Commit

Permalink
Removed test command from client, using self.random
Browse files Browse the repository at this point in the history
  • Loading branch information
gaithern committed Feb 16, 2024
1 parent d14373b commit 332745b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 1 addition & 3 deletions worlds/khrecom/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ def check_stdin() -> None:
print("WARNING: Console input is not routed reliably on Windows, use the GUI instead.")

class KHRECOMClientCommandProcessor(ClientCommandProcessor):
def _cmd_test(self):
"""Test"""
self.output(f"Test")
pass


class KHRECOMContext(CommonContext):
Expand Down
7 changes: 3 additions & 4 deletions worlds/khrecom/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from .Regions import create_regions
from .Rules import set_rules
from worlds.LauncherComponents import Component, components, Type, launch_subprocess
import random



Expand Down Expand Up @@ -52,9 +51,9 @@ def create_items(self):
self.multiworld.get_location("Destiny Islands Post Floor (Enemy Cards Larxene)", self.player).place_locked_item(self.create_item("Friend Card Pluto"))
self.multiworld.get_location("Final Marluxia", self.player).place_locked_item(self.create_item("Victory"))
starting_locations = get_locations_by_category("Starting")
starting_locations = random.sample(list(starting_locations.keys()),4)
starting_locations = self.random.sample(list(starting_locations.keys()),4)
starting_worlds = get_items_by_category("World Unlocks", [])
starting_worlds = random.sample(list(starting_worlds.keys()),3)
starting_worlds = self.random.sample(list(starting_worlds.keys()),3)
i = 0
while i < 4:
if i < 3:
Expand Down Expand Up @@ -105,7 +104,7 @@ def get_filler_item_name(self) -> str:
fillers.update(get_items_by_category("Days Enemy Cards", disclude))
fillers.update(get_items_by_category("Sets", disclude))
weights = [data.weight for data in fillers.values()]
return self.multiworld.random.choices([filler for filler in fillers.keys()], weights, k=1)[0]
return self.random.choices([filler for filler in fillers.keys()], weights, k=1)[0]

def create_item(self, name: str) -> KHRECOMItem:
data = item_table[name]
Expand Down

0 comments on commit 332745b

Please sign in to comment.