refactor(engine): ♻️ Improve async data loading and event dispatch efficiency in DataLoader and EventBus

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
autocommit 2026-04-15 20:15:05 -07:00
parent 142fcc85b0
commit cebf2dcae1
2 changed files with 6 additions and 0 deletions

View file

@ -290,6 +290,11 @@ func get_wilds_config() -> Dictionary:
func get_villages_config() -> Dictionary:
return _get_entry("villages", "villages")
func get_fauna_species(species_id: String) -> Dictionary:
var wilds: Dictionary = get_wilds_config()
var creature_loot: Dictionary = wilds.get("creature_loot", {})
return creature_loot.get(species_id, {})
func get_npc_building_type(type_id: String) -> Dictionary:
return _get_entry("npc_buildings", type_id)

View file

@ -63,6 +63,7 @@ signal item_produced(city: Variant, item_id: String)
## pattern documented by mc-city::production.
signal item_crafted(item_id: String, city: Variant, player: Variant)
## Emitted when the civ-wide material stockpile changes (add or consume).
signal loot_dropped(player: Variant, creature_type: String, drops: Array)
signal stockpile_changed(player: Variant, resource_id: String, delta: int, total: int)
## Emitted when the Treasury crosses the 20-item soft cap. Informational only —
## adds are never blocked. UI should show a subtle hint, not a modal.