Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding Category ID #271

Merged
merged 3 commits into from
Feb 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions xml_converter/doc/menu/menu_id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Menu ID
type: Custom
class: UniqueId
xml_fields: [ID, MenuID]
applies_to: [Category]
protobuf_field: id
---

Notes
=====

A 128bit long Unique ID.

If the ID is not present when converting from XML, the ID is created as a hash of the category's "name" and the names of the categories parents.
1 change: 1 addition & 0 deletions xml_converter/generators/cpp_templates/class_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class {{cpp_class}} : public Parseable {
std::map<std::string, Category> children;
Icon default_icon;
Trail default_trail;
Category* parent;

void init_from_xml(rapidxml::xml_node<>* node, std::vector<XMLError*>* errors, XMLReaderState* state);
{% endif %}
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.824954339 +0000
+++ xml_converter/integration_tests/test_cases/achievement_bitmask_valid/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.832954349 +0000
@@ -47,4 +47,5 @@
   trail {
     achievement_bit: 5
   }
+  8: "(\350\314\006\302\223^\226"
 }

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.844954365 +0000
+++ xml_converter/integration_tests/test_cases/achievement_id/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.852954376 +0000
@@ -56,4 +56,5 @@
   trail {
     achievement_id: 5
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

µ
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ˆûÿÿÿÿÿÿÿÿ"ˆ
¿
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(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.864954392 +0000
+++ xml_converter/integration_tests/test_cases/animation_speed/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.868954397 +0000
@@ -178,4 +178,5 @@
     }
     animation_speed: -123.456
   }
+  8: "(\350\314\006\302\223^\226"
 }

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.880954413 +0000
+++ xml_converter/integration_tests/test_cases/canfade_invalid/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.888954424 +0000
@@ -16,4 +16,5 @@
       z: 215.83
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

7
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC
A
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.900954439 +0000
+++ xml_converter/integration_tests/test_cases/canfade_valid/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.908954450 +0000
@@ -34,4 +34,5 @@
       z: 215.83
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

g
My Category 2B\Ï)Cf¦RC{ÔWC˜ 2B\Ï)Cf¦RC{ÔWC˜ 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC
q
My Category 2B\Ï)Cf¦RC{ÔWC˜ 2B\Ï)Cf¦RC{ÔWC˜ 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.920954466 +0000
+++ xml_converter/integration_tests/test_cases/category_name/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.928954476 +0000
@@ -24,4 +24,5 @@
       z: 215.83
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

L
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC
V
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<OverlayData>
<MarkerCategory DisplayName="My Missing Category">
<MarkerCategory DisplayName="My Missing Category" ID="2QxOSlo91UE=">
</MarkerCategory>

<MarkerCategory DisplayName="My Empty Category" Name="">
<MarkerCategory DisplayName="My Empty Category" ID="2QxOSls91UE=" Name="">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.940954493 +0000
+++ xml_converter/integration_tests/test_cases/cull_chirality/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.948954503 +0000
@@ -26,4 +26,5 @@
     }
     cull_chirality: counter_clockwise
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

R
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCˆ 2B\Ï)Cf¦RC{ÔWCˆ
\
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCˆ 2B\Ï)Cf¦RC{ÔWCˆB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.960954519 +0000
+++ xml_converter/integration_tests/test_cases/fade_distance/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.964954524 +0000
@@ -83,4 +83,5 @@
   trail {
     distance_fade_end: 3.14
   }
+  8: "(\350\314\006\302\223^\226"
 }

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.976954540 +0000
+++ xml_converter/integration_tests/test_cases/festival_filter/output_proto/markers.bin.textproto._new	2024-01-23 07:51:44.984954551 +0000
@@ -46,4 +46,5 @@
       lunar_new_year: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

y
My Category 2B\Ï)Cf¦RC{ÔWCÚ 2B\Ï)Cf¦RC{ÔWCÚ( 2B\Ï)Cf¦RC{ÔWCÚ( 2B\Ï)Cf¦RC{ÔWCÚ 
ƒ
My Category 2B\Ï)Cf¦RC{ÔWCÚ 2B\Ï)Cf¦RC{ÔWCÚ( 2B\Ï)Cf¦RC{ÔWCÚ( 2B\Ï)Cf¦RC{ÔWCÚ B(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin.textproto._old	2024-01-23 07:51:44.996954567 +0000
+++ xml_converter/integration_tests/test_cases/is_wall/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.004954577 +0000
@@ -14,4 +14,5 @@
   trail {
     map_id: 50
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

#
My Category" 2 " 2 " 2" 2
-
My Category" 2 " 2 " 2" 2B(èÌ“^–
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.016954593 +0000
+++ xml_converter/integration_tests/test_cases/map_id/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.024954604 +0000
@@ -39,4 +39,5 @@
       z: 215.83
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

x
My CategoryB\Ï)Cf¦RC{ÔWC B\Ï)Cf¦RC{ÔWC B\Ï)Cf¦RC{ÔWC ÿÿÿÿB\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC
‚
My CategoryB\Ï)Cf¦RC{ÔWC B\Ï)Cf¦RC{ÔWC B\Ï)Cf¦RC{ÔWC ÿÿÿÿB\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.036954620 +0000
+++ xml_converter/integration_tests/test_cases/map_type_filter/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.044954631 +0000
@@ -81,4 +81,5 @@
       wvw_lounge_map: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

Ì
My Category 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâO 2B\Ï)Cf¦RC{ÔWCâ9 (08@HPX`hpx€ˆ˜ ¨°¸À
Ö
My Category 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâ 2B\Ï)Cf¦RC{ÔWCâO 2B\Ï)Cf¦RC{ÔWCâ9 (08@HPX`hpx€ˆ˜ ¨°¸ÀB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.056954646 +0000
+++ xml_converter/integration_tests/test_cases/mount_filter_invalid/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.064954657 +0000
@@ -40,4 +40,5 @@
       springer: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

o
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCê
y
My Category 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWC 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCêB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.072954668 +0000
+++ xml_converter/integration_tests/test_cases/mountfilter_valid/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.080954679 +0000
@@ -55,4 +55,5 @@
       seige_turtle: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@


My Category 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCê* 2B\Ï)Cf¦RC{ÔWCê (08@HP

My Category 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCê 2B\Ï)Cf¦RC{ÔWCê* 2B\Ï)Cf¦RC{ÔWCê (08@HPB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.092954694 +0000
+++ xml_converter/integration_tests/test_cases/profession_filter/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.100954705 +0000
@@ -66,4 +66,5 @@
       revenant: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

¥
My Category 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò( 2B\Ï)Cf¦RC{ÔWCò (08@H
¯
My Category 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò 2B\Ï)Cf¦RC{ÔWCò( 2B\Ï)Cf¦RC{ÔWCò (08@HB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.112954721 +0000
+++ xml_converter/integration_tests/test_cases/specialization_filter/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.120954731 +0000
@@ -166,4 +166,5 @@
       warrior_bladesworn: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

»
My Category 2B\Ï)Cf¦RC{ÔWCú` 2B\Ï)Cf¦RC{ÔWCúH 2B\Ï)Cf¦RC{ÔWCúX 2B\Ï)Cf¦RC{ÔWCú¨Øà 2B\Ï)Cf¦RC{ÔWCúÉ (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀX 2B\Ï)Cf¦RC{ÔWCúB (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØ
Å
My Category 2B\Ï)Cf¦RC{ÔWCú` 2B\Ï)Cf¦RC{ÔWCúH 2B\Ï)Cf¦RC{ÔWCúX 2B\Ï)Cf¦RC{ÔWCú¨Øà 2B\Ï)Cf¦RC{ÔWCúÉ (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀÈÐØàèðø€ˆ˜ ¨°¸ÀX 2B\Ï)Cf¦RC{ÔWCúB (08@HPX`hpx€ˆ˜ ¨°¸ÀÈÐØB(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.132954747 +0000
+++ xml_converter/integration_tests/test_cases/species_filter/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.140954758 +0000
@@ -124,4 +124,5 @@
       sylvari: true
     }
   }
+  8: "(\350\314\006\302\223^\226"
 }

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

­
·
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‚ 2B\Ï)Cf¦RC{ÔWC‚ 2B\Ï)Cf¦RC{ÔWC‚ 2B\Ï)Cf¦RC{ÔWC‚  2B\Ï)Cf¦RC{ÔWC‚
 (
 (B(èÌ“^–
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Full Diff
--- xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin.textproto._old	2024-01-23 07:51:45.152954773 +0000
+++ xml_converter/integration_tests/test_cases/texture/output_proto/markers.bin.textproto._new	2024-01-23 07:51:45.160954784 +0000
@@ -16,6 +16,7 @@
     texture_id: 1
     map_id: 50
   }
+  8: "(\350\314\006\302\223^\226"
 }
 textures {
 }

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<OverlayData>
<MarkerCategory DisplayName="My Category" Name="mycategory">
<MarkerCategory DisplayName="My Category" ID="KOjMBsKTXpY=" Name="mycategory">
</MarkerCategory>

<POIs>
Expand Down
1 change: 1 addition & 0 deletions xml_converter/proto/waypoint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ message Category {
bool is_separator = 5;
bool default_visibility = 6;
string tip_description = 7;
bytes id = 8;
}

message Icon {
Expand Down
24 changes: 24 additions & 0 deletions xml_converter/src/category_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ bool Category::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vector<X
else if (attributename == "isseparator") {
xml_attribute_to_bool(attribute, errors, state, &(this->is_separator), &(this->is_separator_is_set));
}
else if (attributename == "id") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The markdown file that generates this code seems to be missing.

xml_attribute_to_unique_id(attribute, errors, state, &(this->menu_id), &(this->menu_id_is_set));
}
else if (attributename == "menuid") {
xml_attribute_to_unique_id(attribute, errors, state, &(this->menu_id), &(this->menu_id_is_set));
}
else if (attributename == "name") {
xml_attribute_to_string(attribute, errors, state, &(this->name), &(this->name_is_set));
}
Expand All @@ -69,6 +75,9 @@ vector<string> Category::as_xml(XMLWriterState* state) const {
if (this->is_separator_is_set) {
xml_node_contents.push_back(bool_to_xml_attribute("IsSeparator", state, &this->is_separator));
}
if (this->menu_id_is_set) {
xml_node_contents.push_back(unique_id_to_xml_attribute("ID", state, &this->menu_id));
}
if (this->name_is_set) {
xml_node_contents.push_back(string_to_xml_attribute("Name", state, &this->name));
}
Expand Down Expand Up @@ -104,6 +113,10 @@ waypoint::Category Category::as_protobuf(ProtoWriterState* state) const {
std::function<void(bool)> setter = [&proto_category](bool val) { proto_category.set_is_separator(val); };
bool_to_proto(this->is_separator, state, setter);
}
if (this->menu_id_is_set) {
std::function<void(std::string)> setter = [&proto_category](std::string val) { proto_category.set_id(val); };
unique_id_to_proto(this->menu_id, state, setter);
}
if (this->name_is_set) {
std::function<void(std::string)> setter = [&proto_category](std::string val) { proto_category.set_name(val); };
do_nothing(this->name, state, setter);
Expand All @@ -125,6 +138,9 @@ void Category::parse_protobuf(waypoint::Category proto_category, ProtoReaderStat
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.name() != "") {
do_nothing(proto_category.name(), state, &(this->name), &(this->name_is_set));
}
Expand Down Expand Up @@ -152,6 +168,10 @@ void Category::apply_underlay(const Category& underlay) {
this->is_separator = underlay.is_separator;
this->is_separator_is_set = true;
}
if (!this->menu_id_is_set && underlay.menu_id_is_set) {
this->menu_id = underlay.menu_id;
this->menu_id_is_set = true;
}
if (!this->name_is_set && underlay.name_is_set) {
this->name = underlay.name;
this->name_is_set = true;
Expand Down Expand Up @@ -184,6 +204,10 @@ void Category::apply_overlay(const Category& overlay) {
this->is_separator = overlay.is_separator;
this->is_separator_is_set = true;
}
if (overlay.menu_id_is_set) {
this->menu_id = overlay.menu_id;
this->menu_id_is_set = true;
}
if (overlay.name_is_set) {
this->name = overlay.name;
this->name_is_set = true;
Expand Down
4 changes: 4 additions & 0 deletions xml_converter/src/category_gen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include <string>
#include <vector>

#include "attribute/unique_id.hpp"
#include "icon_gen.hpp"
#include "parseable.hpp"
#include "rapidxml-1.13/rapidxml.hpp"
Expand All @@ -19,16 +20,19 @@ class Category : public Parseable {
bool default_visibility;
std::string display_name;
bool is_separator;
UniqueId menu_id;
std::string name;
std::string tooltip_description;
bool default_visibility_is_set = false;
bool display_name_is_set = false;
bool is_separator_is_set = false;
bool menu_id_is_set = false;
bool name_is_set = false;
bool tooltip_description_is_set = false;
std::map<std::string, Category> children;
Icon default_icon;
Trail default_trail;
Category* parent;

void init_from_xml(rapidxml::xml_node<>* node, std::vector<XMLError*>* errors, XMLReaderState* state);
virtual std::vector<std::string> as_xml(XMLWriterState* state) const;
Expand Down
Loading
Loading