From 2301679757b69e36e5d4e6dd28695e55174e7c1b Mon Sep 17 00:00:00 2001 From: IamPyu Date: Thu, 31 Oct 2024 22:11:49 -0600 Subject: [PATCH] Remove frying pans in favour of furnaces --- CHANGELOG.md | 1 + mods/ITEMS/pyutest_cooking/init.lua | 49 ------------------------- mods/ITEMS/pyutest_cooking/mod.conf | 1 - mods/ITEMS/pyutest_crafts/mod.conf | 2 +- mods/ITEMS/pyutest_furnace/init.lua | 1 - mods/ITEMS/pyutest_tools/api.lua | 10 ++++- mods/WORLD/pyutest_overworld/biomes.lua | 3 +- 7 files changed, 12 insertions(+), 55 deletions(-) delete mode 100644 mods/ITEMS/pyutest_cooking/init.lua delete mode 100644 mods/ITEMS/pyutest_cooking/mod.conf diff --git a/CHANGELOG.md b/CHANGELOG.md index 7899a60..964142f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ - Water and Lava now have "chemical reactions" - Added Calcite - Added Pumpkins +- Removed Frying Pans, why did I even add them for cooking food when we can just use furnaces? - A lot of other changes that I forgot to document ## [Oct 19th 2024] Bugfix Update diff --git a/mods/ITEMS/pyutest_cooking/init.lua b/mods/ITEMS/pyutest_cooking/init.lua deleted file mode 100644 index d259e6c..0000000 --- a/mods/ITEMS/pyutest_cooking/init.lua +++ /dev/null @@ -1,49 +0,0 @@ --- i hate nodeboxes so much i basically just guessed random numbers until it was "good enough" -local nodebox = { - type = "fixed", - fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } -} - -PyuTest.make_node("pyutest_cooking:frying_pan", "Frying Pan",{ - oddly_breakable_by_hand = PyuTest.BLOCK_FAST -}, {"pyutest-darkstone.png"}, { - drawtype = "mesh", - paramtype = "light", - paramtype2 = "4dir", - mesh = "pyutest-frying-pan.obj", - selection_box = nodebox, - collision_box = nodebox, - on_rightclick = function (pos, node, clicker, itemstack, pointed_thing) - if not clicker then - return - end - - if not clicker:is_player() then - return - end - - if not itemstack:is_known() then - return itemstack - end - - local def = minetest.registered_items[itemstack:get_name()] - - if def.__pyutest_cook_into then - local inv = clicker:get_inventory() - local count = itemstack:get_count() - itemstack:set_name(def.__pyutest_cook_into) - for i = 1, count do - local s = ItemStack(def.__pyutest_cook_into) - s:set_count(1) - local leftover = inv:add_item("main", s) - if leftover then - minetest.add_item(pos, leftover) - end - end - - return ItemStack() - else - return itemstack - end - end -}) diff --git a/mods/ITEMS/pyutest_cooking/mod.conf b/mods/ITEMS/pyutest_cooking/mod.conf deleted file mode 100644 index d3c5936..0000000 --- a/mods/ITEMS/pyutest_cooking/mod.conf +++ /dev/null @@ -1 +0,0 @@ -depends = pyutest_blocks diff --git a/mods/ITEMS/pyutest_crafts/mod.conf b/mods/ITEMS/pyutest_crafts/mod.conf index ba255dd..f325660 100644 --- a/mods/ITEMS/pyutest_crafts/mod.conf +++ b/mods/ITEMS/pyutest_crafts/mod.conf @@ -1 +1 @@ -depends = pyutest_tools,pyutest_blocks,pyutest_farming,pyutest_cooking +depends = pyutest_tools,pyutest_blocks,pyutest_farming diff --git a/mods/ITEMS/pyutest_furnace/init.lua b/mods/ITEMS/pyutest_furnace/init.lua index 48a4683..bb6df9a 100644 --- a/mods/ITEMS/pyutest_furnace/init.lua +++ b/mods/ITEMS/pyutest_furnace/init.lua @@ -41,7 +41,6 @@ PyuTest.make_node("pyutest_furnace:furnace", "Furnace", { PyuTest.get_inventory_drops(pos, "src", drops) PyuTest.get_inventory_drops(pos, "fuel", drops) PyuTest.get_inventory_drops(pos, "dst", drops) - drops[#drops+1] = "pyutest_furnace:furnace" for _, v in pairs(drops) do minetest.add_item(pos, v) diff --git a/mods/ITEMS/pyutest_tools/api.lua b/mods/ITEMS/pyutest_tools/api.lua index e5174c0..559cd81 100644 --- a/mods/ITEMS/pyutest_tools/api.lua +++ b/mods/ITEMS/pyutest_tools/api.lua @@ -50,7 +50,6 @@ PyuTest.make_sword = function (nsname, desc, texture, damage, durability, atkspe end PyuTest.make_food = function (nsname, desc, wield_image, health_fill, cook_into, extra_code) - PyuTest.make_item(nsname, desc, { food = 1 }, wield_image, { @@ -60,6 +59,13 @@ PyuTest.make_food = function (nsname, desc, wield_image, health_fill, cook_into, minetest.do_item_eat(health_fill, "", itemstack, user, pt) if extra_code then extra_code() end end, - __pyutest_cook_into = cook_into }) + + if cook_into ~= nil then + minetest.register_craft({ + type = "cooking", + output = cook_into, + recipe = nsname + }) + end end diff --git a/mods/WORLD/pyutest_overworld/biomes.lua b/mods/WORLD/pyutest_overworld/biomes.lua index a5053ef..4627a41 100644 --- a/mods/WORLD/pyutest_overworld/biomes.lua +++ b/mods/WORLD/pyutest_overworld/biomes.lua @@ -203,7 +203,8 @@ PyuTest.register_overworld_biome("redwood_forest", PyuTest.BIOME_TYPES.CHILLY, { heat_point = 30, humidity_point = 50, - _pyutest_biome_flowering = true + _pyutest_biome_flowering = true, + _pyutest_fog_distance = 40, }) -- Marsh biomes