From 90b902a22858998eede0bb8bf38d5b616baa7292 Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 18:29:41 -0400 Subject: [PATCH 1/7] update formspec with translatable label --- mods/ITEMS/mcl_brewing/init.lua | 2 ++ .../textures/mcl_brewing_inventory.png | Bin 1033 -> 1597 bytes 2 files changed, 2 insertions(+) diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index c0d5d8c7a..fa9aa3d91 100755 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -5,6 +5,7 @@ local function active_brewing_formspec(fuel_percent, brew_percent) return "size[9,8.75]".. "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]".. -- "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory_active.png]".. + "label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Brewing Stand"))).."]".. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. mcl_formspec.get_itemslot_bg(0,4.5,9,3).. @@ -35,6 +36,7 @@ end local brewing_formspec = "size[9,8.75]".. "background[-0.19,-0.25;9.5,9.5;mcl_brewing_inventory.png]".. + "label[4,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Brewing Stand"))).."]".. "label[0,4.0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. "list[current_player;main;0,4.5;9,3;9]".. mcl_formspec.get_itemslot_bg(0,4.5,9,3).. diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_inventory.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_inventory.png index 02c9dc44d104929c726074bb22b5105090b9c724..0ed2f4029f3920c694da7e701115ffe2e811c053 100755 GIT binary patch literal 1597 zcmds%YgE#A7{`Bq1CQFeOij|}YPw4C(rJa4A~hulFPM~}8RT+mD2kUd%}YfWEp=&D zx^!wPF_$t-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;>kVv`T4UYIxJ`Wbz4!F zG<*Bwk3Y%{@-oHF1S%i*iN1O&Fx_aq$ibaYWEwO(64Fdx>s6d_4c(nEN%-K)&If`n z2AhvZU3U$hzpFN`C-a}xt7n}FX{OIE?^UXpoi=}&tHEZ$gJ-;0jH}mlCZrjgG_{|) zTVI!dE&gcE*Vp<;nm6 From 16c886f0ece0a227e2ad920ffcd861453265e6ae Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:10:38 -0400 Subject: [PATCH 2/7] Update Night Vision to allow full day brightness - only active at night. --- mods/ITEMS/mcl_potions/functions.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 7b737dc19..555a87c26 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -174,7 +174,10 @@ minetest.register_globalstep(function(dtime) is_cat[player].timer = is_cat[player].timer + dtime if player:get_pos() then mcl_potions._add_spawner(player, "#1010AA") end - player:override_day_night_ratio(0.45) + if minetest.get_timeofday() > 0.8 or minetest.get_timeofday() < 0.2 then + player:override_day_night_ratio(0.45) + else player:override_day_night_ratio(nil) + end if is_cat[player].timer >= is_cat[player].dur then is_cat[player] = nil From 1fda285102ee2851f3488fd7dc412660faf9f999 Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:16:23 -0400 Subject: [PATCH 3/7] Fix reset for night vision on drink milk --- mods/ITEMS/mcl_potions/functions.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 555a87c26..61bb8fd62 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -329,6 +329,7 @@ function mcl_potions._reset_player_effects(player) end if is_cat[player] then + player:override_day_night_ratio(nil) is_cat[player] = nil end From d1b7184e7d67ea102d00ba56f4ec23c1f25d0a4d Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:22:11 -0400 Subject: [PATCH 4/7] Comment weakness/strength --- mods/ITEMS/mcl_potions/init.lua | 9 ++++++--- mods/ITEMS/mcl_potions/potions.lua | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index 648aa7e7a..b8685bdf7 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -291,7 +291,7 @@ minetest.register_craft({ local water_table = { ["mcl_nether:nether_wart_item"] = "mcl_potions:awkward", - ["mcl_potions:fermented_spider_eye"] = "mcl_potions:weakness", + -- ["mcl_potions:fermented_spider_eye"] = "mcl_potions:weakness", ["mcl_potions:speckled_melon"] = "mcl_potions:mundane", ["mcl_core:sugar"] = "mcl_potions:mundane", ["mcl_mobitems:magma_cream"] = "mcl_potions:mundane", @@ -307,7 +307,7 @@ local awkward_table = { ["mcl_farming:carrot_item_gold"] = "mcl_potions:night_vision", ["mcl_core:sugar"] = "mcl_potions:swiftness", ["mcl_mobitems:magma_cream"] = "mcl_potions:fire_resistance", - ["mcl_mobitems:blaze_powder"] = "mcl_potions:strength", + -- ["mcl_mobitems:blaze_powder"] = "mcl_potions:strength", ["mcl_fishing:pufferfish_raw"] = "mcl_potions:water_breathing", ["mcl_mobitems:ghast_tear"] = "mcl_potions:regeneration", ["mcl_mobitems:spider_eye"] = "mcl_potions:poison", @@ -324,7 +324,10 @@ local output_table = { local enhancement_table = {} local extension_table = {} local potions = {"awkward", "mundane", "thick"} -for i, potion in ipairs({"healing","harming","swiftness","slowness","leaping","poison","regeneration","invisibility","fire_resistance","weakness","strength","water_breathing","night_vision"}) do +for i, potion in ipairs({"healing","harming","swiftness","slowness", + "leaping","poison","regeneration","invisibility","fire_resistance", + -- "weakness","strength", + "water_breathing","night_vision"}) do table.insert(potions, potion) diff --git a/mods/ITEMS/mcl_potions/potions.lua b/mods/ITEMS/mcl_potions/potions.lua index 8ba1f703e..a4f0dace8 100644 --- a/mods/ITEMS/mcl_potions/potions.lua +++ b/mods/ITEMS/mcl_potions/potions.lua @@ -18,7 +18,7 @@ minetest.register_craftitem("mcl_potions:awkward", { stack_max = 1, inventory_image = potion_image("#0000FF"), wield_image = potion_image("#0000FF"), - groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1}, + groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0}, on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), }) @@ -31,7 +31,7 @@ minetest.register_craftitem("mcl_potions:mundane", { stack_max = 1, inventory_image = potion_image("#0000FF"), wield_image = potion_image("#0000FF"), - groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=1 }, + groups = {brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, on_place = minetest.item_eat(0, "mcl_potions:glass_bottle"), on_secondary_use = minetest.item_eat(0, "mcl_potions:glass_bottle"), }) From ac13dd2a71de806cfdf64288281fc98a4bbe339e Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:25:34 -0400 Subject: [PATCH 5/7] Comment weakness/strength potions --- mods/ITEMS/mcl_potions/lingering.lua | 44 ++--- mods/ITEMS/mcl_potions/potions.lua | 236 ++++++++++++++------------- mods/ITEMS/mcl_potions/splash.lua | 58 +++---- 3 files changed, 170 insertions(+), 168 deletions(-) diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index 26ea47f34..e0a91389d 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -261,17 +261,17 @@ register_lingering("invisibility_plus", S("Lingering Invisibility Potion +"), "# tt = time_string(mcl_potions.DURATION_PLUS*0.25) }) -register_lingering("weakness", S("Lingering Weakness Potion"), "#6600AA", { - potion_fun = function(player) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end, - -- TODO: Fix tooltip - tt = time_string(mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) -}) - -register_lingering("weakness_plus", S("Lingering Weakness Potion +"), "#7700BB", { - potion_fun = function(player) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end, - -- TODO: Fix tooltip - tt = time_string(mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) -}) +-- register_lingering("weakness", S("Lingering Weakness Potion"), "#6600AA", { +-- potion_fun = function(player) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) end, +-- -- TODO: Fix tooltip +-- tt = time_string(mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) +-- }) +-- +-- register_lingering("weakness_plus", S("Lingering Weakness Potion +"), "#7700BB", { +-- potion_fun = function(player) mcl_potions.weakness_func(player, -4, mcl_potions.DURATION_PLUS*mcl_potions.INV_FACTOR*0.25) end, +-- -- TODO: Fix tooltip +-- tt = time_string(mcl_potions.DURATION*mcl_potions.INV_FACTOR*0.25) +-- }) register_lingering("fire_resistance", S("Lingering Fire Resistance Potion"), "#D0A040", { potion_fun = function(player) mcl_potions.fire_resistance_func(player, mcl_potions.DURATION*0.25) end, @@ -283,17 +283,17 @@ register_lingering("fire_resistance_plus", S("Lingering Fire Resistance Potion + tt = time_string(mcl_potions.DURATION_PLUS*0.25) }) -register_lingering("strength", S("Lingering Strength Potion"), "#D444D4", { - potion_fun = function(player) mcl_potions.strength_func(player, 3, mcl_potions.DURATION*0.25) end, - -- TODO: Fix tooltip - tt = time_string(mcl_potions.DURATION*0.25) -}) - -register_lingering("strength_2", S("Lingering Strength Potion II"), "#D444F4", { - potion_fun = function(player) mcl_potions.strength_func(player, 6, smcl_potions.DURATION_2*0.25) end, - -- TODO: Fix tooltip - tt = time_string(mcl_potions.DURATION_2*0.25) -}) +-- register_lingering("strength", S("Lingering Strength Potion"), "#D444D4", { +-- potion_fun = function(player) mcl_potions.strength_func(player, 3, mcl_potions.DURATION*0.25) end, +-- -- TODO: Fix tooltip +-- tt = time_string(mcl_potions.DURATION*0.25) +-- }) +-- +-- register_lingering("strength_2", S("Lingering Strength Potion II"), "#D444F4", { +-- potion_fun = function(player) mcl_potions.strength_func(player, 6, smcl_potions.DURATION_2*0.25) end, +-- -- TODO: Fix tooltip +-- tt = time_string(mcl_potions.DURATION_2*0.25) +-- }) register_lingering("strength_plus", S("Lingering Strength Potion +"), "#D444E4", { potion_fun = function(player) mcl_potions.strength_func(player, 3, mcl_potions.DURATION_PLUS*0.25) end, diff --git a/mods/ITEMS/mcl_potions/potions.lua b/mods/ITEMS/mcl_potions/potions.lua index a4f0dace8..91ce53b58 100644 --- a/mods/ITEMS/mcl_potions/potions.lua +++ b/mods/ITEMS/mcl_potions/potions.lua @@ -425,125 +425,127 @@ minetest.register_craftitem("mcl_potions:leaping_plus", { }) -minetest.register_craftitem("mcl_potions:weakness", { - description = S("Weakness Potion"), - _tt_help = S("-4 HP damage | 1:30"), - _doc_items_longdesc = brewhelp, - wield_image = potion_image("#6600AA"), - inventory_image = potion_image("#6600AA"), - groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, - stack_max = 1, +-- minetest.register_craftitem("mcl_potions:weakness", { +-- description = S("Weakness Potion"), +-- _tt_help = S("-4 HP damage | 1:30"), +-- _doc_items_longdesc = brewhelp, +-- wield_image = potion_image("#6600AA"), +-- inventory_image = potion_image("#6600AA"), +-- groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, +-- stack_max = 1, +-- +-- on_place = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#6600AA") +-- return itemstack +-- end, +-- +-- on_secondary_use = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#6600AA") +-- return itemstack +-- end +-- }) +-- +-- minetest.register_craftitem("mcl_potions:weakness_plus", { +-- description = S("Weakness Potion +"), +-- _tt_help = S("-4 HP damage | 4:00"), +-- _doc_items_longdesc = brewhelp, +-- wield_image = potion_image("#7700BB"), +-- inventory_image = potion_image("#7700BB"), +-- groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, +-- stack_max = 1, +-- +-- on_place = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#7700BB") +-- return itemstack +-- end, +-- +-- on_secondary_use = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#7700BB") +-- return itemstack +-- end +-- }) +-- +-- minetest.register_craftitem("mcl_potions:strength", { +-- description = S("Strength Potion"), +-- _tt_help = S("+3 HP damage | 3:00"), +-- _doc_items_longdesc = brewhelp, +-- wield_image = potion_image("#D444D4"), +-- inventory_image = potion_image("#D444D4"), +-- groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, +-- stack_max = 1, +-- +-- on_place = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444D4") +-- return itemstack +-- end, +-- +-- on_secondary_use = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444D4") +-- return itemstack +-- end +-- }) +-- +-- minetest.register_craftitem("mcl_potions:strength_2", { +-- description = S("Strength Potion II"), +-- _tt_help = S("+6 HP damage | 1:30"), +-- _doc_items_longdesc = brewhelp, +-- wield_image = potion_image("#D444E4"), +-- inventory_image = potion_image("#D444E4"), +-- groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, +-- stack_max = 1, +-- +-- on_place = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444E4") +-- return itemstack +-- end, +-- +-- on_secondary_use = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444E4") +-- return itemstack +-- end +-- }) +-- +-- minetest.register_craftitem("mcl_potions:strength_plus", { +-- description = S("Strength Potion +"), +-- _tt_help = S("+3 HP damage | 8:00"), +-- _doc_items_longdesc = brewhelp, +-- wield_image = potion_image("#D444F4"), +-- inventory_image = potion_image("#D444F4"), +-- groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, +-- stack_max = 1, +-- +-- on_place = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444F4") +-- return itemstack +-- end, +-- +-- on_secondary_use = function(itemstack, user, pointed_thing) +-- mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) +-- minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) +-- mcl_potions._use_potion(itemstack, user, "#D444F4") +-- return itemstack +-- end +-- }) - on_place = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#6600AA") - return itemstack - end, - on_secondary_use = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, -4, mcl_potions.DURATION*mcl_potions.INV_FACTOR) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#6600AA") - return itemstack - end -}) - -minetest.register_craftitem("mcl_potions:weakness_plus", { - description = S("Weakness Potion +"), - _tt_help = S("-4 HP damage | 4:00"), - _doc_items_longdesc = brewhelp, - wield_image = potion_image("#7700BB"), - inventory_image = potion_image("#7700BB"), - groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, - stack_max = 1, - - on_place = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#7700BB") - return itemstack - end, - - on_secondary_use = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, -4, mcl_potions.DURATION_2*mcl_potions.INV_FACTOR) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#7700BB") - return itemstack - end -}) - -minetest.register_craftitem("mcl_potions:strength", { - description = S("Strength Potion"), - _tt_help = S("+3 HP damage | 3:00"), - _doc_items_longdesc = brewhelp, - wield_image = potion_image("#D444D4"), - inventory_image = potion_image("#D444D4"), - groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, - stack_max = 1, - - on_place = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444D4") - return itemstack - end, - - on_secondary_use = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 3, mcl_potions.DURATION) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444D4") - return itemstack - end -}) - -minetest.register_craftitem("mcl_potions:strength_2", { - description = S("Strength Potion II"), - _tt_help = S("+6 HP damage | 1:30"), - _doc_items_longdesc = brewhelp, - wield_image = potion_image("#D444E4"), - inventory_image = potion_image("#D444E4"), - groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, - stack_max = 1, - - on_place = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444E4") - return itemstack - end, - - on_secondary_use = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 6, mcl_potions.DURATION_2) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444E4") - return itemstack - end -}) - -minetest.register_craftitem("mcl_potions:strength_plus", { - description = S("Strength Potion +"), - _tt_help = S("+3 HP damage | 8:00"), - _doc_items_longdesc = brewhelp, - wield_image = potion_image("#D444F4"), - inventory_image = potion_image("#D444F4"), - groups = { brewitem=1, food=3, can_eat_when_full=1, not_in_creative_inventory=0 }, - stack_max = 1, - - on_place = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444F4") - return itemstack - end, - - on_secondary_use = function(itemstack, user, pointed_thing) - mcl_potions.weakness_func(user, 3, mcl_potions.DURATION_PLUS) - minetest.do_item_eat(0, "mcl_potions:glass_bottle", itemstack, user, pointed_thing) - mcl_potions._use_potion(itemstack, user, "#D444F4") - return itemstack - end -}) minetest.register_craftitem("mcl_potions:poison", { description = S("Poison Potion"), _tt_help = S("-1 HP / 2.5s | 0:45"), diff --git a/mods/ITEMS/mcl_potions/splash.lua b/mods/ITEMS/mcl_potions/splash.lua index a9efe52f8..6de5e07ad 100644 --- a/mods/ITEMS/mcl_potions/splash.lua +++ b/mods/ITEMS/mcl_potions/splash.lua @@ -220,35 +220,35 @@ register_splash("invisibility_plus", S("Invisibility Splash Potion +"), "#A0A0A0 tt = time_string(splash_DUR_pl) }) -register_splash("weakness", S("Weakness Splash Potion"), "#6600AA", { - potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR*mcl_potions.INV_FACTOR*redx) end, - -- TODO: Fix tooltip - tt = time_string(splash_DUR*mcl_potions.INV_FACTOR) -}) - -register_splash("weakness_plus", S("Weakness Splash Potion +"), "#7700BB", { - potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR_pl*mcl_potions.INV_FACTOR*redx) end, - -- TODO: Fix tooltip - tt = time_string(splash_DUR_pl*mcl_potions.INV_FACTOR) -}) - -register_splash("strength", S("Strength Splash Potion"), "#D444D4", { - potion_fun = function(player, redx) mcl_potions.strength_func(player, 3, splash_DUR*redx) end, - -- TODO: Fix tooltip - tt = time_string(splash_DUR) -}) - -register_splash("strength_2", S("Strength Splash Potion II"), "#D444F4", { - potion_fun = function(player, redx) mcl_potions.strength_func(player, 6, splash_DUR_2*redx) end, - -- TODO: Fix tooltip - tt = time_string(splash_DUR_2) -}) - -register_splash("strength_plus", S("Strength Splash Potion +"), "#D444E4", { - potion_fun = function(player, redx) mcl_potions.strength_func(player, 3, splash_DUR_pl*redx) end, - -- TODO: Fix tooltip - tt = time_string(splash_DUR_pl) -}) +-- register_splash("weakness", S("Weakness Splash Potion"), "#6600AA", { +-- potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR*mcl_potions.INV_FACTOR*redx) end, +-- -- TODO: Fix tooltip +-- tt = time_string(splash_DUR*mcl_potions.INV_FACTOR) +-- }) +-- +-- register_splash("weakness_plus", S("Weakness Splash Potion +"), "#7700BB", { +-- potion_fun = function(player, redx) mcl_potions.weakness_func(player, -4, splash_DUR_pl*mcl_potions.INV_FACTOR*redx) end, +-- -- TODO: Fix tooltip +-- tt = time_string(splash_DUR_pl*mcl_potions.INV_FACTOR) +-- }) +-- +-- register_splash("strength", S("Strength Splash Potion"), "#D444D4", { +-- potion_fun = function(player, redx) mcl_potions.strength_func(player, 3, splash_DUR*redx) end, +-- -- TODO: Fix tooltip +-- tt = time_string(splash_DUR) +-- }) +-- +-- register_splash("strength_2", S("Strength Splash Potion II"), "#D444F4", { +-- potion_fun = function(player, redx) mcl_potions.strength_func(player, 6, splash_DUR_2*redx) end, +-- -- TODO: Fix tooltip +-- tt = time_string(splash_DUR_2) +-- }) +-- +-- register_splash("strength_plus", S("Strength Splash Potion +"), "#D444E4", { +-- potion_fun = function(player, redx) mcl_potions.strength_func(player, 3, splash_DUR_pl*redx) end, +-- -- TODO: Fix tooltip +-- tt = time_string(splash_DUR_pl) +-- }) register_splash("water_breathing", S("Water Breathing Splash Potion"), "#0000AA", { potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, splash_DUR*redx) end, From 0422a6410e58b84cba75d691c5ff978acc719bdf Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:26:30 -0400 Subject: [PATCH 6/7] Comment strength/weakness --- mods/ITEMS/mcl_potions/lingering.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index e0a91389d..a336201ae 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -294,12 +294,12 @@ register_lingering("fire_resistance_plus", S("Lingering Fire Resistance Potion + -- -- TODO: Fix tooltip -- tt = time_string(mcl_potions.DURATION_2*0.25) -- }) - -register_lingering("strength_plus", S("Lingering Strength Potion +"), "#D444E4", { - potion_fun = function(player) mcl_potions.strength_func(player, 3, mcl_potions.DURATION_PLUS*0.25) end, - -- TODO: Fix tooltip - tt = time_string(mcl_potions.DURATION_PLUS*0.25) -}) +-- +-- register_lingering("strength_plus", S("Lingering Strength Potion +"), "#D444E4", { +-- potion_fun = function(player) mcl_potions.strength_func(player, 3, mcl_potions.DURATION_PLUS*0.25) end, +-- -- TODO: Fix tooltip +-- tt = time_string(mcl_potions.DURATION_PLUS*0.25) +-- }) register_lingering("night_vision", S("Lingering Night Vision Potion"), "#1010AA", { potion_fun = function(player) mcl_potions.night_vision_func(player, mcl_potions.DURATION*0.25) end, From 4f6761948b275067d97fe7e5d89e143771f1501e Mon Sep 17 00:00:00 2001 From: Brandon Date: Fri, 10 Jul 2020 19:51:13 -0400 Subject: [PATCH 7/7] Comment weakness/strength --- mods/MISC/mcl_wip/init.lua | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/mods/MISC/mcl_wip/init.lua b/mods/MISC/mcl_wip/init.lua index b82db9283..c72907bd6 100644 --- a/mods/MISC/mcl_wip/init.lua +++ b/mods/MISC/mcl_wip/init.lua @@ -17,25 +17,25 @@ local wip_items = { "mcl_paintings:painting", "mcl_potions:night_vision", "mcl_potions:night_vision_plus", - "mcl_potions:weakness", - "mcl_potions:weakness_plus", - "mcl_potions:strength", - "mcl_potions:strength_plus", - "mcl_potions:strength_2", + -- "mcl_potions:weakness", + -- "mcl_potions:weakness_plus", + -- "mcl_potions:strength", + -- "mcl_potions:strength_plus", + -- "mcl_potions:strength_2", "mcl_potions:night_vision_splash", "mcl_potions:night_vision_plus_splash", - "mcl_potions:weakness_splash", - "mcl_potions:weakness_plus_splash", - "mcl_potions:strength_splash", - "mcl_potions:strength_plus_splash", - "mcl_potions:strength_2_splash", + -- "mcl_potions:weakness_splash", + -- "mcl_potions:weakness_plus_splash", + -- "mcl_potions:strength_splash", + -- "mcl_potions:strength_plus_splash", + -- "mcl_potions:strength_2_splash", "mcl_potions:night_vision_lingering", "mcl_potions:night_vision_plus_lingering", - "mcl_potions:weakness_lingering", - "mcl_potions:weakness_plus_lingering", - "mcl_potions:strength_lingering", - "mcl_potions:strength_plus_lingering", - "mcl_potions:strength_2_lingering", + -- "mcl_potions:weakness_lingering", + -- "mcl_potions:weakness_plus_lingering", + -- "mcl_potions:strength_lingering", + -- "mcl_potions:strength_plus_lingering", + -- "mcl_potions:strength_2_lingering", } local experimental_items = { } @@ -66,5 +66,3 @@ for i=1,#experimental_items do new_description = new_description .. "\n"..core.colorize("#FFFF00", S("(Temporary)")) minetest.override_item(experimental_items[i], { description = new_description }) end - -