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 c0d5d8c7a0..fa9aa3d915 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 zcmeAS@N?(olHy`uVBq!ia0vp^3xIeQ2OE&o({p|Xq!^2X+?^QKos)S9|3mA#!eck{Nwb4UN*-^mrNo3G!pd-v{xB4_P(i6w9Le9%w+}y(ycWB!?2GvA$B!THyI(PMNd_Us9fO}~?~b(Pix zvEz4|^)lxi%uLPOv-JCYpS5QrE)^fp@c(`G)571`lIfq%Gq%tB5&Shd&}9C3)7Q&b zFNfY+Q=M0z`*==wcqM;hgvi8SMWKszwh65?{JMEsVNs!lnUjLsuyd*k=--_7&$^M5lgsyX9rb@t}k+&O7E-`u&5ESk{d{wUKd zHX(QA#xR?p4_~&HzgVbk>ehPx{P|j2%^wF+moGW6b?Jlm@85fxTh~6GY2|mac*Dzm zSxeV!?Nw$K|Fiw2*TJptnv|!gF8kHAJYje2SKr9M{H{wNS%1sfthd+cnqKR2=hEB3 z@%Yt~))!3+cD>TSU~c;Dy38M1xYc2&qHbFR6&zeD8Q$x? z>;cEo*n)$?yOyj2TDR}9%U;bokjmv6;yJswU8&HTr=k7zqmky02TDEb9zEHzyGMM{ zG2e&@Ttgf_aKCp6%S;~&!zb=tEFJGB1xxcXVvW4^Qt*`&*$ofk<^`6E5?}6<5mQy>HpPD}Dn4if6=EX<0pZK*Xu6pnO z?$=N5etUQM`pr+-{cm4A6JM#abn=%a-(RWSEOz>M{>z^~HDCU0NdN4-^@aL(8)Ge? z#esI;?`HM{E6vjiKhPX^+>d3lc2>;KO;2~4W!p~+`k;4iji=W^>)km&xBiT&VLbNe zwb#YWM7PSd&rPqFHQoBm*?#xh>%84}uRWgTptHg5<&vv86Zw^|32DBL`LNvQ{8rhZ zIIVeFYroxbsWQ$vUK<0&W{cceI^A9_EvVq$vllCNKTw`@R(8ja;~O8@n|%boFyt=akR{038N~H2?qr delta 1011 zcmdnX)5$SGrJl3EBeIx*f$sw# zUVftx=~%{~9N}5UELcIwz$Ebn6Mzowt#I{%4-6$?XH+V?;#KylI{m+YzyCBYXAjDn*HQobZ=8wz{`>Eb=56o3T732M z+3VNdhyP#puOfQ4^RF9gE{CmOyT1R`gu2{w@0# zw6=;Z=Uh*~5hR@u`^&e+!<dh%<*vliK=HpC#JogaNydaK$i7qz+^yp zN~^%3uT{K?YqX_YKXmEnO6}iYzdt;%-DR6tuTn+pv%X^j*CfBHY}mqaF4Ubx{|H#y zg*$?Ku34!Vm~1M#DtJ&oE&HNIQ+UR^44#8}KT@A|=?MC)UhA41Klg8)e$(_-xz{XY z_#PJR6bW6jR#U2YkG#=~?kyp2m-IZi|0TJnKB(l`#CvC6OkA9Ax%9_B7hsS*tlGOx z?y`WB#azFeX-h=jtDl}eY2Mq6(tzbZCJSVLHQrIB{G-OM{M{tUg}=86Nxb z^XE+6rsenME~~Qd{t=ZHe&<@+zEJ*sQ&w^C$sS+Q^rcX9AUv`$S(o6_{?cUgY4;Co&D19SLcsuk|XeaJOprU7&_bOG)PMg2X)nK#W!82Yg#?@IRT?WgY6*X3V} zKbrHkcGq^D(*+hXhu)THzxwYfcY9Mu#OvQB?`8fnGLQ!pS_J;F+H9En>-VnIFCZg4 MUHx3vIVCg!07aDL$^ZZW 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 7b737dc199..555a87c262 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 555a87c262..61bb8fd62d 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 648aa7e7ae..b8685bdf71 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 8ba1f703e8..a4f0dace87 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 26ea47f340..e0a91389d9 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 a4f0dace87..91ce53b584 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 a9efe52f83..6de5e07adf 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 e0a91389d9..a336201aea 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 b82db92834..c72907bd63 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 - -