mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-23 14:03:13 +00:00
Fix pxo loading
This commit is contained in:
parent
46929b97d2
commit
4531b5993c
2 changed files with 6 additions and 2 deletions
|
@ -596,5 +596,5 @@ func convert_dictionary_values(dict: Dictionary) -> void:
|
||||||
dict[key] = str2var("Color(" + dict[key] + ")")
|
dict[key] = str2var("Color(" + dict[key] + ")")
|
||||||
elif "v2" in key: # Convert a String to a Vector2
|
elif "v2" in key: # Convert a String to a Vector2
|
||||||
dict[key] = str2var("Vector2" + dict[key])
|
dict[key] = str2var("Vector2" + dict[key])
|
||||||
elif "size" in key: # Convert a String to a Vector3
|
elif "size" in key or "center_offset" in key: # Convert a String to a Vector3
|
||||||
dict[key] = str2var("Vector3" + dict[key])
|
dict[key] = str2var("Vector3" + dict[key])
|
||||||
|
|
|
@ -120,7 +120,11 @@ func serialize() -> Dictionary:
|
||||||
func deserialize(dict: Dictionary) -> void:
|
func deserialize(dict: Dictionary) -> void:
|
||||||
.deserialize(dict)
|
.deserialize(dict)
|
||||||
properties = dict["properties"]
|
properties = dict["properties"]
|
||||||
objects = dict["objects"]
|
var objects_copy = dict["objects"]
|
||||||
|
for object in objects_copy:
|
||||||
|
if typeof(object) != TYPE_STRING:
|
||||||
|
return
|
||||||
|
objects[int(object)] = int(objects_copy[object])
|
||||||
# new_cels_linked = dict.new_cels_linked
|
# new_cels_linked = dict.new_cels_linked
|
||||||
current_object_id = objects.size()
|
current_object_id = objects.size()
|
||||||
Global.convert_dictionary_values(properties)
|
Global.convert_dictionary_values(properties)
|
||||||
|
|
Loading…
Add table
Reference in a new issue