Compare commits
41 Commits
0.4.dev-20
...
0.4.3
Author | SHA1 | Date | |
---|---|---|---|
87a1e37d34 | |||
6ad1d56b3d | |||
d3d3e76447 | |||
794c68b32b | |||
0722c8064b | |||
d98eab6a84 | |||
61a9bb2b47 | |||
32ee20ebe7 | |||
937ec64ee6 | |||
7db7ea543f | |||
319ac40fa5 | |||
cd4e86773f | |||
8643caac3c | |||
81afea1c00 | |||
a29819ebee | |||
6de625c67f | |||
e550a0e26f | |||
8739c4e737 | |||
3ea6096a7a | |||
f2916c0a31 | |||
c7b624d67c | |||
6ba4f01d0b | |||
a9da19c590 | |||
b1dcbe72aa | |||
8c8b4b005e | |||
537344bc62 | |||
274f280e10 | |||
3c8d4879a1 | |||
d05002ecc0 | |||
d817c9babe | |||
4e996ffa35 | |||
1dd62938c1 | |||
9a624d85d0 | |||
a93527dfb6 | |||
fcaacdb4ad | |||
dd9b33db67 | |||
894f98d878 | |||
3a1a7d511d | |||
53e9b0e107 | |||
216227bac3 | |||
1a62348e44 |
@ -27,16 +27,16 @@ Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
|||||||
See README.txt in each mod directory for information about other authors.
|
See README.txt in each mod directory for information about other authors.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
This program is distributed in the hope that it will be useful,
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License along
|
You should have received a copy of the GNU Lesser General Public License along
|
||||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
@ -7,11 +7,11 @@ Copyright (C) 2011-2012 Kahrl <kahrl@gmx.net>
|
|||||||
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
http://www.gnu.org/licenses/gpl-2.0.html
|
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
|
||||||
License of media (textures and sounds)
|
License of media (textures and sounds)
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -56,6 +56,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image)
|
|||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_craftitem("bucket:bucket_empty", {
|
minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
|
description = "Emtpy bucket",
|
||||||
inventory_image = "bucket.png",
|
inventory_image = "bucket.png",
|
||||||
stack_max = 1,
|
stack_max = 1,
|
||||||
liquids_pointable = true,
|
liquids_pointable = true,
|
||||||
@ -90,6 +91,6 @@ bucket.register_liquid(
|
|||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
type = "fuel",
|
type = "fuel",
|
||||||
recipe = "default:bucket_lava",
|
recipe = "bucket:bucket_lava",
|
||||||
burntime = 60,
|
burntime = 60,
|
||||||
})
|
})
|
||||||
|
22
mods/creative/README.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Minetest 0.4 mod: creative
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Implements creative mode.
|
||||||
|
|
||||||
|
Switch on by using the "creative_mode" setting.
|
||||||
|
|
||||||
|
Registered items that
|
||||||
|
- have a description, and
|
||||||
|
- do not have the group not_in_creative_inventory
|
||||||
|
are added to the creative inventory.
|
||||||
|
|
||||||
|
License of source code and media files:
|
||||||
|
---------------------------------------
|
||||||
|
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||||
|
|
||||||
|
This program is free software. It comes without any warranty, to
|
||||||
|
the extent permitted by applicable law. You can redistribute it
|
||||||
|
and/or modify it under the terms of the Do What The Fuck You Want
|
||||||
|
To Public License, Version 2, as published by Sam Hocevar. See
|
||||||
|
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
|
116
mods/creative/init.lua
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
-- minetest/creative/init.lua
|
||||||
|
|
||||||
|
local creative_inventory = {}
|
||||||
|
creative_inventory.creative_inventory_size = 0
|
||||||
|
|
||||||
|
-- Create detached creative inventory after loading all mods
|
||||||
|
minetest.after(0, function()
|
||||||
|
local inv = minetest.create_detached_inventory("creative", {
|
||||||
|
allow_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
if minetest.setting_getbool("creative_mode") then
|
||||||
|
return count
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
|
if minetest.setting_getbool("creative_mode") then
|
||||||
|
return -1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
allow_take = function(inv, listname, index, stack, player)
|
||||||
|
if minetest.setting_getbool("creative_mode") then
|
||||||
|
return -1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
end,
|
||||||
|
on_put = function(inv, listname, index, stack, player)
|
||||||
|
end,
|
||||||
|
on_take = function(inv, listname, index, stack, player)
|
||||||
|
print(player:get_player_name().." takes item from creative inventory; listname="..dump(listname)..", index="..dump(index)..", stack="..dump(stack))
|
||||||
|
if stack then
|
||||||
|
print("stack:get_name()="..dump(stack:get_name())..", stack:get_count()="..dump(stack:get_count()))
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
local creative_list = {}
|
||||||
|
for name,def in pairs(minetest.registered_items) do
|
||||||
|
if (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0)
|
||||||
|
and def.description and def.description ~= "" then
|
||||||
|
table.insert(creative_list, name)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
table.sort(creative_list)
|
||||||
|
inv:set_size("main", #creative_list)
|
||||||
|
for _,itemstring in ipairs(creative_list) do
|
||||||
|
local stack = ItemStack(itemstring)
|
||||||
|
-- Make a stack of the right number of items
|
||||||
|
local stack2 = nil
|
||||||
|
if stack:get_stack_max() == 1 then
|
||||||
|
stack2 = ItemStack(stack:get_name())
|
||||||
|
else
|
||||||
|
-- Insert half full so that a taken stack can be put back
|
||||||
|
stack2 = ItemStack(stack:get_name().." "..(stack:get_stack_max()/2))
|
||||||
|
end
|
||||||
|
inv:add_item("main", stack2)
|
||||||
|
end
|
||||||
|
creative_inventory.creative_inventory_size = #creative_list
|
||||||
|
print("creative inventory size: "..dump(creative_inventory.creative_inventory_size))
|
||||||
|
end)
|
||||||
|
|
||||||
|
creative_inventory.set_creative_formspec = function(player, start_i, pagenum)
|
||||||
|
pagenum = math.floor(pagenum)
|
||||||
|
local pagemax = math.floor((creative_inventory.creative_inventory_size-1) / (6*4) + 1)
|
||||||
|
player:set_inventory_formspec("size[13,7.5]"..
|
||||||
|
--"image[6,0.6;1,2;player.png]"..
|
||||||
|
"list[current_player;main;5,3.5;8,4;]"..
|
||||||
|
"list[current_player;craft;8,0;3,3;]"..
|
||||||
|
"list[current_player;craftpreview;12,1;1,1;]"..
|
||||||
|
"list[detached:creative;main;0.3,0.5;4,6;"..tostring(start_i).."]"..
|
||||||
|
"label[2.0,6.55;"..tostring(pagenum).."/"..tostring(pagemax).."]"..
|
||||||
|
"button[0.3,6.5;1.6,1;creative_prev;<<]"..
|
||||||
|
"button[2.7,6.5;1.6,1;creative_next;>>]")
|
||||||
|
end
|
||||||
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
-- If in creative mode, modify player's inventory forms
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
creative_inventory.set_creative_formspec(player, 0, 1)
|
||||||
|
end)
|
||||||
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Figure out current page from formspec
|
||||||
|
local current_page = 0
|
||||||
|
local formspec = player:get_inventory_formspec()
|
||||||
|
local start_i = string.match(formspec, "list%[detached:creative;main;[%d.]+,[%d.]+;[%d.]+,[%d.]+;(%d+)%]")
|
||||||
|
start_i = tonumber(start_i) or 0
|
||||||
|
|
||||||
|
if fields.creative_prev then
|
||||||
|
start_i = start_i - 4*6
|
||||||
|
end
|
||||||
|
if fields.creative_next then
|
||||||
|
start_i = start_i + 4*6
|
||||||
|
end
|
||||||
|
|
||||||
|
if start_i < 0 then
|
||||||
|
start_i = start_i + 4*6
|
||||||
|
end
|
||||||
|
if start_i >= creative_inventory.creative_inventory_size then
|
||||||
|
start_i = start_i - 4*6
|
||||||
|
end
|
||||||
|
|
||||||
|
if start_i < 0 or start_i >= creative_inventory.creative_inventory_size then
|
||||||
|
start_i = 0
|
||||||
|
end
|
||||||
|
|
||||||
|
creative_inventory.set_creative_formspec(player, start_i, start_i / (6*4) + 1)
|
||||||
|
end)
|
||||||
|
|
@ -6,11 +6,11 @@ License of source code:
|
|||||||
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
http://www.gnu.org/licenses/gpl-2.0.html
|
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
|
||||||
License of media (textures and sounds)
|
License of media (textures and sounds)
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -61,4 +61,10 @@ Originating from G4JC's Almost MC Texture Pack:
|
|||||||
default_torch.png
|
default_torch.png
|
||||||
default_torch_on_ceiling.png
|
default_torch_on_ceiling.png
|
||||||
default_torch_on_floor.png
|
default_torch_on_floor.png
|
||||||
|
|
||||||
|
VanessaE's animated torches (WTFPL):
|
||||||
|
default_torch_animated.png
|
||||||
|
default_torch_on_ceiling_animated.png
|
||||||
|
default_torch_on_floor_animated.png
|
||||||
|
default_torch_on_floor.png
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@ minetest.register_alias("mapgen_desert_stone", "default:desert_stone")
|
|||||||
-- Ore generation
|
-- Ore generation
|
||||||
--
|
--
|
||||||
|
|
||||||
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max)
|
local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max)
|
||||||
if maxp.y < height_min or minp.y > height_max then
|
if maxp.y < height_min or minp.y > height_max then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -38,10 +38,6 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume,
|
|||||||
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
|
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
|
||||||
local pr = PseudoRandom(seed)
|
local pr = PseudoRandom(seed)
|
||||||
local num_chunks = math.floor(chunks_per_volume * volume)
|
local num_chunks = math.floor(chunks_per_volume * volume)
|
||||||
local chunk_size = 3
|
|
||||||
if ore_per_chunk <= 4 then
|
|
||||||
chunk_size = 2
|
|
||||||
end
|
|
||||||
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk)
|
||||||
--print("generate_ore num_chunks: "..dump(num_chunks))
|
--print("generate_ore num_chunks: "..dump(num_chunks))
|
||||||
for i=1,num_chunks do
|
for i=1,num_chunks do
|
||||||
@ -84,11 +80,66 @@ function default.make_cactus(pos, size)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- facedir: 0/1/2/3 (head node facedir value)
|
||||||
|
-- length: length of rainbow tail
|
||||||
|
function default.make_nyancat(pos, facedir, length)
|
||||||
|
local tailvec = {x=0, y=0, z=0}
|
||||||
|
if facedir == 0 then
|
||||||
|
tailvec.z = 1
|
||||||
|
elseif facedir == 1 then
|
||||||
|
tailvec.x = 1
|
||||||
|
elseif facedir == 2 then
|
||||||
|
tailvec.z = -1
|
||||||
|
elseif facedir == 3 then
|
||||||
|
tailvec.x = -1
|
||||||
|
else
|
||||||
|
print("default.make_nyancat(): Invalid facedir: "+dump(facedir))
|
||||||
|
facedir = 0
|
||||||
|
tailvec.z = 1
|
||||||
|
end
|
||||||
|
local p = {x=pos.x, y=pos.y, z=pos.z}
|
||||||
|
minetest.env:set_node(p, {name="default:nyancat", param2=facedir})
|
||||||
|
for i=1,length do
|
||||||
|
p.x = p.x + tailvec.x
|
||||||
|
p.z = p.z + tailvec.z
|
||||||
|
minetest.env:set_node(p, {name="default:nyancat_rainbow"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function generate_nyancats(seed, minp, maxp)
|
||||||
|
local height_min = -31000
|
||||||
|
local height_max = -32
|
||||||
|
if maxp.y < height_min or minp.y > height_max then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local y_min = math.max(minp.y, height_min)
|
||||||
|
local y_max = math.min(maxp.y, height_max)
|
||||||
|
local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1)
|
||||||
|
local pr = PseudoRandom(seed + 9324342)
|
||||||
|
local max_num_nyancats = math.floor(volume / (16*16*16))
|
||||||
|
for i=1,max_num_nyancats do
|
||||||
|
if pr:next(0, 1000) == 0 then
|
||||||
|
local x0 = pr:next(minp.x, maxp.x)
|
||||||
|
local y0 = pr:next(minp.y, maxp.y)
|
||||||
|
local z0 = pr:next(minp.z, maxp.z)
|
||||||
|
local p0 = {x=x0, y=y0, z=z0}
|
||||||
|
default.make_nyancat(p0, pr:next(0,3), pr:next(3,15))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
minetest.register_on_generated(function(minp, maxp, seed)
|
minetest.register_on_generated(function(minp, maxp, seed)
|
||||||
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed, 1/8/8/8, 5, -31000, 64)
|
-- Generate regular ores
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5, -5, 7)
|
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8, 3, 8, -31000, 64)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16, -5)
|
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3, -15, 2)
|
||||||
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9, 5, -31000, -17)
|
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9, 3, 5, -63, -16)
|
||||||
|
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7, 3, 5, -31000, -64)
|
||||||
|
generate_ore("default:mese", "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3, -127, -64)
|
||||||
|
generate_ore("default:mese", "default:stone", minp, maxp, seed+5, 1/9/9/9, 3, 5, -31000,-128)
|
||||||
|
|
||||||
|
generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000, 0)
|
||||||
|
generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64)
|
||||||
|
|
||||||
if maxp.y >= 2 and minp.y <= 0 then
|
if maxp.y >= 2 and minp.y <= 0 then
|
||||||
-- Generate clay
|
-- Generate clay
|
||||||
-- Assume X and Z lengths are equal
|
-- Assume X and Z lengths are equal
|
||||||
@ -217,5 +268,8 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- Generate nyan cats
|
||||||
|
generate_nyancats(seed, minp, maxp)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
mods/default/textures/default_furnace_bottom.png
Normal file
After Width: | Height: | Size: 731 B |
BIN
mods/default/textures/default_furnace_fire_bg.png
Normal file
After Width: | Height: | Size: 313 B |
BIN
mods/default/textures/default_furnace_fire_fg.png
Normal file
After Width: | Height: | Size: 865 B |
Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 651 B |
BIN
mods/default/textures/default_furnace_front_active.png
Normal file
After Width: | Height: | Size: 826 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 731 B |
BIN
mods/default/textures/default_furnace_top.png
Normal file
After Width: | Height: | Size: 731 B |
BIN
mods/default/textures/default_lava_flowing_animated.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
mods/default/textures/default_lava_source_animated.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 203 B |
BIN
mods/default/textures/default_torch_animated.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
mods/default/textures/default_torch_on_ceiling_animated.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 282 B |
BIN
mods/default/textures/default_torch_on_floor_animated.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 483 B |
@ -11,18 +11,18 @@ Original license text:
|
|||||||
|
|
||||||
There has been unsuccesful attempts to contact the original author. Thus,
|
There has been unsuccesful attempts to contact the original author. Thus,
|
||||||
based on the intentions of the author, it is assumed that this code is
|
based on the intentions of the author, it is assumed that this code is
|
||||||
distributable and modifiable under GPLv2+later, under which Minetest is
|
distributable and modifiable under LGPLv2+later, under which Minetest is
|
||||||
distributed.
|
distributed.
|
||||||
|
|
||||||
Modifications:
|
Modifications:
|
||||||
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
http://www.gnu.org/licenses/gpl-2.0.html
|
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
|
||||||
License of media (textures and sounds)
|
License of media (textures and sounds)
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -15,7 +15,7 @@ minetest.register_alias('door_wood', 'doors:door_wood')
|
|||||||
minetest.register_node( 'doors:door_wood', {
|
minetest.register_node( 'doors:door_wood', {
|
||||||
description = 'Wooden Door',
|
description = 'Wooden Door',
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tile_images = { 'door_wood.png' },
|
tiles = { 'door_wood.png' },
|
||||||
inventory_image = 'door_wood.png',
|
inventory_image = 'door_wood.png',
|
||||||
wield_image = 'door_wood.png',
|
wield_image = 'door_wood.png',
|
||||||
paramtype2 = 'wallmounted',
|
paramtype2 = 'wallmounted',
|
||||||
@ -41,7 +41,7 @@ minetest.register_craft({
|
|||||||
minetest.register_node( 'doors:door_wood_a_c', {
|
minetest.register_node( 'doors:door_wood_a_c', {
|
||||||
Description = 'Top Closed Door',
|
Description = 'Top Closed Door',
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tile_images = { 'door_wood_a.png' },
|
tiles = { 'door_wood_a.png' },
|
||||||
inventory_image = 'door_wood_a.png',
|
inventory_image = 'door_wood_a.png',
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'wallmounted',
|
paramtype2 = 'wallmounted',
|
||||||
@ -55,7 +55,7 @@ minetest.register_node( 'doors:door_wood_a_c', {
|
|||||||
minetest.register_node( 'doors:door_wood_b_c', {
|
minetest.register_node( 'doors:door_wood_b_c', {
|
||||||
Description = 'Bottom Closed Door',
|
Description = 'Bottom Closed Door',
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tile_images = { 'door_wood_b.png' },
|
tiles = { 'door_wood_b.png' },
|
||||||
inventory_image = 'door_wood_b.png',
|
inventory_image = 'door_wood_b.png',
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'wallmounted',
|
paramtype2 = 'wallmounted',
|
||||||
@ -69,7 +69,7 @@ minetest.register_node( 'doors:door_wood_b_c', {
|
|||||||
minetest.register_node( 'doors:door_wood_a_o', {
|
minetest.register_node( 'doors:door_wood_a_o', {
|
||||||
Description = 'Top Open Door',
|
Description = 'Top Open Door',
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tile_images = { 'door_wood_a_r.png' },
|
tiles = { 'door_wood_a_r.png' },
|
||||||
inventory_image = 'door_wood_a_r.png',
|
inventory_image = 'door_wood_a_r.png',
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'wallmounted',
|
paramtype2 = 'wallmounted',
|
||||||
@ -83,7 +83,7 @@ minetest.register_node( 'doors:door_wood_a_o', {
|
|||||||
minetest.register_node( 'doors:door_wood_b_o', {
|
minetest.register_node( 'doors:door_wood_b_o', {
|
||||||
Description = 'Bottom Open Door',
|
Description = 'Bottom Open Door',
|
||||||
drawtype = 'signlike',
|
drawtype = 'signlike',
|
||||||
tile_images = { 'door_wood_b_r.png' },
|
tiles = { 'door_wood_b_r.png' },
|
||||||
inventory_image = 'door_wood_b_r.png',
|
inventory_image = 'door_wood_b_r.png',
|
||||||
paramtype = 'light',
|
paramtype = 'light',
|
||||||
paramtype2 = 'wallmounted',
|
paramtype2 = 'wallmounted',
|
||||||
@ -107,12 +107,12 @@ end
|
|||||||
local on_door_placed = function( pos, node, placer )
|
local on_door_placed = function( pos, node, placer )
|
||||||
if node.name ~= 'doors:door_wood' then return end
|
if node.name ~= 'doors:door_wood' then return end
|
||||||
|
|
||||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
local upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||||
apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
local apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||||
und = minetest.env:get_node( upos )
|
local und = minetest.env:get_node( upos )
|
||||||
abv = minetest.env:get_node( apos )
|
local abv = minetest.env:get_node( apos )
|
||||||
|
|
||||||
dir = placer:get_look_dir()
|
local dir = placer:get_look_dir()
|
||||||
|
|
||||||
if round( dir.x ) == 1 then
|
if round( dir.x ) == 1 then
|
||||||
newparam = WALLMX
|
newparam = WALLMX
|
||||||
@ -140,8 +140,8 @@ end
|
|||||||
local on_door_punched = function( pos, node, puncher )
|
local on_door_punched = function( pos, node, puncher )
|
||||||
if string.find( node.name, 'doors:door_wood' ) == nil then return end
|
if string.find( node.name, 'doors:door_wood' ) == nil then return end
|
||||||
|
|
||||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
local upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||||
apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
local apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||||
|
|
||||||
if string.find( node.name, '_c', -2 ) ~= nil then
|
if string.find( node.name, '_c', -2 ) ~= nil then
|
||||||
if node.param2 == WALLPX then
|
if node.param2 == WALLPX then
|
||||||
@ -185,8 +185,8 @@ local on_door_punched = function( pos, node, puncher )
|
|||||||
end
|
end
|
||||||
|
|
||||||
local on_door_digged = function( pos, node, digger )
|
local on_door_digged = function( pos, node, digger )
|
||||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
local upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||||
apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
local apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||||
|
|
||||||
if ( node.name == 'doors:door_wood_a_c' ) or ( node.name == 'doors:door_wood_a_o' ) then
|
if ( node.name == 'doors:door_wood_a_c' ) or ( node.name == 'doors:door_wood_a_o' ) then
|
||||||
minetest.env:remove_node( upos )
|
minetest.env:remove_node( upos )
|
||||||
|
15
mods/dye/README.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Minetest 0.4 mod: dye
|
||||||
|
======================
|
||||||
|
|
||||||
|
See init.lua for documentation.
|
||||||
|
|
||||||
|
License of source code and media files:
|
||||||
|
---------------------------------------
|
||||||
|
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||||
|
|
||||||
|
This program is free software. It comes without any warranty, to
|
||||||
|
the extent permitted by applicable law. You can redistribute it
|
||||||
|
and/or modify it under the terms of the Do What The Fuck You Want
|
||||||
|
To Public License, Version 2, as published by Sam Hocevar. See
|
||||||
|
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
|
0
mods/dye/depends.txt
Normal file
134
mods/dye/init.lua
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
-- minetest/dye/init.lua
|
||||||
|
|
||||||
|
-- To make recipes that will work with any dye ever made by anybody, define
|
||||||
|
-- them based on groups.
|
||||||
|
-- You can select any group of groups, based on your need for amount of colors.
|
||||||
|
-- basecolor: 9, excolor: 17, unicolor: 89
|
||||||
|
--
|
||||||
|
-- Example of one shapeless recipe using a color group:
|
||||||
|
-- Note: As this uses basecolor_*, you'd need 9 of these.
|
||||||
|
-- minetest.register_craft({
|
||||||
|
-- type = "shapeless",
|
||||||
|
-- output = '<mod>:item_yellow',
|
||||||
|
-- recipe = {'<mod>:item_no_color', 'group:basecolor_yellow'},
|
||||||
|
-- })
|
||||||
|
|
||||||
|
-- Other mods can use these for looping through available colors
|
||||||
|
local dye = {}
|
||||||
|
dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"}
|
||||||
|
dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"}
|
||||||
|
|
||||||
|
-- Base color groups:
|
||||||
|
-- - basecolor_white
|
||||||
|
-- - basecolor_grey
|
||||||
|
-- - basecolor_black
|
||||||
|
-- - basecolor_red
|
||||||
|
-- - basecolor_yellow
|
||||||
|
-- - basecolor_green
|
||||||
|
-- - basecolor_cyan
|
||||||
|
-- - basecolor_blue
|
||||||
|
-- - basecolor_magenta
|
||||||
|
|
||||||
|
-- Extended color groups (* = equal to a base color):
|
||||||
|
-- * excolor_white
|
||||||
|
-- - excolor_lightgrey
|
||||||
|
-- * excolor_grey
|
||||||
|
-- - excolor_darkgrey
|
||||||
|
-- * excolor_black
|
||||||
|
-- * excolor_red
|
||||||
|
-- - excolor_orange
|
||||||
|
-- * excolor_yellow
|
||||||
|
-- - excolor_lime
|
||||||
|
-- * excolor_green
|
||||||
|
-- - excolor_aqua
|
||||||
|
-- * excolor_cyan
|
||||||
|
-- - excolor_sky_blue
|
||||||
|
-- * excolor_blue
|
||||||
|
-- - excolor_violet
|
||||||
|
-- * excolor_magenta
|
||||||
|
-- - excolor_red_violet
|
||||||
|
|
||||||
|
-- The whole unifieddyes palette as groups:
|
||||||
|
-- - unicolor_<excolor>
|
||||||
|
-- For the following, no white/grey/black is allowed:
|
||||||
|
-- - unicolor_medium_<excolor>
|
||||||
|
-- - unicolor_dark_<excolor>
|
||||||
|
-- - unicolor_light_<excolor>
|
||||||
|
-- - unicolor_<excolor>_s50
|
||||||
|
-- - unicolor_medium_<excolor>_s50
|
||||||
|
-- - unicolor_dark_<excolor>_s50
|
||||||
|
|
||||||
|
-- Local stuff
|
||||||
|
local dyelocal = {}
|
||||||
|
|
||||||
|
-- This collection of colors is partly a historic thing, partly something else.
|
||||||
|
dyelocal.dyes = {
|
||||||
|
{"white", "White dye", {dye=1, basecolor_white=1, excolor_white=1, unicolor_white=1}},
|
||||||
|
{"grey", "Grey dye", {dye=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}},
|
||||||
|
{"dark_grey", "Dark grey dye", {dye=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}},
|
||||||
|
{"black", "Black dye", {dye=1, basecolor_black=1, excolor_black=1, unicolor_black=1}},
|
||||||
|
{"violet", "Violet dye", {dye=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}},
|
||||||
|
{"blue", "Blue dye", {dye=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}},
|
||||||
|
{"cyan", "Cyan dye", {dye=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}},
|
||||||
|
{"dark_green", "Dark green dye",{dye=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
|
||||||
|
{"green", "Green dye", {dye=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
|
||||||
|
{"yellow", "Yellow dye", {dye=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
|
||||||
|
{"brown", "Brown dye", {dye=1, basecolor_yellow=1, excolor_orange=1, unicolor_dark_orange=1}},
|
||||||
|
{"orange", "Orange dye", {dye=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
|
||||||
|
{"red", "Red dye", {dye=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
|
||||||
|
{"magenta", "Magenta dye", {dye=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},
|
||||||
|
{"pink", "Pink dye", {dye=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}},
|
||||||
|
}
|
||||||
|
|
||||||
|
-- Define items
|
||||||
|
for _, row in ipairs(dyelocal.dyes) do
|
||||||
|
local name = row[1]
|
||||||
|
local description = row[2]
|
||||||
|
local groups = row[3]
|
||||||
|
local item_name = "dye:"..name
|
||||||
|
local item_image = "dye_"..name..".png"
|
||||||
|
minetest.register_craftitem(item_name, {
|
||||||
|
inventory_image = item_image,
|
||||||
|
description = description,
|
||||||
|
groups = groups
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Mix recipes
|
||||||
|
-- Just mix everything to everything somehow sanely
|
||||||
|
|
||||||
|
dyelocal.mixbases = {"magenta", "red", "orange", "brown", "yellow", "green", "dark_green", "cyan", "blue", "violet", "black", "dark_grey", "grey", "white"}
|
||||||
|
|
||||||
|
dyelocal.mixes = {
|
||||||
|
-- magenta, red, orange, brown, yellow, green, dark_green, cyan, blue, violet, black, dark_grey, grey, white
|
||||||
|
white = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "violet", "grey", "grey", "white", "white"},
|
||||||
|
grey = {"pink", "pink", "orange", "orange", "yellow", "green", "green", "grey", "cyan", "pink", "dark_grey","grey", "grey"},
|
||||||
|
dark_grey={"brown","brown", "brown", "brown", "brown","dark_green","dark_green","blue","blue","violet","black", "black"},
|
||||||
|
black = {"black", "black", "black", "black", "black", "black", "black", "black", "black", "black", "black"},
|
||||||
|
violet= {"magenta","magenta","red", "brown", "red", "cyan", "brown", "blue", "violet","violet"},
|
||||||
|
blue = {"violet", "magenta","brown","brown","dark_green","cyan","cyan", "cyan", "blue"},
|
||||||
|
cyan = {"blue","brown","dark_green","dark_grey","green","cyan","dark_green","cyan"},
|
||||||
|
dark_green={"brown","brown","brown", "brown", "green", "green", "dark_green"},
|
||||||
|
green = {"brown", "yellow","yellow","dark_green","green","green"},
|
||||||
|
yellow= {"red", "orange", "yellow","orange", "yellow"},
|
||||||
|
brown = {"brown", "brown","orange", "brown"},
|
||||||
|
orange= {"red", "orange","orange"},
|
||||||
|
red = {"magenta","red"},
|
||||||
|
magenta={"magenta"},
|
||||||
|
}
|
||||||
|
|
||||||
|
for one,results in pairs(dyelocal.mixes) do
|
||||||
|
for i,result in ipairs(results) do
|
||||||
|
local another = dyelocal.mixbases[i]
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'dye:'..result..' 2',
|
||||||
|
recipe = {'dye:'..one, 'dye:'..another},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Hide dyelocal
|
||||||
|
dyelocal = nil
|
||||||
|
|
||||||
|
-- EOF
|
BIN
mods/dye/textures/dye_black.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
mods/dye/textures/dye_blue.png
Normal file
After Width: | Height: | Size: 352 B |
BIN
mods/dye/textures/dye_brown.png
Normal file
After Width: | Height: | Size: 348 B |
BIN
mods/dye/textures/dye_cyan.png
Normal file
After Width: | Height: | Size: 370 B |
BIN
mods/dye/textures/dye_dark_green.png
Normal file
After Width: | Height: | Size: 367 B |
BIN
mods/dye/textures/dye_dark_grey.png
Normal file
After Width: | Height: | Size: 371 B |
BIN
mods/dye/textures/dye_green.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
mods/dye/textures/dye_grey.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
mods/dye/textures/dye_magenta.png
Normal file
After Width: | Height: | Size: 380 B |
BIN
mods/dye/textures/dye_orange.png
Normal file
After Width: | Height: | Size: 374 B |
BIN
mods/dye/textures/dye_pink.png
Normal file
After Width: | Height: | Size: 364 B |
BIN
mods/dye/textures/dye_red.png
Normal file
After Width: | Height: | Size: 381 B |
BIN
mods/dye/textures/dye_violet.png
Normal file
After Width: | Height: | Size: 376 B |
BIN
mods/dye/textures/dye_white.png
Normal file
After Width: | Height: | Size: 375 B |
BIN
mods/dye/textures/dye_yellow.png
Normal file
After Width: | Height: | Size: 389 B |
@ -6,11 +6,11 @@ License of source code:
|
|||||||
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU Lesser General Public License as published by
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
the Free Software Foundation; either version 2.1 of the License, or
|
||||||
(at your option) any later version.
|
(at your option) any later version.
|
||||||
|
|
||||||
http://www.gnu.org/licenses/gpl-2.0.html
|
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||||
|
|
||||||
License of media (textures and sounds)
|
License of media (textures and sounds)
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
minetest.register_node("fire:basic_flame", {
|
minetest.register_node("fire:basic_flame", {
|
||||||
description = "Fire",
|
description = "Fire",
|
||||||
drawtype = "glasslike",
|
drawtype = "glasslike",
|
||||||
tile_images = {"fire_basic_flame.png"},
|
tiles = {"fire_basic_flame.png"},
|
||||||
light_source = 14,
|
light_source = 14,
|
||||||
groups = {igniter=3,dig_immediate=3},
|
groups = {igniter=2,dig_immediate=3},
|
||||||
drop = '',
|
drop = '',
|
||||||
walkable = false,
|
walkable = false,
|
||||||
})
|
})
|
||||||
|
@ -102,6 +102,7 @@ minetest.register_craftitem(":cooked_rat", {
|
|||||||
minetest.register_craftitem(":firefly", {
|
minetest.register_craftitem(":firefly", {
|
||||||
description = "Firefly",
|
description = "Firefly",
|
||||||
inventory_image = "firefly.png",
|
inventory_image = "firefly.png",
|
||||||
|
groups = {not_in_creative_inventory=1},
|
||||||
on_drop = function(item, dropper, pos)
|
on_drop = function(item, dropper, pos)
|
||||||
minetest.env:add_firefly(pos)
|
minetest.env:add_firefly(pos)
|
||||||
item:take_item()
|
item:take_item()
|
||||||
|
26
mods/stairs/README.txt
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Minetest 0.4 mod: stairs
|
||||||
|
=========================
|
||||||
|
|
||||||
|
License of source code:
|
||||||
|
-----------------------
|
||||||
|
Copyright (C) 2011-2012 Kahrl <kahrl@gmx.net>
|
||||||
|
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 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
|
||||||
|
-----------------------
|
||||||
|
Everything not listed in here:
|
||||||
|
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
|
||||||
|
|
1
mods/stairs/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
146
mods/stairs/init.lua
Normal file
@ -0,0 +1,146 @@
|
|||||||
|
-- Minetest 0.4 mod: stairs
|
||||||
|
-- See README.txt for licensing and other information.
|
||||||
|
|
||||||
|
stairs = {}
|
||||||
|
|
||||||
|
-- Node will be called stairs:stair_<subname>
|
||||||
|
function stairs.register_stair(subname, recipeitem, groups, images, description)
|
||||||
|
minetest.register_node("stairs:stair_" .. subname, {
|
||||||
|
description = description,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = images,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = groups,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
{-0.5, 0, 0, 0.5, 0.5, 0.5},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'stairs:stair_' .. subname .. ' 4',
|
||||||
|
recipe = {
|
||||||
|
{recipeitem, "", ""},
|
||||||
|
{recipeitem, recipeitem, ""},
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Flipped recipe for the silly minecrafters
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'stairs:stair_' .. subname .. ' 4',
|
||||||
|
recipe = {
|
||||||
|
{"", "", recipeitem},
|
||||||
|
{"", recipeitem, recipeitem},
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Node will be called stairs:slab_<subname>
|
||||||
|
function stairs.register_slab(subname, recipeitem, groups, images, description)
|
||||||
|
minetest.register_node("stairs:slab_" .. subname, {
|
||||||
|
description = description,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = images,
|
||||||
|
paramtype = "light",
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = groups,
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
|
||||||
|
},
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
-- If it's being placed on an another similar one, replace it with
|
||||||
|
-- a full block
|
||||||
|
local slabpos = nil
|
||||||
|
local slabnode = nil
|
||||||
|
local p0 = pointed_thing.under
|
||||||
|
local p1 = pointed_thing.above
|
||||||
|
local n0 = minetest.env:get_node(p0)
|
||||||
|
local n1 = minetest.env:get_node(p1)
|
||||||
|
if n0.name == "stairs:slab_" .. subname then
|
||||||
|
slabpos = p0
|
||||||
|
slabnode = n0
|
||||||
|
elseif n1.name == "stairs:slab_" .. subname then
|
||||||
|
slabpos = p1
|
||||||
|
slabnode = n1
|
||||||
|
end
|
||||||
|
if slabpos then
|
||||||
|
-- Remove the slab at slabpos
|
||||||
|
minetest.env:remove_node(slabpos)
|
||||||
|
-- Make a fake stack of a single item and try to place it
|
||||||
|
local fakestack = ItemStack(recipeitem)
|
||||||
|
pointed_thing.above = slabpos
|
||||||
|
fakestack = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
|
-- If the item was taken from the fake stack, decrement original
|
||||||
|
if not fakestack or fakestack:is_empty() then
|
||||||
|
itemstack:take_item(1)
|
||||||
|
-- Else put old node back
|
||||||
|
else
|
||||||
|
minetest.env:set_node(slabpos, slabnode)
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Otherwise place regularly
|
||||||
|
return minetest.item_place(itemstack, placer, pointed_thing)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'stairs:slab_' .. subname .. ' 3',
|
||||||
|
recipe = {
|
||||||
|
{recipeitem, recipeitem, recipeitem},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Nodes will be called stairs:{stair,slab}_<subname>
|
||||||
|
function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab)
|
||||||
|
stairs.register_stair(subname, recipeitem, groups, images, desc_stair)
|
||||||
|
stairs.register_slab(subname, recipeitem, groups, images, desc_slab)
|
||||||
|
end
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("wood", "default:wood",
|
||||||
|
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
|
||||||
|
{"default_wood.png"},
|
||||||
|
"Wooden stair",
|
||||||
|
"Wooden slab")
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("stone", "default:stone",
|
||||||
|
{cracky=3},
|
||||||
|
{"default_stone.png"},
|
||||||
|
"Stone stair",
|
||||||
|
"Stone slab")
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("cobble", "default:cobble",
|
||||||
|
{cracky=3},
|
||||||
|
{"default_cobble.png"},
|
||||||
|
"Cobble stair",
|
||||||
|
"Cobble slab")
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("brick", "default:brick",
|
||||||
|
{cracky=3},
|
||||||
|
{"default_brick.png"},
|
||||||
|
"Brick stair",
|
||||||
|
"Brick slab")
|
||||||
|
|
||||||
|
stairs.register_stair_and_slab("sandstone", "default:sandstone",
|
||||||
|
{crumbly=2,cracky=2},
|
||||||
|
{"default_sandstone.png"},
|
||||||
|
"Sandstone stair",
|
||||||
|
"Sandstone slab")
|
45
mods/vessels/README.txt
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
Minetest 0.4 mod: vessels
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Crafts
|
||||||
|
-------
|
||||||
|
Glass bottle (yields 10)
|
||||||
|
|
||||||
|
G - G
|
||||||
|
G - G
|
||||||
|
- G -
|
||||||
|
|
||||||
|
Drinking Glass (yields 14)
|
||||||
|
|
||||||
|
G - G
|
||||||
|
G - G
|
||||||
|
G G G
|
||||||
|
|
||||||
|
Heavy Steel Bottle (yields 5)
|
||||||
|
|
||||||
|
S - S
|
||||||
|
S - S
|
||||||
|
- S -
|
||||||
|
|
||||||
|
License of source code:
|
||||||
|
-----------------------
|
||||||
|
Copyright (C) 2012 Vanessa Ezekowitz
|
||||||
|
Version 2012-09-02
|
||||||
|
Modifications by 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)
|
||||||
|
--------------------------------------
|
||||||
|
WTFPL
|
||||||
|
|
||||||
|
Authors of media files
|
||||||
|
-----------------------
|
||||||
|
Unless specifically noted,
|
||||||
|
Copyright (C) 2012 Vanessa Ezekowitz
|
||||||
|
|
1
mods/vessels/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
86
mods/vessels/init.lua
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
-- Minetest 0.4 mod: vessels
|
||||||
|
-- See README.txt for licensing and other information.
|
||||||
|
|
||||||
|
minetest.register_craftitem("vessels:glass_bottle", {
|
||||||
|
description = "Glass Bottle (empty)",
|
||||||
|
inventory_image = "vessels_glass_bottle.png",
|
||||||
|
groups = {vessel=1},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "vessels:glass_bottle 10",
|
||||||
|
recipe = {
|
||||||
|
{ "default:glass", "", "default:glass" },
|
||||||
|
{ "default:glass", "", "default:glass" },
|
||||||
|
{ "", "default:glass", "" }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("vessels:drinking_glass", {
|
||||||
|
description = "Drinking Glass (empty)",
|
||||||
|
inventory_image = "vessels_drinking_glass.png",
|
||||||
|
groups = {vessel=1},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "vessels:drinking_glass 14",
|
||||||
|
recipe = {
|
||||||
|
{ "default:glass", "", "default:glass" },
|
||||||
|
{ "default:glass", "", "default:glass" },
|
||||||
|
{ "default:glass", "default:glass", "default:glass" }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("vessels:steel_bottle", {
|
||||||
|
description = "Heavy Steel Bottle (empty)",
|
||||||
|
inventory_image = "vessels_steel_bottle.png",
|
||||||
|
groups = {vessel=1},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
output = "vessels:steel_bottle 5",
|
||||||
|
recipe = {
|
||||||
|
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||||
|
{ "default:steel_ingot", "", "default:steel_ingot" },
|
||||||
|
{ "", "default:steel_ingot", "" }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
-- Make sure we can recycle them
|
||||||
|
|
||||||
|
minetest.register_craftitem("vessels:glass_fragments", {
|
||||||
|
description = "Pile of Glass Fragments",
|
||||||
|
inventory_image = "vessels_glass_fragments.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "vessels:glass_fragments",
|
||||||
|
recipe = {
|
||||||
|
"vessels:glass_bottle",
|
||||||
|
"vessels:glass_bottle",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "shapeless",
|
||||||
|
output = "vessels:glass_fragments",
|
||||||
|
recipe = {
|
||||||
|
"vessels:drinking_glass",
|
||||||
|
"vessels:drinking_glass",
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "default:glass",
|
||||||
|
recipe = "vessels:glass_fragments",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft( {
|
||||||
|
type = "cooking",
|
||||||
|
output = "default:steel_ingot",
|
||||||
|
recipe = "vessels:steel_bottle",
|
||||||
|
})
|
||||||
|
|
BIN
mods/vessels/textures/alternates/vessels_drinking_glass.png
Normal file
After Width: | Height: | Size: 253 B |
BIN
mods/vessels/textures/alternates/vessels_glass_bottle.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
mods/vessels/textures/alternates/vessels_steel_bottle.png
Normal file
After Width: | Height: | Size: 345 B |
BIN
mods/vessels/textures/vessels_drinking_glass.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
mods/vessels/textures/vessels_glass_bottle.png
Normal file
After Width: | Height: | Size: 405 B |
BIN
mods/vessels/textures/vessels_glass_fragments.png
Normal file
After Width: | Height: | Size: 425 B |
BIN
mods/vessels/textures/vessels_steel_bottle.png
Normal file
After Width: | Height: | Size: 342 B |
28
mods/wool/README.txt
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
Minetest 0.4 mod: wool
|
||||||
|
======================
|
||||||
|
|
||||||
|
Mostly backward-compatible with jordach's 16-color wool mod.
|
||||||
|
|
||||||
|
License of source code:
|
||||||
|
-----------------------
|
||||||
|
Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com>
|
||||||
|
|
||||||
|
This program is free software. It comes without any warranty, to
|
||||||
|
the extent permitted by applicable law. You can redistribute it
|
||||||
|
and/or modify it under the terms of the Do What The Fuck You Want
|
||||||
|
To Public License, Version 2, as published by Sam Hocevar. See
|
||||||
|
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||||
|
|
||||||
|
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
|
||||||
|
-----------------------
|
||||||
|
Cisoun:
|
||||||
|
- wool_black.png wool_brown.png wool_dark_green.png wool_green.png
|
||||||
|
- wool_magenta.png wool_pink.png wool_violet.png wool_yellow.png wool_blue.png
|
||||||
|
- wool_cyan.png wool_dark_grey.png wool_grey.png wool_orange.png wool_red.png
|
||||||
|
- wool_white.png
|
||||||
|
|
0
mods/wool/depends.txt
Normal file
48
mods/wool/init.lua
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
-- minetest/wool/init.lua
|
||||||
|
|
||||||
|
-- Backwards compatibility with jordach's 16-color wool mod
|
||||||
|
minetest.register_alias("wool:dark_blue", "wool:blue")
|
||||||
|
minetest.register_alias("wool:gold", "wool:yellow")
|
||||||
|
|
||||||
|
local wool = {}
|
||||||
|
-- This uses a trick: you can first define the recipes using all of the base
|
||||||
|
-- colors, and then some recipes using more specific colors for a few non-base
|
||||||
|
-- colors available. When crafting, the last recipes will be checked first.
|
||||||
|
wool.dyes = {
|
||||||
|
{"white", "White", nil},
|
||||||
|
{"grey", "Grey", "basecolor_grey"},
|
||||||
|
{"black", "Black", "basecolor_black"},
|
||||||
|
{"red", "Red", "basecolor_red"},
|
||||||
|
{"yellow", "Yellow", "basecolor_yellow"},
|
||||||
|
{"green", "Green", "basecolor_green"},
|
||||||
|
{"cyan", "Cyan", "basecolor_cyan"},
|
||||||
|
{"blue", "Blue", "basecolor_blue"},
|
||||||
|
{"magenta", "Magenta", "basecolor_magenta"},
|
||||||
|
{"orange", "Orange", "excolor_orange"},
|
||||||
|
{"violet", "Violet", "excolor_violet"},
|
||||||
|
{"brown", "Brown", "unicolor_dark_orange"},
|
||||||
|
{"pink", "Pink", "unicolor_light_red"},
|
||||||
|
{"dark_grey", "Dark Grey", "unicolor_darkgrey"},
|
||||||
|
{"dark_green", "Dark Green", "unicolor_dark_green"},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, row in ipairs(wool.dyes) do
|
||||||
|
local name = row[1]
|
||||||
|
local desc = row[2]
|
||||||
|
local craft_color_group = row[3]
|
||||||
|
-- Node Definition
|
||||||
|
minetest.register_node("wool:"..name, {
|
||||||
|
description = desc.." Wool",
|
||||||
|
tiles = {"wool_"..name..".png"},
|
||||||
|
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3},
|
||||||
|
})
|
||||||
|
if craft_color_group then
|
||||||
|
-- Crafting from dye and white wool
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "shapeless",
|
||||||
|
output = 'wool:'..name..' 16',
|
||||||
|
recipe = {'group:dye,'..craft_color_group, 'wool:white'},
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
BIN
mods/wool/textures/wool_black.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/wool/textures/wool_blue.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
mods/wool/textures/wool_brown.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/wool/textures/wool_cyan.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/wool/textures/wool_dark_green.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/wool/textures/wool_dark_grey.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
mods/wool/textures/wool_green.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
mods/wool/textures/wool_grey.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
mods/wool/textures/wool_magenta.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
mods/wool/textures/wool_orange.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
mods/wool/textures/wool_pink.png
Normal file
After Width: | Height: | Size: 3.0 KiB |
BIN
mods/wool/textures/wool_red.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
mods/wool/textures/wool_violet.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/wool/textures/wool_white.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/wool/textures/wool_yellow.png
Normal file
After Width: | Height: | Size: 3.1 KiB |