feat: import ASCII content catalog

This commit is contained in:
goose
2026-10-02 11:55:27 -04:00
parent 8e3c6fc191
commit 263345d07d
43 changed files with 26813 additions and 3 deletions
+19
View File
@@ -0,0 +1,19 @@
extends GutTest
const ContentCatalog = preload("res://scripts/domain/content/content_catalog.gd")
func test_item_fixture_preserves_rusty_sword_fields() -> void:
var catalog := ContentCatalog.load_from_directory("res://tests/fixtures/content_loader")
var sword: Dictionary = catalog.get_item(&"weapon_rusty_sword")
assert_eq(sword.get("id"), "weapon_rusty_sword")
assert_eq(sword.get("name"), "Epee rouillee")
assert_eq(sword.get("category"), "weapon")
assert_eq(sword.get("rarity"), "commun")
assert_eq(sword.get("damage"), 6)
func test_missing_required_id_records_explicit_diagnostic() -> void:
var catalog := ContentCatalog.load_from_directory("res://tests/fixtures/content_loader_missing_id")
assert_eq(catalog.get_item(&"weapon_without_id"), {})
assert_eq(Array(catalog.get_diagnostics()), ["Missing required id in items.json entry 0"])
+1
View File
@@ -0,0 +1 @@
uid://b7nigr0mxb8cq