Add jungleleaves, junglewood and junglesapling
authorPilzAdam <pilzadam@minetest.net>
Sat, 16 Mar 2013 20:27:28 +0000 (21:27 +0100)
committerPilzAdam <pilzadam@minetest.net>
Sat, 16 Mar 2013 20:55:29 +0000 (21:55 +0100)
mods/default/README.txt
mods/default/init.lua
mods/default/mapgen.lua
mods/default/textures/default_jungleleaves.png [new file with mode: 0644]
mods/default/textures/default_junglesapling.png [new file with mode: 0644]
mods/default/textures/default_jungletree.png
mods/default/textures/default_jungletree_top.png
mods/default/textures/default_junglewood.png [new file with mode: 0644]

index 5d0735b91a1a46346d516bcfff0ab8fed75994be..e4227b952161ca727fbb7bd83a4eb4fd1c59c5fa 100644 (file)
@@ -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/
index 1f2c4f7debe403a8c3151a6cba44664ae3c5a7f5..53bd66b2594b264a96ceea9b13239c11b6ff35fe 100644 (file)
@@ -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 = {
index a40f3e536186c08aafc5a4ad9cb036b80bb97cb4..8955caeb5244a3122a3d9f1d6428e008ceafcda3 100644 (file)
@@ -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 (file)
index 0000000..68e9b9e
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 (file)
index 0000000..42df417
Binary files /dev/null and b/mods/default/textures/default_junglesapling.png differ
index d8c263552439436c63c2db2f4179f01bb861640b..24e5b3fe92d2d900336b4d6ee6acbfb2fa5b5c6a 100644 (file)
Binary files a/mods/default/textures/default_jungletree.png and b/mods/default/textures/default_jungletree.png differ
index 805272a7363ee3df080e6aa061e1f2ac226d8e40..6bb6f2b527870ae57e9083388c96b97596381b09 100644 (file)
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 (file)
index 0000000..753f522
Binary files /dev/null and b/mods/default/textures/default_junglewood.png differ