mirror of
https://github.com/rr-/pq-cli.git
synced 2026-09-28 22:33:59 -06:00
misc: fix style issues
This commit is contained in:
+1
-1
@@ -79,7 +79,7 @@ def main() -> None:
|
||||
try:
|
||||
player = list(roster.players)[args.load_save - 1]
|
||||
except IndexError:
|
||||
print(f"Invalid player. Available players:", file=sys.stderr)
|
||||
print("Invalid player. Available players:", file=sys.stderr)
|
||||
list_players(roster, file=sys.stderr)
|
||||
exit(1)
|
||||
|
||||
|
||||
+41
-2
@@ -1,10 +1,49 @@
|
||||
import datetime
|
||||
import itertools
|
||||
import logging
|
||||
import math
|
||||
import typing as T
|
||||
from collections import defaultdict
|
||||
from dataclasses import dataclass
|
||||
|
||||
from pqcli.config import *
|
||||
from pqcli.lingo import *
|
||||
from pqcli import random
|
||||
from pqcli.config import (
|
||||
ARMORS,
|
||||
BORING_ITEMS,
|
||||
CLASSES,
|
||||
DEFENSE_ATTRIB,
|
||||
DEFENSE_BAD,
|
||||
IMPRESSIVE_TITLES,
|
||||
ITEM_ATTRIB,
|
||||
ITEM_OFS,
|
||||
MONSTERS,
|
||||
OFFENSE_ATTRIB,
|
||||
OFFENSE_BAD,
|
||||
PRIME_STATS,
|
||||
RACES,
|
||||
SHIELDS,
|
||||
SPECIALS,
|
||||
SPELLS,
|
||||
TITLES,
|
||||
WEAPONS,
|
||||
Class,
|
||||
EquipmentPreset,
|
||||
EquipmentType,
|
||||
Modifier,
|
||||
Monster,
|
||||
Race,
|
||||
StatType,
|
||||
)
|
||||
from pqcli.lingo import (
|
||||
act_name,
|
||||
big,
|
||||
definite,
|
||||
generate_name,
|
||||
indefinite,
|
||||
sick,
|
||||
special,
|
||||
young,
|
||||
)
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -130,7 +130,6 @@ class BasicUserInterface(BaseUserInterface):
|
||||
def play(self, player: Player) -> None:
|
||||
print(f"Playing as {player.name}")
|
||||
simulation = Simulation(player)
|
||||
last_save = datetime.now()
|
||||
last_tick = datetime.now()
|
||||
last_level = 0
|
||||
while True:
|
||||
|
||||
@@ -9,3 +9,15 @@ from .create_character_view import (
|
||||
)
|
||||
from .game_view import GameView
|
||||
from .roster_view import RosterView
|
||||
|
||||
__all__ = [
|
||||
"BaseView",
|
||||
"ChooseCharacterView",
|
||||
"ConfirmView",
|
||||
"ChooseCharacterClassView",
|
||||
"ChooseCharacterNameView",
|
||||
"ChooseCharacterRaceView",
|
||||
"ChooseCharacterStatsView",
|
||||
"GameView",
|
||||
"RosterView",
|
||||
]
|
||||
|
||||
@@ -18,7 +18,7 @@ class ConfirmView(BaseView):
|
||||
self.choices: T.List[Choice] = [
|
||||
Choice(
|
||||
keys=list(map(ord, "yY")),
|
||||
desc=f"[Y] Yes",
|
||||
desc="[Y] Yes",
|
||||
callback=self.on_confirm,
|
||||
),
|
||||
Choice(
|
||||
|
||||
@@ -2,3 +2,10 @@ from .choose_character_class_view import ChooseCharacterClassView
|
||||
from .choose_character_name_view import ChooseCharacterNameView
|
||||
from .choose_character_race_view import ChooseCharacterRaceView
|
||||
from .choose_character_stats_view import ChooseCharacterStatsView
|
||||
|
||||
__all__ = [
|
||||
"ChooseCharacterClassView",
|
||||
"ChooseCharacterNameView",
|
||||
"ChooseCharacterRaceView",
|
||||
"ChooseCharacterStatsView",
|
||||
]
|
||||
|
||||
@@ -6,3 +6,15 @@ from .list_box import ListBox
|
||||
from .menu import Menu
|
||||
from .progress_bar import ProgressBar
|
||||
from .scrollable import Scrollable
|
||||
|
||||
__all__ = [
|
||||
"Widget",
|
||||
"WindowWrapper",
|
||||
"DataTable",
|
||||
"Focusable",
|
||||
"Label",
|
||||
"ListBox",
|
||||
"Menu",
|
||||
"ProgressBar",
|
||||
"Scrollable",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user