First work on dialogic, resized guild, and started implementing portraits.

This commit is contained in:
2025-08-14 10:26:24 -04:00
parent 95a7db036b
commit 3aeb3d44e6
959 changed files with 47688 additions and 46 deletions

View File

@@ -0,0 +1,34 @@
@tool
class_name DialogicCharacterFormatSaver
extends ResourceFormatSaver
func _get_recognized_extensions(_resource: Resource) -> PackedStringArray:
return PackedStringArray(["dch"])
## Return true if this resource should be loaded as a DialogicCharacter
func _recognize(resource: Resource) -> bool:
# Cast instead of using "is" keyword in case is a subclass
resource = resource as DialogicCharacter
if resource:
return true
return false
## Save the resource
func _save(resource: Resource, path: String = '', _flags: int = 0) -> Error:
var file := FileAccess.open(path, FileAccess.WRITE)
if not file:
# For now, just let editor know that for some reason you can't
# read the file.
print("[Dialogic] Error opening file:", FileAccess.get_open_error())
return FileAccess.get_open_error()
var result := var_to_str(inst_to_dict(resource))
file.store_string(result)
# print('[Dialogic] Saved character "' , path, '"')
return OK