forked from LizzyFleckenstein03/Memeclone
Add fire resistance groundwork.
This commit is contained in:
parent
7827e0019f
commit
162faa7e60
|
@ -149,7 +149,7 @@ minetest.register_globalstep(function(dtime)
|
||||||
is_swift[player] = nil
|
is_swift[player] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
elseif not player:get_properties() then
|
elseif not player:get_properties() then
|
||||||
is_swift[player] = nil
|
is_swift[player] = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -415,3 +415,10 @@ function mcl_potions.water_breathing_func(player, duration)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function mcl_potions.fire_resistance_func(player, duration)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
end
|
||||||
|
|
|
@ -300,9 +300,9 @@ local awkward_table = {
|
||||||
["mcl_core:sugar"] = "mcl_potions:swiftness",
|
["mcl_core:sugar"] = "mcl_potions:swiftness",
|
||||||
["mcl_mobitems:magma_cream"] = "mcl_potions:fire_resistance", --add craft
|
["mcl_mobitems:magma_cream"] = "mcl_potions:fire_resistance", --add craft
|
||||||
["mcl_mobitems:blaze_powder"] = "mcl_potions:strength", --add craft
|
["mcl_mobitems:blaze_powder"] = "mcl_potions:strength", --add craft
|
||||||
["mcl_fishing:pufferfish_raw"] = "mcl_potions:water_breathing", --add craft
|
["mcl_fishing:pufferfish_raw"] = "mcl_potions:water_breathing",
|
||||||
["mcl_mobitems:ghast_tear"] = "mcl_potions:regeneration", --add craft
|
["mcl_mobitems:ghast_tear"] = "mcl_potions:regeneration",
|
||||||
["mcl_mobitems:spider_eye"] = "mcl_potions:poison", --add craft
|
["mcl_mobitems:spider_eye"] = "mcl_potions:poison",
|
||||||
["mcl_mobitems:rabbit_foot"] = "mcl_potions:leaping",
|
["mcl_mobitems:rabbit_foot"] = "mcl_potions:leaping",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ for i, potion in ipairs({"healing","harming","swiftness","leaping","poison","reg
|
||||||
|
|
||||||
table.insert(potions, potion)
|
table.insert(potions, potion)
|
||||||
|
|
||||||
if potion ~= "invisibility" and potion ~= "night_vision" and potion ~= "weakness" and potion ~= "water_breathing" then
|
if potion ~= "invisibility" and potion ~= "night_vision" and potion ~= "weakness" and potion ~= "water_breathing" and potion ~= "fire_resistance" then
|
||||||
enhancement_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_2"
|
enhancement_table["mcl_potions:"..potion] = "mcl_potions:"..potion.."_2"
|
||||||
enhancement_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_2_splash"
|
enhancement_table["mcl_potions:"..potion.."_splash"] = "mcl_potions:"..potion.."_2_splash"
|
||||||
table.insert(potions, potion.."_2")
|
table.insert(potions, potion.."_2")
|
||||||
|
|
|
@ -591,3 +591,46 @@ minetest.register_craftitem("mcl_potions:water_breathing_plus", {
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("mcl_potions:fire_resistance", {
|
||||||
|
description = S("Fire Resistance Potion"),
|
||||||
|
_doc_items_longdesc = brewhelp,
|
||||||
|
wield_image = potion_image("#D0A040"),
|
||||||
|
inventory_image = potion_image("#D0A040"),
|
||||||
|
groups = { brewitem = 1, food = 0 },
|
||||||
|
stack_max = 1,
|
||||||
|
|
||||||
|
on_place = function(itemstack, user, pointed_thing)
|
||||||
|
mcl_potions.fire_resistance_func(user, 180)
|
||||||
|
mcl_potions._use_potion(itemstack, user, "#D0A040")
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_secondary_use = function(itemstack, user, pointed_thing)
|
||||||
|
mcl_potions.fire_resistance_func(user, 180)
|
||||||
|
mcl_potions._use_potion(itemstack, user, "#D0A040")
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craftitem("mcl_potions:fire_resistance_plus", {
|
||||||
|
description = S("Fire Resistance Potion +"),
|
||||||
|
_doc_items_longdesc = brewhelp,
|
||||||
|
wield_image = potion_image("#E0B050"),
|
||||||
|
inventory_image = potion_image("#E0B050"),
|
||||||
|
groups = { brewitem = 1, food = 0 },
|
||||||
|
stack_max = 1,
|
||||||
|
|
||||||
|
on_place = function(itemstack, user, pointed_thing)
|
||||||
|
mcl_potions.fire_resistance_func(user, 480)
|
||||||
|
mcl_potions._use_potion(itemstack, user, "#E0B050")
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_secondary_use = function(itemstack, user, pointed_thing)
|
||||||
|
mcl_potions.fire_resistance_func(user, 480)
|
||||||
|
mcl_potions._use_potion(itemstack, user, "#E0B050")
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
})
|
||||||
|
|
|
@ -188,3 +188,11 @@ register_splash("water_breathing", "Splash Water Breathing", "#0000AA", {
|
||||||
register_splash("water_breathing_plus", "Splash Water Breathing +", "#0000CC", {
|
register_splash("water_breathing_plus", "Splash Water Breathing +", "#0000CC", {
|
||||||
potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, 360*redx) end
|
potion_fun = function(player, redx) mcl_potions.water_breathing_func(player, 360*redx) end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
register_splash("water_breathing_plus", "Splash Fire Resistance", "#D0A040", {
|
||||||
|
potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, 135*redx) end
|
||||||
|
})
|
||||||
|
|
||||||
|
register_splash("water_breathing_plus", "Splash Fire Resistance +", "#E0B050", {
|
||||||
|
potion_fun = function(player, redx) mcl_potions.fire_resistance_func(player, 360*redx) end
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in New Issue