From: PilzAdam Date: Sat, 16 Mar 2013 20:27:28 +0000 (+0100) Subject: Add jungleleaves, junglewood and junglesapling X-Git-Tag: 0.4.6~22 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=4b9914fdcb0c4e7459c37c0d5953709733dab15d;p=oweals%2Fminetest_game.git Add jungleleaves, junglewood and junglesapling --- diff --git a/mods/default/README.txt b/mods/default/README.txt index 5d0735b9..e4227b95 100644 --- a/mods/default/README.txt +++ b/mods/default/README.txt @@ -89,6 +89,11 @@ MirceaKitsune (WTFPL): Jordach (CC BY-SA 3.0): character.png +PilzAdam (WTFPL): + default_jungleleaves.png + default_junglesapling.png + default_junglewood.png + Glass breaking sounds (CC BY 3.0): 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ 2: http://www.freesound.org/people/Tomlija/sounds/97669/ diff --git a/mods/default/init.lua b/mods/default/init.lua index 1f2c4f7d..53bd66b2 100644 --- a/mods/default/init.lua +++ b/mods/default/init.lua @@ -213,6 +213,13 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'default:junglewood 4', + recipe = { + {'default:jungletree'}, + } +}) + minetest.register_craft({ output = 'default:stick 4', recipe = { @@ -563,7 +570,7 @@ minetest.register_craft({ minetest.register_craft({ type = "fuel", - recipe = "default:leaves", + recipe = "group:leaves", burntime = 1, }) @@ -663,6 +670,12 @@ minetest.register_craft({ burntime = 40, }) +minetest.register_craft({ + type = "fuel", + recipe = "default:junglesapling", + burntime = 10, +}) + -- -- Node definitions -- @@ -886,6 +899,58 @@ minetest.register_node("default:jungletree", { sounds = default.node_sound_wood_defaults(), }) +minetest.register_node("default:junglewood", { + description = "Junglewood Planks", + tiles = {"default_junglewood.png"}, + is_ground_content = true, + groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("default:jungleleaves", { + description = "Jungle Leaves", + drawtype = "allfaces_optional", + visual_scale = 1.3, + tiles = {"default_jungleleaves.png"}, + paramtype = "light", + groups = {snappy=3, leafdecay=3, flammable=2, leaves=1}, + drop = { + max_items = 1, + items = { + { + -- player will get sapling with 1/20 chance + items = {'default:junglesapling'}, + rarity = 20, + }, + { + -- player will get leaves only if he get no saplings, + -- this is because max_items is 1 + items = {'default:jungleleaves'}, + } + } + }, + sounds = default.node_sound_leaves_defaults(), +}) + +minetest.register_node("default:junglesapling", { + description = "Jungle Sapling", + drawtype = "plantlike", + visual_scale = 1.0, + tiles = {"default_junglesapling.png"}, + inventory_image = "default_junglesapling.png", + wield_image = "default_junglesapling.png", + paramtype = "light", + walkable = false, + selection_box = { + type = "fixed", + fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3} + }, + groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1}, + sounds = default.node_sound_defaults(), +}) +-- alias for tree growing abm in content_abm.cpp +minetest.register_alias("junglesapling", "default:junglesapling") + minetest.register_node("default:junglegrass", { description = "Jungle Grass", drawtype = "plantlike", @@ -905,7 +970,7 @@ minetest.register_node("default:leaves", { visual_scale = 1.3, tiles = {"default_leaves.png"}, paramtype = "light", - groups = {snappy=3, leafdecay=3, flammable=2}, + groups = {snappy=3, leafdecay=3, flammable=2, leaves=1}, drop = { max_items = 1, items = { diff --git a/mods/default/mapgen.lua b/mods/default/mapgen.lua index a40f3e53..8955caeb 100644 --- a/mods/default/mapgen.lua +++ b/mods/default/mapgen.lua @@ -8,6 +8,8 @@ minetest.register_alias("mapgen_air", "air") minetest.register_alias("mapgen_stone", "default:stone") minetest.register_alias("mapgen_tree", "default:tree") minetest.register_alias("mapgen_leaves", "default:leaves") +minetest.register_alias("mapgen_jungletree", "default:jungletree") +minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves") minetest.register_alias("mapgen_apple", "default:apple") minetest.register_alias("mapgen_water_source", "default:water_source") minetest.register_alias("mapgen_dirt", "default:dirt") diff --git a/mods/default/textures/default_jungleleaves.png b/mods/default/textures/default_jungleleaves.png new file mode 100644 index 00000000..68e9b9e4 Binary files /dev/null and b/mods/default/textures/default_jungleleaves.png differ diff --git a/mods/default/textures/default_junglesapling.png b/mods/default/textures/default_junglesapling.png new file mode 100644 index 00000000..42df417d Binary files /dev/null and b/mods/default/textures/default_junglesapling.png differ diff --git a/mods/default/textures/default_jungletree.png b/mods/default/textures/default_jungletree.png index d8c26355..24e5b3fe 100644 Binary files a/mods/default/textures/default_jungletree.png and b/mods/default/textures/default_jungletree.png differ diff --git a/mods/default/textures/default_jungletree_top.png b/mods/default/textures/default_jungletree_top.png index 805272a7..6bb6f2b5 100644 Binary files a/mods/default/textures/default_jungletree_top.png and b/mods/default/textures/default_jungletree_top.png differ diff --git a/mods/default/textures/default_junglewood.png b/mods/default/textures/default_junglewood.png new file mode 100644 index 00000000..753f5220 Binary files /dev/null and b/mods/default/textures/default_junglewood.png differ