Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SC2 WoL: Mod, Item and Location update #2113

Merged
merged 14 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,050 changes: 6 additions & 1,044 deletions Starcraft2Client.py

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WebHostLib/static/static/icons/sc2/cyclone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WebHostLib/static/static/icons/sc2/jumpjets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WebHostLib/static/static/icons/sc2/liberator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WebHostLib/static/static/icons/sc2/lockdown.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WebHostLib/static/static/icons/sc2/spidermine.png
Binary file added WebHostLib/static/static/icons/sc2/valkyrie.png
Binary file added WebHostLib/static/static/icons/sc2/warpjump.png
Binary file added WebHostLib/static/static/icons/sc2/widowmine.png
6 changes: 4 additions & 2 deletions WebHostLib/static/styles/sc2wolTracker.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
border-top-left-radius: 4px;
border-top-right-radius: 4px;
padding: 3px 3px 10px;
width: 500px;
width: 710px;
background-color: #525494;
}

Expand All @@ -34,10 +34,12 @@
max-height: 40px;
border: 1px solid #000000;
filter: grayscale(100%) contrast(75%) brightness(20%);
background-color: black;
}

#inventory-table img.acquired{
filter: none;
background-color: black;
}

#inventory-table div.counted-item {
Expand All @@ -52,7 +54,7 @@
}

#location-table{
width: 500px;
width: 710px;
border-left: 2px solid #000000;
border-right: 2px solid #000000;
border-bottom: 2px solid #000000;
Expand Down
298 changes: 213 additions & 85 deletions WebHostLib/templates/sc2wolTracker.html

Large diffs are not rendered by default.

234 changes: 191 additions & 43 deletions WebHostLib/tracker.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
"Raft",
"Secret of Evermore",
"Slay the Spire",
"Starcraft 2 Wings of Liberty",
"Sudoku",
"Super Mario 64",
"VVVVVV",
Expand All @@ -91,6 +90,7 @@
# LogicMixin is broken before 3.10 import revamp
if sys.version_info < (3,10):
non_apworlds.add("Hollow Knight")
non_apworlds.add("Starcraft 2 Wings of Liberty")

def download_SNI():
print("Updating SNI")
Expand Down
27 changes: 20 additions & 7 deletions worlds/_sc2common/bot/maps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,31 @@


def get(name: str) -> Map:
# Iterate through 2 folder depths
for map_dir in (p for p in Paths.MAPS.iterdir()):
if map_dir.is_dir():
for map_file in (p for p in map_dir.iterdir()):
if Map.matches_target_map_name(map_file, name):
return Map(map_file)
elif Map.matches_target_map_name(map_dir, name):
return Map(map_dir)
map = find_map_in_dir(name, map_dir)
if map is not None:
return map

raise KeyError(f"Map '{name}' was not found. Please put the map file in \"/StarCraft II/Maps/\".")


# Go deeper
def find_map_in_dir(name, path):
if Map.matches_target_map_name(path, name):
return Map(path)

if path.name.endswith("SC2Map"):
return None

if path.is_dir():
for childPath in (p for p in path.iterdir()):
map = find_map_in_dir(name, childPath)
if map is not None:
return map

return None


class Map:

def __init__(self, path: Path):
Expand Down
Loading
Loading