fixing deck editor filter bugs

This commit is contained in:
dingo
2026-03-20 11:49:35 -04:00
parent 6c6a66c011
commit afc8564201
@@ -539,9 +539,11 @@ func _render_coll_response(payload: Dictionary, page: int) -> void:
child.queue_free() child.queue_free()
var seen : Dictionary = {} var seen : Dictionary = {}
for child in _coll_list.get_children(): if page > 1:
if child.has_meta("def_id"): for child in _coll_list.get_children():
seen[str(child.get_meta("def_id"))] = true if child.has_meta("def_id"):
seen[str(child.get_meta("def_id"))] = true
for raw_dto in cards: for raw_dto in cards:
var dto := raw_dto as Dictionary var dto := raw_dto as Dictionary
@@ -549,12 +551,6 @@ func _render_coll_response(payload: Dictionary, page: int) -> void:
if def_id.is_empty() or def_id in seen: if def_id.is_empty() or def_id in seen:
continue continue
var def := ContentCache.get_definition(def_id) var def := ContentCache.get_definition(def_id)
var tier_value: Variant = def.get("tier", null)
var tier_num := 1
if tier_value != null:
tier_num = type_convert(tier_value, TYPE_INT)
if str(def.get("cardType", "")) == "ArchSpirit" and tier_num <= 1:
continue
seen[def_id] = true seen[def_id] = true
_coll_list.add_child(_make_coll_row(_hydrate_card_dto(dto, def))) _coll_list.add_child(_make_coll_row(_hydrate_card_dto(dto, def)))