Disable spawning default trees bearing apples

and stop calling them apple trees.  We already
have REAL apple trees.
This commit is contained in:
Vanessa Dannenberg 2021-02-24 00:48:16 -05:00
parent 4394beec6a
commit 2550b4782e
10 changed files with 30 additions and 8 deletions

View File

@ -17,7 +17,7 @@ This game is in use on my Creative server and on my Survival server, which also
* The default lavacooling code has been supplanted by better, safer code from my Gloopblocks mod. That mod also provides stone/cobble --> mossy stone/cobble transformation in the presence of water.
* An extensive selection of administration tools for single-player and server use are included, such as areas, maptools, worldedit, xban, and more.
* A few textures here and there are different.
* The mapgen won't spawn apples on default trees, nor will they appear on a sapling-grown default tree. Only the *real* apple trees supplied by the Moretrees mod will bear apples (both at mapgen time and sapling-grown). Or at least that's how it's supposed to work. :stuck_out_tongue: While on that subject, apples now use a 3d model instead of the plantlike version.
* The mapgen won't spawn apples on default trees, nor will they appear on a sapling-grown default tree. Only the *real* apple trees supplied by the Moretrees mod will bear apples (both at mapgen time and sapling-grown). While on that subject, apples now use a 3d model instead of the plantlike version.
##  

View File

@ -378,8 +378,8 @@ paramat (CC BY-SA 3.0):
acacia_bush.mts
acacia_tree.mts
acacia_tree_from_sapling.mts
apple_tree.mts
apple_tree_from_sapling.mts
default_tree.mts
default_tree_from_sapling.mts
aspen_tree.mts
aspen_tree_from_sapling.mts
bush.mts
@ -398,7 +398,7 @@ paramat (CC BY-SA 3.0):
Shara RedCat (CC BY-SA 3.0):
acacia_log.mts
apple_log.mts
default_log.mts
aspen_log.mts
jungle_log.mts
pine_log.mts

View File

@ -1828,7 +1828,7 @@ function default.register_decorations()
biomes = {"deciduous_forest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("default") .. "/schematics/apple_tree.mts",
schematic = minetest.get_modpath("default") .. "/schematics/default_tree.mts",
flags = "place_center_x, place_center_z",
rotation = "random",
})
@ -1850,7 +1850,7 @@ function default.register_decorations()
biomes = {"deciduous_forest"},
y_max = 31000,
y_min = 1,
schematic = minetest.get_modpath("default") .. "/schematics/apple_log.mts",
schematic = minetest.get_modpath("default") .. "/schematics/default_log.mts",
flags = "place_center_x",
rotation = "random",
spawn_by = "default:dirt_with_grass",

Binary file not shown.

Binary file not shown.

View File

@ -124,7 +124,7 @@ local function add_trunk_and_leaves(data, a, pos, tree_cid, leaves_cid,
local x, y, z = pos.x, pos.y, pos.z
local c_air = minetest.get_content_id("air")
local c_ignore = minetest.get_content_id("ignore")
local c_apple = minetest.get_content_id("default:apple")
local c_apple = minetest.get_content_id("default:leaves")
-- Trunk
data[a:index(x, y, z)] = tree_cid -- Force-place lowest trunk node to replace sapling
@ -393,7 +393,7 @@ end
function default.grow_new_apple_tree(pos)
local path = minetest.get_modpath("default") ..
"/schematics/apple_tree_from_sapling.mts"
"/schematics/default_tree_from_sapling.mts"
minetest.place_schematic({x = pos.x - 3, y = pos.y - 1, z = pos.z - 3},
path, "random", nil, false)
end

View File

@ -60,11 +60,33 @@ mv $workdir"/mods/dreambuilder_extras/dreambuilder_screenshot.png" $workdir"/
mv $workdir"/mods/dreambuilder_extras/dreambuilder_menu_icon.png" $workdir"/menu/icon.png"
mv $workdir"/mods/dreambuilder_extras/dreambuilder_menu_overlay.png" $workdir"/menu/background.png"
# Convert fake "apple" trees back into just normal default trees,
# and don't let them spawn with apples. Ever.
mv $workdir"/mods/dreambuilder_extras/default_tree.mts" $workdir"/mods/default/schematics/"
mv $workdir"/mods/dreambuilder_extras/default_tree_from_sapling.mts" $workdir"/mods/default/schematics/"
mv $workdir"/mods/default/schematics/apple_log.mts" \
$workdir"/mods/default/schematics/default_log.mts"
rm $workdir"/mods/default/schematics/apple_tree.mts"
rm $workdir"/mods/default/schematics/apple_tree_from_sapling.mts"
sed -i "s:/schematics/apple_tree_from_sapling.mts:/schematics/default_tree_from_sapling.mts:g" $workdir"/mods/default/trees.lua"
sed -i "s:/schematics/apple_tree.mts:/schematics/default_tree.mts:" $workdir"/mods/default/mapgen.lua"
sed -i "s:/schematics/apple_log.mts:/schematics/default_log.mts:" $workdir"/mods/default/mapgen.lua"
sed -i 's/local c_apple = minetest.get_content_id("default:apple")/local c_apple = minetest.get_content_id("default:leaves")/' $workdir"/mods/default/trees.lua"
sed -i 's/Apple Wood Planks/Wood Planks/g' $workdir"/mods/default/nodes.lua"
sed -i 's/Apple Tree Leaves/Leaves/' $workdir"/mods/default/nodes.lua"
sed -i 's/Apple Tree Sapling/Sapling/' $workdir"/mods/default/nodes.lua"
sed -i 's/Apple Tree/Tree/' $workdir"/mods/default/nodes.lua"
sed -i "s/apple_tree.mts/default_tree.mts/" $workdir"/mods/default/README.txt"
sed -i "s/apple_log.mts/default_log.mts/" $workdir"/mods/default/README.txt"
sed -i "s/apple_tree_from_sapling.mts/default_tree_from_sapling.mts/" $workdir"/mods/default/README.txt"
echo -e "\nBring all mods up-to-date from "$upstream_mods_path
cd $upstream_mods_path