Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev

This commit is contained in:
Sys Quatre 2020-06-14 23:10:12 +02:00
commit 36d76ca7fb
2 changed files with 98 additions and 96 deletions

View File

@ -8,5 +8,6 @@ farming?
lightning? lightning?
pmobs? pmobs?
hud_hunger? hud_hunger?
hunger_ng?
moreplants? moreplants?
horror? horror?

View File

@ -2553,8 +2553,6 @@ minetest.register_node("witchcraft:potion_purple", {
end, end,
}) })
if minetest.get_modpath("hud_hunger") ~= nil then if minetest.get_modpath("hud_hunger") ~= nil then
local register_food = hunger.register_food local register_food = hunger.register_food
minetest.register_node("witchcraft:potion_gpurple", { minetest.register_node("witchcraft:potion_gpurple", {
@ -2570,7 +2568,7 @@ minetest.register_node("witchcraft:potion_gpurple", {
type = "fixed", type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
}, },
groups = {dig_immediate=3,attached_node=1, potion2=1}, groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gpurple.png", inventory_image = "witchcraft_potion_gpurple.png",
on_use = function(item, placer, pos) on_use = function(item, placer, pos)
@ -2592,7 +2590,7 @@ minetest.register_node("witchcraft:potion_gred", {
type = "fixed", type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
}, },
groups = {dig_immediate=3,attached_node=1, potion2=1}, groups = {vessel=1,dig_immediate=3,attached_node=1, potion2=1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gred.png", inventory_image = "witchcraft_potion_gred.png",
on_use = function(item, placer, pos) on_use = function(item, placer, pos)
@ -2604,12 +2602,11 @@ minetest.register_node("witchcraft:potion_gred", {
register_food("witchcraft:potion_gpurple", 10) register_food("witchcraft:potion_gpurple", 10)
register_food("witchcraft:potion_gred", -4) register_food("witchcraft:potion_gred", -4)
else else
minetest.register_node("witchcraft:potion_gpurple", { minetest.register_node("witchcraft:potion_gpurple", {
description = "Filling Potion (better with hunger mod)", description = "Filling Potion",
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"witchcraft_potion_purple.png"}, tiles = {"witchcraft_potion_gpurple.png"},
wield_image = "witchcraft_potion_purple.png", wield_image = "witchcraft_potion_gpurple.png",
paramtype = "light", paramtype = "light",
stack_max = 1, stack_max = 1,
is_ground_content = false, is_ground_content = false,
@ -2618,18 +2615,14 @@ else
type = "fixed", type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
}, },
groups = {dig_immediate=3,attached_node=1, potion=1}, groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_purple.png", inventory_image = "witchcraft_potion_purple.png",
on_use = function(itemstack, player) on_use = minetest.item_eat(20, "vessels:glass_bottle"),
local health = player:get_hp(); })
player:set_hp(health+20)
itemstack:replace("vessels:glass_bottle")
return itemstack
end,
minetest.register_node("witchcraft:potion_gred", { minetest.register_node("witchcraft:potion_gred", {
description = "Hunger Potion (better with hunger mod)", description = "Hunger Potion",
drawtype = "plantlike", drawtype = "plantlike",
tiles = {"witchcraft_potion_gred.png"}, tiles = {"witchcraft_potion_gred.png"},
wield_image = "witchcraft_potion_gred.png", wield_image = "witchcraft_potion_gred.png",
@ -2641,17 +2634,25 @@ else
type = "fixed", type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25} fixed = {-0.25, -0.5, -0.25, 0.25, 0.4, 0.25}
}, },
groups = {dig_immediate=3,attached_node=1, potion=1}, groups = {vessel=1,dig_immediate=3,attached_node=1, potion=1},
sounds = default.node_sound_glass_defaults(), sounds = default.node_sound_glass_defaults(),
inventory_image = "witchcraft_potion_gred.png", inventory_image = "witchcraft_potion_gred.png",
on_use = function(itemstack, player) on_use = minetest.item_eat(-10, "vessels:glass_bottle"),
local health = player:get_hp();
player:set_hp(health+10)
itemstack:replace("vessels:glass_bottle")
return itemstack
end,
}) })
if minetest.get_modpath("hunger_ng") ~= nil then
local register_food = hunger_ng.add_hunger_data
register_food('witchcraft:potion_gpurple', {
satiates = 10,
returns = 'vessels:glass_bottle'
}) })
register_food('witchcraft:potion_gred', {
satiates = -4,
returns = 'vessels:glass_bottle'
})
end
end end
minetest.register_node("witchcraft:potion_purple_2", { minetest.register_node("witchcraft:potion_purple_2", {