-
Notifications
You must be signed in to change notification settings - Fork 19
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
Adding Category ID #271
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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. |
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(èÌ“^– | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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(èÌ“^– |
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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"
}
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 {
}
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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") { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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)); | ||
} | ||
|
@@ -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)); | ||
} | ||
|
@@ -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); | ||
|
@@ -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)); | ||
} | ||
|
@@ -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; | ||
|
@@ -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; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Full Diff