Merge branch 'master' into 'equipment'
# Conflicts: # squirrelbattle/display/statsdisplay.py # squirrelbattle/entities/items.py # squirrelbattle/entities/player.py # squirrelbattle/interfaces.py # squirrelbattle/locale/de/LC_MESSAGES/squirrelbattle.po # squirrelbattle/locale/es/LC_MESSAGES/squirrelbattle.po # squirrelbattle/locale/fr/LC_MESSAGES/squirrelbattle.po # squirrelbattle/tests/game_test.py
This commit is contained in:
@ -2,18 +2,22 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
import curses
|
||||
from typing import Any
|
||||
from typing import Any, Union, Tuple
|
||||
|
||||
|
||||
class TexturePack:
|
||||
"""
|
||||
A class to handle displaying several textures.
|
||||
"""
|
||||
_packs = dict()
|
||||
|
||||
name: str
|
||||
tile_width: int
|
||||
tile_fg_color: int
|
||||
tile_bg_color: int
|
||||
entity_fg_color: int
|
||||
entity_bg_color: int
|
||||
tile_fg_color: Union[int, Tuple[int, int, int]]
|
||||
tile_fg_visible_color: Union[int, Tuple[int, int, int]]
|
||||
tile_bg_color: Union[int, Tuple[int, int, int]]
|
||||
entity_fg_color: Union[int, Tuple[int, int, int]]
|
||||
entity_bg_color: Union[int, Tuple[int, int, int]]
|
||||
|
||||
BODY_SNATCH_POTION: str
|
||||
BOMB: str
|
||||
@ -29,6 +33,7 @@ class TexturePack:
|
||||
SWORD: str
|
||||
TEDDY_BEAR: str
|
||||
TIGER: str
|
||||
TRUMPET: str
|
||||
WALL: str
|
||||
EAGLE: str
|
||||
SHIELD: str
|
||||
@ -60,9 +65,10 @@ class TexturePack:
|
||||
TexturePack.ASCII_PACK = TexturePack(
|
||||
name="ascii",
|
||||
tile_width=1,
|
||||
tile_fg_visible_color=(1000, 1000, 1000),
|
||||
tile_fg_color=curses.COLOR_WHITE,
|
||||
tile_bg_color=curses.COLOR_BLACK,
|
||||
entity_fg_color=curses.COLOR_WHITE,
|
||||
entity_fg_color=(1000, 1000, 1000),
|
||||
entity_bg_color=curses.COLOR_BLACK,
|
||||
|
||||
BODY_SNATCH_POTION='S',
|
||||
@ -70,6 +76,7 @@ TexturePack.ASCII_PACK = TexturePack(
|
||||
EMPTY=' ',
|
||||
EXPLOSION='%',
|
||||
FLOOR='.',
|
||||
LADDER='H',
|
||||
HAZELNUT='¤',
|
||||
HEART='❤',
|
||||
HEDGEHOG='*',
|
||||
@ -81,6 +88,7 @@ TexturePack.ASCII_PACK = TexturePack(
|
||||
SWORD='\u2020',
|
||||
TEDDY_BEAR='8',
|
||||
TIGER='n',
|
||||
TRUMPET='/',
|
||||
WALL='#',
|
||||
EAGLE='µ',
|
||||
CHESTPLATE='(',
|
||||
@ -92,16 +100,19 @@ TexturePack.ASCII_PACK = TexturePack(
|
||||
TexturePack.SQUIRREL_PACK = TexturePack(
|
||||
name="squirrel",
|
||||
tile_width=2,
|
||||
tile_fg_visible_color=(1000, 1000, 1000),
|
||||
tile_fg_color=curses.COLOR_WHITE,
|
||||
tile_bg_color=curses.COLOR_BLACK,
|
||||
entity_fg_color=curses.COLOR_WHITE,
|
||||
entity_bg_color=curses.COLOR_WHITE,
|
||||
entity_fg_color=(1000, 1000, 1000),
|
||||
entity_bg_color=(1000, 1000, 1000),
|
||||
|
||||
BODY_SNATCH_POTION='🔀',
|
||||
BOMB='💣',
|
||||
EMPTY=' ',
|
||||
EXPLOSION='💥',
|
||||
FLOOR='██',
|
||||
LADDER=('🪜', curses.COLOR_WHITE, (1000, 1000, 1000),
|
||||
curses.COLOR_WHITE, (1000, 1000, 1000)),
|
||||
HAZELNUT='🌰',
|
||||
HEART='💜',
|
||||
HEDGEHOG='🦔',
|
||||
@ -113,6 +124,7 @@ TexturePack.SQUIRREL_PACK = TexturePack(
|
||||
SWORD='🗡️ ',
|
||||
TEDDY_BEAR='🧸',
|
||||
TIGER='🐅',
|
||||
TRUMPET='🎺',
|
||||
WALL='🧱',
|
||||
EAGLE='🦅',
|
||||
CHESTPLATE='🦺',
|
||||
|
Reference in New Issue
Block a user