This commit is contained in:
sfan5 2014-12-27 01:49:27 +00:00
commit fc6f8c20b1
6 changed files with 79 additions and 31 deletions

View file

@ -28,14 +28,6 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = 'default:fence_wood 2',
recipe = {
{'group:stick', 'group:stick', 'group:stick'},
{'group:stick', 'group:stick', 'group:stick'},
}
})
minetest.register_craft({
output = 'default:sign_wall',
recipe = {
@ -720,12 +712,6 @@ minetest.register_craft({
burntime = 30,
})
minetest.register_craft({
type = "fuel",
recipe = "default:fence_wood",
burntime = 15,
})
minetest.register_craft({
type = "fuel",
recipe = "default:ladder",

View file

@ -460,23 +460,6 @@ minetest.register_node("default:glass", {
sounds = default.node_sound_glass_defaults(),
})
local fence_texture = "default_fence_overlay.png^default_wood.png^default_fence_overlay.png^[makealpha:255,126,126"
minetest.register_node("default:fence_wood", {
description = "Wooden Fence",
drawtype = "fencelike",
tiles = {"default_wood.png"},
inventory_image = fence_texture,
wield_image = fence_texture,
paramtype = "light",
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
groups = {choppy=2,oddly_breakable_by_hand=2,flammable=2},
sounds = default.node_sound_wood_defaults(),
})
minetest.register_node("default:rail", {
description = "Rail",
drawtype = "raillike",

23
mods/fences/README.txt Normal file
View file

@ -0,0 +1,23 @@
Minetest 0.4 mod: fences
========================
License of source code:
-----------------------
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or
(at your option) any later version.
http://www.gnu.org/licenses/lgpl-2.1.html
License of media (textures and sounds)
--------------------------------------
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
http://creativecommons.org/licenses/by-sa/3.0/
Authors of media files
-----------------------
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>

1
mods/fences/depends.txt Normal file
View file

@ -0,0 +1 @@
default

55
mods/fences/init.lua Normal file
View file

@ -0,0 +1,55 @@
-- Minetest 0.4 mod: fences
-- See README.txt for licensing and other information.
fences = {}
function fences.register_fence(name, texture, desc, craftitem, craftoutput, groups, sounds)
local fence_texture = texture .. "^fences_overlay.png^[makealpha:255,126,126"
minetest.register_node(":fences:" .. name, {
description = desc,
drawtype = "fencelike",
tiles = {texture},
inventory_image = fence_texture,
wield_image = fence_texture,
paramtype = "light",
is_ground_content = false,
selection_box = {
type = "fixed",
fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
},
groups = groups,
sounds = sounds,
})
minetest.register_craft({
output = 'fences:' .. name .. ' ' .. craftoutput,
recipe = {
{craftitem, craftitem, craftitem},
{craftitem, craftitem, craftitem},
}
})
end
fences.register_fence("wood", "default_wood.png", "Wooden Fence", "group:stick", 2,
{choppy=2, oddly_breakable_by_hand=2, flammable=2}, default.node_sound_wood_defaults())
fences.register_fence("cobble", "default_cobble.png", "Cobblestone Fence", "default:cobble", 4,
{cracky=3, stone=2}, default.node_sound_stone_defaults())
fences.register_fence("desert_cobble", "default_desert_cobble.png", "Desert Cobblestone Fence", "default:desert_cobble", 4,
{cracky=3, stone=2}, default.node_sound_stone_defaults())
fences.register_fence("sandstone", "default_sandstone.png", "Sandstone Fence", "default:sandstone", 4,
{crumbly=2, cracky=3}, default.node_sound_stone_defaults())
fences.register_fence("stonebrick", "default_stone_brick.png", "Stone Brick Fence", "default:stonebrick", 4,
{cracky=2, stone=1}, default.node_sound_stone_defaults())
fences.register_fence("sandstonebrick", "default_sandstone_brick.png", "Sandstone Brick Fence", "default:sandstonebrick", 4,
{cracky=2}, default.node_sound_stone_defaults())
fences.register_fence("desert_stonebrick", "default_desert_stone_brick.png", "Desert Stone Brick Fence", "default:desert_stonebrick", 4,
{cracky=2, stone=1}, default.node_sound_stone_defaults())
minetest.register_craft({
type = "fuel",
recipe = "fences:wood",
burntime = 15,
})
minetest.register_alias("default:fence_wood", "fences:wood")

View file

Before

Width:  |  Height:  |  Size: 240 B

After

Width:  |  Height:  |  Size: 240 B