-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflags.py
More file actions
26 lines (19 loc) · 772 Bytes
/
flags.py
File metadata and controls
26 lines (19 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Flags allow us to run the game with specific things, example a flag to disable the chaser
# Or a flag to directly unlock all levels
import sys
bDisableChaser: bool = False
bUnlockAllLevels: bool = False
_BROWSER: bool = sys.platform == "emscripten"
def parse(args: list[str] | None = None) -> None:
global bDisableChaser, bUnlockAllLevels
if _BROWSER:
bDisableChaser = False
bUnlockAllLevels = True
return
from argparse import ArgumentParser
parser = ArgumentParser()
parser.add_argument("--disableChaser", action="store_true")
parser.add_argument("--unlockAllLevels", action="store_true")
parsed = parser.parse_args(args)
bDisableChaser = parsed.disableChaser
bUnlockAllLevels = parsed.unlockAllLevels