Fix GDScript editor warnings (shadowed vars, unused param, integer division)

Renames locals/params that shadowed base-class properties (Node.name,
Control.size, BoxContainer.alignment), prefixes an intentionally-unused
parameter, and annotates a deliberate integer division so the console
stays clean during development.
This commit is contained in:
hz
2026-07-23 14:30:48 -05:00
parent 4a4bed2ac5
commit 48f404518f
4 changed files with 12 additions and 11 deletions
+3 -3
View File
@@ -597,7 +597,7 @@ func _refresh_deck_panel() -> void:
if deck_ring == null:
return
var dark := UIThemeService.is_dark_mode()
var name := "All decks"
var deck_name := "All decks"
var total := 0
var mastered := 0
var is_system := false
@@ -609,12 +609,12 @@ func _refresh_deck_panel() -> void:
for summary in decks:
var deck: Dictionary = summary.get("deck", {})
if str(deck.get("id", "")) == deck_id:
name = str(deck.get("name", "Deck"))
deck_name = str(deck.get("name", "Deck"))
total = int(summary.get("total", 0))
mastered = int(summary.get("mastered", 0))
is_system = bool(deck.get("isSystem", false))
break
deck_name_label.text = name
deck_name_label.text = deck_name
deck_system_badge.visible = is_system
var fraction := float(mastered) / float(total) if total > 0 else 0.0
deck_ring.configure(fraction, "%d%%" % roundi(fraction * 100.0), "Mastery", Brand.ROYAL_BLUE, dark)