From 10aa509c7bfbc4a5be849e16ce9cd01bd15e737d Mon Sep 17 00:00:00 2001 From: klingbolt Date: Sun, 27 Aug 2023 13:43:49 -0400 Subject: [PATCH] Regenerated gdscript for proto --- Spatial.gd | 2 +- waypoint.gd | 146 ++++++++++++++++++++++++---------------------------- 2 files changed, 67 insertions(+), 81 deletions(-) diff --git a/Spatial.gd b/Spatial.gd index 00e48000..0ab2d1d7 100644 --- a/Spatial.gd +++ b/Spatial.gd @@ -286,7 +286,7 @@ func reset_minimap_masks(): minimap_path.material.set_shader_param("minimap_corner2", compass_corner2) var Waypoint_data = Waypoint.Waypoint.new() -var marker_file_dir = "user://protobins/" +var marker_file_dir = Directory.new() var marker_file_path = "" var root: TreeItem diff --git a/waypoint.gd b/waypoint.gd index 0e9da02b..9af1a9f5 100644 --- a/waypoint.gd +++ b/waypoint.gd @@ -670,18 +670,6 @@ class Waypoint: service.func_ref = funcref(self, "add_category") data[_category.tag] = service - _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 2, true, []) - service = PBServiceField.new() - service.field = _icon - service.func_ref = funcref(self, "add_icon") - data[_icon.tag] = service - - _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 3, true, []) - service = PBServiceField.new() - service.field = _trail - service.func_ref = funcref(self, "add_trail") - data[_trail.tag] = service - var data = {} var _category: PBField @@ -695,28 +683,6 @@ class Waypoint: _category.value.append(element) return element - var _icon: PBField - func get_icon() -> Array: - return _icon.value - func clear_icon() -> void: - data[2].state = PB_SERVICE_STATE.UNFILLED - _icon.value = [] - func add_icon() -> Icon: - var element = Icon.new() - _icon.value.append(element) - return element - - var _trail: PBField - func get_trail() -> Array: - return _trail.value - func clear_trail() -> void: - data[3].state = PB_SERVICE_STATE.UNFILLED - _trail.value = [] - func add_trail() -> Trail: - var element = Trail.new() - _trail.value.append(element) - return element - func to_string() -> String: return PBPacker.message_to_string(data) @@ -773,6 +739,18 @@ class Category: service.func_ref = funcref(self, "add_children") data[_children.tag] = service + _icon = PBField.new("icon", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 7, true, []) + service = PBServiceField.new() + service.field = _icon + service.func_ref = funcref(self, "add_icon") + data[_icon.tag] = service + + _trail = PBField.new("trail", PB_DATA_TYPE.MESSAGE, PB_RULE.REPEATED, 8, true, []) + service = PBServiceField.new() + service.field = _trail + service.func_ref = funcref(self, "add_trail") + data[_trail.tag] = service + var data = {} var _default_visibility: PBField @@ -831,6 +809,28 @@ class Category: _children.value.append(element) return element + var _icon: PBField + func get_icon() -> Array: + return _icon.value + func clear_icon() -> void: + data[7].state = PB_SERVICE_STATE.UNFILLED + _icon.value = [] + func add_icon() -> Icon: + var element = Icon.new() + _icon.value.append(element) + return element + + var _trail: PBField + func get_trail() -> Array: + return _trail.value + func clear_trail() -> void: + data[8].state = PB_SERVICE_STATE.UNFILLED + _trail.value = [] + func add_trail() -> Trail: + var element = Trail.new() + _trail.value.append(element) + return element + func to_string() -> String: return PBPacker.message_to_string(data) @@ -856,12 +856,6 @@ class Icon: func _init(): var service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _category - service.func_ref = funcref(self, "new_category") - data[_category.tag] = service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() service.field = _texture_path @@ -1034,18 +1028,14 @@ class Icon: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + var data = {} - var _category: PBField - func get_category() -> Category: - return _category.value - func clear_category() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value - var _texture_path: PBField func get_texture_path() -> TexturePath: return _texture_path.value @@ -1346,6 +1336,16 @@ class Icon: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[2054].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -1371,12 +1371,6 @@ class Trail: func _init(): var service - _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) - service = PBServiceField.new() - service.field = _category - service.func_ref = funcref(self, "new_category") - data[_category.tag] = service - _texture_path = PBField.new("texture_path", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) service = PBServiceField.new() service.field = _texture_path @@ -1517,18 +1511,14 @@ class Trail: service.field = _bhdraft__schedule_duration data[_bhdraft__schedule_duration.tag] = service + _category = PBField.new("category", PB_DATA_TYPE.MESSAGE, PB_RULE.OPTIONAL, 2054, true, DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE]) + service = PBServiceField.new() + service.field = _category + service.func_ref = funcref(self, "new_category") + data[_category.tag] = service + var data = {} - var _category: PBField - func get_category() -> Category: - return _category.value - func clear_category() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] - func new_category() -> Category: - _category.value = Category.new() - return _category.value - var _texture_path: PBField func get_texture_path() -> TexturePath: return _texture_path.value @@ -1773,6 +1763,16 @@ class Trail: func set_bhdraft__schedule_duration(value : float) -> void: _bhdraft__schedule_duration.value = value + var _category: PBField + func get_category() -> Category: + return _category.value + func clear_category() -> void: + data[2054].state = PB_SERVICE_STATE.UNFILLED + _category.value = DEFAULT_VALUES_3[PB_DATA_TYPE.MESSAGE] + func new_category() -> Category: + _category.value = Category.new() + return _category.value + func to_string() -> String: return PBPacker.message_to_string(data) @@ -4260,11 +4260,6 @@ class TrailData: func _init(): var service - _trail_data = PBField.new("trail_data", PB_DATA_TYPE.STRING, PB_RULE.OPTIONAL, 1, true, DEFAULT_VALUES_3[PB_DATA_TYPE.STRING]) - service = PBServiceField.new() - service.field = _trail_data - data[_trail_data.tag] = service - _points_x = PBField.new("points_x", PB_DATA_TYPE.FLOAT, PB_RULE.REPEATED, 2, true, []) service = PBServiceField.new() service.field = _points_x @@ -4282,15 +4277,6 @@ class TrailData: var data = {} - var _trail_data: PBField - func get_trail_data() -> String: - return _trail_data.value - func clear_trail_data() -> void: - data[1].state = PB_SERVICE_STATE.UNFILLED - _trail_data.value = DEFAULT_VALUES_3[PB_DATA_TYPE.STRING] - func set_trail_data(value : String) -> void: - _trail_data.value = value - var _points_x: PBField func get_points_x() -> Array: return _points_x.value