first commit 🎉

This commit is contained in:
anyreso 2026-02-17 23:36:57 -05:00
commit 6e724f67fe
805 changed files with 62098 additions and 0 deletions

View file

@ -0,0 +1,38 @@
@tool
class_name Profile extends Resource
@export var name: String
var _loadouts:Array[Loadout] = []:
set(value):
_loadouts = value
_loadouts.resize(3)
notify_property_list_changed()
func _init() -> void:
_loadouts.resize(3)
notify_property_list_changed()
func _get_property_list() -> Array:
var properties := []
for i in range(_loadouts.size()):
properties.append({
"name": "loadout_%d" % (i + 1),
"type": TYPE_OBJECT,
"hint": PROPERTY_HINT_RESOURCE_TYPE,
"hint_string": "Loadout",
})
return properties
func _get(prop:StringName) -> Variant:
if prop.begins_with("loadout_"):
var index := prop.get_slice("_", 1).to_int() - 1
return _loadouts[index]
return null
func _set(prop:StringName, value:Variant) -> bool:
if prop.begins_with("loadout_"):
var index := prop.get_slice("_", 1).to_int() - 1
_loadouts[index] = value
return true
return false