Decouple everything from globals

This commit is contained in:
2026-04-10 01:09:57 +02:00
parent b758803afe
commit f671ab3419
56 changed files with 993 additions and 1291 deletions

View File

@@ -0,0 +1,17 @@
class_name CurrencyCatalogue
extends Resource
@export var currencies: Array[Currency] = []
func get_currency_by_id(id: StringName) -> Currency:
for currency in currencies:
if currency.id == id:
return currency
return null
func get_all_ids() -> Array[StringName]:
var ids: Array[StringName] = []
for currency in currencies:
if currency.id != &"":
ids.append(currency.id)
return ids

View File

@@ -0,0 +1 @@
uid://621tus0uvbrd