forked from mtcontrib/claycrafter
Compare commits
No commits in common. "master" and "nalc-1.0" have entirely different histories.
46
README.md
46
README.md
|
@ -1,31 +1,33 @@
|
||||||
# claycrafter
|
# claycrafter
|
||||||
Minetest clay crafter mod.
|
Minetest clay crafter mod. Adds a way to craft clay out of compressed dirt.
|
||||||
Adds a way for players to obtain clay other than mining, out of a common material: dirt. It adds three new nodes:
|
|
||||||
|
|
||||||
**Claycrafter:** Used to convert compressed dirt into clay.
|
Dependencies:
|
||||||
|
|
||||||
**Compressed dirt:** Just 9 dirt, compressed, useful for saving storage space, too!
|
|
||||||
(Not present if moreblocks is installed, use moreblocks:dirt_compressed instead)
|
|
||||||
|
|
||||||
**Glass of water:** Used as fuel for the Claycrafter. Placeable.
|
|
||||||
|
|
||||||
For extra info look at the [Forum Thread](https://forum.minetest.net/viewtopic.php?f=11&t=13992)
|
|
||||||
|
|
||||||
|
|
||||||
##### Dependencies:
|
|
||||||
Default
|
Default
|
||||||
Vessels
|
Vessels
|
||||||
|
Bucket
|
||||||
|
moreblocks (optional)
|
||||||
|
|
||||||
##### Optional dependencies:
|
claycrafter.lua is derivated from furnace.lua (minetest_game) by PilzAdam and Amaz1.
|
||||||
moreblocks
|
Edited by everamzah to work for this mod.
|
||||||
|
|
||||||
#####License for Code
|
#####License for Code
|
||||||
Dragonop (LGPLv3)
|
|
||||||
|
|
||||||
##### License for Media
|
Copyright (C) 2016 Dragonop <joaco-mono@hotmail.com>
|
||||||
Textures created or modified by Dragonop (CC-BY-SA 4.0)
|
|
||||||
Glass of water derived from the Drinking Glass texture from the vessels mod made by Thomas-S which is distributed as (CC-BY-SA 3.0)
|
|
||||||
Compressed dirt derived from the minetest's game default dirt texture made by Neuromancer and later modified by random-geek which is distributed as (CC-BY-SA 3.0)
|
|
||||||
Arrow textures by Blockmen, from minetest game's default, distributed under (CC-BY-SA 3.0)
|
|
||||||
|
|
||||||
##### Special thanks to everamzah
|
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.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU Lesser General Public License for more details.
|
||||||
|
|
||||||
|
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.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
#####License for Textures, Models and Sounds
|
||||||
|
|
||||||
|
CC-BY-SA 3.0 UNPORTED. Created by Dragonop
|
||||||
|
|
|
@ -233,7 +233,7 @@ minetest.register_abm({
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
-- Furnace ran out of fuel
|
-- Furnace ran out of fuel
|
||||||
if cookable and inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4})) then
|
if cookable then
|
||||||
-- We need to get new fuel
|
-- We need to get new fuel
|
||||||
local fueltime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
|
local fueltime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
|
||||||
|
|
||||||
|
@ -244,13 +244,16 @@ minetest.register_abm({
|
||||||
src_time = 0
|
src_time = 0
|
||||||
else
|
else
|
||||||
-- Take fuel from fuel list
|
-- Take fuel from fuel list
|
||||||
if inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
|
|
||||||
|
if inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4}))
|
||||||
|
and inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
|
||||||
then
|
then
|
||||||
inv:remove_item("fuel", inv:get_stack("fuel", 1):get_name())
|
inv:remove_item("fuel", inv:get_stack("fuel", 1):get_name())
|
||||||
inv:add_item("vessels", {name = "vessels:drinking_glass"})
|
inv:add_item("vessels", {name = "vessels:drinking_glass"})
|
||||||
else
|
else
|
||||||
swap_node(pos, "claycrafter:claycrafter_active")
|
swap_node(pos, "claycrafter:claycrafter_active")
|
||||||
end
|
end
|
||||||
|
|
||||||
fuel_totaltime = fueltime
|
fuel_totaltime = fueltime
|
||||||
fuel_time = 0
|
fuel_time = 0
|
||||||
|
|
||||||
|
@ -271,7 +274,7 @@ minetest.register_abm({
|
||||||
local item_percent = 0
|
local item_percent = 0
|
||||||
if cookable then
|
if cookable then
|
||||||
item_percent = math.floor(src_time / cooktime * 100)
|
item_percent = math.floor(src_time / cooktime * 100)
|
||||||
item_state = "Yes"
|
item_state = "In use"
|
||||||
else
|
else
|
||||||
if srclist[1]:is_empty() then
|
if srclist[1]:is_empty() then
|
||||||
item_state = "Empty"
|
item_state = "Empty"
|
||||||
|
|
4
depends.txt
Normal file
4
depends.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
vessels
|
||||||
|
default
|
||||||
|
bucket
|
||||||
|
moreblocks?
|
1
description.txt
Normal file
1
description.txt
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Craft clay out of compressed dirt.
|
1
init.lua
1
init.lua
|
@ -3,6 +3,7 @@ local modpath = minetest.get_modpath("claycrafter")
|
||||||
-- TODO: Investigate function to automatically get mod name.
|
-- TODO: Investigate function to automatically get mod name.
|
||||||
|
|
||||||
dofile(modpath .. "/items.lua")
|
dofile(modpath .. "/items.lua")
|
||||||
|
dofile(modpath .. "/recipes.lua")
|
||||||
dofile(modpath .. "/claycrafter.lua")
|
dofile(modpath .. "/claycrafter.lua")
|
||||||
|
|
||||||
minetest.log("action", "[claycrafter] loaded.")
|
minetest.log("action", "[claycrafter] loaded.")
|
||||||
|
|
72
items.lua
72
items.lua
|
@ -1,75 +1,15 @@
|
||||||
--compressed dirt
|
if minetest.get_modpath("moreblocks") then
|
||||||
local moreblocks = minetest.get_modpath("moreblocks")
|
|
||||||
|
|
||||||
if moreblocks ~= nil then
|
|
||||||
minetest.register_alias("claycrafter:compressed_dirt", "moreblocks:dirt_compressed")
|
minetest.register_alias("claycrafter:compressed_dirt", "moreblocks:dirt_compressed")
|
||||||
else
|
else
|
||||||
minetest.register_craft({
|
|
||||||
output = "claycrafter:compressed_dirt",
|
|
||||||
recipe = {
|
|
||||||
{"group:dirt", "group:dirt", "group:dirt"},
|
|
||||||
{"group:dirt", "group:dirt", "group:dirt"},
|
|
||||||
{"group:dirt", "group:dirt", "group:dirt"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
minetest.register_node("claycrafter:compressed_dirt", {
|
minetest.register_node("claycrafter:compressed_dirt", {
|
||||||
description = "Compressed Dirt",
|
description = "Compressed Dirt",
|
||||||
tiles = {"claycrafter_compressed_dirt.png"},
|
tiles = {"claycrafter_compressed_dirt.png"},
|
||||||
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1},
|
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1}
|
||||||
sounds = default.node_sound_dirt_defaults(),
|
|
||||||
})
|
})
|
||||||
minetest.register_craft({
|
|
||||||
output = "default:dirt 9",
|
|
||||||
recipe = {{"claycrafter:compressed_dirt"}}
|
|
||||||
})
|
|
||||||
minetest.register_alias("moreblocks:dirt_compressed","claycrafter:compressed_dirt")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--nodes
|
minetest.register_craftitem("claycrafter:glass_of_water", {
|
||||||
minetest.register_node("claycrafter:glass_of_water", {
|
description = "Glass of Water",
|
||||||
description = ("Glass of Water"),
|
inventory_image = "claycrafter_glass_of_water.png",
|
||||||
drawtype = "plantlike",
|
groups = {h2o = 1, vessel = 1}, -- How much time to convert 1 compressed dirt to 4 clay
|
||||||
tiles = {"claycrafter_glass_of_water.png"},
|
|
||||||
inventory_image = "claycrafter_glass_of_water_inv.png",
|
|
||||||
wield_image = "claycrafter_glass_of_water.png",
|
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = "blend",
|
|
||||||
is_ground_content = false,
|
|
||||||
walkable = false,
|
|
||||||
sunlight_propagates = true,
|
|
||||||
selection_box = {type = "fixed",fixed = {-0.25, -0.5, -0.25, 0.25, 0, 0.25} },
|
|
||||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, h2o = 3}, -- How much time to convert 1 compressed dirt to 4 clay
|
|
||||||
on_use = minetest.item_eat(0,"vessels:drinking_glass"),
|
|
||||||
sounds = default.node_sound_glass_defaults(),
|
|
||||||
})
|
|
||||||
|
|
||||||
--recipes
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "claycrafter:glass_of_water 8",
|
|
||||||
recipe = {
|
|
||||||
{"group:vessel", "group:vessel", "group:vessel"},
|
|
||||||
{"group:vessel", "group:water_bucket", "group:vessel"},
|
|
||||||
{"group:vessel", "group:vessel", "group:vessel"}
|
|
||||||
},
|
|
||||||
replacements = {
|
|
||||||
{"group:water_bucket", "bucket:bucket_empty"},
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "claycrafter:glass_of_water 8",
|
|
||||||
recipe = {
|
|
||||||
{"group:vessel", "group:vessel", "group:vessel"},
|
|
||||||
{"group:vessel", "group:water", "group:vessel"},
|
|
||||||
{"group:vessel", "group:vessel", "group:vessel"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "claycrafter:claycrafter",
|
|
||||||
recipe = {
|
|
||||||
{"group:wood", "default:steel_ingot", "group:wood"},
|
|
||||||
{"group:wood", "group:glass", "group:wood"},
|
|
||||||
{"group:stick", "group:water_bucket", "group:stick"}
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
4
mod.conf
4
mod.conf
|
@ -1,5 +1 @@
|
||||||
name = claycrafter
|
name = claycrafter
|
||||||
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
|
|
||||||
depends = vessels, default
|
|
||||||
optional_depends = moreblocks
|
|
||||||
author = Dragonop
|
|
||||||
|
|
31
recipes.lua
Normal file
31
recipes.lua
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
if not minetest.get_modpath("moreblocks") then
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "claycrafter:compressed_dirt",
|
||||||
|
recipe = {
|
||||||
|
{"default:dirt", "default:dirt", "default:dirt"},
|
||||||
|
{"default:dirt", "default:dirt", "default:dirt"},
|
||||||
|
{"default:dirt", "default:dirt", "default:dirt"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "claycrafter:glass_of_water 8",
|
||||||
|
recipe = {
|
||||||
|
{"vessels:drinking_glass", "vessels:drinking_glass", "vessels:drinking_glass"},
|
||||||
|
{"vessels:drinking_glass", "bucket:bucket_water", "vessels:drinking_glass"},
|
||||||
|
{"vessels:drinking_glass", "vessels:drinking_glass", "vessels:drinking_glass"}
|
||||||
|
},
|
||||||
|
replacements = {
|
||||||
|
{"bucket:bucket_water", "bucket:bucket_empty"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "claycrafter:claycrafter",
|
||||||
|
recipe = {
|
||||||
|
{"group:wood", "default:steel_ingot", "group:wood"},
|
||||||
|
{"group:wood", "default:glass", "group:wood"},
|
||||||
|
{"default:stick", "bucket:bucket_water", "default:stick"}
|
||||||
|
}
|
||||||
|
})
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 7.4 KiB |
Binary file not shown.
Before Width: | Height: | Size: 377 B After Width: | Height: | Size: 233 B |
Binary file not shown.
Before Width: | Height: | Size: 396 B |
Loading…
Reference in New Issue
Block a user