develop smelting update
This commit is contained in:
parent
195a38ae4b
commit
63aa85bb98
12
CHANGELOG.md
12
CHANGELOG.md
@ -1,5 +1,15 @@
|
||||
# Changelog
|
||||
|
||||
## [Jun 11th - **STILL UNDER DEVELOPMENT** 2024] Update: Smithing Update
|
||||
|
||||
- Updated Unified Inventory and Mobs Redo
|
||||
- Added furnaces
|
||||
- Implement the workbench from the "Adventure and Magic Update"
|
||||
- Added bricks (Not the block, but the item)
|
||||
- Clay now spawns in the world
|
||||
- Fire now spreads instead of just sitting there and damaging entities.
|
||||
- Add terracotta that I forgot to add in the "Adventure and Magic Update"
|
||||
|
||||
## [Jun 10th 2024] Minor Update: Fence Update
|
||||
|
||||
- Added fences
|
||||
@ -161,6 +171,8 @@ Now that I think of it, this wasn't much of an "adventure" update..
|
||||
|
||||
**This update contains breaking changes!!**
|
||||
|
||||
- Game Exists Alpha and Enters Beta
|
||||
|
||||
- Added Diamonds and Emeralds
|
||||
- Added Block Variants of Ores
|
||||
- Added Wheat
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit e11f3835892ad9bd5e502fe5118be68d78371ec0
|
||||
Subproject commit fc7269cc8c0e50015e16c28569028be45787ebd8
|
@ -36,3 +36,16 @@ minetest.register_abm({
|
||||
})
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_abm({
|
||||
label = "Fire Spread",
|
||||
nodenames = {"group:flammable"},
|
||||
neighbors = {"pyutest_core:fire"},
|
||||
interval = 3,
|
||||
chance = 3.1,
|
||||
action = function (pos)
|
||||
minetest.set_node(pos, {
|
||||
name = "pyutest_core:fire"
|
||||
})
|
||||
end
|
||||
})
|
||||
|
@ -204,6 +204,7 @@ PyuTestCore.make_building_blocks("pyutest_core:dirt", "Dirt", {"dirt.png"}, nil,
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:stone", "Stone", {"stone.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE,
|
||||
}, {is_ground_content = false})
|
||||
|
||||
@ -215,7 +216,8 @@ PyuTestCore.make_building_blocks("pyutest_core:wooden_log", "Oak Wooden Log", {
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
wooden_log = 1
|
||||
wooden_log = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
})
|
||||
@ -227,7 +229,8 @@ PyuTestCore.make_building_blocks("pyutest_core:savanna_wooden_log", "Savanna Woo
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
wooden_log = 1
|
||||
wooden_log = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
})
|
||||
@ -239,7 +242,8 @@ PyuTestCore.make_building_blocks("pyutest_core:birch_wooden_log", "Birch Wooden
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
wooden_log = 1
|
||||
wooden_log = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
})
|
||||
@ -251,14 +255,16 @@ PyuTestCore.make_building_blocks("pyutest_core:cherry_wooden_log", "Cherry Woode
|
||||
}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1,
|
||||
wooden_log = 1
|
||||
wooden_log = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:wooden", "Wooden", {"wood.png"}, nil, {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
acid_vulnerable = 1
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:snow", "Snow", {"snow.png"}, nil, {
|
||||
@ -283,23 +289,33 @@ PyuTestCore.make_building_blocks("pyutest_core:ice", "Ice", {"ice.png"}, nil, {
|
||||
slippery = 2
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:leaves", "Leaves", {"leaves.png"}, nil, {}, {
|
||||
PyuTestCore.make_building_blocks("pyutest_core:leaves", "Leaves", {"leaves.png"}, nil, {
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
acid_vulnerable = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:snowy_leaves", "Snowy Leaves", {"snowy-leaves.png"}, nil, {}, {
|
||||
PyuTestCore.make_building_blocks("pyutest_core:snowy_leaves", "Snowy Leaves", {"snowy-leaves.png"}, nil, {
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
acid_vulnerable = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:cherry_leaves", "Cherry Leaves", {"cherry-leaves.png"}, nil, {}, {
|
||||
PyuTestCore.make_building_blocks("pyutest_core:cherry_leaves", "Cherry Leaves", {"cherry-leaves.png"}, nil, {
|
||||
acid_vulnerable = 1,
|
||||
flammable = 1
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
acid_vulnerable = 1
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"mushroom.png"}, nil, {}, {is_ground_content = false})
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom_stem", "Mushroom Stem", {"mushroom-stem.png"}, nil, {}, {is_ground_content = false})
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom", "Mushroom", {"mushroom.png"}, nil, {
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mushroom_stem", "Mushroom Stem", {"mushroom-stem.png"}, nil, {
|
||||
flammable = 1
|
||||
}, {is_ground_content = false})
|
||||
PyuTestCore.make_building_blocks("pyutest_core:mycelium", "Mycelium", {"mycelium.png"}, nil, {ground = 1})
|
||||
PyuTestCore.make_building_blocks("pyutest_core:molten_rock", "Molten Rock", {"molten-rock.png"}, nil, {
|
||||
ground = 1,
|
||||
@ -386,6 +402,7 @@ PyuTestCore.make_node("pyutest_core:glass", "Glass", {
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:flower", "Rose", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"flower.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -398,6 +415,7 @@ PyuTestCore.make_node("pyutest_core:flower", "Rose", {
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:flower2", "Dandelion", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"flower2.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -410,6 +428,7 @@ PyuTestCore.make_node("pyutest_core:flower2", "Dandelion", {
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:flower3", "Blue Daisy", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"flower3.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -422,6 +441,7 @@ PyuTestCore.make_node("pyutest_core:flower3", "Blue Daisy", {
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:flower4", "Lavender", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"flower4.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -433,7 +453,8 @@ PyuTestCore.make_node("pyutest_core:flower4", "Lavender", {
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:deadbush", "Deadbush", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"deadbush.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -445,7 +466,8 @@ PyuTestCore.make_node("pyutest_core:deadbush", "Deadbush", {
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:grass_plant", "Grass", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"grass-plant.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -457,7 +479,8 @@ PyuTestCore.make_node("pyutest_core:grass_plant", "Grass", {
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:tree_sapling", "Tree Sapling", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"sapling.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -495,7 +518,8 @@ PyuTestCore.make_node("pyutest_core:tree_sapling", "Tree Sapling", {
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:sugarcane", "Sugarcane", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_INSTANT,
|
||||
flammable = 1
|
||||
}, {"sugarcane.png"}, {
|
||||
drawtype = "plantlike",
|
||||
walkable = false,
|
||||
@ -506,7 +530,8 @@ PyuTestCore.make_node("pyutest_core:sugarcane", "Sugarcane", {
|
||||
})
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:trapdoor", "Trapdoor", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY,
|
||||
flammable = 1
|
||||
}, {"trapdoor.png"}, {
|
||||
drawtype = "nodebox",
|
||||
paramtype = "light",
|
||||
@ -601,8 +626,12 @@ PyuTestCore.make_node("pyutest_core:crate", "Crate", {
|
||||
PyuTestCore.make_node("pyutest_core:workbench", "Workbench", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_CHOPPY
|
||||
}, {"workbench-top.png", "workbench-bottom.png", "workbench-sides.png"}, {
|
||||
on_rightclick = function(pos, clicker)
|
||||
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
minetest.show_formspec(clicker:get_player_name(), "pyutest_core:workbench", table.concat({
|
||||
"size[8,9]",
|
||||
"list[current_player;craft;2.5,1;3,3;]",
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
}))
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -183,3 +183,32 @@ minetest.register_craft({
|
||||
},
|
||||
type = "shapeless"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:brick_block 4",
|
||||
recipe = {
|
||||
{"pyutest_core:brick", "pyutest_core:brick"},
|
||||
{"pyutest_core:brick", "pyutest_core:brick"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "pyutest_core:furnace",
|
||||
recipe = {
|
||||
{"pyutest_core:stone_block", "pyutest_core:stone_block", "pyutest_core:stone_block"},
|
||||
{"pyutest_core:stone_block", "", "pyutest_core:stone_block"},
|
||||
{"pyutest_core:stone_block", "pyutest_core:stone_block", "pyutest_core:stone_block"}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "pyutest_core:glass",
|
||||
recipe = "pyutest_core:sand_block 5"
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "pyutest_core:brick",
|
||||
recipe = "pyutest_core:clay",
|
||||
})
|
||||
|
79
mods/pyutest_core/furnace.lua
Normal file
79
mods/pyutest_core/furnace.lua
Normal file
@ -0,0 +1,79 @@
|
||||
local function furnace_formspec(pos)
|
||||
local spos = string.format("%d,%d,%d", pos.x, pos.y, pos.z)
|
||||
|
||||
local formspec = {
|
||||
"size[8,9]",
|
||||
"list[nodemeta:", spos, ";main;0,0;8,4;]",
|
||||
"list[context;src;1,1;1,1;]",
|
||||
"list[context;fuel;1,2.5;1,1;]",
|
||||
"list[context;dst;5,1.25;2,2;]",
|
||||
"button[0,3.5;4,2;smelt;Smelt]",
|
||||
"button[4,3.5;4,2;smelt3;Smelt 3]",
|
||||
"list[current_player;main;0,5;8,4;]"
|
||||
}
|
||||
|
||||
return table.concat(formspec)
|
||||
end
|
||||
|
||||
PyuTestCore.make_node("pyutest_core:furnace", "Furnace", {
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
}, {
|
||||
"furnace-top-bottom.png",
|
||||
"furnace-top-bottom.png",
|
||||
"furnace-sides.png",
|
||||
"furnace-sides.png",
|
||||
"furnace-sides.png",
|
||||
"furnace-front.png",
|
||||
}, {
|
||||
is_ground_content = false,
|
||||
paramtype2 = "facedir",
|
||||
on_construct = function(pos, placer)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inventory = meta:get_inventory()
|
||||
inventory:set_size("src", 1)
|
||||
inventory:set_size("fuel", 1)
|
||||
inventory:set_size("dst", 4)
|
||||
meta:set_string("formspec", furnace_formspec(pos))
|
||||
end,
|
||||
on_receive_fields = function(pos, formname, fields, player)
|
||||
if fields.quit then
|
||||
return
|
||||
end
|
||||
|
||||
local meta = minetest.get_meta(pos)
|
||||
local inv = meta:get_inventory()
|
||||
|
||||
local function smelt()
|
||||
local src = inv:get_stack("src", 1)
|
||||
local fuel = inv:get_stack("fuel", 1)
|
||||
|
||||
if minetest.get_item_group(fuel:get_name(), "fuel") == 0 then
|
||||
return
|
||||
end
|
||||
|
||||
local output, decremented_input = minetest.get_craft_result({
|
||||
method = "cooking",
|
||||
width = 1,
|
||||
items = {
|
||||
src
|
||||
}
|
||||
})
|
||||
|
||||
inv:add_item("dst", output.item)
|
||||
src:set_count(src:get_count() - output.item:get_count())
|
||||
fuel:set_count(fuel:get_count() - 1)
|
||||
inv:set_stack("src", 1, src)
|
||||
inv:set_stack("fuel", 1, fuel)
|
||||
end
|
||||
|
||||
if fields.smelt then
|
||||
smelt()
|
||||
end
|
||||
|
||||
if fields.smelt3 then
|
||||
for i = 1, 3 do
|
||||
smelt()
|
||||
end
|
||||
end
|
||||
end,
|
||||
})
|
@ -33,4 +33,5 @@ dofile(PyuTestCore_Path.."/combat.lua")
|
||||
dofile(PyuTestCore_Path.."/magic.lua")
|
||||
dofile(PyuTestCore_Path.."/crafts.lua")
|
||||
dofile(PyuTestCore_Path.."/furniture.lua")
|
||||
dofile(PyuTestCore_Path.."/furnace.lua")
|
||||
dofile(PyuTestCore_Path.."/overrides.lua")
|
||||
|
@ -54,3 +54,4 @@ PyuTestCore.make_item("pyutest_core:clay", "Clay Ball", {}, "clay.png")
|
||||
PyuTestCore.make_item("pyutest_core:glass_bottle", "Glass Bottle", {}, "glass-bottle.png", {
|
||||
stack_max = 16
|
||||
})
|
||||
PyuTestCore.make_item("pyutest_core:brick", "Brick", {}, "brick.png")
|
||||
|
@ -1,10 +1,12 @@
|
||||
PyuTestCore.make_building_blocks("pyutest_core:granite", "Granite", {"granite.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
})
|
||||
|
||||
PyuTestCore.make_building_blocks("pyutest_core:andesite", "Andesite", {"andesite.png"}, nil, {
|
||||
ground = 1,
|
||||
stone = 1,
|
||||
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
|
||||
})
|
||||
|
||||
@ -43,6 +45,18 @@ minetest.register_ore({
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "pyutest_core:clay_block",
|
||||
wherein = "pyutest_core:gravel_block",
|
||||
clust_scarcity = 7 * 7 * 7,
|
||||
clust_num_ores = 35,
|
||||
clust_size = 5,
|
||||
y_max = PyuTestCore_SurfaceBottom - 1,
|
||||
y_min = PyuTestCore_DeepOceanMin,
|
||||
noise_params = PyuTestCore.SPECIALSTONE_NOISE_PARAMS
|
||||
})
|
||||
|
||||
PyuTestCore.ORE_STONES = {
|
||||
"pyutest_core:stone_block",
|
||||
"pyutest_core:granite_block",
|
||||
|
@ -13,3 +13,9 @@ minetest.override_item("pyutest_core:leaves_block", {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.override_item("pyutest_core:coal_lump", {
|
||||
groups = {
|
||||
fuel = 1
|
||||
}
|
||||
})
|
||||
|
BIN
mods/pyutest_core/textures/brick.png
Normal file
BIN
mods/pyutest_core/textures/brick.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 185 B |
BIN
mods/pyutest_core/textures/furnace-front.png
Normal file
BIN
mods/pyutest_core/textures/furnace-front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 230 B |
BIN
mods/pyutest_core/textures/furnace-sides.png
Normal file
BIN
mods/pyutest_core/textures/furnace-sides.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 134 B |
BIN
mods/pyutest_core/textures/furnace-top-bottom.png
Normal file
BIN
mods/pyutest_core/textures/furnace-top-bottom.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 110 B |
@ -1 +1 @@
|
||||
Subproject commit 2c9449b6e796c5a4bcf832b10595c5a78e237dc6
|
||||
Subproject commit 235fa841dd558be5972e1ffa8bc858478a489bd4
|
Loading…
x
Reference in New Issue
Block a user