fix: use correct SOR.Database.Enums.Affinity values throughout client
Replace placeholder Fire/Water/Earth/Air/Lightning/Dark/Light affinities with the actual enum values: Void, Aether, Lake, Hill, Forest, Field (basics) plus their non-basic combos (Ocean, Island, Marsh, Swamp, Mountain, Steppe, Fort, Plains, Grove, Jungle, PerfectAether, PureVoid). - Rename 7 wrong SVG icons → 6 correct ones (Void/Aether/Lake/Hill/Forest/Field) - card_widget.gd: rewrite AFFINITY_BORDER, AFFINITY_BG for all 18 card affinities; add static affinity_icon() helper that maps non-basics to their primary basic icon - card_detail_popup.gd: use affinity_icon() instead of direct dict lookup - cars_view.gd: affinity filter now lists all 18 card-valid affinities Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Four-pointed star / sparkle -->
|
||||
<path fill="white" d="M12 2l2.5 7.5L22 12l-7.5 2.5L12 22l-2.5-7.5L2 12l7.5-2.5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 192 B |
@@ -1,6 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<rect fill="white" x="3" y="7" width="15" height="2.5" rx="1.25"/>
|
||||
<path fill="white" d="M18 7a3 3 0 1 1 0 6H3V10.5h15a.5.5 0 0 0 0-1H3V7h15z"/>
|
||||
<rect fill="white" x="3" y="13" width="11" height="2.5" rx="1.25"/>
|
||||
<path fill="white" d="M14 13a3 3 0 1 1 0 6H3V16.5h11a.5.5 0 0 0 0-1H3V13h11z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 369 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 3a9 9 0 0 0 0 18 9.2 9.2 0 0 0 2-.22A7 7 0 0 1 9.78 6.22 9.2 9.2 0 0 0 12 3z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 176 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M1.5 21L8 7l5.5 9.5 3.5-6L23 21H1.5z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 132 B |
@@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Three wheat stalks -->
|
||||
<rect fill="white" x="7" y="10" width="2" height="12" rx="1"/>
|
||||
<ellipse fill="white" cx="8" cy="8" rx="2.2" ry="3.5"/>
|
||||
<rect fill="white" x="11" y="8" width="2" height="14" rx="1"/>
|
||||
<ellipse fill="white" cx="12" cy="6" rx="2.2" ry="3.5"/>
|
||||
<rect fill="white" x="15" y="10" width="2" height="12" rx="1"/>
|
||||
<ellipse fill="white" cx="16" cy="8" rx="2.2" ry="3.5"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 470 B |
@@ -1,4 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M12 2C9.5 5.5 7 8.5 8 13c.4 1.8 1.6 3 2.8 3.8-.6-1.6 0-3.2 1.2-4 .4 1.8 1.4 3 2.2 4.2 1-1.4 1.2-3.2.3-4.8C16.4 13.6 17 16 16 18.5c-1 2.2-3.2 3.5-4 3.5C8.5 22 5.5 19.5 5.5 16.5c0-5 4-7.5 6.5-14.5z"/>
|
||||
<path fill="white" d="M12 10c-.5 2.5.5 4 2 5-.5-2 .5-3.5 1.5-4.5-.5 2 .5 4 0 6C17.5 15 18 12.5 16.5 11 18 12.5 18 15 17 17c-1 2.5-3.5 4-5 4z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 437 B |
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Stylised tree: triangular crown + trunk -->
|
||||
<path fill="white" d="M12 2L20 15H15L17 20H7L9 15H4L12 2Z"/>
|
||||
<rect fill="white" x="10.5" y="19" width="3" height="3" rx="1"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 249 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Gentle hill / dome -->
|
||||
<path fill="white" d="M2 20Q7 5 12 5Q17 5 22 20Z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 152 B |
@@ -1,3 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Water drop -->
|
||||
<path fill="white" d="M12 2L5.5 12.5C4 15.2 4.5 18 6.5 19.8A7 7 0 0 0 12 22a7 7 0 0 0 5.5-2.2C19.5 18 20 15.2 18.5 12.5L12 2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 199 B After Width: | Height: | Size: 221 B |
@@ -1,11 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<circle fill="white" cx="12" cy="12" r="4.5"/>
|
||||
<rect fill="white" x="10.75" y="1" width="2.5" height="3.5" rx="1.25"/>
|
||||
<rect fill="white" x="10.75" y="19.5" width="2.5" height="3.5" rx="1.25"/>
|
||||
<rect fill="white" x="1" y="10.75" width="3.5" height="2.5" rx="1.25"/>
|
||||
<rect fill="white" x="19.5" y="10.75" width="3.5" height="2.5" rx="1.25"/>
|
||||
<rect fill="white" x="10.75" y="1" width="2.5" height="3.5" rx="1.25" transform="rotate(45 12 12)"/>
|
||||
<rect fill="white" x="10.75" y="19.5" width="2.5" height="3.5" rx="1.25" transform="rotate(45 12 12)"/>
|
||||
<rect fill="white" x="1" y="10.75" width="3.5" height="2.5" rx="1.25" transform="rotate(45 12 12)"/>
|
||||
<rect fill="white" x="19.5" y="10.75" width="3.5" height="2.5" rx="1.25" transform="rotate(45 12 12)"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 837 B |
@@ -1,3 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path fill="white" d="M13.5 2L5 13.5h6.5L10 22l9-12.5H13L13.5 2z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 138 B |
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<!-- Crescent moon -->
|
||||
<path fill="white" d="M12 3a9 9 0 0 0 0 18 9.5 9.5 0 0 0 2.1-.24A7 7 0 0 1 9.9 6.24 9.5 9.5 0 0 0 12 3z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 202 B |
@@ -21,10 +21,6 @@ Network="*res://autoloads/Network.gd"
|
||||
ContentCache="*res://autoloads/ContentCache.gd"
|
||||
Auth="*res://autoloads/Auth.gd"
|
||||
|
||||
[input_devices]
|
||||
|
||||
pointing/emulate_touch_from_mouse=true
|
||||
|
||||
[display]
|
||||
|
||||
window/size/viewport_width=1280
|
||||
@@ -32,6 +28,10 @@ window/size/viewport_height=720
|
||||
window/stretch/mode="canvas_items"
|
||||
window/stretch/aspect="expand"
|
||||
|
||||
[input_devices]
|
||||
|
||||
pointing/emulate_touch_from_mouse=true
|
||||
|
||||
[rendering]
|
||||
|
||||
renderer/rendering_method="gl_compatibility"
|
||||
|
||||
@@ -48,7 +48,7 @@ func show_card(dto: Dictionary, def: Dictionary) -> void:
|
||||
|
||||
# Header
|
||||
name_label.text = str(dto.get("name", "Unknown"))
|
||||
affinity_icon.texture = _CardWidget.AFFINITY_ICONS.get(affinity, null)
|
||||
affinity_icon.texture = _CardWidget.affinity_icon(affinity)
|
||||
affinity_icon.modulate = _CardWidget.AFFINITY_BORDER.get(affinity, Color.WHITE)
|
||||
foil_badge.visible = is_foil
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
uid://bbs4g6f1ax4er
|
||||
@@ -9,37 +9,86 @@ extends PanelContainer
|
||||
## Call set_selected(true/false) to highlight the card (used by the arch-spirit picker).
|
||||
|
||||
# ── Colour tables ─────────────────────────────────────────────────────────────
|
||||
# Affinities match SOR.Database.Enums.Affinity.
|
||||
# Basic: Void, Aether, Lake, Hill, Forest, Field.
|
||||
# Non-basics are two-basic combos; tile-only affinities never appear on cards.
|
||||
|
||||
const AFFINITY_BORDER := {
|
||||
"Fire": Color(0.91, 0.33, 0.13),
|
||||
"Water": Color(0.20, 0.53, 1.00),
|
||||
"Earth": Color(0.45, 0.69, 0.20),
|
||||
"Air": Color(0.53, 0.80, 0.93),
|
||||
"Lightning": Color(0.94, 0.88, 0.19),
|
||||
"Dark": Color(0.60, 0.25, 0.93),
|
||||
"Light": Color(0.97, 0.84, 0.25),
|
||||
# ── Basic ──────────────────────────────────────────────────────────────
|
||||
"Void": Color(0.45, 0.18, 0.65),
|
||||
"Aether": Color(0.35, 0.72, 1.00),
|
||||
"Lake": Color(0.22, 0.52, 0.92),
|
||||
"Hill": Color(0.70, 0.55, 0.30),
|
||||
"Forest": Color(0.28, 0.68, 0.25),
|
||||
"Field": Color(0.82, 0.72, 0.18),
|
||||
# ── Non-basic ──────────────────────────────────────────────────────────
|
||||
"Ocean": Color(0.12, 0.38, 0.82),
|
||||
"Island": Color(0.22, 0.65, 0.72),
|
||||
"Marsh": Color(0.35, 0.60, 0.38),
|
||||
"Swamp": Color(0.50, 0.58, 0.22),
|
||||
"Mountain": Color(0.55, 0.55, 0.62),
|
||||
"Steppe": Color(0.55, 0.58, 0.25),
|
||||
"Fort": Color(0.78, 0.65, 0.35),
|
||||
"Plains": Color(0.55, 0.78, 0.35),
|
||||
"Grove": Color(0.18, 0.52, 0.20),
|
||||
"Jungle": Color(0.32, 0.72, 0.18),
|
||||
"PerfectAether": Color(0.70, 0.88, 1.00),
|
||||
"PureVoid": Color(0.30, 0.08, 0.48),
|
||||
}
|
||||
|
||||
const AFFINITY_BG := {
|
||||
"Fire": Color(0.54, 0.15, 0.08),
|
||||
"Water": Color(0.06, 0.23, 0.43),
|
||||
"Earth": Color(0.19, 0.26, 0.08),
|
||||
"Air": Color(0.18, 0.34, 0.44),
|
||||
"Lightning": Color(0.42, 0.36, 0.03),
|
||||
"Dark": Color(0.23, 0.06, 0.38),
|
||||
"Light": Color(0.47, 0.38, 0.04),
|
||||
# ── Basic ──────────────────────────────────────────────────────────────
|
||||
"Void": Color(0.15, 0.04, 0.22),
|
||||
"Aether": Color(0.06, 0.18, 0.38),
|
||||
"Lake": Color(0.05, 0.15, 0.40),
|
||||
"Hill": Color(0.28, 0.20, 0.08),
|
||||
"Forest": Color(0.08, 0.24, 0.08),
|
||||
"Field": Color(0.25, 0.20, 0.03),
|
||||
# ── Non-basic ──────────────────────────────────────────────────────────
|
||||
"Ocean": Color(0.03, 0.10, 0.32),
|
||||
"Island": Color(0.05, 0.22, 0.28),
|
||||
"Marsh": Color(0.08, 0.18, 0.10),
|
||||
"Swamp": Color(0.14, 0.18, 0.05),
|
||||
"Mountain": Color(0.15, 0.15, 0.18),
|
||||
"Steppe": Color(0.18, 0.20, 0.06),
|
||||
"Fort": Color(0.25, 0.20, 0.08),
|
||||
"Plains": Color(0.15, 0.26, 0.08),
|
||||
"Grove": Color(0.04, 0.16, 0.05),
|
||||
"Jungle": Color(0.08, 0.24, 0.04),
|
||||
"PerfectAether": Color(0.12, 0.22, 0.42),
|
||||
"PureVoid": Color(0.08, 0.02, 0.14),
|
||||
}
|
||||
|
||||
# One icon per basic affinity. Non-basics share their primary component's icon
|
||||
# via _affinity_icon() below.
|
||||
const AFFINITY_ICONS := {
|
||||
"Fire": preload("res://icons/affinity_fire.svg"),
|
||||
"Water": preload("res://icons/affinity_water.svg"),
|
||||
"Earth": preload("res://icons/affinity_earth.svg"),
|
||||
"Air": preload("res://icons/affinity_air.svg"),
|
||||
"Lightning": preload("res://icons/affinity_lightning.svg"),
|
||||
"Dark": preload("res://icons/affinity_dark.svg"),
|
||||
"Light": preload("res://icons/affinity_light.svg"),
|
||||
"Void": preload("res://icons/affinity_void.svg"),
|
||||
"Aether": preload("res://icons/affinity_aether.svg"),
|
||||
"Lake": preload("res://icons/affinity_lake.svg"),
|
||||
"Hill": preload("res://icons/affinity_hill.svg"),
|
||||
"Forest": preload("res://icons/affinity_forest.svg"),
|
||||
"Field": preload("res://icons/affinity_field.svg"),
|
||||
}
|
||||
|
||||
## Returns the icon texture for any affinity, mapping non-basics to their
|
||||
## primary basic component.
|
||||
static func affinity_icon(affinity: String) -> Texture2D:
|
||||
match affinity:
|
||||
"Lake", "Ocean", "Island", "Marsh", "Swamp":
|
||||
return AFFINITY_ICONS["Lake"]
|
||||
"Hill", "Mountain", "Steppe", "Fort":
|
||||
return AFFINITY_ICONS["Hill"]
|
||||
"Forest", "Plains", "Grove":
|
||||
return AFFINITY_ICONS["Forest"]
|
||||
"Field", "Jungle":
|
||||
return AFFINITY_ICONS["Field"]
|
||||
"Aether", "PerfectAether":
|
||||
return AFFINITY_ICONS["Aether"]
|
||||
"Void", "PureVoid":
|
||||
return AFFINITY_ICONS["Void"]
|
||||
_:
|
||||
return null
|
||||
|
||||
const RARITY_COLOR := {
|
||||
"Common": Color(0.67, 0.67, 0.67),
|
||||
"Uncommon": Color(0.27, 0.85, 0.27),
|
||||
@@ -84,8 +133,8 @@ func setup(dto: Dictionary, def: Dictionary = {}) -> void:
|
||||
|
||||
_apply_style()
|
||||
|
||||
art_rect.color = AFFINITY_BG.get(_affinity, Color(0.18, 0.18, 0.24))
|
||||
art_symbol.texture = AFFINITY_ICONS.get(_affinity, null)
|
||||
art_rect.color = AFFINITY_BG.get(_affinity, Color(0.18, 0.18, 0.24))
|
||||
art_symbol.texture = affinity_icon(_affinity)
|
||||
|
||||
foil_label.visible = is_foil
|
||||
name_label.text = str(dto.get("name", "—"))
|
||||
|
||||
@@ -71,7 +71,15 @@ func _populate_type_options() -> void:
|
||||
func _populate_affinity_options() -> void:
|
||||
affinity_option.clear()
|
||||
affinity_option.add_item("All Affinities")
|
||||
for a in ["Fire", "Water", "Earth", "Air", "Lightning", "Dark", "Light"]:
|
||||
for a in [
|
||||
# Basic
|
||||
"Void", "Aether", "Lake", "Hill", "Forest", "Field",
|
||||
# Non-basic
|
||||
"Ocean", "Island", "Marsh", "Swamp",
|
||||
"Mountain", "Steppe", "Fort",
|
||||
"Plains", "Grove", "Jungle",
|
||||
"PerfectAether", "PureVoid",
|
||||
]:
|
||||
affinity_option.add_item(a)
|
||||
|
||||
# ── Responsive columns ────────────────────────────────────────────────────────
|
||||
|
||||