Replace CurrencyType with Currency resource

This commit is contained in:
2026-03-14 12:39:21 +01:00
parent 020d287b03
commit 6da962a53d
13 changed files with 379 additions and 158 deletions

6
currency/currency.gd Normal file
View File

@@ -0,0 +1,6 @@
class_name Currency
extends Resource
@export var id: StringName = &""
@export var display_name: String = ""
@export var icon: Texture2D

1
currency/currency.gd.uid Normal file
View File

@@ -0,0 +1 @@
uid://dtgqjf3bl7pm8

10
currency/gems.tres Normal file
View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="Currency" format=3]
[ext_resource type="Script" path="res://currency/currency.gd" id="1_72iuq"]
[ext_resource type="Texture2D" path="res://icon.svg" id="2_x2h5x"]
[resource]
script = ExtResource("1_72iuq")
id = &"gems"
display_name = "Gems"
icon = ExtResource("2_x2h5x")

10
currency/gold.tres Normal file
View File

@@ -0,0 +1,10 @@
[gd_resource type="Resource" script_class="Currency" format=3]
[ext_resource type="Script" path="res://currency/currency.gd" id="1_x4uiu"]
[ext_resource type="Texture2D" path="res://icon.svg" id="2_52ar0"]
[resource]
script = ExtResource("1_x4uiu")
id = &"gold"
display_name = "Gold"
icon = ExtResource("2_52ar0")