fixed an animation override bug cause im dumb and havent touched the json parser in a while

This commit is contained in:
JHDev2006
2025-10-17 13:32:08 +01:00
parent 2e66c00163
commit a0521becb4
9 changed files with 167 additions and 19 deletions

View File

@@ -113,14 +113,15 @@ func get_resource(json_file: JSON) -> Resource:
match mode:
ResourceMode.SPRITE_FRAMES:
var animation_json = {}
if json.has("animations"):
animation_json = json.get("animations")
elif source_json.has("animations"):
animation_json = source_json.get("animations")
if source_json.has("animation_overrides"):
for i in source_json.get("animation_overrides").keys():
animation_json[i] = source_json.get("animation_overrides")[i]
if source_json.has("animations"):
animation_json = source_json.get("animations")
elif json.has("animations"):
animation_json = json.get("animations")
if json.has("animation_overrides"):
for i in json.get("animation_overrides").keys():
animation_json[i] = json.get("animation_overrides")[i]
if animation_json != {}:
resource = load_image_from_path(source_resource_path)