Fix potion registering not working with other mods
This commit is contained in:
parent
ddba0408e1
commit
67f45bd6fb
@ -123,7 +123,7 @@ end)
|
|||||||
|
|
||||||
|
|
||||||
function mcl_potions.register_lingering(name, descr, color, def)
|
function mcl_potions.register_lingering(name, descr, color, def)
|
||||||
local id = "mcl_potions:"..name.."_lingering"
|
local id = minetest.get_current_modname()..":"..name.."_lingering"
|
||||||
local longdesc = def._longdesc
|
local longdesc = def._longdesc
|
||||||
if not def.no_effect then
|
if not def.no_effect then
|
||||||
longdesc = S("A throwable potion that will shatter on impact, where it creates a magic cloud that lingers around for a while. Any player or mob inside the cloud will receive the potion's effect or set of effects, possibly repeatedly.")
|
longdesc = S("A throwable potion that will shatter on impact, where it creates a magic cloud that lingers around for a while. Any player or mob inside the cloud will receive the potion's effect or set of effects, possibly repeatedly.")
|
||||||
|
@ -17,7 +17,7 @@ local function splash_image(colorstring, opacity)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function mcl_potions.register_splash(name, descr, color, def)
|
function mcl_potions.register_splash(name, descr, color, def)
|
||||||
local id = "mcl_potions:"..name.."_splash"
|
local id = minetest.get_current_modname()..":"..name.."_splash"
|
||||||
local longdesc = def._longdesc
|
local longdesc = def._longdesc
|
||||||
if not def.no_effect then
|
if not def.no_effect then
|
||||||
longdesc = S("A throwable potion that will shatter on impact, where it gives all nearby players and mobs a status effect or a set of status effects.")
|
longdesc = S("A throwable potion that will shatter on impact, where it gives all nearby players and mobs a status effect or a set of status effects.")
|
||||||
|
@ -21,7 +21,7 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
|||||||
local tt = def._tt or ""
|
local tt = def._tt or ""
|
||||||
local groups = {ammo=1, ammo_bow=1, brewitem=1, _mcl_potion=1}
|
local groups = {ammo=1, ammo_bow=1, brewitem=1, _mcl_potion=1}
|
||||||
if def.nocreative then groups.not_in_creative_inventory = 1 end
|
if def.nocreative then groups.not_in_creative_inventory = 1 end
|
||||||
local arrow_item = "mcl_potions:"..name.."_arrow"
|
local arrow_item = minetest.get_current_modname()..":"..name.."_arrow"
|
||||||
core.register_craftitem(arrow_item, {
|
core.register_craftitem(arrow_item, {
|
||||||
description = desc,
|
description = desc,
|
||||||
_tt_help = arrow_tt .. "\n" .. tt,
|
_tt_help = arrow_tt .. "\n" .. tt,
|
||||||
@ -81,14 +81,14 @@ function mcl_potions.register_arrow(name, desc, color, def)
|
|||||||
mcl_bows.arrow_entity.on_activate(self, staticdata, dtime_s)
|
mcl_bows.arrow_entity.on_activate(self, staticdata, dtime_s)
|
||||||
self._arrow_item = arrow_item
|
self._arrow_item = arrow_item
|
||||||
end
|
end
|
||||||
vl_projectile.register("mcl_potions:"..name.."_arrow_entity", arrow_entity)
|
vl_projectile.register(arrow_item.."_entity", arrow_entity)
|
||||||
|
|
||||||
if core.get_modpath("mcl_bows") then
|
if core.get_modpath("mcl_bows") then
|
||||||
core.register_craft({
|
core.register_craft({
|
||||||
output = "mcl_potions:"..name.."_arrow 8",
|
output = arrow_item.." 8",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"mcl_bows:arrow","mcl_bows:arrow","mcl_bows:arrow"},
|
{"mcl_bows:arrow","mcl_bows:arrow","mcl_bows:arrow"},
|
||||||
{"mcl_bows:arrow","mcl_potions:"..name.."_lingering","mcl_bows:arrow"},
|
{"mcl_bows:arrow",minetest.get_current_modname()..":"..name.."_lingering","mcl_bows:arrow"},
|
||||||
{"mcl_bows:arrow","mcl_bows:arrow","mcl_bows:arrow"}
|
{"mcl_bows:arrow","mcl_bows:arrow","mcl_bows:arrow"}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user