linleyh / liberation-circuit

Trapped in a hostile computer system, you must make a way out - RTS/coding game
GNU General Public License v3.0
382 stars 40 forks source link

Fix mirror axis initialization #30

Closed michiel-de-muynck closed 7 years ago

michiel-de-muynck commented 7 years ago

If a shape is symmetric in a certain direction, it's symmetric in the opposite direction too, but not all shapes in g_shapes.c add mirror axes in both directions. However, mirror_process_on_axis_recursively() in d_design.c relies on this. This makes it so that the "symmetry" button in the template designer sometimes fails. For example, make a process with core core_quad_A, add a component_fork to the right of it. The "symmetry" button won't mirror anything you add to that component_fork.

This commit adds the missing mirror axes. I think I got all of them, but a better long-term solution (if new components ever get added) might be to rewrite the shape initialization so that it's not possible to forget.