diff --git a/xml_converter/doc/rendering/render_on_map.md b/xml_converter/doc/rendering/render_on_map.md
index a5981c7b..375fb135 100644
--- a/xml_converter/doc/rendering/render_on_map.md
+++ b/xml_converter/doc/rendering/render_on_map.md
@@ -3,7 +3,14 @@ name: Render on Map
type: Boolean
applies_to: [Icon, Trail]
xml_fields: [MapVisibility, BHMapVisibility]
-protobuf_field: tentative__render_on_map
+protobuf_field: is_hidden_on_map
+custom_functions:
+ read.xml:
+ function: inverted_xml_attribute_to_bool
+ side_effects: []
+ write.xml:
+ function: bool_to_inverted_xml_attribute
+ side_effects: []
---
Allows or Prevents this object from being rendered on the world map.
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin
new file mode 100644
index 00000000..06a072a0
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/input/pack/markers.bin
@@ -0,0 +1,3 @@
+
+D
+My Category 2B
\Ï)Cf¦RC{ÔWC˜ 2B
\Ï)Cf¦RC{ÔWCB(èÌ“^–
\ No newline at end of file
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin
new file mode 100644
index 00000000..06a072a0
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_proto/markers.bin
@@ -0,0 +1,3 @@
+
+D
+My Category 2B
\Ï)Cf¦RC{ÔWC˜ 2B
\Ï)Cf¦RC{ÔWCB(èÌ“^–
\ No newline at end of file
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml
new file mode 100644
index 00000000..c01df540
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/output_xml/xml_file.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml
new file mode 100644
index 00000000..d87f4066
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/proto_is_hidden_on_map/testcase.yaml
@@ -0,0 +1,5 @@
+input_paths:
+ "pack": "proto"
+expected_stdout: |
+expected_stderr: |
+expected_returncode: 0
diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml
new file mode 100644
index 00000000..f250afbd
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/input/pack/xml_file.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin
new file mode 100644
index 00000000..7f148a4f
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_proto/markers.bin
@@ -0,0 +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˜ 2B
\Ï)Cf¦RC{ÔWC 2B
\Ï)Cf¦RC{ÔWCB(èÌ“^–
\ No newline at end of file
diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml
new file mode 100644
index 00000000..d9bc1940
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/output_xml/xml_file.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml b/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml
new file mode 100644
index 00000000..9510c793
--- /dev/null
+++ b/xml_converter/integration_tests/test_cases/xml_render_on_map/testcase.yaml
@@ -0,0 +1,5 @@
+input_paths:
+ "pack": "xml"
+expected_stdout: |
+expected_stderr: |
+expected_returncode: 0
diff --git a/xml_converter/proto/waypoint.proto b/xml_converter/proto/waypoint.proto
index 1a028d79..ddddd635 100644
--- a/xml_converter/proto/waypoint.proto
+++ b/xml_converter/proto/waypoint.proto
@@ -55,10 +55,10 @@ message Icon {
SpecializationFilter specialization_filter = 31;
SpeciesFilter species_filter = 32;
CullChirality cull_chirality = 33;
+ bool is_hidden_on_map = 35;
float tentative__scale = 2048;
bool tentative__render_ingame = 2049;
- bool tentative__render_on_map = 2050;
bool tentative__render_on_minimap = 2051;
string bhdraft__schedule = 2052;
float bhdraft__schedule_duration = 2053;
@@ -87,9 +87,9 @@ message Trail {
SpeciesFilter species_filter = 28;
int32 map_display_size = 29;
CullChirality cull_chirality = 30;
+ bool is_hidden_on_map = 32;
bool tentative__render_ingame = 2049;
- bool tentative__render_on_map = 2050;
bool tentative__render_on_minimap = 2051;
string bhdraft__schedule = 2052;
float bhdraft__schedule_duration = 2053;
diff --git a/xml_converter/src/icon_gen.cpp b/xml_converter/src/icon_gen.cpp
index 36c87c83..dbdb4f50 100644
--- a/xml_converter/src/icon_gen.cpp
+++ b/xml_converter/src/icon_gen.cpp
@@ -188,10 +188,10 @@ bool Icon::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "mapvisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
}
else if (attributename == "bhmapvisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
}
else if (attributename == "minimapvisibility") {
xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set));
@@ -367,7 +367,7 @@ vector Icon::as_xml(XMLWriterState* state) const {
xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame));
}
if (this->render_on_map_is_set) {
- xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map));
+ xml_node_contents.push_back(bool_to_inverted_xml_attribute("MapVisibility", state, &this->render_on_map));
}
if (this->render_on_minimap_is_set) {
xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap));
@@ -544,7 +544,7 @@ waypoint::Icon Icon::as_protobuf(ProtoWriterState* state) const {
bool_to_proto(this->render_ingame, state, setter);
}
if (this->render_on_map_is_set) {
- std::function setter = [&proto_icon](bool val) { proto_icon.set_tentative__render_on_map(val); };
+ std::function setter = [&proto_icon](bool val) { proto_icon.set_is_hidden_on_map(val); };
bool_to_proto(this->render_on_map, state, setter);
}
if (this->render_on_minimap_is_set) {
@@ -698,8 +698,8 @@ void Icon::parse_protobuf(waypoint::Icon proto_icon, ProtoReaderState* state) {
if (proto_icon.tentative__render_ingame() != 0) {
proto_to_bool(proto_icon.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
}
- if (proto_icon.tentative__render_on_map() != 0) {
- proto_to_bool(proto_icon.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));
+ if (proto_icon.is_hidden_on_map() != 0) {
+ proto_to_bool(proto_icon.is_hidden_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));
}
if (proto_icon.tentative__render_on_minimap() != 0) {
proto_to_bool(proto_icon.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set));
diff --git a/xml_converter/src/trail_gen.cpp b/xml_converter/src/trail_gen.cpp
index a22ff256..1267fd60 100644
--- a/xml_converter/src/trail_gen.cpp
+++ b/xml_converter/src/trail_gen.cpp
@@ -110,10 +110,10 @@ bool Trail::init_xml_attribute(rapidxml::xml_attribute<>* attribute, vectorrender_ingame), &(this->render_ingame_is_set));
}
else if (attributename == "mapvisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
}
else if (attributename == "bhmapvisibility") {
- xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
+ inverted_xml_attribute_to_bool(attribute, errors, state, &(this->render_on_map), &(this->render_on_map_is_set));
}
else if (attributename == "minimapvisibility") {
xml_attribute_to_bool(attribute, errors, state, &(this->render_on_minimap), &(this->render_on_minimap_is_set));
@@ -217,7 +217,7 @@ vector Trail::as_xml(XMLWriterState* state) const {
xml_node_contents.push_back(bool_to_xml_attribute("IngameVisibility", state, &this->render_ingame));
}
if (this->render_on_map_is_set) {
- xml_node_contents.push_back(bool_to_xml_attribute("MapVisibility", state, &this->render_on_map));
+ xml_node_contents.push_back(bool_to_inverted_xml_attribute("MapVisibility", state, &this->render_on_map));
}
if (this->render_on_minimap_is_set) {
xml_node_contents.push_back(bool_to_xml_attribute("MinimapVisibility", state, &this->render_on_minimap));
@@ -318,7 +318,7 @@ waypoint::Trail Trail::as_protobuf(ProtoWriterState* state) const {
bool_to_proto(this->render_ingame, state, setter);
}
if (this->render_on_map_is_set) {
- std::function setter = [&proto_trail](bool val) { proto_trail.set_tentative__render_on_map(val); };
+ std::function setter = [&proto_trail](bool val) { proto_trail.set_is_hidden_on_map(val); };
bool_to_proto(this->render_on_map, state, setter);
}
if (this->render_on_minimap_is_set) {
@@ -408,8 +408,8 @@ void Trail::parse_protobuf(waypoint::Trail proto_trail, ProtoReaderState* state)
if (proto_trail.tentative__render_ingame() != 0) {
proto_to_bool(proto_trail.tentative__render_ingame(), state, &(this->render_ingame), &(this->render_ingame_is_set));
}
- if (proto_trail.tentative__render_on_map() != 0) {
- proto_to_bool(proto_trail.tentative__render_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));
+ if (proto_trail.is_hidden_on_map() != 0) {
+ proto_to_bool(proto_trail.is_hidden_on_map(), state, &(this->render_on_map), &(this->render_on_map_is_set));
}
if (proto_trail.tentative__render_on_minimap() != 0) {
proto_to_bool(proto_trail.tentative__render_on_minimap(), state, &(this->render_on_minimap), &(this->render_on_minimap_is_set));