2
0
Daniele Bartolini 9 жил өмнө
parent
commit
111f648fa6

+ 3 - 3
tools/api/level_editor_api.vala

@@ -67,12 +67,12 @@ namespace Crown
 
 		public string set_snap_mode(SnapMode sm)
 		{
-			return """LevelEditor:set_snap_mode("%s")""".printf(sm == SnapMode.Relative ? "relative" : "absolute");
+			return """LevelEditor:set_snap_mode("%s")""".printf(sm == SnapMode.RELATIVE ? "relative" : "absolute");
 		}
 
 		public string set_reference_system(ReferenceSystem rs)
 		{
-			return """LevelEditor:set_reference_system("%s")""".printf(rs == ReferenceSystem.Local ? "local" : "world");
+			return """LevelEditor:set_reference_system("%s")""".printf(rs == ReferenceSystem.LOCAL ? "local" : "world");
 		}
 
 		public string enable_show_grid(bool enabled)
@@ -175,7 +175,7 @@ namespace Crown
 
 		public string set_placeable(PlaceableType type, string name)
 		{
-			return "LevelEditor:set_placeable(\"%s\", \"%s\")".printf((type == PlaceableType.Unit ? "unit" : "sound"), name);
+			return "LevelEditor:set_placeable(\"%s\", \"%s\")".printf((type == PlaceableType.UNIT ? "unit" : "sound"), name);
 		}
 
 		public string set_selected_unit(Guid id)

+ 1 - 1
tools/api/unit_preview_api.vala

@@ -15,7 +15,7 @@ namespace Crown
 
 		public string set_preview_unit(PlaceableType placeable_type, string name)
 		{
-			return "UnitPreview:set_preview_unit(\"%s\")".printf(placeable_type == PlaceableType.Unit ? name : _placeables[(int)placeable_type]);
+			return "UnitPreview:set_preview_unit(\"%s\")".printf(placeable_type == PlaceableType.UNIT ? name : _placeables[(int)placeable_type]);
 		}
 	}
 }