From d7dd2129cf557696f7a51796e1c6c74386689957 Mon Sep 17 00:00:00 2001 From: geese_suck Date: Sat, 17 Dec 2022 16:06:08 -0800 Subject: [PATCH] more award stuff --- files/events/__init__.py | 4 +++- files/events/assets/css/blizzard.css | 5 +++++ files/events/helpers/const.py | 20 +++++++++++++++----- files/events/templates/awards.html | 26 ++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/files/events/__init__.py b/files/events/__init__.py index 10402b802..01b554aa1 100644 --- a/files/events/__init__.py +++ b/files/events/__init__.py @@ -1,6 +1,6 @@ from sqlalchemy import inspect -from files.helpers.config.awards import AWARDS_ENABLED, AWARDS_DISABLED +from files.helpers.config.awards import AWARDS, AWARDS_ENABLED, AWARDS_DISABLED from files.__main__ import engine from files.events.classes import * @@ -22,6 +22,8 @@ def _populate_awards(): if award in AWARDS_DISABLED: AWARDS_DISABLED.remove(award) + AWARDS.update(EVENT_AWARDS) + def event_init(): _build_table() diff --git a/files/events/assets/css/blizzard.css b/files/events/assets/css/blizzard.css index 32a8f2d30..7eb017f81 100644 --- a/files/events/assets/css/blizzard.css +++ b/files/events/assets/css/blizzard.css @@ -148,6 +148,11 @@ textarea, input[type=textbox], input[type=search] { } .fa-moon-over-sun:before{content:"\f74a"} +.fa-temperature-snow:before{content:"\f768"} + +.award-name { + color: var(--gray-200) +} .sidebar { background-color: var(--gray-600); diff --git a/files/events/helpers/const.py b/files/events/helpers/const.py index 253fb78b8..7a9c8fd39 100644 --- a/files/events/helpers/const.py +++ b/files/events/helpers/const.py @@ -4,7 +4,7 @@ EVENT_AWARDS = { "title": "Snow", "description": "", "icon": "fas fa-snowflake", - "color": "text-blue-200", + "color": "text-lightblue", "price": 300, "deflectable": False, "cosmetic": True @@ -14,7 +14,7 @@ EVENT_AWARDS = { "title": "Gingerbread", "description": "", "icon": "fas fa-gingerbread-man", - "color": "", + "color": "text-brown", "price": 300, "deflectable": False, "cosmetic": True @@ -24,7 +24,7 @@ EVENT_AWARDS = { "title": "Lights", "description": "", "icon": "fas fa-lights-holiday", - "color": "", + "color": "text-success", "price": 300, "deflectable": False, "cosmetic": True @@ -34,7 +34,7 @@ EVENT_AWARDS = { "title": "Candy Cane", "description": "", "icon": "fas fa-candy-cane", - "color": "", + "color": "text-danger", "price": 400, "deflectable": False, "cosmetic": True @@ -44,11 +44,21 @@ EVENT_AWARDS = { "title": "Fireplace", "description": "", "icon": "fas fa-fireplace", - "color": "", + "color": "text-orange", "price": 600, "deflectable": False, "cosmetic": True }, + "frostbite": { + "kind": "frostbite", + "title": "Frostbite", + "description": "", + "icon": "fas fa-temperature-snow", + "color": "text-blue", + "price": 300, + "deflectable": False, + "cosmetic": True + }, } EVENT_FORCED_HATS = ['/i/hats/Santa Hat III.webp?h=1', \ '/i/hats/Winter Cap.webp?h=1', \ diff --git a/files/events/templates/awards.html b/files/events/templates/awards.html index afe1b60ce..d01409d65 100644 --- a/files/events/templates/awards.html +++ b/files/events/templates/awards.html @@ -11,6 +11,32 @@ {% endif %} + + {% if p.award_count("frostbite", v) %} +
+ + + {% endif %} {% if p.award_count("lights", v) %}