extends Resource

class_name CoreCfg

@export var name : String
@export var type : Enum.ECoreType
@export var skill_list : Array[SkillPlayerCfg]

var icon : Texture2D

func get_icon()->Texture2D:
	if not icon:
		var res_name = Util.get_resource_name(self)
		var path = "res://resource/ui/icon/core/%s.png" % res_name
		if ResourceLoader.exists(path):
			icon = load(path)
		else:
			icon = load("res://resource/ui/icon/core/default.png")
	return icon
