1
0
mirror of https://github.com/Dragonop/claycrafter.git synced 2025-07-13 17:00:19 +02:00

21 Commits

Author SHA1 Message Date
fc9daaa401 Merge remote-tracking branch 'upstream/master' 2020-11-14 08:57:05 +01:00
34575ded4d Updated licences 2020-11-13 02:18:00 -03:00
902f3c0e4c Updated licences... 2020-11-13 02:17:32 -03:00
211c3f4b68 Delete description.txt 2020-11-13 01:37:23 -03:00
26d8e9dd24 Delete depends.txt 2020-11-13 01:37:13 -03:00
b49f0ad425 Update mod.conf 2020-11-13 01:36:55 -03:00
204a25d060 Merge pull request #12 from Dragonop/Dragonop-#9
Fix bug where claycrafter won't turn off. Fixes issue #9
2020-11-13 01:32:24 -03:00
4a8a178800 Fix bug where claycrafter won't turn off
Fixed a bug where the Claycrafter would remain in its active state even if the output inv was full. This didn't waste or create any resources (only light and kept the block animated), it was purely cosmetic. Fixes issue #9, I guess.
2020-11-13 01:30:44 -03:00
fea2299053 Update description.txt 2020-11-13 01:15:53 -03:00
0502b438a8 Updated screenshot.png
Updated to better depict the current state of the claycrafter mod.
2020-11-13 01:07:33 -03:00
64aae49bbd Glass of water now placeable - nerfed convert time
Glass of Water is now a placeable node. Can now be used to empty it out, returning an Empty Drinking Glass.
Don't recomend changing the item_eat value to any other than 0, if you don't want free food.
2020-11-13 00:53:54 -03:00
fc192685b0 Added glass_of_water_inv
Added inventory image for glass of water (since it's now placeable)
2020-11-13 00:25:17 -03:00
2b2a893960 Updated glass of water texture
Updated glass of water texture to fit the new drinking glass from the vessels mod
2020-11-12 23:55:15 -03:00
75b30587e0 Updated infotext
Changed itemstate "In use" to "Yes"
2020-11-12 23:47:03 -03:00
1626a812fa Add reversible craft for compressed dirt
1 compressed dirt can now be used to get back 9 dirt
2020-11-12 22:36:56 -03:00
1a64404611 Ajoute message de chargement du mod dans le journal "action" 2018-12-24 13:02:34 +01:00
f62ad8ef38 Modify README.md file 2018-08-20 21:47:01 +02:00
feb2efb6bc Add compatibility with dirt_compressed node from moreblocks 2018-03-28 19:36:35 +02:00
c8c4e41cae Move glass of water def to items.lua 2016-02-06 17:51:51 -05:00
ea612c59d5 Add files for recipes and items 2016-02-06 17:44:27 -05:00
21e22e4451 Empty init.lua of node and craft defs. 2016-02-06 17:43:54 -05:00
12 changed files with 85 additions and 73 deletions

View File

@ -1,32 +1,19 @@
# claycrafter
Minetest clay crafter mod. Adds a way to craft clay out of compressed dirt.
Dependencies:
Dependencies:
Default
Vessels
Bucket
moreblocks (optional)
claycrafter.lua is derivated from furnace.lua (minetest_game) by PilzAdam and Amaz1.
Edited by everamzah to work for this mod.
#####License for Code
#####License for Code
Copyright (C) 2016 Dragonop <joaco-mono@hotmail.com>
Dragonop (LGPLv3)
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.
#####License for Media
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
Textures by Dragonop (CC-BY-SA 4.0)

View File

@ -200,10 +200,13 @@ minetest.register_abm({
--
-- Cooking
--
local compressed_dirt = "claycrafter:compressed_dirt"
if minetest.get_modpath("moreblocks") then
compressed_dirt = "moreblocks:dirt_compressed"
end
local cooktime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
local cookable = true
if inv:get_stack("src", 1):get_name() ~= "claycrafter:compressed_dirt" then
if inv:get_stack("src", 1):get_name() ~= compressed_dirt then
cookable = false
end
@ -230,7 +233,7 @@ minetest.register_abm({
end
else
-- Furnace ran out of fuel
if cookable then
if cookable and inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4})) then
-- We need to get new fuel
local fueltime = minetest.get_item_group(inv:get_stack("fuel", 1):get_name(), "h2o")
@ -241,16 +244,13 @@ minetest.register_abm({
src_time = 0
else
-- Take fuel from fuel list
if inv:room_for_item("dst", ItemStack({name = "default:clay", count = 4}))
and inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
if inv:room_for_item("vessels", ItemStack({name = "vessels:drinking_glass"}))
then
inv:remove_item("fuel", inv:get_stack("fuel", 1):get_name())
inv:add_item("vessels", {name = "vessels:drinking_glass"})
else
swap_node(pos, "claycrafter:claycrafter_active")
end
fuel_totaltime = fueltime
fuel_time = 0
@ -271,7 +271,7 @@ minetest.register_abm({
local item_percent = 0
if cookable then
item_percent = math.floor(src_time / cooktime * 100)
item_state = "In use"
item_state = "Yes"
else
if srclist[1]:is_empty() then
item_state = "Empty"

View File

@ -1,3 +0,0 @@
vessels
default
bucket

View File

@ -1 +0,0 @@
Craft clay out of compressed dirt.

View File

@ -1,5 +0,0 @@
minetest.register_craftitem("claycrafter:glass_of_water", {
description = "Glass of Water",
inventory_image = "claycrafter_glass_of_water.png",
groups = {h2o = 1, vessel = 1}, -- How much time to convert 1 compressed dirt to 4 clay
})

View File

@ -1,40 +1,9 @@
-- Compressed dirt
minetest.register_node("claycrafter:compressed_dirt", {
description = "Compressed Dirt",
tiles = {"claycrafter_compressed_dirt.png"},
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1}
})
-- Crafts
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"}
}
})
local modpath = minetest.get_modpath("claycrafter")
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"},
}
})
-- TODO: Investigate function to automatically get mod name.
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"}
}
})
dofile(modpath .. "/items.lua")
dofile(modpath .. "/recipes.lua")
dofile(modpath .. "/claycrafter.lua")
dofile(minetest.get_modpath("claycrafter") .. "/claycrafter.lua")
dofile(minetest.get_modpath("claycrafter") .. "/glass_of_water.lua")
minetest.log("action", "[claycrafter] loaded.")

25
items.lua Normal file
View File

@ -0,0 +1,25 @@
if minetest.get_modpath("moreblocks") then
minetest.register_alias("claycrafter:compressed_dirt", "moreblocks:dirt_compressed")
else
minetest.register_node("claycrafter:compressed_dirt", {
description = "Compressed Dirt",
tiles = {"claycrafter_compressed_dirt.png"},
groups = {crumbly = 1, oddly_breakable_by_hand = 1, soil = 1, cracky =1}
})
end
minetest.register_node("claycrafter:glass_of_water", {
description = ("Glass of Water"),
drawtype = "plantlike",
tiles = {"claycrafter_glass_of_water.png"},
inventory_image = "claycrafter_glass_of_water_inv.png",
wield_image = "claycrafter_glass_of_water.png",
paramtype = "light",
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(),
})

View File

@ -1 +1,5 @@
name = claycrafter
description = This mod introduces the Claycrafter, which converts Compressed Dirt to Clay using Glasses of Water.
depends = vessels, default, bucket
optional_depends = moreblocks
author = Dragonop

36
recipes.lua Normal file
View File

@ -0,0 +1,36 @@
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 = "default:dirt 9",
recipe = {{"claycrafter:compressed_dirt"}}
})
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"}
}
})

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 233 B

After

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B