From a2942c51e68da5524678f49d31e66be31577d104 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 2 Jun 2023 17:58:49 +0200 Subject: [PATCH] Fix generating default values. --- generation/generate_bindings.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/generation/generate_bindings.py b/generation/generate_bindings.py index a6f818e..7166901 100644 --- a/generation/generate_bindings.py +++ b/generation/generate_bindings.py @@ -407,13 +407,13 @@ def cook_data(data): if value == "Null": return "None" else: - return value + return value.replace("inf", "float('inf')") elif type == "pandemonium_string": return f'"{value}"' - elif type == "pandemonium_node_path": - return f'"{value}"' - elif type == "pandemonium_string_name": - return f'"{value}"' + #elif type == "pandemonium_node_path": + # return f'"{value}"' + #elif type == "pandemonium_string_name": + # return f'"{value}"' elif type == "pandemonium_object" and value in ("[Object:null]", "Null"): return "None" elif type == "pandemonium_dictionary" and value == "{}": @@ -423,9 +423,9 @@ def cook_data(data): elif type == "pandemonium_vector2i": return f"Vector2i{value}" elif type == "pandemonium_rect2": - return f"Rect2{value}" + return f"Rect2{value}".replace("[P: (", "(Vector2(").replace("), S: (", "), Vector2(").replace(")]", "))") elif type == "pandemonium_rect2i": - return f"Rect2i{value}" + return f"Rect2i{value}".replace("[P: (", "(Vector2i(").replace("), S: (", "), Vector2i(").replace(")]", "))") elif type == "pandemonium_vector3": return f"Vector3{value}" elif type == "pandemonium_vector3i":