diff --git a/xml_converter/doc/acheivement/achievement_bit_index.md b/xml_converter/doc/acheivement/achievement_bit_index.md index 909d189f..98851d5b 100644 --- a/xml_converter/doc/acheivement/achievement_bit_index.md +++ b/xml_converter/doc/acheivement/achievement_bit_index.md @@ -3,6 +3,7 @@ name: Achievement Bit Index type: Int32 applies_to: [Icon, Trail] xml_fields: ["AchievementBit", "AchievementBitIndex"] +exclude_from_protobuf: True protobuf_field: achievement_bit_index examples: ["0", "1", "2", "14"] --- diff --git a/xml_converter/doc/acheivement/achievement_id.md b/xml_converter/doc/acheivement/achievement_id.md index 5935436c..6f90220e 100644 --- a/xml_converter/doc/acheivement/achievement_id.md +++ b/xml_converter/doc/acheivement/achievement_id.md @@ -3,6 +3,7 @@ name: Achievement ID type: Int32 applies_to: [Icon, Trail] xml_fields: ["AchievementId"] +exclude_from_protobuf: True protobuf_field: achievement_id examples: - "2655" diff --git a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md index 35fb7490..d45e1429 100644 --- a/xml_converter/doc/disable_player_cutout/disable_player_cutout.md +++ b/xml_converter/doc/disable_player_cutout/disable_player_cutout.md @@ -3,6 +3,7 @@ name: Disable Player Cutout type: Boolean applies_to: [Icon, Trail] xml_fields: [CanFade] +exclude_from_protobuf: True protobuf_field: disable_player_cutout custom_functions: read.xml: diff --git a/xml_converter/doc/fade/distance_fade_end.md b/xml_converter/doc/fade/distance_fade_end.md index d1ad9a99..3108bc98 100644 --- a/xml_converter/doc/fade/distance_fade_end.md +++ b/xml_converter/doc/fade/distance_fade_end.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeFar, DistanceFadeEnd] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #distance_fade_end +exclude_from_protobuf: True +protobuf_field: distance_fade_end examples: - "850" - "600" diff --git a/xml_converter/doc/fade/distance_fade_start.md b/xml_converter/doc/fade/distance_fade_start.md index 56355435..f1031a07 100644 --- a/xml_converter/doc/fade/distance_fade_start.md +++ b/xml_converter/doc/fade/distance_fade_start.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Icon, Trail] xml_fields: [FadeNear, DistanceFadeStart] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #distance_fade_start +exclude_from_protobuf: True +protobuf_field: distance_fade_start examples: - "650" - "400" diff --git a/xml_converter/doc/menu/is_hidden.md b/xml_converter/doc/menu/is_hidden.md index a78b08d8..6f78ab87 100644 --- a/xml_converter/doc/menu/is_hidden.md +++ b/xml_converter/doc/menu/is_hidden.md @@ -3,6 +3,7 @@ name: Is Hidden type: Boolean applies_to: [Category] xml_fields: [DefaultToggle] +exclude_from_protobuf: True protobuf_field: is_hidden custom_functions: read.xml: diff --git a/xml_converter/doc/position/height_offset.md b/xml_converter/doc/position/height_offset.md index a7ea11e6..e05d75a1 100644 --- a/xml_converter/doc/position/height_offset.md +++ b/xml_converter/doc/position/height_offset.md @@ -4,7 +4,8 @@ type: Float32 applies_to: ["Icon"] xml_fields: ["HeightOffset", "BHHeightOffset"] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #height_offset +exclude_from_protobuf: True +protobuf_field: height_offset examples: - "0" --- diff --git a/xml_converter/doc/rendering/constant_size_on_map.md b/xml_converter/doc/rendering/constant_size_on_map.md index b73d9932..e1306a5e 100644 --- a/xml_converter/doc/rendering/constant_size_on_map.md +++ b/xml_converter/doc/rendering/constant_size_on_map.md @@ -3,6 +3,7 @@ name: Constant Size On Map type: Boolean applies_to: [Icon] xml_fields: [ScaleOnMapWithZoom] +exclude_from_protobuf: True protobuf_field: constant_size_on_map custom_functions: read.xml: diff --git a/xml_converter/doc/rendering/map_display_size.md b/xml_converter/doc/rendering/map_display_size.md index 4b3d62be..4912c172 100644 --- a/xml_converter/doc/rendering/map_display_size.md +++ b/xml_converter/doc/rendering/map_display_size.md @@ -4,7 +4,8 @@ type: Int32 applies_to: [Icon, Trail] xml_fields: [MapDisplaySize] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #map_display_size +exclude_from_protobuf: True +protobuf_field: map_display_size --- The size, in pixels, that the marker should be shown on the minimap or fullscreen map. When applied to a Trail, affects the width of the trail shown on the minimap or fullscreen map. diff --git a/xml_converter/doc/scale/icon_size.md b/xml_converter/doc/scale/icon_size.md index 12480b80..0642be4b 100644 --- a/xml_converter/doc/scale/icon_size.md +++ b/xml_converter/doc/scale/icon_size.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Icon] xml_fields: [IconSize] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #tentative__scale +exclude_from_protobuf: True +protobuf_field: tentative__scale --- Multiplier on the size of an image (i.e. 1 is 100%, 2 is 200%). diff --git a/xml_converter/doc/scale/trail_scale.md b/xml_converter/doc/scale/trail_scale.md index 7a5e7889..c9806f76 100644 --- a/xml_converter/doc/scale/trail_scale.md +++ b/xml_converter/doc/scale/trail_scale.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Trail] xml_fields: [TrailScale] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #scale +exclude_from_protobuf: True +protobuf_field: scale --- Adjusts the width of a trail mesh as a multiplier to the default width. diff --git a/xml_converter/doc/schedule/schedule.md b/xml_converter/doc/schedule/schedule.md index 14d2f113..3d30bf31 100644 --- a/xml_converter/doc/schedule/schedule.md +++ b/xml_converter/doc/schedule/schedule.md @@ -3,6 +3,7 @@ name: Schedule type: String applies_to: [Icon, Trail] xml_fields: [Schedule] +exclude_from_protobuf: True protobuf_field: bhdraft__schedule --- A description of when to hide or show an object based on a realtime schedule. diff --git a/xml_converter/doc/schedule/schedule_duration.md b/xml_converter/doc/schedule/schedule_duration.md index c69b1ef5..3e72d841 100644 --- a/xml_converter/doc/schedule/schedule_duration.md +++ b/xml_converter/doc/schedule/schedule_duration.md @@ -3,6 +3,7 @@ name: Schedule Duration type: Float32 applies_to: [Icon, Trail] xml_fields: [ScheduleDuration] +exclude_from_protobuf: True protobuf_field: bhdraft__schedule_duration --- Combined with Schedule to determine how long after the object is shown before it is hidden again. diff --git a/xml_converter/doc/size_on_screen/maximum_size_on_screen.md b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md index bddf4094..2c4546c1 100644 --- a/xml_converter/doc/size_on_screen/maximum_size_on_screen.md +++ b/xml_converter/doc/size_on_screen/maximum_size_on_screen.md @@ -4,7 +4,8 @@ type: Int32 applies_to: [Icon] xml_fields: [MaxSize] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #maximum_size_on_screen +exclude_from_protobuf: True +protobuf_field: maximum_size_on_screen --- The largest width/height of this icon on the screen. Notes diff --git a/xml_converter/doc/size_on_screen/minimum_size_on_screen.md b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md index 0125d704..0b9d9798 100644 --- a/xml_converter/doc/size_on_screen/minimum_size_on_screen.md +++ b/xml_converter/doc/size_on_screen/minimum_size_on_screen.md @@ -4,7 +4,8 @@ type: Int32 applies_to: [Icon] xml_fields: [MinSize] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #minimum_size_on_screen +exclude_from_protobuf: True +protobuf_field: minimum_size_on_screen --- The smallest width/height of this icon on the screen. diff --git a/xml_converter/doc/texture/animation_speed.md b/xml_converter/doc/texture/animation_speed.md index 3d552b80..a788e35d 100644 --- a/xml_converter/doc/texture/animation_speed.md +++ b/xml_converter/doc/texture/animation_speed.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Trail] xml_fields: ["AnimSpeed", "AnimationSpeed"] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #animation_speed +exclude_from_protobuf: True +protobuf_field: animation_speed --- The speed which the texture should be moving across the object. diff --git a/xml_converter/doc/tooltip/tooltip_description.md b/xml_converter/doc/tooltip/tooltip_description.md index a783c21e..dd90994b 100644 --- a/xml_converter/doc/tooltip/tooltip_description.md +++ b/xml_converter/doc/tooltip/tooltip_description.md @@ -3,6 +3,7 @@ name: Tooltip Description type: String applies_to: [Icon, Category] xml_fields: [TipDescription] +exclude_from_protobuf: True protobuf_field: tip_description --- The full text of the tooltip. diff --git a/xml_converter/doc/tooltip/tooltip_name.md b/xml_converter/doc/tooltip/tooltip_name.md index 769b4321..af69d4d3 100644 --- a/xml_converter/doc/tooltip/tooltip_name.md +++ b/xml_converter/doc/tooltip/tooltip_name.md @@ -3,6 +3,7 @@ name: Tooltip Name type: String applies_to: [Icon] xml_fields: [TipName] +exclude_from_protobuf: True protobuf_field: tip_name --- The name of the tooltip when hovering over the minimap. diff --git a/xml_converter/doc/trigger/auto_trigger.md b/xml_converter/doc/trigger/auto_trigger.md index 1252c299..6f6fe9f5 100644 --- a/xml_converter/doc/trigger/auto_trigger.md +++ b/xml_converter/doc/trigger/auto_trigger.md @@ -3,6 +3,7 @@ name: Auto Trigger type: Boolean applies_to: [Icon] xml_fields: [AutoTrigger] +exclude_from_protobuf: True protobuf_field: trigger.auto_trigger --- Any triggers will be triggered automatially when the player enters within range instead of being triggered. diff --git a/xml_converter/doc/trigger/bounce_delay.md b/xml_converter/doc/trigger/bounce_delay.md index 57b19b25..d7cf0c70 100644 --- a/xml_converter/doc/trigger/bounce_delay.md +++ b/xml_converter/doc/trigger/bounce_delay.md @@ -3,6 +3,7 @@ name: Bounce Delay type: Float32 applies_to: [Icon] xml_fields: [BounceDelay] +exclude_from_protobuf: True protobuf_field: trigger.bounce_delay --- How many seconds should pass before the bouncing begins. diff --git a/xml_converter/doc/trigger/bounce_duration.md b/xml_converter/doc/trigger/bounce_duration.md index 268d2c1f..36d65140 100644 --- a/xml_converter/doc/trigger/bounce_duration.md +++ b/xml_converter/doc/trigger/bounce_duration.md @@ -3,6 +3,7 @@ name: Bounce Duration type: Float32 applies_to: [Icon] xml_fields: [BounceDuration] +exclude_from_protobuf: True protobuf_field: trigger.bounce_duration --- How long should the icon bounce for when triggered. diff --git a/xml_converter/doc/trigger/bounce_height.md b/xml_converter/doc/trigger/bounce_height.md index 9b41124e..f76923fc 100644 --- a/xml_converter/doc/trigger/bounce_height.md +++ b/xml_converter/doc/trigger/bounce_height.md @@ -3,6 +3,7 @@ name: Bounce Height type: Float32 applies_to: [Icon] xml_fields: [BounceHeight] +exclude_from_protobuf: True protobuf_field: trigger.bounce_height --- How high should the icon bounce when triggered. diff --git a/xml_converter/doc/trigger/copy_clipboard.md b/xml_converter/doc/trigger/copy_clipboard.md index b9072163..2bdeb3cb 100644 --- a/xml_converter/doc/trigger/copy_clipboard.md +++ b/xml_converter/doc/trigger/copy_clipboard.md @@ -3,6 +3,7 @@ name: Copy Clipboard type: String applies_to: [Icon] xml_fields: [Copy, CopyClipboard] +exclude_from_protobuf: True protobuf_field: trigger.action_copy_clipboard --- A value that is copied to the clipboard when triggered. diff --git a/xml_converter/doc/trigger/copy_message.md b/xml_converter/doc/trigger/copy_message.md index c419a6b5..7048a535 100644 --- a/xml_converter/doc/trigger/copy_message.md +++ b/xml_converter/doc/trigger/copy_message.md @@ -3,6 +3,7 @@ name: Copy Message type: String applies_to: [Icon] xml_fields: [CopyMessage] +exclude_from_protobuf: True protobuf_field: trigger.action_copy_message --- A message that is displayed to the user when an item is copied to the clipboard. diff --git a/xml_converter/doc/trigger/has_countdown.md b/xml_converter/doc/trigger/has_countdown.md index 43302f65..ead0605f 100644 --- a/xml_converter/doc/trigger/has_countdown.md +++ b/xml_converter/doc/trigger/has_countdown.md @@ -3,6 +3,7 @@ name: Has Countdown type: Boolean xml_fields: ["HasCountdown"] applies_to: ["Icon"] +exclude_from_protobuf: True protobuf_field: trigger.has_countdown --- ? diff --git a/xml_converter/doc/trigger/hide_category.md b/xml_converter/doc/trigger/hide_category.md index c7bc53a5..b29f32e4 100644 --- a/xml_converter/doc/trigger/hide_category.md +++ b/xml_converter/doc/trigger/hide_category.md @@ -4,6 +4,7 @@ type: Custom class: MarkerCategory applies_to: [Icon] xml_fields: [Hide] +exclude_from_protobuf: True protobuf_field: trigger.action_hide_category --- Hide the specified category when triggered. diff --git a/xml_converter/doc/trigger/info_message.md b/xml_converter/doc/trigger/info_message.md index 907b48a3..1d7c666a 100644 --- a/xml_converter/doc/trigger/info_message.md +++ b/xml_converter/doc/trigger/info_message.md @@ -3,6 +3,7 @@ name: Info Message type: String applies_to: [Icon] xml_fields: [Info] +exclude_from_protobuf: True protobuf_field: trigger.action_info_message --- Show a message to the user when triggered diff --git a/xml_converter/doc/trigger/invert_visibility.md b/xml_converter/doc/trigger/invert_visibility.md index 55d93918..7f7fd1fc 100644 --- a/xml_converter/doc/trigger/invert_visibility.md +++ b/xml_converter/doc/trigger/invert_visibility.md @@ -3,6 +3,7 @@ name: Invert Visibility type: Boolean applies_to: [Icon] xml_fields: [InvertBehavior] +exclude_from_protobuf: True protobuf_field: trigger.invert_display --- Inverts the hide show behavior so that it is shown when it is supposed to be hidden and hidden when it is supposed to be shown. diff --git a/xml_converter/doc/trigger/reset_behavior.md b/xml_converter/doc/trigger/reset_behavior.md index 92086a87..f1807603 100644 --- a/xml_converter/doc/trigger/reset_behavior.md +++ b/xml_converter/doc/trigger/reset_behavior.md @@ -3,6 +3,7 @@ name: Reset Behavior type: Enum applies_to: [Icon] xml_fields: [Behavior] +exclude_from_protobuf: True protobuf_field: trigger.reset_behavior values: always_visible: ["0", "always_visible"] diff --git a/xml_converter/doc/trigger/reset_length.md b/xml_converter/doc/trigger/reset_length.md index ddfb4c0f..7418ffd3 100644 --- a/xml_converter/doc/trigger/reset_length.md +++ b/xml_converter/doc/trigger/reset_length.md @@ -3,6 +3,7 @@ name: Reset Length type: Float32 applies_to: [Icon] xml_fields: [ResetLength] +exclude_from_protobuf: True protobuf_field: trigger.reset_length --- When using behavior 4 (reappear after timer) this value defines, in seconds, the duration until the marker is reset after being activated. diff --git a/xml_converter/doc/trigger/show_category.md b/xml_converter/doc/trigger/show_category.md index e710344c..fee1127c 100644 --- a/xml_converter/doc/trigger/show_category.md +++ b/xml_converter/doc/trigger/show_category.md @@ -4,6 +4,7 @@ type: Custom class: MarkerCategory applies_to: [Icon] xml_fields: [Show] +exclude_from_protobuf: True protobuf_field: trigger.action_show_category --- Show the specified category when triggered. diff --git a/xml_converter/doc/trigger/toggle_category.md b/xml_converter/doc/trigger/toggle_category.md index 16161ba8..f4c6528f 100644 --- a/xml_converter/doc/trigger/toggle_category.md +++ b/xml_converter/doc/trigger/toggle_category.md @@ -4,6 +4,7 @@ type: Custom class: MarkerCategory applies_to: [Icon] xml_fields: [Toggle, ToggleCategory] +exclude_from_protobuf: True protobuf_field: trigger.action_toggle_category --- Show if hidden or Hide if shown the specified category when triggered. diff --git a/xml_converter/doc/trigger/trigger_range.md b/xml_converter/doc/trigger/trigger_range.md index b002f936..42ec87e3 100644 --- a/xml_converter/doc/trigger/trigger_range.md +++ b/xml_converter/doc/trigger/trigger_range.md @@ -4,7 +4,8 @@ type: Float32 applies_to: [Icon] xml_fields: [TriggerRange, InfoRange] #151 This field should be set to 0 in the protobuf when equal to the default value -protobuf_field: null #trigger.range +exclude_from_protobuf: True +protobuf_field: trigger.range --- Used to indicate a trigger range. This attribute is used by multiple other attributes to define a distance from the marker in which those attributes will activate their functionality or behavior. diff --git a/xml_converter/generators/cpp_templates/attribute_template.hpp b/xml_converter/generators/cpp_templates/attribute_template.hpp index 39f5e78c..90c47475 100644 --- a/xml_converter/generators/cpp_templates/attribute_template.hpp +++ b/xml_converter/generators/cpp_templates/attribute_template.hpp @@ -46,21 +46,23 @@ std::string {{attribute_name}}_to_xml_attribute( const std::string& attribute_name, XMLWriterState* state, const {{class_name}}* value); +{% if exclude_from_protobuf == false %} -void proto_to_{{attribute_name}}( - {{proto_field_cpp_type}} input, - ProtoReaderState* state, - {{class_name}}* value, - bool* is_set); + void proto_to_{{attribute_name}}( + {{proto_field_cpp_type}} input, + ProtoReaderState* state, + {{class_name}}* value, + bool* is_set); -{% if type == "Enum" %} - void {{attribute_name}}_to_proto( - {{class_name}} value, - ProtoWriterState* state, - std::function setter); -{% else %} - void {{attribute_name}}_to_proto( - {{class_name}} value, - ProtoWriterState* state, - std::function setter); + {% if type == "Enum" %} + void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter); + {% else %} + void {{attribute_name}}_to_proto( + {{class_name}} value, + ProtoWriterState* state, + std::function setter); + {% endif %} {% endif %} \ No newline at end of file diff --git a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp index 9d928085..82a0dc67 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_compoundvalue.cpp @@ -51,6 +51,7 @@ void xml_attribute_to_{{attribute_name}}( return " " + attribute_name + "=\"" + output + "\""; } {% endif %} +{% if exclude_from_protobuf == false %} void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, @@ -79,3 +80,4 @@ void {{attribute_name}}_to_proto( {% endfor %} setter(proto_{{attribute_name}}); } +{% endif %} diff --git a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp index 240b8559..4034b57e 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_enum.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_enum.cpp @@ -60,6 +60,7 @@ string {{attribute_name}}_to_xml_attribute( return " " + attribute_name + "=\"" + "{{class_name}}::{{attribute_components[0].xml_fields[0]}}" + "\""; } } +{% if exclude_from_protobuf == false %} void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, @@ -95,3 +96,4 @@ void {{attribute_name}}_to_proto( break; } } +{% endif %} diff --git a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp index 7663dcb7..3212e6cc 100644 --- a/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp +++ b/xml_converter/generators/cpp_templates/attribute_template_multiflagvalue.cpp @@ -62,6 +62,7 @@ string {{attribute_name}}_to_xml_attribute( string output = join(flag_values, ","); return " " + attribute_name + "=\"" + output + "\""; } +{% if exclude_from_protobuf == false %} void proto_to_{{attribute_name}}( {{proto_field_cpp_type}} input, @@ -90,3 +91,4 @@ void {{attribute_name}}_to_proto( setter(proto_{{attribute_name}}); } } +{% endif %} diff --git a/xml_converter/generators/cpp_templates/class_template.cpp b/xml_converter/generators/cpp_templates/class_template.cpp index b19c20b9..c015168c 100644 --- a/xml_converter/generators/cpp_templates/class_template.cpp +++ b/xml_converter/generators/cpp_templates/class_template.cpp @@ -100,10 +100,18 @@ vector {{cpp_class}}::as_xml(XMLWriterState* state) const { return xml_node_contents; } +// The following attributes are not yet supported in Burrito +// and are not written to or read from the protobuf file: +{% for attribute_variable in attribute_variables %} + {% if attribute_variable.exclude_from_protobuf == true %} +// {{attribute_variable.attribute_name}} + {% endif %} +{% endfor %} + guildpoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) const { guildpoint::{{cpp_class}} proto_{{cpp_class_header}}; {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} + {% if attribute_variable.is_component == false and attribute_variable.proto_info != None and attribute_variable.exclude_from_protobuf == false %} if (this->{{attribute_variable.attribute_flag_name}}) { {% if not attribute_variable.proto_info.is_proto_field_scalar %} std::function setter = [&proto_{{cpp_class_header}}]({{attribute_variable.proto_info.protobuf_cpp_type}}* val) { proto_{{cpp_class_header}}.{{attribute_variable.proto_info.mutable_proto_drilldown_calls}}set_allocated_{{attribute_variable.proto_info.protobuf_field}}(val); }; @@ -119,7 +127,7 @@ guildpoint::{{cpp_class}} {{cpp_class}}::as_protobuf(ProtoWriterState* state) co void {{cpp_class}}::parse_protobuf(guildpoint::{{cpp_class}} proto_{{cpp_class_header}}, ProtoReaderState* state) { {% for attribute_variable in attribute_variables %} - {% if attribute_variable.is_component == false and attribute_variable.proto_info != None %} + {% if attribute_variable.is_component == false and attribute_variable.proto_info != None and attribute_variable.exclude_from_protobuf == false %} {% if not attribute_variable.proto_info.is_proto_field_scalar %} if (proto_{{cpp_class_header}}{{attribute_variable.proto_info.proto_drilldown_calls}}.has_{{attribute_variable.proto_info.protobuf_field}}()) { {% elif attribute_variable.proto_info.protobuf_cpp_type == "std::string" %} diff --git a/xml_converter/generators/generate_cpp.py b/xml_converter/generators/generate_cpp.py index b23ddc53..33c33c84 100644 --- a/xml_converter/generators/generate_cpp.py +++ b/xml_converter/generators/generate_cpp.py @@ -101,6 +101,7 @@ class AttributeVariable: attribute_flag_name: Optional[str] = "" is_component: bool = False + exclude_from_protobuf: bool = False @dataclass @@ -109,6 +110,7 @@ class AttributeComponent: cpp_type: str protobuf_field: Optional[str] xml_fields: List[str] + exclude_from_protobuf: bool = False ################################################################################ @@ -350,6 +352,7 @@ def generate_cpp_variable_data( class_name=component_class_name, attribute_flag_name=attribute_name + "_is_set", is_component=True, + exclude_from_protobuf=fieldval.exclude_from_protobuf, proto_info=AttributeVariableProtoInfo( protobuf_field=component.protobuf_field, @@ -359,7 +362,7 @@ def generate_cpp_variable_data( serialize_proto_side_effects=[], deserialize_proto_function="from_proto_" + component_class_name, deserialize_proto_side_effects=[], - ) if fieldval.protobuf_field is not None and component.protobuf_field is not None else None, + ) if fieldval.protobuf_field is not None and component.protobuf_field is not None and fieldval.exclude_from_protobuf is not True else None, xml_info=AttributeVariableXMLInfo( xml_fields=component_xml_fields, @@ -425,7 +428,7 @@ def generate_cpp_variable_data( deserialize_proto_function = fieldval.custom_functions.read_proto proto_info: Optional[AttributeVariableProtoInfo] = None - if fieldval.protobuf_field is not None: + if fieldval.protobuf_field is not None and fieldval.exclude_from_protobuf is not True: proto_drilldown_calls: str mutable_proto_drilldown_calls: str protobuf_field: str @@ -451,6 +454,7 @@ def generate_cpp_variable_data( attribute_flag_name=attribute_name + "_is_set", proto_info=proto_info, + exclude_from_protobuf=fieldval.exclude_from_protobuf, xml_info=AttributeVariableXMLInfo( xml_fields=xml_fields, @@ -512,15 +516,16 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st proto_field_type: str = "" proto_field_prototype: Optional[str] = None for marker_type in attribute_data.applies_to_as_str(): - new_type = get_proto_field_cpp_type(marker_type, attribute_data.protobuf_field) - if proto_field_type != "" and proto_field_type != new_type: - print("Proto Field type differes between different marker types for ", attribute_data.protobuf_field) - proto_field_type = new_type + if attribute_data.exclude_from_protobuf is False: + new_type = get_proto_field_cpp_type(marker_type, attribute_data.protobuf_field) + if proto_field_type != "" and proto_field_type != new_type: + print("Proto Field type differes between different marker types for ", attribute_data.protobuf_field) + proto_field_type = new_type - new_prototype = get_proto_field_cpp_prototype(marker_type, attribute_data.protobuf_field) - if proto_field_prototype is not None and proto_field_prototype != new_prototype: - print("Proto Field prototype differes between different marker types for ", attribute_data.protobuf_field) - proto_field_prototype = new_prototype + new_prototype = get_proto_field_cpp_prototype(marker_type, attribute_data.protobuf_field) + if proto_field_prototype is not None and proto_field_prototype != new_prototype: + print("Proto Field prototype differes between different marker types for ", attribute_data.protobuf_field) + proto_field_prototype = new_prototype protobuf_field: str _, _, protobuf_field = split_field_into_drilldown(attribute_data.protobuf_field) @@ -584,6 +589,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st type=attribute_data.variable_type, proto_field_cpp_type=proto_field_type, proto_field_cpp_type_prototype=proto_field_prototype, + exclude_from_protobuf=attribute_data.exclude_from_protobuf, ) ) files_written.append(hpp_filepath) @@ -600,6 +606,7 @@ def write_attribute(output_directory: str, data: Dict[str, Document]) -> List[st xml_bundled_components=xml_bundled_components, proto_field_cpp_type=proto_field_type, proto_field_cpp_type_prototype=proto_field_prototype, + exclude_from_protobuf=attribute_data.exclude_from_protobuf, ) ) files_written.append(cpp_filepath) diff --git a/xml_converter/generators/main.py b/xml_converter/generators/main.py index 4ff3435d..88956a58 100644 --- a/xml_converter/generators/main.py +++ b/xml_converter/generators/main.py @@ -241,7 +241,7 @@ def generate_auto_docs(self, metadata: Dict[str, MetadataType], content: Dict[st proto_field_type: str proto_field_name: str - if fieldval.protobuf_field is not None: + if fieldval.protobuf_field is not None and fieldval.exclude_from_protobuf is False: proto_field_name = fieldval.protobuf_field proto_field_type = "" for marker_type in fieldval.applies_to_as_str(): diff --git a/xml_converter/generators/metadata.py b/xml_converter/generators/metadata.py index c2910a26..94c517cd 100644 --- a/xml_converter/generators/metadata.py +++ b/xml_converter/generators/metadata.py @@ -61,6 +61,7 @@ def applies_to_as_str(self) -> List[str]: class OptionalBaseMetadata: custom_functions: CustomFunctions = CustomFunctions() examples: List[str] = field(default_factory=list) + exclude_from_protobuf: bool = field(default=False) ################################################################################ diff --git a/xml_converter/integration_tests/run_tests.py b/xml_converter/integration_tests/run_tests.py index 4d99b9df..052568f6 100755 --- a/xml_converter/integration_tests/run_tests.py +++ b/xml_converter/integration_tests/run_tests.py @@ -163,17 +163,24 @@ def main() -> bool: if not re.match(args.filter, testcase.name): continue - xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) - proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) + output_xml_paths: Optional[List[str]] = None + output_proto_paths: Optional[List[str]] = None - os.makedirs(xml_output_dir_path, exist_ok=True) - os.makedirs(proto_output_dir_path, exist_ok=True) + if testcase.expected_output_xml_path: + xml_output_dir_path = os.path.join(output_parent_dirpath, "xml", testcase.name) + os.makedirs(xml_output_dir_path, exist_ok=True) + output_xml_paths = [xml_output_dir_path] + + if testcase.expected_output_proto_path: + proto_output_dir_path = os.path.join(output_parent_dirpath, "proto", testcase.name) + os.makedirs(proto_output_dir_path, exist_ok=True) + output_proto_paths = [proto_output_dir_path] rawstdout, rawstderr, returncode = run_xml_converter( input_xml=testcase.xml_input_paths, input_proto=testcase.proto_input_paths, - output_xml=[xml_output_dir_path], - output_proto=[proto_output_dir_path], + output_xml=output_xml_paths if output_xml_paths else None, + output_proto=output_proto_paths if output_proto_paths else None, ) # Sanitize and denoise the lines @@ -206,8 +213,10 @@ def main() -> bool: if testcase.expected_returncode is not None and testcase.expected_returncode != returncode: print(f"Expected a return code of {testcase.expected_returncode} for {testcase.name} but got {returncode}") - testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path) - testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path) + if testcase.expected_output_xml_path != "": + testcase_passed &= diff_dirs(xml_output_dir_path, testcase.expected_output_xml_path) + if testcase.expected_output_proto_path != "": + testcase_passed &= diff_dirs(proto_output_dir_path, testcase.expected_output_proto_path) if testcase_passed: print(f"Success: test {testcase.name}") diff --git a/xml_converter/integration_tests/src/testcase_loader.py b/xml_converter/integration_tests/src/testcase_loader.py index aa85b442..04628d20 100644 --- a/xml_converter/integration_tests/src/testcase_loader.py +++ b/xml_converter/integration_tests/src/testcase_loader.py @@ -104,12 +104,25 @@ def load_testcase(path: str) -> Optional[Testcase]: print(f"Invalid Test, expecting string value for 'expected_returncode' in {path}") return None + expected_output_xml_path: str = os.path.join(path, "output_xml") + expected_output_proto_path: str = os.path.join(path, "output_proto") + + if "exclude_output" in data: + for pack_type in data["exclude_output"]: + if pack_type == "xml": + expected_output_xml_path = "" + if pack_type == "proto": + expected_output_proto_path = "" + else: + print(f"Invalid pack type {pack_type} found in exclude_output in {test_info_path}") + return None + return Testcase( name=os.path.basename(path), xml_input_paths=xml_input_paths, proto_input_paths=proto_input_paths, - expected_output_xml_path=os.path.join(path, "output_xml"), - expected_output_proto_path=os.path.join(path, "output_proto"), + expected_output_xml_path=expected_output_xml_path, + expected_output_proto_path=expected_output_proto_path, expected_stdout=to_lines(data["expected_stdout"]), expected_stderr=to_lines(data["expected_stderr"]), expected_returncode=data["expected_returncode"] diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin deleted file mode 100644 index 3f954555..00000000 --- a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/input/pack/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -q - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin deleted file mode 100644 index 3f954555..00000000 --- a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_proto/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -q - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml deleted file mode 100644 index 652c2abc..00000000 --- a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/output_xml/xml_file.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin deleted file mode 100644 index d46368ee..00000000 --- a/xml_converter/integration_tests/test_cases/proto_hide_category/input/pack/markers.bin +++ /dev/null @@ -1,9 +0,0 @@ - -. - My Category 2B \Ï)Cf¦RC{ÔWC0B(èÌ“^– -. - My Category 2 2B \Ï)Cf¦RC{ÔWCB(íià4 1b -0 - My Category 3 2B \Ï)Cf¦RC{ÔWC0B(íià5 1b -. - My Category 4 2B \Ï)Cf¦RC{ÔWCB(íià6 1b \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin deleted file mode 100644 index d46368ee..00000000 --- a/xml_converter/integration_tests/test_cases/proto_hide_category/output_proto/markers.bin +++ /dev/null @@ -1,9 +0,0 @@ - -. - My Category 2B \Ï)Cf¦RC{ÔWC0B(èÌ“^– -. - My Category 2 2B \Ï)Cf¦RC{ÔWCB(íià4 1b -0 - My Category 3 2B \Ï)Cf¦RC{ÔWC0B(íià5 1b -. - My Category 4 2B \Ï)Cf¦RC{ÔWCB(íià6 1b \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml deleted file mode 100644 index 0bc237c6..00000000 --- a/xml_converter/integration_tests/test_cases/proto_hide_category/output_xml/xml_file.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_proto/markers.bin deleted file mode 100644 index b2fe80f1..00000000 --- a/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/output_proto/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -e - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCˆ 2B \Ï)Cf¦RC{ÔWCˆÿÿÿÿ"ˆB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml index 9510c793..f7244e86 100644 --- a/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_achievement_bit_index_valid/testcase.yaml @@ -3,3 +3,5 @@ input_paths: expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_achievement_id/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_achievement_id/output_proto/markers.bin deleted file mode 100644 index aadb6812..00000000 --- a/xml_converter/integration_tests/test_cases/xml_achievement_id/output_proto/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -¿ - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC€ 2B \Ï)Cf¦RC{ÔWC€ 2B \Ï)Cf¦RC{ÔWC€ÿÿÿÿ 2B \Ï)Cf¦RC{ÔWC€€€€€øÿÿÿÿ 2B \Ï)Cf¦RC{ÔWC€ûÿÿÿÿÿÿÿÿ"€B(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml index 9510c793..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_achievement_id/testcase.yaml @@ -3,3 +3,5 @@ input_paths: expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/trail.trl b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/trail.trl new file mode 100644 index 00000000..201ab83c Binary files /dev/null and b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/trail.trl differ diff --git a/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/xml_file.xml new file mode 100644 index 00000000..92ebf53c --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_animation_speed/input/pack/xml_file.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/037aa160e392f1c8.trl b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/037aa160e392f1c8.trl new file mode 100644 index 00000000..201ab83c Binary files /dev/null and b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/037aa160e392f1c8.trl differ diff --git a/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/xml_file.xml new file mode 100644 index 00000000..ff5aa933 --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_animation_speed/output_xml/xml_file.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_animation_speed/testcase.yaml similarity index 60% rename from xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_animation_speed/testcase.yaml index d87f4066..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/proto_hide_category/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_animation_speed/testcase.yaml @@ -1,5 +1,7 @@ input_paths: - "pack": "proto" + "pack": "xml" expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/integration_tests/test_cases/xml_canfade_valid/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_canfade_valid/output_proto/markers.bin deleted file mode 100644 index a900d117..00000000 --- a/xml_converter/integration_tests/test_cases/xml_canfade_valid/output_proto/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -q - My Category 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC˜ 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml index 9510c793..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_canfade_valid/testcase.yaml @@ -3,3 +3,5 @@ input_paths: expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml index 9510c793..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_default_toggle/testcase.yaml @@ -3,3 +3,5 @@ input_paths: expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/integration_tests/test_cases/xml_fade_distance/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_fade_distance/input/pack/xml_file.xml new file mode 100644 index 00000000..c6a9611a --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_fade_distance/input/pack/xml_file.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/xml_fade_distance/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_fade_distance/output_xml/xml_file.xml new file mode 100644 index 00000000..0c97ca2c --- /dev/null +++ b/xml_converter/integration_tests/test_cases/xml_fade_distance/output_xml/xml_file.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_fade_distance/testcase.yaml similarity index 60% rename from xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml rename to xml_converter/integration_tests/test_cases/xml_fade_distance/testcase.yaml index d87f4066..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/proto_constant_size_on_map/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_fade_distance/testcase.yaml @@ -1,5 +1,7 @@ input_paths: - "pack": "proto" + "pack": "xml" expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin deleted file mode 100644 index 3f954555..00000000 --- a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/output_proto/markers.bin +++ /dev/null @@ -1,3 +0,0 @@ - -q - My Category 2B \Ï)Cf¦RC{ÔWC 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWC¸ 2B \Ï)Cf¦RC{ÔWCB(èÌ“^– \ No newline at end of file diff --git a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml index 9510c793..734b3928 100644 --- a/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml +++ b/xml_converter/integration_tests/test_cases/xml_scale_on_map_with_zoom/testcase.yaml @@ -3,3 +3,5 @@ input_paths: expected_stdout: | expected_stderr: | expected_returncode: 0 +exclude_output: + - "proto" diff --git a/xml_converter/proto/guildpoint.proto b/xml_converter/proto/guildpoint.proto index 58a0959b..6b146b0a 100644 --- a/xml_converter/proto/guildpoint.proto +++ b/xml_converter/proto/guildpoint.proto @@ -21,8 +21,8 @@ message Category { repeated Icon icon = 3; repeated Trail trail = 4; bool is_separator = 5; - bool is_hidden = 6; - string tip_description = 7; + // bool is_hidden = 6; + // string tip_description = 7; bytes id = 8; } @@ -32,21 +32,21 @@ message Icon { int32 map_id = 4; // float distance_fade_end = 5; // float distance_fade_start = 6; - // float height_offset= 7; + // float height_offset= 7; Double check how this is used Position position = 8; - Trigger trigger = 9; + // Trigger trigger = 9; EulerRotation euler_rotation = 10; - int32 achievement_id = 16; - int32 achievement_bit_index = 17; + //int32 achievement_id = 16; + //int32 achievement_bit_index = 17; - bool disable_player_cutout = 19; - // int32 minimum_size_on_screen = 20; - // int32 map_display_size = 21; - // int32 maximum_size_on_screen = 22; - bool constant_size_on_map = 23; - string tip_description = 24; - string tip_name = 25; + //bool disable_player_cutout = 19; + //int32 minimum_size_on_screen = 20; + //int32 map_display_size = 21; + //int32 maximum_size_on_screen = 22; + //bool constant_size_on_map = 23; + //string tip_description = 24; + //string tip_name = 25; fixed32 rgba_color = 26; FestivalFilter festival_filter = 27; MapTypeFilter map_type_filter = 28; @@ -59,25 +59,25 @@ message Icon { bool is_hidden_on_map = 35; bool is_hidden_on_minimap = 36; - // float tentative__scale = 2048; - string bhdraft__schedule = 2052; - float bhdraft__schedule_duration = 2053; + //float tentative__scale = 2048; + //string bhdraft__schedule = 2052; + //float bhdraft__schedule_duration = 2053; } message Trail { uint32 texture_id = 2; bytes guid = 3; int32 map_id = 4; - // float distance_fade_end = 5; - // float distance_fade_start = 6; + //float distance_fade_end = 5; + //float distance_fade_start = 6; TrailData trail_data = 7; - // float animation_speed = 8; + //float animation_speed = 8; - int32 achievement_id = 16; - int32 achievement_bit_index = 17; - bool disable_player_cutout = 19; + //int32 achievement_id = 16; + //int32 achievement_bit_index = 17; + //bool disable_player_cutout = 19; bool is_wall = 20; - // float scale = 21; + //float scale = 21; fixed32 rgba_color = 22; FestivalFilter festival_filter = 23; MapTypeFilter map_type_filter = 24; @@ -85,14 +85,14 @@ message Trail { ProfessionFilter profession_filter = 26; SpecializationFilter specialization_filter = 27; SpeciesFilter species_filter = 28; - // int32 map_display_size = 29; + //int32 map_display_size = 29; CullChirality cull_chirality = 30; bool is_hidden_ingame = 31; bool is_hidden_on_map = 32; bool is_hidden_on_minimap = 33; - string bhdraft__schedule = 2052; - float bhdraft__schedule_duration = 2053; + //string bhdraft__schedule = 2052; + //float bhdraft__schedule_duration = 2053; } message Position { @@ -107,23 +107,23 @@ message EulerRotation { float z = 3; } -message Trigger { - bool auto_trigger = 1; - float bounce_delay = 2; - float bounce_duration = 3; - float bounce_height = 4; - string action_copy_clipboard = 5; - string action_copy_message = 6; - bool has_countdown = 7; - string action_info_message = 8; - bool invert_display = 9; - float reset_length = 10; - // float range = 11; - Category action_hide_category = 12; - Category action_show_category = 13; - Category action_toggle_category = 14; - ResetBehavior reset_behavior = 15; -} +// message Trigger { +// bool auto_trigger = 1; +// float bounce_delay = 2; +// float bounce_duration = 3; +// float bounce_height = 4; +// string action_copy_clipboard = 5; +// string action_copy_message = 6; +// bool has_countdown = 7; +// string action_info_message = 8; +// bool invert_display = 9; +// float reset_length = 10; +// float range = 11; +// Category action_hide_category = 12; +// Category action_show_category = 13; +// Category action_toggle_category = 14; +// ResetBehavior reset_behavior = 15; +// } enum CullChirality { none = 0; @@ -131,17 +131,17 @@ enum CullChirality { counter_clockwise = 2; } -enum ResetBehavior { - always_visible = 0; - map_change = 1; - daily_reset = 2; - never = 3; - timer = 4; - map_reset = 5; - instance_change = 6; - daily_reset_per_character = 7; - weekly_reset = 8; -} +// enum ResetBehavior { +// always_visible = 0; +// map_change = 1; +// daily_reset = 2; +// never = 3; +// timer = 4; +// map_reset = 5; +// instance_change = 6; +// daily_reset_per_character = 7; +// weekly_reset = 8; +// } message FestivalFilter { bool dragonbash = 1; diff --git a/xml_converter/src/attribute/reset_behavior_gen.cpp b/xml_converter/src/attribute/reset_behavior_gen.cpp index af3b16b5..34482217 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.cpp +++ b/xml_converter/src/attribute/reset_behavior_gen.cpp @@ -144,90 +144,3 @@ string reset_behavior_to_xml_attribute( return " " + attribute_name + "=\"" + "ResetBehavior::0" + "\""; } } - -void proto_to_reset_behavior( - guildpoint::ResetBehavior input, - ProtoReaderState*, - ResetBehavior* value, - bool* is_set) { - switch (input) { - case guildpoint::ResetBehavior::always_visible: - *value = ResetBehavior::always_visible; - *is_set = true; - break; - case guildpoint::ResetBehavior::map_change: - *value = ResetBehavior::map_change; - *is_set = true; - break; - case guildpoint::ResetBehavior::daily_reset: - *value = ResetBehavior::daily_reset; - *is_set = true; - break; - case guildpoint::ResetBehavior::never: - *value = ResetBehavior::never; - *is_set = true; - break; - case guildpoint::ResetBehavior::timer: - *value = ResetBehavior::timer; - *is_set = true; - break; - case guildpoint::ResetBehavior::map_reset: - *value = ResetBehavior::map_reset; - *is_set = true; - break; - case guildpoint::ResetBehavior::instance_change: - *value = ResetBehavior::instance_change; - *is_set = true; - break; - case guildpoint::ResetBehavior::daily_reset_per_character: - *value = ResetBehavior::daily_reset_per_character; - *is_set = true; - break; - case guildpoint::ResetBehavior::weekly_reset: - *value = ResetBehavior::weekly_reset; - *is_set = true; - break; - default: - *value = ResetBehavior::always_visible; - *is_set = true; - break; - } -} - -void reset_behavior_to_proto( - ResetBehavior value, - ProtoWriterState*, - std::function setter) { - switch (value) { - case ResetBehavior::always_visible: - setter(guildpoint::ResetBehavior::always_visible); - break; - case ResetBehavior::map_change: - setter(guildpoint::ResetBehavior::map_change); - break; - case ResetBehavior::daily_reset: - setter(guildpoint::ResetBehavior::daily_reset); - break; - case ResetBehavior::never: - setter(guildpoint::ResetBehavior::never); - break; - case ResetBehavior::timer: - setter(guildpoint::ResetBehavior::timer); - break; - case ResetBehavior::map_reset: - setter(guildpoint::ResetBehavior::map_reset); - break; - case ResetBehavior::instance_change: - setter(guildpoint::ResetBehavior::instance_change); - break; - case ResetBehavior::daily_reset_per_character: - setter(guildpoint::ResetBehavior::daily_reset_per_character); - break; - case ResetBehavior::weekly_reset: - setter(guildpoint::ResetBehavior::weekly_reset); - break; - default: - setter(guildpoint::ResetBehavior::always_visible); - break; - } -} diff --git a/xml_converter/src/attribute/reset_behavior_gen.hpp b/xml_converter/src/attribute/reset_behavior_gen.hpp index 2110082b..364a25f8 100644 --- a/xml_converter/src/attribute/reset_behavior_gen.hpp +++ b/xml_converter/src/attribute/reset_behavior_gen.hpp @@ -35,14 +35,3 @@ std::string reset_behavior_to_xml_attribute( const std::string& attribute_name, XMLWriterState* state, const ResetBehavior* value); - -void proto_to_reset_behavior( - guildpoint::ResetBehavior input, - ProtoReaderState* state, - ResetBehavior* value, - bool* is_set); - -void reset_behavior_to_proto( - ResetBehavior value, - ProtoWriterState* state, - std::function setter); diff --git a/xml_converter/src/category_gen.cpp b/xml_converter/src/category_gen.cpp index f53f21d6..5df45426 100644 --- a/xml_converter/src/category_gen.cpp +++ b/xml_converter/src/category_gen.cpp @@ -111,16 +111,17 @@ vector Category::as_xml(XMLWriterState* state) const { return xml_node_contents; } +// The following attributes are not yet supported in Burrito +// and are not written to or read from the protobuf file: +// is_hidden +// tooltip_description + guildpoint::Category Category::as_protobuf(ProtoWriterState* state) const { guildpoint::Category proto_category; if (this->display_name_is_set) { std::function setter = [&proto_category](std::string val) { proto_category.set_name(val); }; display_name_and_name_to_proto_display_name(this->display_name, state, setter, &(this->name), &(this->name_is_set)); } - if (this->is_hidden_is_set) { - std::function setter = [&proto_category](bool val) { proto_category.set_is_hidden(val); }; - bool_to_proto(this->is_hidden, state, setter); - } if (this->is_separator_is_set) { std::function setter = [&proto_category](bool val) { proto_category.set_is_separator(val); }; bool_to_proto(this->is_separator, state, setter); @@ -129,10 +130,6 @@ guildpoint::Category Category::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_category](std::string val) { proto_category.set_id(val); }; unique_id_to_proto(this->menu_id, state, setter); } - if (this->tooltip_description_is_set) { - std::function setter = [&proto_category](std::string val) { proto_category.set_tip_description(val); }; - string_to_proto(this->tooltip_description, state, setter); - } return proto_category; } @@ -140,16 +137,10 @@ void Category::parse_protobuf(guildpoint::Category proto_category, ProtoReaderSt if (proto_category.name() != "") { proto_display_name_to_display_name_and_name(proto_category.name(), state, &(this->display_name), &(this->display_name_is_set), &(this->name), &(this->name_is_set)); } - if (proto_category.is_hidden() != 0) { - proto_to_bool(proto_category.is_hidden(), state, &(this->is_hidden), &(this->is_hidden_is_set)); - } if (proto_category.is_separator() != 0) { proto_to_bool(proto_category.is_separator(), state, &(this->is_separator), &(this->is_separator_is_set)); } if (proto_category.id() != "") { proto_to_unique_id(proto_category.id(), state, &(this->menu_id), &(this->menu_id_is_set)); } - if (proto_category.tip_description() != "") { - proto_to_string(proto_category.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); - } } diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp index 9a91ac73..887fd49f 100644 --- a/xml_converter/src/icon_gen.cpp +++ b/xml_converter/src/icon_gen.cpp @@ -409,56 +409,49 @@ vector Icon::as_xml(XMLWriterState* state) const { return xml_node_contents; } +// The following attributes are not yet supported in Burrito +// and are not written to or read from the protobuf file: +// achievement_bit_index +// achievement_id +// auto_trigger +// bounce_delay +// bounce_duration +// bounce_height +// constant_size_on_map +// copy_clipboard +// copy_message +// disable_player_cutout +// distance_fade_end +// distance_fade_start +// has_countdown +// height_offset +// hide_category +// icon_size +// info_message +// invert_visibility +// map_display_size +// maximum_size_on_screen +// minimum_size_on_screen +// reset_behavior +// reset_length +// schedule +// schedule_duration +// show_category +// toggle_category +// tooltip_description +// tooltip_name +// trigger_range + guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { guildpoint::Icon proto_icon; - if (this->achievement_bit_index_is_set) { - std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_bit_index(val); }; - int_to_proto(this->achievement_bit_index, state, setter); - } - if (this->achievement_id_is_set) { - std::function setter = [&proto_icon](int val) { proto_icon.set_achievement_id(val); }; - int_to_proto(this->achievement_id, state, setter); - } - if (this->auto_trigger_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_auto_trigger(val); }; - bool_to_proto(this->auto_trigger, state, setter); - } - if (this->bounce_delay_is_set) { - std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_delay(val); }; - float_to_proto(this->bounce_delay, state, setter); - } - if (this->bounce_duration_is_set) { - std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_duration(val); }; - float_to_proto(this->bounce_duration, state, setter); - } - if (this->bounce_height_is_set) { - std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_bounce_height(val); }; - float_to_proto(this->bounce_height, state, setter); - } if (this->color_is_set) { std::function setter = [&proto_icon](uint32_t val) { proto_icon.set_rgba_color(val); }; color_to_proto(this->color, state, setter); } - if (this->constant_size_on_map_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_constant_size_on_map(val); }; - bool_to_proto(this->constant_size_on_map, state, setter); - } - if (this->copy_clipboard_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_clipboard(val); }; - string_to_proto(this->copy_clipboard, state, setter); - } - if (this->copy_message_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_copy_message(val); }; - string_to_proto(this->copy_message, state, setter); - } if (this->cull_chirality_is_set) { std::function setter = [&proto_icon](guildpoint::CullChirality val) { proto_icon.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } - if (this->disable_player_cutout_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, state, setter); - } if (this->euler_rotation_is_set) { std::function setter = [&proto_icon](guildpoint::EulerRotation* val) { proto_icon.set_allocated_euler_rotation(val); }; euler_rotation_to_proto(this->euler_rotation, state, setter); @@ -471,26 +464,10 @@ guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](std::string val) { proto_icon.set_guid(val); }; unique_id_to_proto(this->guid, state, setter); } - if (this->has_countdown_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_has_countdown(val); }; - bool_to_proto(this->has_countdown, state, setter); - } - if (this->hide_category_is_set) { - std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_hide_category(val); }; - marker_category_to_proto(this->hide_category, state, setter); - } if (this->icon_is_set) { std::function setter = [&proto_icon](unsigned int val) { proto_icon.set_texture_id(val); }; image_to_proto(this->icon, state, setter); } - if (this->info_message_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.mutable_trigger()->set_action_info_message(val); }; - string_to_proto(this->info_message, state, setter); - } - if (this->invert_visibility_is_set) { - std::function setter = [&proto_icon](bool val) { proto_icon.mutable_trigger()->set_invert_display(val); }; - bool_to_proto(this->invert_visibility, state, setter); - } if (this->map_id_is_set) { std::function setter = [&proto_icon](int val) { proto_icon.set_map_id(val); }; int_to_proto(this->map_id, state, setter); @@ -523,26 +500,6 @@ guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_on_minimap(val); }; bool_to_proto(this->render_on_minimap, state, setter); } - if (this->reset_behavior_is_set) { - std::function setter = [&proto_icon](guildpoint::ResetBehavior val) { proto_icon.mutable_trigger()->set_reset_behavior(val); }; - reset_behavior_to_proto(this->reset_behavior, state, setter); - } - if (this->reset_length_is_set) { - std::function setter = [&proto_icon](float val) { proto_icon.mutable_trigger()->set_reset_length(val); }; - float_to_proto(this->reset_length, state, setter); - } - if (this->schedule_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, state, setter); - } - if (this->schedule_duration_is_set) { - std::function setter = [&proto_icon](float val) { proto_icon.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, state, setter); - } - if (this->show_category_is_set) { - std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_show_category(val); }; - marker_category_to_proto(this->show_category, state, setter); - } if (this->specialization_filter_is_set) { std::function setter = [&proto_icon](guildpoint::SpecializationFilter* val) { proto_icon.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); @@ -551,58 +508,16 @@ guildpoint::Icon Icon::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_icon](guildpoint::SpeciesFilter* val) { proto_icon.set_allocated_species_filter(val); }; species_filter_to_proto(this->species_filter, state, setter); } - if (this->toggle_category_is_set) { - std::function setter = [&proto_icon](guildpoint::Category* val) { proto_icon.mutable_trigger()->set_allocated_action_toggle_category(val); }; - marker_category_to_proto(this->toggle_category, state, setter); - } - if (this->tooltip_description_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_description(val); }; - string_to_proto(this->tooltip_description, state, setter); - } - if (this->tooltip_name_is_set) { - std::function setter = [&proto_icon](std::string val) { proto_icon.set_tip_name(val); }; - string_to_proto(this->tooltip_name, state, setter); - } return proto_icon; } void Icon::parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state) { - if (proto_icon.achievement_bit_index() != 0) { - proto_to_int(proto_icon.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); - } - if (proto_icon.achievement_id() != 0) { - proto_to_int(proto_icon.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); - } - if (proto_icon.trigger().auto_trigger() != 0) { - proto_to_bool(proto_icon.trigger().auto_trigger(), state, &(this->auto_trigger), &(this->auto_trigger_is_set)); - } - if (proto_icon.trigger().bounce_delay() != 0) { - proto_to_float(proto_icon.trigger().bounce_delay(), state, &(this->bounce_delay), &(this->bounce_delay_is_set)); - } - if (proto_icon.trigger().bounce_duration() != 0) { - proto_to_float(proto_icon.trigger().bounce_duration(), state, &(this->bounce_duration), &(this->bounce_duration_is_set)); - } - if (proto_icon.trigger().bounce_height() != 0) { - proto_to_float(proto_icon.trigger().bounce_height(), state, &(this->bounce_height), &(this->bounce_height_is_set)); - } if (proto_icon.rgba_color() != 0) { proto_to_color(proto_icon.rgba_color(), state, &(this->color), &(this->color_is_set)); } - if (proto_icon.constant_size_on_map() != 0) { - proto_to_bool(proto_icon.constant_size_on_map(), state, &(this->constant_size_on_map), &(this->constant_size_on_map_is_set)); - } - if (proto_icon.trigger().action_copy_clipboard() != "") { - proto_to_string(proto_icon.trigger().action_copy_clipboard(), state, &(this->copy_clipboard), &(this->copy_clipboard_is_set)); - } - if (proto_icon.trigger().action_copy_message() != "") { - proto_to_string(proto_icon.trigger().action_copy_message(), state, &(this->copy_message), &(this->copy_message_is_set)); - } if (proto_icon.cull_chirality() != 0) { proto_to_cull_chirality(proto_icon.cull_chirality(), state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } - if (proto_icon.disable_player_cutout() != 0) { - proto_to_bool(proto_icon.disable_player_cutout(), state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); - } if (proto_icon.has_euler_rotation()) { proto_to_euler_rotation(proto_icon.euler_rotation(), state, &(this->euler_rotation), &(this->euler_rotation_is_set)); } @@ -612,21 +527,9 @@ void Icon::parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state) if (proto_icon.guid() != "") { proto_to_unique_id(proto_icon.guid(), state, &(this->guid), &(this->guid_is_set)); } - if (proto_icon.trigger().has_countdown() != 0) { - proto_to_bool(proto_icon.trigger().has_countdown(), state, &(this->has_countdown), &(this->has_countdown_is_set)); - } - if (proto_icon.trigger().has_action_hide_category()) { - proto_to_marker_category(proto_icon.trigger().action_hide_category(), state, &(this->hide_category), &(this->hide_category_is_set)); - } if (proto_icon.texture_id() != 0) { proto_to_image(proto_icon.texture_id(), state, &(this->icon), &(this->icon_is_set)); } - if (proto_icon.trigger().action_info_message() != "") { - proto_to_string(proto_icon.trigger().action_info_message(), state, &(this->info_message), &(this->info_message_is_set)); - } - if (proto_icon.trigger().invert_display() != 0) { - proto_to_bool(proto_icon.trigger().invert_display(), state, &(this->invert_visibility), &(this->invert_visibility_is_set)); - } if (proto_icon.map_id() != 0) { proto_to_int(proto_icon.map_id(), state, &(this->map_id), &(this->map_id_is_set)); } @@ -651,34 +554,10 @@ void Icon::parse_protobuf(guildpoint::Icon proto_icon, ProtoReaderState* state) if (proto_icon.is_hidden_on_minimap() != 0) { proto_to_bool(proto_icon.is_hidden_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } - if (proto_icon.trigger().reset_behavior() != 0) { - proto_to_reset_behavior(proto_icon.trigger().reset_behavior(), state, &(this->reset_behavior), &(this->reset_behavior_is_set)); - } - if (proto_icon.trigger().reset_length() != 0) { - proto_to_float(proto_icon.trigger().reset_length(), state, &(this->reset_length), &(this->reset_length_is_set)); - } - if (proto_icon.bhdraft__schedule() != "") { - proto_to_string(proto_icon.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); - } - if (proto_icon.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_icon.bhdraft__schedule_duration(), state, &(this->schedule_duration), &(this->schedule_duration_is_set)); - } - if (proto_icon.trigger().has_action_show_category()) { - proto_to_marker_category(proto_icon.trigger().action_show_category(), state, &(this->show_category), &(this->show_category_is_set)); - } if (proto_icon.has_specialization_filter()) { proto_to_specialization_filter(proto_icon.specialization_filter(), state, &(this->specialization_filter), &(this->specialization_filter_is_set)); } if (proto_icon.has_species_filter()) { proto_to_species_filter(proto_icon.species_filter(), state, &(this->species_filter), &(this->species_filter_is_set)); } - if (proto_icon.trigger().has_action_toggle_category()) { - proto_to_marker_category(proto_icon.trigger().action_toggle_category(), state, &(this->toggle_category), &(this->toggle_category_is_set)); - } - if (proto_icon.tip_description() != "") { - proto_to_string(proto_icon.tip_description(), state, &(this->tooltip_description), &(this->tooltip_description_is_set)); - } - if (proto_icon.tip_name() != "") { - proto_to_string(proto_icon.tip_name(), state, &(this->tooltip_name), &(this->tooltip_name_is_set)); - } } diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp index 6e074fe8..fe9c36a1 100644 --- a/xml_converter/src/trail_gen.cpp +++ b/xml_converter/src/trail_gen.cpp @@ -247,16 +247,21 @@ vector Trail::as_xml(XMLWriterState* state) const { return xml_node_contents; } +// The following attributes are not yet supported in Burrito +// and are not written to or read from the protobuf file: +// achievement_bit_index +// achievement_id +// animation_speed +// disable_player_cutout +// distance_fade_end +// distance_fade_start +// map_display_size +// schedule +// schedule_duration +// trail_scale + guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { guildpoint::Trail proto_trail; - if (this->achievement_bit_index_is_set) { - std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_bit_index(val); }; - int_to_proto(this->achievement_bit_index, state, setter); - } - if (this->achievement_id_is_set) { - std::function setter = [&proto_trail](int val) { proto_trail.set_achievement_id(val); }; - int_to_proto(this->achievement_id, state, setter); - } if (this->color_is_set) { std::function setter = [&proto_trail](uint32_t val) { proto_trail.set_rgba_color(val); }; color_to_proto(this->color, state, setter); @@ -265,10 +270,6 @@ guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_trail](guildpoint::CullChirality val) { proto_trail.set_cull_chirality(val); }; cull_chirality_to_proto(this->cull_chirality, state, setter); } - if (this->disable_player_cutout_is_set) { - std::function setter = [&proto_trail](bool val) { proto_trail.set_disable_player_cutout(val); }; - bool_to_proto(this->disable_player_cutout, state, setter); - } if (this->festival_filter_is_set) { std::function setter = [&proto_trail](guildpoint::FestivalFilter* val) { proto_trail.set_allocated_festival_filter(val); }; festival_filter_to_proto(this->festival_filter, state, setter); @@ -309,14 +310,6 @@ guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_on_minimap(val); }; bool_to_proto(this->render_on_minimap, state, setter); } - if (this->schedule_is_set) { - std::function setter = [&proto_trail](std::string val) { proto_trail.set_bhdraft__schedule(val); }; - string_to_proto(this->schedule, state, setter); - } - if (this->schedule_duration_is_set) { - std::function setter = [&proto_trail](float val) { proto_trail.set_bhdraft__schedule_duration(val); }; - float_to_proto(this->schedule_duration, state, setter); - } if (this->specialization_filter_is_set) { std::function setter = [&proto_trail](guildpoint::SpecializationFilter* val) { proto_trail.set_allocated_specialization_filter(val); }; specialization_filter_to_proto(this->specialization_filter, state, setter); @@ -337,21 +330,12 @@ guildpoint::Trail Trail::as_protobuf(ProtoWriterState* state) const { } void Trail::parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* state) { - if (proto_trail.achievement_bit_index() != 0) { - proto_to_int(proto_trail.achievement_bit_index(), state, &(this->achievement_bit_index), &(this->achievement_bit_index_is_set)); - } - if (proto_trail.achievement_id() != 0) { - proto_to_int(proto_trail.achievement_id(), state, &(this->achievement_id), &(this->achievement_id_is_set)); - } if (proto_trail.rgba_color() != 0) { proto_to_color(proto_trail.rgba_color(), state, &(this->color), &(this->color_is_set)); } if (proto_trail.cull_chirality() != 0) { proto_to_cull_chirality(proto_trail.cull_chirality(), state, &(this->cull_chirality), &(this->cull_chirality_is_set)); } - if (proto_trail.disable_player_cutout() != 0) { - proto_to_bool(proto_trail.disable_player_cutout(), state, &(this->disable_player_cutout), &(this->disable_player_cutout_is_set)); - } if (proto_trail.has_festival_filter()) { proto_to_festival_filter(proto_trail.festival_filter(), state, &(this->festival_filter), &(this->festival_filter_is_set)); } @@ -382,12 +366,6 @@ void Trail::parse_protobuf(guildpoint::Trail proto_trail, ProtoReaderState* stat if (proto_trail.is_hidden_on_minimap() != 0) { proto_to_bool(proto_trail.is_hidden_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set)); } - if (proto_trail.bhdraft__schedule() != "") { - proto_to_string(proto_trail.bhdraft__schedule(), state, &(this->schedule), &(this->schedule_is_set)); - } - if (proto_trail.bhdraft__schedule_duration() != 0) { - proto_to_float(proto_trail.bhdraft__schedule_duration(), state, &(this->schedule_duration), &(this->schedule_duration_is_set)); - } if (proto_trail.has_specialization_filter()) { proto_to_specialization_filter(proto_trail.specialization_filter(), state, &(this->specialization_filter), &(this->specialization_filter_is_set)); }