Compare commits
88 Commits
0.4.dev-20
...
0.4.4
Author | SHA1 | Date | |
---|---|---|---|
3928eccf74 | |||
5311c6ec96 | |||
91937acf76 | |||
e7b4b2ba57 | |||
89fb5aed7f | |||
df54836ea0 | |||
f2a67871d2 | |||
c3eaa9cd64 | |||
d39044a2a7 | |||
8a6b2df6b1 | |||
bed848f68a | |||
24939c299b | |||
24d8d79ea1 | |||
cb4bfa51a1 | |||
7a01de2f36 | |||
c7a4a68d28 | |||
91da5d1308 | |||
39e4bf0346 | |||
dce87664d2 | |||
b97400d71d | |||
abaf4c5121 | |||
609646b9b5 | |||
04d40a5ce4 | |||
24781813fa | |||
0057a87b99 | |||
dfa0f096ce | |||
e9ad8d06c8 | |||
0495f9e209 | |||
2ff55cf6cc | |||
d0638d7284 | |||
6687b5504d | |||
c455ba9b68 | |||
165da9348a | |||
fb8144f703 | |||
df2fdba2b4 | |||
3a7cbfc531 | |||
2768d4974b | |||
d317d7b80b | |||
91ee23d61b | |||
df3a694099 | |||
d75b39683a | |||
68020d2e93 | |||
f1a447d1fe | |||
30d582296b | |||
36c17b04fe | |||
ff9e2a75ee | |||
5497db98de | |||
4a68126a2b | |||
5ce918059d | |||
e0fe1a08c5 | |||
25a6cd866b | |||
0ed7ccfc1f | |||
e5502c9415 | |||
e5e62f9085 | |||
a8a204ae39 | |||
a399f648e7 | |||
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 |
@ -7,11 +7,11 @@ 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 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
|
||||
(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)
|
||||
--------------------------------------
|
||||
|
@ -40,14 +40,21 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image)
|
||||
if pointed_thing.type ~= "node" then
|
||||
return
|
||||
end
|
||||
-- Check if pointing to a liquid
|
||||
-- Check if pointing to a buildable node
|
||||
n = minetest.env:get_node(pointed_thing.under)
|
||||
if bucket.liquids[n.name] == nil then
|
||||
-- Not a liquid
|
||||
minetest.env:add_node(pointed_thing.above, {name=source})
|
||||
elseif n.name ~= source then
|
||||
-- It's a liquid
|
||||
if minetest.registered_nodes[n.name].buildable_to then
|
||||
-- buildable; replace the node
|
||||
minetest.env:add_node(pointed_thing.under, {name=source})
|
||||
else
|
||||
-- not buildable to; place the liquid above
|
||||
-- check if the node above can be replaced
|
||||
n = minetest.env:get_node(pointed_thing.above)
|
||||
if minetest.registered_nodes[n.name].buildable_to then
|
||||
minetest.env:add_node(pointed_thing.above,{name=source})
|
||||
else
|
||||
-- do not remove the bucket with the liquid
|
||||
return
|
||||
end
|
||||
end
|
||||
return {name="bucket:bucket_empty"}
|
||||
end
|
||||
@ -56,6 +63,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image)
|
||||
end
|
||||
|
||||
minetest.register_craftitem("bucket:bucket_empty", {
|
||||
description = "Empty Bucket",
|
||||
inventory_image = "bucket.png",
|
||||
stack_max = 1,
|
||||
liquids_pointable = true,
|
||||
@ -90,6 +98,6 @@ bucket.register_liquid(
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:bucket_lava",
|
||||
recipe = "bucket:bucket_lava",
|
||||
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.
|
||||
|
131
mods/creative/init.lua
Normal file
@ -0,0 +1,131 @@
|
||||
-- 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)
|
||||
return 0
|
||||
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
|
||||
stack2 = ItemStack(stack:get_name().." "..stack:get_stack_max())
|
||||
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)
|
||||
|
||||
-- Create the trash field
|
||||
local trash = minetest.create_detached_inventory("creative_trash", {
|
||||
-- Allow the stack to be placed and remove it in on_put()
|
||||
-- This allows the creative inventory to restore the stack
|
||||
allow_put = function(inv, listname, index, stack, player)
|
||||
if minetest.setting_getbool("creative_mode") then
|
||||
return stack:get_count()
|
||||
else
|
||||
return 0
|
||||
end
|
||||
end,
|
||||
on_put = function(inv, listname, index, stack, player)
|
||||
inv:set_stack(listname, index, "")
|
||||
end,
|
||||
})
|
||||
trash:set_size("main", 1)
|
||||
|
||||
|
||||
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;>>]"..
|
||||
"label[5,1.5;Trash:]"..
|
||||
"list[detached:creative_trash;main;5,2;1,1;]")
|
||||
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>
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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/gpl-2.0.html
|
||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
License of media (textures and sounds)
|
||||
--------------------------------------
|
||||
@ -47,7 +47,6 @@ Cisoun's WTFPL texture pack:
|
||||
default_tool_mesepick.png
|
||||
default_tool_steelpick.png
|
||||
default_tool_steelshovel.png
|
||||
default_tool_steelsword.png
|
||||
default_tool_stonepick.png
|
||||
default_tool_stoneshovel.png
|
||||
default_tool_woodpick.png
|
||||
@ -61,4 +60,36 @@ Originating from G4JC's Almost MC Texture Pack:
|
||||
default_torch.png
|
||||
default_torch_on_ceiling.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
|
||||
|
||||
RealBadAngel's animated water (WTFPL):
|
||||
default_water_source_animated.png
|
||||
default_water_flowing_animated.png
|
||||
|
||||
VanessaE:
|
||||
default_nc_back.png
|
||||
default_nc_front.png
|
||||
default_nc_rb.png
|
||||
default_nc_side.png
|
||||
|
||||
Calinou's improved default textures (CC BY-SA):
|
||||
default_brick.png
|
||||
default_clay_brick.png
|
||||
default_papyrus.png
|
||||
default_tool_steelsword.png
|
||||
|
||||
MirceaKitsune (WTFPL):
|
||||
character.x
|
||||
|
||||
Jordach (CC BY-SA 3.0):
|
||||
character.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/
|
||||
3: http://www.freesound.org/people/lsprice/sounds/88808/
|
||||
|
@ -47,7 +47,7 @@ minetest.register_abm({
|
||||
local n = minetest.env:get_node(trunkp)
|
||||
local reg = minetest.registered_nodes[n.name]
|
||||
-- Assume ignore is a trunk, to make the thing work at the border of the active area
|
||||
if n.name == "ignore" or (reg.groups.tree and reg.groups.tree ~= 0) then
|
||||
if n.name == "ignore" or (reg and reg.groups.tree and reg.groups.tree ~= 0) then
|
||||
--print("cached trunk still exists")
|
||||
return
|
||||
end
|
||||
|
@ -69,14 +69,26 @@ end
|
||||
function default.make_papyrus(pos, size)
|
||||
for y=0,size-1 do
|
||||
local p = {x=pos.x, y=pos.y+y, z=pos.z}
|
||||
minetest.env:set_node(p, {name="default:papyrus"})
|
||||
local nn = minetest.env:get_node(p).name
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
minetest.env:set_node(p, {name="default:papyrus"})
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function default.make_cactus(pos, size)
|
||||
for y=0,size-1 do
|
||||
local p = {x=pos.x, y=pos.y+y, z=pos.z}
|
||||
minetest.env:set_node(p, {name="default:cactus"})
|
||||
local nn = minetest.env:get_node(p).name
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
minetest.env:set_node(p, {name="default:cactus"})
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -245,11 +257,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
local z0 = minp.z + math.floor((divz+0)*divlen)
|
||||
local x1 = minp.x + math.floor((divx+1)*divlen)
|
||||
local z1 = minp.z + math.floor((divz+1)*divlen)
|
||||
-- Determine cactus amount from perlin noise
|
||||
local cactus_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
|
||||
-- Find random positions for cactus based on this random
|
||||
-- Determine dry shrubs amount from perlin noise
|
||||
local shrub_amount = math.floor(perlin1:get2d({x=x0, y=z0}) * 5 + 0)
|
||||
-- Find random positions for dry shrubs based on this random
|
||||
local pr = PseudoRandom(seed+1)
|
||||
for i=0,cactus_amount do
|
||||
for i=0,shrub_amount do
|
||||
local x = pr:next(x0, x1)
|
||||
local z = pr:next(z0, z1)
|
||||
-- Find ground level (0...15)
|
||||
@ -260,9 +272,14 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
break
|
||||
end
|
||||
end
|
||||
-- If desert sand, make cactus
|
||||
-- If desert sand, make dry shrub
|
||||
if ground_y and minetest.env:get_node({x=x,y=ground_y,z=z}).name == "default:desert_sand" then
|
||||
minetest.env:set_node({x=x,y=ground_y+1,z=z}, {name="default:dry_shrub"})
|
||||
local p = {x=x,y=ground_y+1,z=z}
|
||||
local nn = minetest.env:get_node(p).name
|
||||
if minetest.registered_nodes[nn] and
|
||||
minetest.registered_nodes[nn].buildable_to then
|
||||
minetest.env:set_node(p, {name="default:dry_shrub"})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
BIN
mods/default/models/character.blend
Normal file
BIN
mods/default/models/character.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
6557
mods/default/models/character.x
Normal file
132
mods/default/player.lua
Normal file
@ -0,0 +1,132 @@
|
||||
-- Minetest 0.4 mod: player
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
--
|
||||
-- Start of configuration area:
|
||||
--
|
||||
|
||||
-- Player animation speed
|
||||
animation_speed = 30
|
||||
|
||||
-- Player animation blending
|
||||
-- Note: This is currently broken due to a bug in Irrlicht, leave at 0
|
||||
animation_blend = 0
|
||||
|
||||
-- Default player appearance
|
||||
default_model = "character.x"
|
||||
default_textures = {"character.png", }
|
||||
|
||||
-- Frame ranges for each player model
|
||||
function player_get_animations(model)
|
||||
if model == "character.x" then
|
||||
return {
|
||||
stand_START = 0,
|
||||
stand_END = 79,
|
||||
sit_START = 81,
|
||||
sit_END = 160,
|
||||
lay_START = 162,
|
||||
lay_END = 166,
|
||||
walk_START = 168,
|
||||
walk_END = 187,
|
||||
mine_START = 189,
|
||||
mine_END = 198,
|
||||
walk_mine_START = 200,
|
||||
walk_mine_END = 219
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
--
|
||||
-- End of configuration area.
|
||||
--
|
||||
|
||||
-- Player stats and animations
|
||||
local player_model = {}
|
||||
local player_anim = {}
|
||||
local player_sneak = {}
|
||||
local ANIM_STAND = 1
|
||||
local ANIM_SIT = 2
|
||||
local ANIM_LAY = 3
|
||||
local ANIM_WALK = 4
|
||||
local ANIM_WALK_MINE = 5
|
||||
local ANIM_MINE = 6
|
||||
|
||||
-- Called when a player's appearance needs to be updated
|
||||
function player_update_visuals(pl)
|
||||
local name = pl:get_player_name()
|
||||
|
||||
player_model[name] = default_model
|
||||
player_anim[name] = 0 -- Animation will be set further below immediately
|
||||
player_sneak[name] = false
|
||||
prop = {
|
||||
mesh = default_model,
|
||||
textures = default_textures,
|
||||
visual = "mesh",
|
||||
visual_size = {x=1, y=1},
|
||||
}
|
||||
pl:set_properties(prop)
|
||||
end
|
||||
|
||||
-- Update appearance when the player joins
|
||||
minetest.register_on_joinplayer(player_update_visuals)
|
||||
|
||||
-- Check each player and apply animations
|
||||
function player_step(dtime)
|
||||
for _, pl in pairs(minetest.get_connected_players()) do
|
||||
local name = pl:get_player_name()
|
||||
local anim = player_get_animations(player_model[name])
|
||||
local controls = pl:get_player_control()
|
||||
local walking = false
|
||||
local animation_speed_mod = animation_speed
|
||||
|
||||
-- Determine if the player is walking
|
||||
if controls.up or controls.down or controls.left or controls.right then
|
||||
walking = true
|
||||
end
|
||||
|
||||
-- Determine if the player is sneaking, and reduce animation speed if so
|
||||
if controls.sneak and pl:get_hp() ~= 0 and (walking or controls.LMB) then
|
||||
animation_speed_mod = animation_speed_mod / 2
|
||||
-- Refresh player animation below if sneak state changed
|
||||
if not player_sneak[name] then
|
||||
player_anim[name] = 0
|
||||
player_sneak[name] = true
|
||||
end
|
||||
else
|
||||
-- Refresh player animation below if sneak state changed
|
||||
if player_sneak[name] then
|
||||
player_anim[name] = 0
|
||||
player_sneak[name] = false
|
||||
end
|
||||
end
|
||||
|
||||
-- Apply animations based on what the player is doing
|
||||
if pl:get_hp() == 0 then
|
||||
if player_anim[name] ~= ANIM_LAY then
|
||||
pl:set_animation({x=anim.lay_START, y=anim.lay_END}, animation_speed_mod, animation_blend)
|
||||
player_anim[name] = ANIM_LAY
|
||||
end
|
||||
elseif walking and controls.LMB then
|
||||
if player_anim[name] ~= ANIM_WALK_MINE then
|
||||
pl:set_animation({x=anim.walk_mine_START, y=anim.walk_mine_END}, animation_speed_mod, animation_blend)
|
||||
player_anim[name] = ANIM_WALK_MINE
|
||||
end
|
||||
elseif walking then
|
||||
if player_anim[name] ~= ANIM_WALK then
|
||||
pl:set_animation({x=anim.walk_START, y=anim.walk_END}, animation_speed_mod, animation_blend)
|
||||
player_anim[name] = ANIM_WALK
|
||||
end
|
||||
elseif controls.LMB then
|
||||
if player_anim[name] ~= ANIM_MINE then
|
||||
pl:set_animation({x=anim.mine_START, y=anim.mine_END}, animation_speed_mod, animation_blend)
|
||||
player_anim[name] = ANIM_MINE
|
||||
end
|
||||
elseif player_anim[name] ~= ANIM_STAND then
|
||||
pl:set_animation({x=anim.stand_START, y=anim.stand_END}, animation_speed_mod, animation_blend)
|
||||
player_anim[name] = ANIM_STAND
|
||||
end
|
||||
end
|
||||
end
|
||||
minetest.register_globalstep(player_step)
|
||||
|
||||
-- END
|
BIN
mods/default/sounds/default_break_glass.1.ogg
Normal file
BIN
mods/default/sounds/default_break_glass.2.ogg
Normal file
BIN
mods/default/sounds/default_break_glass.3.ogg
Normal file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 283 B |
Before Width: | Height: | Size: 604 B After Width: | Height: | Size: 626 B |
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 271 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 |
Before Width: | Height: | Size: 303 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 410 B After Width: | Height: | Size: 378 B |
Before Width: | Height: | Size: 203 B After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 260 B After Width: | Height: | Size: 231 B |
Before Width: | Height: | Size: 366 B After Width: | Height: | Size: 664 B |
BIN
mods/default/textures/default_tool_steelsword.png
Executable file → Normal file
Before Width: | Height: | Size: 306 B After Width: | Height: | Size: 317 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: 384 B After Width: | Height: | Size: 710 B |
BIN
mods/default/textures/default_water_flowing_animated.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
mods/default/textures/default_water_source_animated.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
@ -1,43 +1,23 @@
|
||||
Minetest 0.4 mod: doors
|
||||
========================
|
||||
=======================
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
||||
Original license text:
|
||||
-- (c) 2011 Fernando Zapata
|
||||
-- Code licensed under GNU GPLv3
|
||||
-- Content licensed under CC BY-SA 3.0
|
||||
-- 2012-01-08 11:03:57
|
||||
Copyright (C) 2012 PilzAdam
|
||||
|
||||
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
|
||||
distributable and modifiable under LGPLv2+later, under which Minetest is
|
||||
distributed.
|
||||
|
||||
Modifications:
|
||||
Copyright (C) 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 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/gpl-2.0.html
|
||||
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
|
||||
-----------------------
|
||||
Everything not listed in here:
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
|
||||
From the original zlpdoors mod by Fernando Zapata:
|
||||
Textures created by Fernando Zapata (CC BY-SA 3.0):
|
||||
door_wood.png
|
||||
door_wood_a.png
|
||||
door_wood_a_r.png
|
||||
door_wood_b.png
|
||||
door_wood_b_r.png
|
||||
door_wood.png
|
||||
|
||||
|
||||
All other textures (created by PilzAdam): WTFPL
|
||||
|
@ -1,205 +1,286 @@
|
||||
-- Minetest 0.4 mod: doors
|
||||
-- See README.txt for licensing and other information.
|
||||
--------------------------------------------------------------------------------
|
||||
doors = {}
|
||||
|
||||
local WALLMX = 3
|
||||
local WALLMZ = 5
|
||||
local WALLPX = 2
|
||||
local WALLPZ = 4
|
||||
-- Registers a door
|
||||
-- name: The name of the door
|
||||
-- def: a table with the folowing fields:
|
||||
-- description
|
||||
-- inventory_image
|
||||
-- groups
|
||||
-- tiles_bottom: the tiles of the bottom part of the door {front, side}
|
||||
-- tiles_top: the tiles of the bottom part of the door {front, side}
|
||||
-- If the following fields are not defined the default values are used
|
||||
-- node_box_bottom
|
||||
-- node_box_top
|
||||
-- selection_box_bottom
|
||||
-- selection_box_top
|
||||
-- only_placer_can_open: if true only the player who placed the door can
|
||||
-- open it
|
||||
function doors:register_door(name, def)
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
|
||||
local box = {{-0.5, -0.5, -0.5, 0.5, 0.5, -0.5+1.5/16}}
|
||||
|
||||
if not def.node_box_bottom then
|
||||
def.node_box_bottom = box
|
||||
end
|
||||
if not def.node_box_top then
|
||||
def.node_box_top = box
|
||||
end
|
||||
if not def.selection_box_bottom then
|
||||
def.selection_box_bottom= box
|
||||
end
|
||||
if not def.selection_box_top then
|
||||
def.selection_box_top = box
|
||||
end
|
||||
|
||||
minetest.register_craftitem(name, {
|
||||
description = def.description,
|
||||
inventory_image = def.inventory_image,
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if not pointed_thing.type == "node" then
|
||||
return itemstack
|
||||
end
|
||||
local pt = pointed_thing.above
|
||||
local pt2 = {x=pt.x, y=pt.y, z=pt.z}
|
||||
pt2.y = pt2.y+1
|
||||
if
|
||||
not minetest.registered_nodes[minetest.env:get_node(pt).name].buildable_to or
|
||||
not minetest.registered_nodes[minetest.env:get_node(pt2).name].buildable_to or
|
||||
not placer or
|
||||
not placer:is_player()
|
||||
then
|
||||
return itemstack
|
||||
end
|
||||
|
||||
local p2 = minetest.dir_to_facedir(placer:get_look_dir())
|
||||
local pt3 = {x=pt.x, y=pt.y, z=pt.z}
|
||||
if p2 == 0 then
|
||||
pt3.x = pt3.x-1
|
||||
elseif p2 == 1 then
|
||||
pt3.z = pt3.z+1
|
||||
elseif p2 == 2 then
|
||||
pt3.x = pt3.x+1
|
||||
elseif p2 == 3 then
|
||||
pt3.z = pt3.z-1
|
||||
end
|
||||
if not string.find(minetest.env:get_node(pt3).name, name.."_b_") then
|
||||
minetest.env:set_node(pt, {name=name.."_b_1", param2=p2})
|
||||
minetest.env:set_node(pt2, {name=name.."_t_1", param2=p2})
|
||||
else
|
||||
minetest.env:set_node(pt, {name=name.."_b_2", param2=p2})
|
||||
minetest.env:set_node(pt2, {name=name.."_t_2", param2=p2})
|
||||
end
|
||||
|
||||
if def.only_placer_can_open then
|
||||
local pn = placer:get_player_name()
|
||||
local meta = minetest.env:get_meta(pt)
|
||||
meta:set_string("doors_owner", pn)
|
||||
meta:set_string("infotext", "Owned by "..pn)
|
||||
meta = minetest.env:get_meta(pt2)
|
||||
meta:set_string("doors_owner", pn)
|
||||
meta:set_string("infotext", "Owned by "..pn)
|
||||
end
|
||||
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
local tt = def.tiles_top
|
||||
local tb = def.tiles_bottom
|
||||
|
||||
local function after_dig_node(pos, name)
|
||||
if minetest.env:get_node(pos).name == name then
|
||||
minetest.env:remove_node(pos)
|
||||
end
|
||||
end
|
||||
|
||||
local function on_punch(pos, dir, check_name, replace, replace_dir, params)
|
||||
pos.y = pos.y+dir
|
||||
if not minetest.env:get_node(pos).name == check_name then
|
||||
return
|
||||
end
|
||||
local p2 = minetest.env:get_node(pos).param2
|
||||
p2 = params[p2+1]
|
||||
|
||||
local meta = minetest.env:get_meta(pos):to_table()
|
||||
minetest.env:set_node(pos, {name=replace_dir, param2=p2})
|
||||
minetest.env:get_meta(pos):from_table(meta)
|
||||
|
||||
pos.y = pos.y-dir
|
||||
meta = minetest.env:get_meta(pos):to_table()
|
||||
minetest.env:set_node(pos, {name=replace, param2=p2})
|
||||
minetest.env:get_meta(pos):from_table(meta)
|
||||
end
|
||||
|
||||
local function check_player_priv(pos, player)
|
||||
if not def.only_placer_can_open then
|
||||
return true
|
||||
end
|
||||
local meta = minetest.env:get_meta(pos)
|
||||
local pn = player:get_player_name()
|
||||
return meta:get_string("doors_owner") == pn
|
||||
end
|
||||
|
||||
minetest.register_node(name.."_b_1", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y+1
|
||||
after_dig_node(pos, name.."_t_1")
|
||||
end,
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_punch(pos, 1, name.."_t_1", name.."_b_2", name.."_t_2", {1,2,3,0})
|
||||
end
|
||||
end,
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
minetest.register_node(name.."_t_1", {
|
||||
tiles = {tt[2], tt[2], tt[2], tt[2], tt[1], tt[1].."^[transformfx"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_top
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_top
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y-1
|
||||
after_dig_node(pos, name.."_b_1")
|
||||
end,
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_punch(pos, -1, name.."_b_1", name.."_t_2", name.."_b_2", {1,2,3,0})
|
||||
end
|
||||
end,
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
minetest.register_node(name.."_b_2", {
|
||||
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_bottom
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_bottom
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y+1
|
||||
after_dig_node(pos, name.."_t_2")
|
||||
end,
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_punch(pos, 1, name.."_t_2", name.."_b_1", name.."_t_1", {3,0,1,2})
|
||||
end
|
||||
end,
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
minetest.register_node(name.."_t_2", {
|
||||
tiles = {tt[2], tt[2], tt[2], tt[2], tt[1].."^[transformfx", tt[1]},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
drop = name,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = def.node_box_top
|
||||
},
|
||||
selection_box = {
|
||||
type = "fixed",
|
||||
fixed = def.selection_box_top
|
||||
},
|
||||
groups = def.groups,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
pos.y = pos.y-1
|
||||
after_dig_node(pos, name.."_b_2")
|
||||
end,
|
||||
|
||||
on_punch = function(pos, node, puncher)
|
||||
if check_player_priv(pos, puncher) then
|
||||
on_punch(pos, -1, name.."_b_2", name.."_t_1", name.."_b_1", {3,0,1,2})
|
||||
end
|
||||
end,
|
||||
|
||||
can_dig = check_player_priv,
|
||||
})
|
||||
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_alias('door', 'doors:door_wood')
|
||||
minetest.register_alias('door_wood', 'doors:door_wood')
|
||||
|
||||
minetest.register_node( 'doors:door_wood', {
|
||||
description = 'Wooden Door',
|
||||
drawtype = 'signlike',
|
||||
tile_images = { 'door_wood.png' },
|
||||
inventory_image = 'door_wood.png',
|
||||
wield_image = 'door_wood.png',
|
||||
paramtype2 = 'wallmounted',
|
||||
selection_box = { type = 'wallmounted' },
|
||||
groups = { choppy=2, dig_immediate=2 },
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = 'doors:door_wood',
|
||||
recipe = {
|
||||
{ 'default:wood', 'default:wood' },
|
||||
{ 'default:wood', 'default:wood' },
|
||||
{ 'default:wood', 'default:wood' },
|
||||
},
|
||||
doors:register_door("doors:door_wood", {
|
||||
description = "Wooden Door",
|
||||
inventory_image = "door_wood.png",
|
||||
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2,door=1},
|
||||
tiles_bottom = {"door_wood_b.png", "door_brown.png"},
|
||||
tiles_top = {"door_wood_a.png", "door_brown.png"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'fuel',
|
||||
recipe = 'doors:door_wood',
|
||||
burntime = 30,
|
||||
output = "doors:door_wood",
|
||||
recipe = {
|
||||
{"default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood"},
|
||||
{"default:wood", "default:wood"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node( 'doors:door_wood_a_c', {
|
||||
Description = 'Top Closed Door',
|
||||
drawtype = 'signlike',
|
||||
tile_images = { 'door_wood_a.png' },
|
||||
inventory_image = 'door_wood_a.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
walkable = true,
|
||||
selection_box = { type = "wallmounted", },
|
||||
groups = { choppy=2, dig_immediate=2 },
|
||||
legacy_wallmounted = true,
|
||||
drop = 'doors:door_wood',
|
||||
doors:register_door("doors:door_steel", {
|
||||
description = "Steel Door",
|
||||
inventory_image = "door_steel.png",
|
||||
groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2,door=1},
|
||||
tiles_bottom = {"door_steel_b.png", "door_grey.png"},
|
||||
tiles_top = {"door_steel_a.png", "door_grey.png"},
|
||||
only_placer_can_open = true,
|
||||
})
|
||||
|
||||
minetest.register_node( 'doors:door_wood_b_c', {
|
||||
Description = 'Bottom Closed Door',
|
||||
drawtype = 'signlike',
|
||||
tile_images = { 'door_wood_b.png' },
|
||||
inventory_image = 'door_wood_b.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
walkable = true,
|
||||
selection_box = { type = "wallmounted", },
|
||||
groups = { choppy=2, dig_immediate=2 },
|
||||
legacy_wallmounted = true,
|
||||
drop = 'doors:door_wood',
|
||||
minetest.register_craft({
|
||||
output = "doors:door_steel",
|
||||
recipe = {
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot"},
|
||||
{"default:steel_ingot", "default:steel_ingot"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_node( 'doors:door_wood_a_o', {
|
||||
Description = 'Top Open Door',
|
||||
drawtype = 'signlike',
|
||||
tile_images = { 'door_wood_a_r.png' },
|
||||
inventory_image = 'door_wood_a_r.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
walkable = false,
|
||||
selection_box = { type = "wallmounted", },
|
||||
groups = { choppy=2, dig_immediate=2 },
|
||||
legacy_wallmounted = true,
|
||||
drop = 'doors:door_wood',
|
||||
})
|
||||
|
||||
minetest.register_node( 'doors:door_wood_b_o', {
|
||||
Description = 'Bottom Open Door',
|
||||
drawtype = 'signlike',
|
||||
tile_images = { 'door_wood_b_r.png' },
|
||||
inventory_image = 'door_wood_b_r.png',
|
||||
paramtype = 'light',
|
||||
paramtype2 = 'wallmounted',
|
||||
walkable = false,
|
||||
selection_box = { type = "wallmounted", },
|
||||
groups = { choppy=2, dig_immediate=2 },
|
||||
legacy_wallmounted = true,
|
||||
drop = 'doors:door_wood',
|
||||
})
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local round = function( n )
|
||||
if n >= 0 then
|
||||
return math.floor( n + 0.5 )
|
||||
else
|
||||
return math.ceil( n - 0.5 )
|
||||
end
|
||||
end
|
||||
|
||||
local on_door_placed = function( pos, node, placer )
|
||||
if node.name ~= 'doors:door_wood' then return end
|
||||
|
||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||
apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
und = minetest.env:get_node( upos )
|
||||
abv = minetest.env:get_node( apos )
|
||||
|
||||
dir = placer:get_look_dir()
|
||||
|
||||
if round( dir.x ) == 1 then
|
||||
newparam = WALLMX
|
||||
elseif round( dir.x ) == -1 then
|
||||
newparam = WALLPX
|
||||
elseif round( dir.z ) == 1 then
|
||||
newparam = WALLMZ
|
||||
elseif round( dir.z ) == -1 then
|
||||
newparam = WALLPZ
|
||||
end
|
||||
|
||||
if und.name == 'air' then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_a_c', param2 = newparam } )
|
||||
minetest.env:add_node( upos, { name = 'doors:door_wood_b_c', param2 = newparam } )
|
||||
elseif abv.name == 'air' then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_b_c', param2 = newparam } )
|
||||
minetest.env:add_node( apos, { name = 'doors:door_wood_a_c', param2 = newparam } )
|
||||
else
|
||||
minetest.env:remove_node( pos )
|
||||
placer:get_inventory():add_item( "main", 'doors:door_wood' )
|
||||
minetest.chat_send_player( placer:get_player_name(), 'not enough space' )
|
||||
end
|
||||
end
|
||||
|
||||
local on_door_punched = function( pos, node, puncher )
|
||||
if string.find( node.name, 'doors:door_wood' ) == nil then return end
|
||||
|
||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||
apos = { x = pos.x, y = pos.y + 1, z = pos.z }
|
||||
|
||||
if string.find( node.name, '_c', -2 ) ~= nil then
|
||||
if node.param2 == WALLPX then
|
||||
newparam = WALLMZ
|
||||
elseif node.param2 == WALLMZ then
|
||||
newparam = WALLMX
|
||||
elseif node.param2 == WALLMX then
|
||||
newparam = WALLPZ
|
||||
elseif node.param2 == WALLPZ then
|
||||
newparam = WALLPX
|
||||
end
|
||||
elseif string.find( node.name, '_o', -2 ) ~= nil then
|
||||
if node.param2 == WALLMZ then
|
||||
newparam = WALLPX
|
||||
elseif node.param2 == WALLMX then
|
||||
newparam = WALLMZ
|
||||
elseif node.param2 == WALLPZ then
|
||||
newparam = WALLMX
|
||||
elseif node.param2 == WALLPX then
|
||||
newparam = WALLPZ
|
||||
end
|
||||
end
|
||||
|
||||
if ( node.name == 'doors:door_wood_a_c' ) then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_a_o', param2 = newparam } )
|
||||
minetest.env:add_node( upos, { name = 'doors:door_wood_b_o', param2 = newparam } )
|
||||
|
||||
elseif ( node.name == 'doors:door_wood_b_c' ) then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_b_o', param2 = newparam } )
|
||||
minetest.env:add_node( apos, { name = 'doors:door_wood_a_o', param2 = newparam } )
|
||||
|
||||
elseif ( node.name == 'doors:door_wood_a_o' ) then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_a_c', param2 = newparam } )
|
||||
minetest.env:add_node( upos, { name = 'doors:door_wood_b_c', param2 = newparam } )
|
||||
|
||||
elseif ( node.name == 'doors:door_wood_b_o' ) then
|
||||
minetest.env:add_node( pos, { name = 'doors:door_wood_b_c', param2 = newparam } )
|
||||
minetest.env:add_node( apos, { name = 'doors:door_wood_a_c', param2 = newparam } )
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
local on_door_digged = function( pos, node, digger )
|
||||
upos = { x = pos.x, y = pos.y - 1, z = pos.z }
|
||||
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
|
||||
minetest.env:remove_node( upos )
|
||||
elseif ( node.name == 'doors:door_wood_b_c' ) or ( node.name == 'doors:door_wood_b_o' ) then
|
||||
minetest.env:remove_node( apos )
|
||||
end
|
||||
end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_on_placenode( on_door_placed )
|
||||
minetest.register_on_punchnode( on_door_punched )
|
||||
minetest.register_on_dignode( on_door_digged )
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_alias("doors:door_wood_a_c", "doors:door_wood_t_1")
|
||||
minetest.register_alias("doors:door_wood_a_o", "doors:door_wood_t_1")
|
||||
minetest.register_alias("doors:door_wood_b_c", "doors:door_wood_b_1")
|
||||
minetest.register_alias("doors:door_wood_b_o", "doors:door_wood_b_1")
|
||||
|
BIN
mods/doors/textures/door_brown.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
mods/doors/textures/door_grey.png
Normal file
After Width: | Height: | Size: 109 B |
BIN
mods/doors/textures/door_steel.png
Normal file
After Width: | Height: | Size: 230 B |
BIN
mods/doors/textures/door_steel_a.png
Normal file
After Width: | Height: | Size: 223 B |
BIN
mods/doors/textures/door_steel_b.png
Normal file
After Width: | Height: | Size: 206 B |
Before Width: | Height: | Size: 249 B |
Before Width: | Height: | Size: 216 B |
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>
|
||||
|
||||
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
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
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/gpl-2.0.html
|
||||
http://www.gnu.org/licenses/lgpl-2.1.html
|
||||
|
||||
License of media (textures and sounds)
|
||||
--------------------------------------
|
||||
@ -28,3 +28,5 @@ fire_small.ogg sampled from:
|
||||
fire_large.ogg sampled from:
|
||||
http://www.freesound.org/people/Dynamicell/sounds/17548/
|
||||
|
||||
fire_basic_flame_animated.png:
|
||||
Muadtralk
|
||||
|
@ -2,15 +2,28 @@
|
||||
|
||||
minetest.register_node("fire:basic_flame", {
|
||||
description = "Fire",
|
||||
drawtype = "glasslike",
|
||||
tile_images = {"fire_basic_flame.png"},
|
||||
drawtype = "plantlike",
|
||||
tiles = {{
|
||||
name="fire_basic_flame_animated.png",
|
||||
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1},
|
||||
}},
|
||||
inventory_image = "fire_basic_flame.png",
|
||||
light_source = 14,
|
||||
groups = {igniter=3,dig_immediate=3},
|
||||
groups = {igniter=2,dig_immediate=3},
|
||||
drop = '',
|
||||
walkable = false,
|
||||
damage_per_second = 4,
|
||||
|
||||
after_place_node = function(pos, placer)
|
||||
fire.on_flame_add_at(pos)
|
||||
end,
|
||||
|
||||
after_dig_node = function(pos, oldnode, oldmetadata, digger)
|
||||
fire.on_flame_remove_at(pos)
|
||||
end,
|
||||
})
|
||||
|
||||
local fire = {}
|
||||
fire = {}
|
||||
fire.D = 6
|
||||
-- key: position hash of low corner of area
|
||||
-- value: {handle=sound handle, name=sound name}
|
||||
@ -88,18 +101,6 @@ function fire.flame_should_extinguish(pos)
|
||||
return (#ps ~= 0)
|
||||
end
|
||||
|
||||
minetest.register_on_placenode(function(pos, newnode, placer)
|
||||
if newnode.name == "fire:basic_flame" then
|
||||
fire.on_flame_add_at(pos)
|
||||
end
|
||||
end)
|
||||
|
||||
minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
if oldnode.name == "fire:basic_flame" then
|
||||
fire.on_flame_remove_at(pos)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Ignite neighboring nodes
|
||||
minetest.register_abm({
|
||||
nodenames = {"group:flammable"},
|
||||
|
BIN
mods/fire/textures/fire_basic_flame_animated.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
@ -102,6 +102,7 @@ minetest.register_craftitem(":cooked_rat", {
|
||||
minetest.register_craftitem(":firefly", {
|
||||
description = "Firefly",
|
||||
inventory_image = "firefly.png",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
on_drop = function(item, dropper, pos)
|
||||
minetest.env:add_firefly(pos)
|
||||
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
|
143
mods/stairs/init.lua
Normal file
@ -0,0 +1,143 @@
|
||||
-- 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)
|
||||
if n0.name == "stairs:slab_" .. subname and
|
||||
p0.y+1 == p1.y then
|
||||
slabpos = p0
|
||||
slabnode = n0
|
||||
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
|
89
mods/vessels/init.lua
Normal file
@ -0,0 +1,89 @@
|
||||
-- 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_inv.png",
|
||||
wield_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_inv.png",
|
||||
wield_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_inv.png",
|
||||
wield_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: 253 B |
BIN
mods/vessels/textures/vessels_drinking_glass_inv.png
Normal file
After Width: | Height: | Size: 338 B |
BIN
mods/vessels/textures/vessels_glass_bottle.png
Normal file
After Width: | Height: | Size: 242 B |
BIN
mods/vessels/textures/vessels_glass_bottle_inv.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: 345 B |
BIN
mods/vessels/textures/vessels_steel_bottle_inv.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 |