update function definitions without effect to nil

This commit is contained in:
Brandon 2020-07-11 20:34:19 -04:00
parent 926d842cdb
commit 922a42756e
3 changed files with 11 additions and 11 deletions

View file

@ -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

View file

@ -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

View file

@ -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)
})