mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
WebHost: List Rooms in a sortable table
This commit is contained in:
6
Utils.py
6
Utils.py
@@ -36,9 +36,11 @@ def int32_as_bytes(value):
|
||||
def pc_to_snes(value):
|
||||
return ((value<<1) & 0x7F0000)|(value & 0x7FFF)|0x8000
|
||||
|
||||
|
||||
def snes_to_pc(value):
|
||||
return ((value & 0x7F0000)>>1)|(value & 0x7FFF)
|
||||
|
||||
|
||||
def parse_player_names(names, players, teams):
|
||||
names = tuple(n for n in (n.strip() for n in names.split(",")) if n)
|
||||
ret = []
|
||||
@@ -52,9 +54,11 @@ def parse_player_names(names, players, teams):
|
||||
names = names[players:]
|
||||
return ret
|
||||
|
||||
def is_bundled():
|
||||
|
||||
def is_bundled() -> bool:
|
||||
return getattr(sys, 'frozen', False)
|
||||
|
||||
|
||||
def local_path(path):
|
||||
if local_path.cached_path:
|
||||
return os.path.join(local_path.cached_path, path)
|
||||
|
Reference in New Issue
Block a user