rust/mapgen/src/lib.rs
branchtransitional_engine
changeset 16058 9cbd18220eb7
parent 16053 3402b2185698
child 16060 1b1d5729ff3e
--- a/rust/mapgen/src/lib.rs	Tue Sep 03 11:16:52 2024 +0200
+++ b/rust/mapgen/src/lib.rs	Tue Sep 03 13:56:35 2024 +0200
@@ -133,7 +133,18 @@
             .map(|(size, indices)| {
                 (
                     TemplateType(size),
-                    indices.iter().map(|i| (&templates[*i]).into()).collect(),
+                    indices
+                        .indices
+                        .iter()
+                        .map(|i| Into::<OutlineTemplate>::into(&templates[*i]))
+                        .map(|o| {
+                            if indices.force_invert == Some(true) {
+                                o.cavern()
+                            } else {
+                                o
+                            }
+                        })
+                        .collect(),
                 )
             })
             .collect();