chore:cleanup settings.py structure and formatting
- remove HP bar colors - fix double parentheses in start and end screen background colors - add section headers for PLAYER and SPRITE - improve spacing and structure between sections
This commit is contained in:
+13
-5
@@ -1,8 +1,8 @@
|
||||
# --- DESK ---
|
||||
from typing import Mapping, Literal, Tuple
|
||||
|
||||
from src.map import tile_size
|
||||
|
||||
# --- DESK ---
|
||||
DESK_WIDTH = 70
|
||||
DESK_HEIGHT = 40
|
||||
|
||||
@@ -13,13 +13,15 @@ DOOR_BORDER_WIDTH = 3
|
||||
|
||||
COLOR_DOOR_BEIGE = (245, 245, 220)
|
||||
COLOR_DOOR_BORDER = (100, 90, 80)
|
||||
COLOR_HP_BAR_GREEN = (0, 255, 0)
|
||||
COLOR_HP_BAR_BG = (50, 50, 50)
|
||||
|
||||
|
||||
# --- PLAYER ---
|
||||
# Players Constants / Settings
|
||||
# Valid movement/animation directions.
|
||||
Direction = Literal["down", "left", "right", "up"]
|
||||
|
||||
|
||||
# --- SPRITE ---
|
||||
# Sprite files are grouped by direction.
|
||||
# Example: "down" uses sprite_01.png, sprite_02.png, sprite_03.png.
|
||||
DIRECTION_FRAMES: Mapping[Direction, Tuple[int, int, int]] = {
|
||||
@@ -33,6 +35,7 @@ DIRECTION_FRAMES: Mapping[Direction, Tuple[int, int, int]] = {
|
||||
DEFAULT_SPRITE_HEIGHT: int = 138
|
||||
DEFAULT_FRAME_TIME: float = 0.16
|
||||
|
||||
|
||||
# --- ECTS ---
|
||||
START_ECTS_VALUE = 1 # how many ECTS are generated at the beginning
|
||||
ECTS_UPDATE_INTERVAL = 1000 # time in ms = 1 sec
|
||||
@@ -40,26 +43,31 @@ ECTS_UPDATE_INTERVAL = 1000 # time in ms = 1 sec
|
||||
BEER_BOTTLE_ECTS_VALUE = 2
|
||||
BEER_COST = 50
|
||||
|
||||
|
||||
# --- BUTTONS ---
|
||||
COLOR_BUTTON = (0, 255, 0)
|
||||
COLOR_BUTTON_HOVER = (200, 255, 0)
|
||||
|
||||
|
||||
# --- STARTSCREEN ---
|
||||
COLOR_STARTSCREEN_BACKGROUND = ((0, 0, 0))
|
||||
COLOR_STARTSCREEN_BACKGROUND = (0, 0, 0)
|
||||
COLOR_STARTSCREEN_FONT_TITLE = (0, 255, 0)
|
||||
COLOR_STARTSCREEN_FONT_LABEL = (0, 255, 255)
|
||||
|
||||
|
||||
# --- ENDSCREEN ---
|
||||
COLOR_ENDSCREEN_BACKGROUND = ((0, 0, 0))
|
||||
COLOR_ENDSCREEN_BACKGROUND = (0, 0, 0)
|
||||
COLOR_ENDSCREEN_TEXT = (255, 255, 255)
|
||||
COLOR_ENDSCREEN_WIN = (0, 255, 0)
|
||||
COLOR_ENDSCREEN_LOSE = (255, 0, 0)
|
||||
FONT_ENDSCREEN = "Arial"
|
||||
|
||||
|
||||
# --- COFFEE ---
|
||||
COFFEE_COST = 30
|
||||
COFFEE_HEAL_VALUE = 30
|
||||
|
||||
|
||||
# --- TOWER ---
|
||||
TOWER_COST = 150
|
||||
PROJECTILE_DMG = 15
|
||||
|
||||
Reference in New Issue
Block a user