]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - games/minimal/mods/default/init.lua
Add list-rings
[dragonfireclient.git] / games / minimal / mods / default / init.lua
index 7b5869bc097e337491fc470eec2097534b9dee4f..c51af594f2d8412e6333d860f48ace342bf3ea83 100644 (file)
@@ -834,7 +834,6 @@ minetest.register_node("default:leaves", {
        visual_scale = 1.3,
        tiles ={"default_leaves.png"},
        paramtype = "light",
-       is_ground_content = false,
        groups = {snappy=3},
        drop = {
                max_items = 1,
@@ -854,6 +853,17 @@ minetest.register_node("default:leaves", {
        sounds = default.node_sound_leaves_defaults(),
 })
 
+minetest.register_node("default:jungleleaves", {
+       description = "Jungle Leaves",
+       drawtype = "allfaces_optional",
+       waving = 1,
+       visual_scale = 1.3,
+       tiles = {"default_jungleleaves.png"},
+       paramtype = "light",
+       groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
+       sounds = default.node_sound_leaves_defaults(),
+})
+
 minetest.register_node("default:cactus", {
        description = "Cactus",
        tiles ={"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
@@ -976,6 +986,7 @@ minetest.register_node("default:water_flowing", {
        pointable = false,
        diggable = false,
        buildable_to = true,
+       is_ground_content = false,
        drowning = 1,
        liquidtype = "flowing",
        liquid_alternative_flowing = "default:water_flowing",
@@ -1000,6 +1011,7 @@ minetest.register_node("default:water_source", {
        pointable = false,
        diggable = false,
        buildable_to = true,
+       is_ground_content = false,
        drowning = 1,
        liquidtype = "source",
        liquid_alternative_flowing = "default:water_flowing",
@@ -1032,6 +1044,7 @@ minetest.register_node("default:lava_flowing", {
        pointable = false,
        diggable = false,
        buildable_to = true,
+       is_ground_content = false,
        drowning = 1,
        liquidtype = "flowing",
        liquid_alternative_flowing = "default:lava_flowing",
@@ -1060,6 +1073,7 @@ minetest.register_node("default:lava_source", {
        pointable = false,
        diggable = false,
        buildable_to = true,
+       is_ground_content = false,
        drowning = 1,
        liquidtype = "source",
        liquid_alternative_flowing = "default:lava_flowing",
@@ -1144,7 +1158,8 @@ minetest.register_node("default:chest", {
                meta:set_string("formspec",
                                "size[8,9]"..
                                "list[current_name;main;0,0;8,4;]"..
-                               "list[current_player;main;0,5;8,4;]")
+                               "list[current_player;main;0,5;8,4;]" ..
+                               "listring[]")
                meta:set_string("infotext", "Chest")
                local inv = meta:get_inventory()
                inv:set_size("main", 8*4)
@@ -1183,7 +1198,8 @@ minetest.register_node("default:chest_locked", {
                meta:set_string("formspec",
                                "size[8,9]"..
                                "list[current_name;main;0,0;8,4;]"..
-                               "list[current_player;main;0,5;8,4;]")
+                               "list[current_player;main;0,5;8,4;]" ..
+                               "listring[]")
                meta:set_string("infotext", "Locked Chest")
                meta:set_string("owner", "")
                local inv = meta:get_inventory()
@@ -1247,7 +1263,11 @@ default.furnace_inactive_formspec =
        "list[current_name;fuel;2,3;1,1;]"..
        "list[current_name;src;2,1;1,1;]"..
        "list[current_name;dst;5,1;2,2;]"..
-       "list[current_player;main;0,5;8,4;]"
+       "list[current_player;main;0,5;8,4;]" ..
+       "listring[current_name;dst]" ..
+       "listring[current_player;main]" ..
+       "listring[current_name;src]" ..
+       "listring[current_player;main]"
 
 minetest.register_node("default:furnace", {
        description = "Furnace",
@@ -1384,7 +1404,11 @@ minetest.register_abm({
                                "list[current_name;fuel;2,3;1,1;]"..
                                "list[current_name;src;2,1;1,1;]"..
                                "list[current_name;dst;5,1;2,2;]"..
-                               "list[current_player;main;0,5;8,4;]")
+                               "list[current_player;main;0,5;8,4;]" ..
+                               "listring[current_name;dst]" ..
+                               "listring[current_player;main]" ..
+                               "listring[current_name;src]" ..
+                               "listring[current_player;main]")
                        return
                end
 
@@ -1494,6 +1518,74 @@ minetest.register_node("default:apple", {
        sounds = default.node_sound_defaults(),
 })
 
+minetest.register_node("default:dirt_with_snow", {
+       description = "Dirt with Snow",
+       tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
+       groups = {crumbly=3,soil=1},
+       drop = 'default:dirt',
+       sounds = default.node_sound_dirt_defaults(),
+})
+
+minetest.register_node("default:snow", {
+       description = "Snow",
+       tiles = {"default_snow.png"},
+       inventory_image = "default_snowball.png",
+       wield_image = "default_snowball.png",
+       paramtype = "light",
+       buildable_to = true,
+       drawtype = "nodebox",
+       node_box = {
+               type = "fixed",
+               fixed = {
+                       {-0.5, -0.5, -0.5,  0.5, -0.5+2/16, 0.5},
+               },
+       },
+       groups = {crumbly=3,falling_node=1},
+       sounds = default.node_sound_dirt_defaults(),
+
+       on_construct = function(pos)
+               pos.y = pos.y - 1
+               if minetest.get_node(pos).name == "default:dirt_with_grass" then
+                       minetest.set_node(pos, {name="default:dirt_with_snow"})
+               end
+       end,
+})
+
+minetest.register_node("default:snowblock", {
+       description = "Snow Block",
+       tiles = {"default_snow.png"},
+       groups = {crumbly=3},
+       sounds = default.node_sound_dirt_defaults(),
+})
+
+minetest.register_node("default:ice", {
+       description = "Ice",
+       tiles = {"default_ice.png"},
+       is_ground_content = false,
+       paramtype = "light",
+       groups = {cracky=3},
+       sounds = default.node_sound_glass_defaults(),
+})
+
+minetest.register_node("default:pinetree", {
+       description = "Pine Tree",
+       tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
+       paramtype2 = "facedir",
+       groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
+       sounds = default.node_sound_wood_defaults(),
+})
+
+minetest.register_node("default:pine_needles",{
+       description = "Pine Needles",
+       drawtype = "allfaces_optional",
+       visual_scale = 1.3,
+       tiles = {"default_pine_needles.png"},
+       waving = 1,
+       paramtype = "light",
+       groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
+       sounds = default.node_sound_leaves_defaults(),
+})
+
 --
 -- Grow tree function
 --
@@ -1578,7 +1670,12 @@ minetest.register_abm({
        interval = 10,
        chance = 50,
        action = function(pos, node)
-               local is_soil = minetest.registered_nodes[minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name].groups.soil
+               local node_under = minetest.registered_nodes[
+                       minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}).name]
+               if not node_under then
+                       return
+               end
+               local is_soil = node_under.groups.soil
                if is_soil == nil or is_soil == 0 then return end
                print("A sapling grows into a tree at "..minetest.pos_to_string(pos))
                local vm = minetest.get_voxel_manip()