Currently about half of the gaia/flora_bush_* files inherit from template_gaia_fruit.xml, the other half from template_gaia_tree.xml; most of the gaia/flora_tree_* files inherit from template_gaia_tree.xml, but some from template_gaia_fruit.xml. The bush vs tree distinction is mostly based on how something looks and not really functional for templates; a more sensible approach is to differentiate by resource subtype (see D2990/rP24043).
This patch:
- moves templates that inherit from template_gaia_fruit.xml into a new gaia/fruit/ subfolder and renames them accordingly;
- moves templates that inherit from template_gaia_tree.xml into a new gaia/tree/ subfolder and renames them accordingly.
To correct the maps/ files, run this command in your 0ad/ repository:
find binaries/data/mods/public/maps/ \( -name '*.js' -o -name '*.json' -o -name '*.xml' \) -print0 | xargs -0 sed -i \ -e 's,gaia/flora_bush_badlands,gaia/tree/bush_badlands,g' \ -e 's,gaia/flora_bush_temperate_winter,gaia/tree/bush_temperate_winter,g' \ -e 's,gaia/flora_bush_temperate,gaia/tree/bush_temperate,g' \ -e 's,gaia/flora_bush_tropic,gaia/tree/bush_tropic,g' \ -e 's,gaia/flora_bush_berry_desert,gaia/fruit/berry_05,g' \ -e 's,gaia/flora_bush_berry_autumn_01,gaia/fruit/berry_04,g' \ -e 's,gaia/flora_bush_berry_03,gaia/fruit/berry_03,g' \ -e 's,gaia/flora_bush_berry_02,gaia/fruit/berry_02,g' \ -e 's,gaia/flora_bush_berry,gaia/fruit/berry_01,g' \ -e 's,gaia/flora_bush_grapes,gaia/fruit/grapes,g' \ -e 's,gaia/flora_tree_apple,gaia/fruit/apple,g' \ -e 's,gaia/flora_tree_banana,gaia/fruit/banana,g' \ -e 's,gaia/flora_tree_date_palm_fruit,gaia/fruit/date,g' \ -e 's,gaia/flora_tree_fig,gaia/fruit/fig,g' \ -e 's,gaia/flora_tree_olive,gaia/fruit/olive,g' \ -e 's,gaia/flora_tree_,gaia/tree/,g'
Similar patches include: