feat(throne-room): ✨ Add dynamic visual rendering and profile display enhancements for the throne room with new UI effects
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
27c190e0d2
commit
93e89f483b
2 changed files with 20 additions and 21 deletions
|
|
@ -12,6 +12,24 @@ const ThroneRoomHarvestScript = preload(
|
|||
"res://engine/src/modules/empire/throne_room_harvest.gd"
|
||||
)
|
||||
|
||||
const _STAT_KEY_MAP: Dictionary = {
|
||||
"best_era_gte": "best_era",
|
||||
"victories_gte": "victories",
|
||||
"conquest_victories_gte": "conquest_victories",
|
||||
"survival_victory_gte": "survival_victories",
|
||||
"ironclad_victory": "ironclad_victories",
|
||||
"games_played_gte": "games_played",
|
||||
"best_tech_count_gte": "best_tech_count",
|
||||
"best_city_count_gte": "best_city_count",
|
||||
"best_happiness_gte": "best_happiness",
|
||||
"golden_ages_lifetime_gte": "golden_ages_lifetime",
|
||||
"best_score_gte": "best_score",
|
||||
"turns_survived_best_gte": "turns_survived_best",
|
||||
"lairs_cleared_lifetime_gte": "lairs_cleared_lifetime",
|
||||
"units_lost_lifetime_gte": "units_lost_lifetime",
|
||||
"legendary_unit_promoted": "legendary_unit_promoted",
|
||||
}
|
||||
|
||||
const DEFAULT_STATS: Dictionary = {
|
||||
"best_era": 0,
|
||||
"victories": 0,
|
||||
|
|
@ -175,25 +193,6 @@ func record_game(record: Dictionary) -> void:
|
|||
game_records.append(record)
|
||||
|
||||
|
||||
static var _STAT_KEY_MAP: Dictionary = {
|
||||
"best_era_gte": "best_era",
|
||||
"victories_gte": "victories",
|
||||
"conquest_victories_gte": "conquest_victories",
|
||||
"survival_victory_gte": "survival_victories",
|
||||
"ironclad_victory": "ironclad_victories",
|
||||
"games_played_gte": "games_played",
|
||||
"best_tech_count_gte": "best_tech_count",
|
||||
"best_city_count_gte": "best_city_count",
|
||||
"best_happiness_gte": "best_happiness",
|
||||
"golden_ages_lifetime_gte": "golden_ages_lifetime",
|
||||
"best_score_gte": "best_score",
|
||||
"turns_survived_best_gte": "turns_survived_best",
|
||||
"lairs_cleared_lifetime_gte": "lairs_cleared_lifetime",
|
||||
"units_lost_lifetime_gte": "units_lost_lifetime",
|
||||
"legendary_unit_promoted": "legendary_unit_promoted",
|
||||
}
|
||||
|
||||
|
||||
func _check_leaf(ctype: String, unlock: Dictionary) -> bool:
|
||||
if ctype == "always":
|
||||
return true
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ func _draw() -> void:
|
|||
|
||||
_draw_city_sprite(pixel, city, color)
|
||||
_draw_city_label(pixel, city)
|
||||
_draw_hp_bar(pixel, city, color)
|
||||
_draw_hp_bar(pixel, city)
|
||||
|
||||
|
||||
func _draw_city_sprite(pixel: Vector2, city: CityScript, color: Color) -> void:
|
||||
|
|
@ -165,7 +165,7 @@ func _draw_city_label(pixel: Vector2, city: CityScript) -> void:
|
|||
draw_string(font, pop_pos, pop_text, HORIZONTAL_ALIGNMENT_LEFT, -1, POP_FONT_SIZE, Color.WHITE)
|
||||
|
||||
|
||||
func _draw_hp_bar(pixel: Vector2, city: CityScript, color: Color) -> void:
|
||||
func _draw_hp_bar(pixel: Vector2, city: CityScript) -> void:
|
||||
## Draw a small HP bar below the city sprite if city is damaged.
|
||||
if city.hp >= city.max_hp:
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue