From ff433e65feb992becfbffbf3ab1ba833c6dd7798 Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:13:22 +0000 Subject: [PATCH 1/7] added Nova_Wostra (creator of Pixel Perfection Legacy) to the credits --- CREDITS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CREDITS.md b/CREDITS.md index bd8a49e65..04e52d5b1 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -105,6 +105,7 @@ ## Textures * XSSheep +* Nova_Wostra * Wuzzy * kingoscargames * leorockway From b6567ee11c9667adbbb2e10e4740a6ab1814919c Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:15:04 +0000 Subject: [PATCH 2/7] upload the code for the suspicious stew(s) --- mods/ITEMS/mcl_mushrooms/suspicious_stew.lua | 131 +++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 mods/ITEMS/mcl_mushrooms/suspicious_stew.lua diff --git a/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua new file mode 100644 index 000000000..87e52be26 --- /dev/null +++ b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua @@ -0,0 +1,131 @@ + +-- ____________________________ +--_________________________________________/ Variables & Functions \_________ + +local eat = minetest.item_eat(6, "mcl_core:bowl") --6 hunger points, player receives mcl_core:bowl after eating + + + +local function poison(itemstack, placer, pointed_thing) + local hunger = mcl_hunger.get_hunger(placer) + if hunger < 20 then + mcl_potions.poison_func(placer, 1, 12) + return eat(itemstack, placer, pointed_thing) + end +end + +local function hunger(itemstack, placer, pointed_thing, player) + local hunger = mcl_hunger.get_hunger(placer) + if hunger < 20 then + return eat(itemstack, placer, pointed_thing) + end +end + +local function jump_boost(itemstack, placer, pointed_thing) + local hunger = mcl_hunger.get_hunger(placer) + if hunger < 20 then + mcl_potions.leaping_func(placer, 1, 6) + return eat(itemstack, placer, pointed_thing) + end +end + +local function regeneration(itemstack, placer, pointed_thing) + local hunger = mcl_hunger.get_hunger(placer) + if hunger < 20 then + mcl_potions.regeneration_func(placer, 1, 8) + return eat(itemstack, placer, pointed_thing) + end +end + +local function night_vision(itemstack, placer, pointed_thing) + local hunger = mcl_hunger.get_hunger(placer) + if hunger < 20 then + mcl_potions.night_vision_func(placer, 1, 5) + return eat(itemstack, placer, pointed_thing) + end +end + + +-- ________________________ +--_________________________________________/ Item Regestration \_________________ +minetest.register_craftitem("mcl_mushrooms:poison_stew",{ + description = "Suspicious Stew", + inventory_image = "suspicious_stew.png", + stack_max = 1, + on_place = poison, + groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + _mcl_saturation = 7.2, +}) + +minetest.register_craftitem("mcl_mushrooms:hunger_stew",{ + description = "Suspicious Stew", + inventory_image = "suspicious_stew.png", + stack_max = 1, + on_place = hunger, + groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + _mcl_saturation = 7.2, +}) + +minetest.register_craftitem("mcl_mushrooms:jump_boost_stew",{ + description = "Suspicious Stew", + inventory_image = "suspicious_stew.png", + stack_max = 1, + on_place = jump_boost, + groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + _mcl_saturation = 7.2, +}) + +minetest.register_craftitem("mcl_mushrooms:regneration_stew",{ + description = "Suspicious Stew", + inventory_image = "suspicious_stew.png", + stack_max = 1, + on_place = regeneration, + groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + _mcl_saturation = 7.2, +}) + +minetest.register_craftitem("mcl_mushrooms:night_vision_stew",{ + description = "Suspicious Stew", + inventory_image = "suspicious_stew.png", + stack_max = 1, + on_place = night_vision, + groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + _mcl_saturation = 7.2, +}) + +-- ____________________________ +--______________________________________/ Using mcl_hunger API \______________________ +mcl_hunger.register_food("mcl_sus_stew:hunger_stew",6, "mcl_core:bowl", 3.5, 0, 100) -- Register it using mcl_hunger so i can use its poison feature + +-- ______________ +--_________________________________________/ Crafts \________________________________ + +minetest.register_craft({ + output = "mcl_mushrooms:poison_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:tulip_white"} }, +}) + +minetest.register_craft({ + output = "mcl_mushrooms:hunger_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:blue_orchid"} }, +}) + +minetest.register_craft({ + output = "mcl_mushrooms:hunger_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:dandelion"} }, +}) + +minetest.register_craft({ + output = "mcl_mushrooms:jump_boost_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:peony"} }, +}) + +minetest.register_craft({ + output = "mcl_mushrooms:regeneration_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:oxeye_daisy"} }, +}) + +minetest.register_craft({ + output = "mcl_mushrooms:night_vision_stew", + recipe = { {"mcl_mushrooms:mushroom_red", "mcl_mushrooms:mushroom_brown"}, {"mcl_core:bowl", "mcl_flowers:poppy"} }, +}) \ No newline at end of file From c263d1a622b0ec0f16f84d49b343d2a94b841cef Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:17:29 +0000 Subject: [PATCH 3/7] registered suspicious_stew.lua within mcl_mushrooms --- mods/ITEMS/mcl_mushrooms/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ITEMS/mcl_mushrooms/init.lua b/mods/ITEMS/mcl_mushrooms/init.lua index 1360eabe7..64368fdf8 100644 --- a/mods/ITEMS/mcl_mushrooms/init.lua +++ b/mods/ITEMS/mcl_mushrooms/init.lua @@ -1,5 +1,6 @@ dofile(minetest.get_modpath("mcl_mushrooms").."/small.lua") dofile(minetest.get_modpath("mcl_mushrooms").."/huge.lua") +dofile(minetest.get_modpath("mcl_mushrooms").."/suspicious_stew.lua") -- Aliases for old MCL2 versions minetest.register_alias("mcl_farming:mushroom_red", "mcl_mushrooms:mushroom_red") From 4a2b07115afafab8b8ae33a6d30f81acd12ed566 Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:18:29 +0000 Subject: [PATCH 4/7] added new dependencies (everything required is within mineclone5) --- mods/ITEMS/mcl_mushrooms/mod.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_mushrooms/mod.conf b/mods/ITEMS/mcl_mushrooms/mod.conf index 20f7bef16..b3ed9b130 100644 --- a/mods/ITEMS/mcl_mushrooms/mod.conf +++ b/mods/ITEMS/mcl_mushrooms/mod.conf @@ -1,3 +1,3 @@ name = mcl_mushrooms -depends = mcl_sounds, mcl_util +depends = mcl_sounds, mcl_util, mcl_core, mcl_flowers, mcl_potions, mcl_hunger optional_depends = doc From a03e532a8501b21ba7684481dd23607ef163e9b4 Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:19:50 +0000 Subject: [PATCH 5/7] upload the texture for the suspicious stew --- .../mcl_mushrooms/textures/suspicious_stew.png | Bin 0 -> 445 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 mods/ITEMS/mcl_mushrooms/textures/suspicious_stew.png diff --git a/mods/ITEMS/mcl_mushrooms/textures/suspicious_stew.png b/mods/ITEMS/mcl_mushrooms/textures/suspicious_stew.png new file mode 100644 index 0000000000000000000000000000000000000000..3580c35aa063a70d0a424ed2d8530b7bc0112f4b GIT binary patch literal 445 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP-J2RV{+2iMFZ43;IUY;(FAr`0KPTcR!#3<1=zuU#Y zx?W(SjHRTK$CV&~b$MvnO=4`ZCN{`MP=4q6d>zR&^b^cX8&2Tt_7_v)5Ve zQzf~l?TlquHjht3Uw2bk{o$P(8v}2tMH@1BJp1IdUqO(2_QeIW+uej~OC=jJ-b&3r z?HYc0LzhylFSEkiugUgys?ml(m4`SEv=qE_6hX2_=H|&%y^k=$911ArJ;Lu^uy!k l-@3BCKAZ3-@{jW#=IvYR%l7>9ISCAC22WQ%mvv4FO#rEFv3mdj literal 0 HcmV?d00001 From fa892e880e2cfcb5eb75774409b91b77db8f08f6 Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 12:23:13 +0000 Subject: [PATCH 6/7] removed the code I used during debugging Now, suspicious stews are no longer in the creative inventory, and have to be crafted or obtained using /giveme --- mods/ITEMS/mcl_mushrooms/suspicious_stew.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua index 87e52be26..eb4246467 100644 --- a/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua +++ b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua @@ -53,7 +53,7 @@ minetest.register_craftitem("mcl_mushrooms:poison_stew",{ inventory_image = "suspicious_stew.png", stack_max = 1, on_place = poison, - groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + groups = { food = 2, eatable = 4, not_in_creative_inventory=1,}, _mcl_saturation = 7.2, }) @@ -62,7 +62,7 @@ minetest.register_craftitem("mcl_mushrooms:hunger_stew",{ inventory_image = "suspicious_stew.png", stack_max = 1, on_place = hunger, - groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + groups = { food = 2, eatable = 4, not_in_creative_inventory=1,}, _mcl_saturation = 7.2, }) @@ -71,7 +71,7 @@ minetest.register_craftitem("mcl_mushrooms:jump_boost_stew",{ inventory_image = "suspicious_stew.png", stack_max = 1, on_place = jump_boost, - groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + groups = { food = 2, eatable = 4, not_in_creative_inventory=1,}, _mcl_saturation = 7.2, }) @@ -80,7 +80,7 @@ minetest.register_craftitem("mcl_mushrooms:regneration_stew",{ inventory_image = "suspicious_stew.png", stack_max = 1, on_place = regeneration, - groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + groups = { food = 2, eatable = 4, not_in_creative_inventory=1,}, _mcl_saturation = 7.2, }) @@ -89,7 +89,7 @@ minetest.register_craftitem("mcl_mushrooms:night_vision_stew",{ inventory_image = "suspicious_stew.png", stack_max = 1, on_place = night_vision, - groups = { food = 2, eatable = 4, not_in_creative_inventory=0,}, + groups = { food = 2, eatable = 4, not_in_creative_inventory=1,}, _mcl_saturation = 7.2, }) From cdab29a42efd23e49573bb43d5a6687dceb1fe62 Mon Sep 17 00:00:00 2001 From: chmodsayshello Date: Sat, 1 Jan 2022 13:52:38 +0000 Subject: [PATCH 7/7] replaced old itemstring --- mods/ITEMS/mcl_mushrooms/suspicious_stew.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua index eb4246467..2106ab8ab 100644 --- a/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua +++ b/mods/ITEMS/mcl_mushrooms/suspicious_stew.lua @@ -95,7 +95,7 @@ minetest.register_craftitem("mcl_mushrooms:night_vision_stew",{ -- ____________________________ --______________________________________/ Using mcl_hunger API \______________________ -mcl_hunger.register_food("mcl_sus_stew:hunger_stew",6, "mcl_core:bowl", 3.5, 0, 100) -- Register it using mcl_hunger so i can use its poison feature +mcl_hunger.register_food("mcl_mushrooms:hunger_stew",6, "mcl_core:bowl", 3.5, 0, 100) -- Register it using mcl_hunger so i can use its poison feature -- ______________ --_________________________________________/ Crafts \________________________________