diff --git a/CHANGELOG.md b/CHANGELOG.md index a9dd9bd..661e602 100644 --- a/CHANGELOG.md +++ b/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 diff --git a/mods/mobs_redo b/mods/mobs_redo index e11f383..fc7269c 160000 --- a/mods/mobs_redo +++ b/mods/mobs_redo @@ -1 +1 @@ -Subproject commit e11f3835892ad9bd5e502fe5118be68d78371ec0 +Subproject commit fc7269cc8c0e50015e16c28569028be45787ebd8 diff --git a/mods/pyutest_core/abms.lua b/mods/pyutest_core/abms.lua index a3be994..fcb8787 100644 --- a/mods/pyutest_core/abms.lua +++ b/mods/pyutest_core/abms.lua @@ -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 +}) diff --git a/mods/pyutest_core/blocks.lua b/mods/pyutest_core/blocks.lua index 57d8846..9f8094d 100644 --- a/mods/pyutest_core/blocks.lua +++ b/mods/pyutest_core/blocks.lua @@ -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 }) diff --git a/mods/pyutest_core/crafts.lua b/mods/pyutest_core/crafts.lua index ade04f7..5cd3719 100644 --- a/mods/pyutest_core/crafts.lua +++ b/mods/pyutest_core/crafts.lua @@ -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", +}) diff --git a/mods/pyutest_core/furnace.lua b/mods/pyutest_core/furnace.lua new file mode 100644 index 0000000..addc732 --- /dev/null +++ b/mods/pyutest_core/furnace.lua @@ -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, +}) diff --git a/mods/pyutest_core/init.lua b/mods/pyutest_core/init.lua index 68936c9..bcd9215 100644 --- a/mods/pyutest_core/init.lua +++ b/mods/pyutest_core/init.lua @@ -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") diff --git a/mods/pyutest_core/items.lua b/mods/pyutest_core/items.lua index 2c72398..fbd2285 100644 --- a/mods/pyutest_core/items.lua +++ b/mods/pyutest_core/items.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") diff --git a/mods/pyutest_core/ores.lua b/mods/pyutest_core/ores.lua index 20c88f3..5959144 100644 --- a/mods/pyutest_core/ores.lua +++ b/mods/pyutest_core/ores.lua @@ -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", diff --git a/mods/pyutest_core/overrides.lua b/mods/pyutest_core/overrides.lua index 8609efb..ef79de5 100644 --- a/mods/pyutest_core/overrides.lua +++ b/mods/pyutest_core/overrides.lua @@ -13,3 +13,9 @@ minetest.override_item("pyutest_core:leaves_block", { } } }) + +minetest.override_item("pyutest_core:coal_lump", { + groups = { + fuel = 1 + } +}) diff --git a/mods/pyutest_core/textures/brick.png b/mods/pyutest_core/textures/brick.png new file mode 100644 index 0000000..ef40a34 Binary files /dev/null and b/mods/pyutest_core/textures/brick.png differ diff --git a/mods/pyutest_core/textures/furnace-front.png b/mods/pyutest_core/textures/furnace-front.png new file mode 100644 index 0000000..fab17a4 Binary files /dev/null and b/mods/pyutest_core/textures/furnace-front.png differ diff --git a/mods/pyutest_core/textures/furnace-sides.png b/mods/pyutest_core/textures/furnace-sides.png new file mode 100644 index 0000000..ebace48 Binary files /dev/null and b/mods/pyutest_core/textures/furnace-sides.png differ diff --git a/mods/pyutest_core/textures/furnace-top-bottom.png b/mods/pyutest_core/textures/furnace-top-bottom.png new file mode 100644 index 0000000..dfe316c Binary files /dev/null and b/mods/pyutest_core/textures/furnace-top-bottom.png differ diff --git a/mods/unified_inventory b/mods/unified_inventory index 2c9449b..235fa84 160000 --- a/mods/unified_inventory +++ b/mods/unified_inventory @@ -1 +1 @@ -Subproject commit 2c9449b6e796c5a4bcf832b10595c5a78e237dc6 +Subproject commit 235fa841dd558be5972e1ffa8bc858478a489bd4