From 922a42756e077eb39ebd5ecae4570fb5f8ade981 Mon Sep 17 00:00:00 2001 From: Brandon Date: Sat, 11 Jul 2020 20:34:19 -0400 Subject: [PATCH] update function definitions without effect to nil --- mods/ITEMS/mcl_potions/init.lua | 4 ++-- mods/ITEMS/mcl_potions/lingering.lua | 2 +- mods/ITEMS/mcl_potions/splash.lua | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mods/ITEMS/mcl_potions/init.lua b/mods/ITEMS/mcl_potions/init.lua index d0d9f9bd30..78eb47b60e 100644 --- a/mods/ITEMS/mcl_potions/init.lua +++ b/mods/ITEMS/mcl_potions/init.lua @@ -378,12 +378,12 @@ local lingering_table = {} for i, potion in ipairs(potions) do splash_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_splash" - lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering" + lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering" end for i, potion in ipairs({"awkward", "mundane", "thick", "water", "river_water"}) do splash_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_splash" - lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering" + lingering_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_lingering" end diff --git a/mods/ITEMS/mcl_potions/lingering.lua b/mods/ITEMS/mcl_potions/lingering.lua index 467e661574..ae391e0804 100644 --- a/mods/ITEMS/mcl_potions/lingering.lua +++ b/mods/ITEMS/mcl_potions/lingering.lua @@ -80,7 +80,7 @@ local function register_lingering(name, descr, color, def) local pos = placer:getpos(); local obj = minetest.add_entity({x=pos.x+dir.x,y=pos.y+2+dir.y,z=pos.z+dir.z}, id.."_flying") obj:setvelocity({x=dir.x*velocity,y=dir.y*velocity,z=dir.z*velocity}) - obj:setacceleration({x=0, y=-9.8, z=0}) + obj:setacceleration({x=dir.x*-3, y=-9.8, z=dir.z*-3}) if not minetest.is_creative_enabled(placer:get_player_name()) then item:take_item() end diff --git a/mods/ITEMS/mcl_potions/splash.lua b/mods/ITEMS/mcl_potions/splash.lua index 59988b6810..4d8e254874 100644 --- a/mods/ITEMS/mcl_potions/splash.lua +++ b/mods/ITEMS/mcl_potions/splash.lua @@ -218,12 +218,12 @@ register_splash("regeneration_plus", S("Regeneration Splash Potion +"), "#C53DD3 }) register_splash("invisibility", S("Invisibility Splash Potion"), "#B0B0B0", { - potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, splash_DUR*redx) end, + potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, nil, splash_DUR*redx) end, tt = time_string(splash_DUR) }) register_splash("invisibility_plus", S("Invisibility Splash Potion +"), "#A0A0A0", { - potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, splash_DUR_pl*redx) end, + potion_fun = function(player, redx) mcl_potions.invisiblility_func(player, nil, splash_DUR_pl*redx) end, tt = time_string(splash_DUR_pl) }) @@ -258,31 +258,31 @@ register_splash("invisibility_plus", S("Invisibility Splash Potion +"), "#A0A0A0 -- }) 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, + potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, nil, splash_DUR*redx) end, tt = time_string(splash_DUR) }) register_splash("water_breathing_plus", S("Water Breathing Splash Potion +"), "#0000CC", { - potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, splash_DUR_pl*redx) end, + potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, nil, splash_DUR_pl*redx) end, tt = time_string(splash_DUR_pl) }) register_splash("fire_resistance", S("Fire Resistance Splash Potion"), "#D0A040", { - potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, splash_DUR*redx) end, + potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, nil, splash_DUR*redx) end, tt = time_string(splash_DUR) }) register_splash("fire_resistance_plus", S("Fire Resistance Splash Potion +"), "#E0B050", { - potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, splash_DUR_pl*redx) end, + potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, nil, splash_DUR_pl*redx) end, tt = time_string(splash_DUR_pl) }) register_splash("night_vision", S("Night Vision Splash Potion"), "#1010AA", { - potion_fun = function(player, redx) mcl_potions.night_vision_func(player, splash_DUR*redx) end, + potion_fun = function(player, redx) mcl_potions.night_vision_func(player, nil, splash_DUR*redx) end, tt = time_string(splash_DUR) }) register_splash("night_vision_plus", S("Night Vision Splash Potion +"), "#2020BA", { - potion_fun = function(player, redx) mcl_potions.night_vision_func(player, splash_DUR_pl*redx) end, + potion_fun = function(player, redx) mcl_potions.night_vision_func(player, nil, splash_DUR_pl*redx) end, tt = time_string(splash_DUR_pl) })