Compare commits

..

No commits in common. "master" and "master" have entirely different histories.

3 changed files with 17 additions and 16 deletions

View File

@ -38,17 +38,13 @@ minetest.register_node("witchcraft:brewing_stand", {
on_rightclick = function(pos, node, clicker, item, _)
local wield_item = item:get_name()
local new_item = wield_item.."_2"
local player_name = clicker:get_player_name()
if not player_name then return end
if minetest.get_item_group(wield_item, "potion") ~= 0 and minetest.registered_items[new_item] ~= nil then
if minetest.get_item_group(wield_item, "potion") ~= 0 then
minetest.set_node(pos, {name="witchcraft:brewing_stand_active", param2=node.param2})
item:take_item()
minetest.after(30, function()
minetest.set_node(pos, {name="witchcraft:brewing_stand_unready", param2=node.param2})
minetest.add_item(pos, new_item)
end)
else
minetest.chat_send_player(player_name, "Sorry, it's not a potion/not upgradable!")
end
end,
})

13
depends.txt Normal file
View File

@ -0,0 +1,13 @@
default
vessels
tnt
fire
playereffects
player_monoids?
farming?
lightning?
pmobs?
hud_hunger?
hunger_ng?
moreplants?
horror?

View File

@ -466,7 +466,7 @@ minetest.register_craft({
output = 'witchcraft:splash_green',
recipe = {
{'vessels:glass_fragments'},
{'witchcraft:potion_green2'},
{'witchcraft:potion_green'},
}
})
minetest.register_craft({
@ -3167,7 +3167,7 @@ minetest.register_node("witchcraft:potion_ggreen", {
})
local mtime = minetest.get_timeofday()
if mtime >= 0.25 and mtime <= 0.75 then
user:override_day_night_ratio(math.min(math.max(-mtime+0.5, 0), 1))
user:override_day_night_ratio(-mtime+0.5)
minetest.after(10, function()
user:override_day_night_ratio(nil)
end)
@ -3391,7 +3391,7 @@ minetest.register_node("witchcraft:potion_blue2_2", {
function lightchange(person, duration)
local mtime = minetest.get_timeofday()
if mtime <= 0.25 or mtime >= 0.75 then
person:override_day_night_ratio(math.min(math.max(mtime+0.5, 0), 1))
person:override_day_night_ratio(mtime+0.5)
minetest.after(duration, function()
person:override_day_night_ratio(nil)
end)
@ -3537,10 +3537,6 @@ minetest.register_node("witchcraft:pentagram", {
on_rightclick = function(pos, node, _)
if minetest.get_modpath("mobs") then
minetest.after(0.5, function()
local node = minetest.get_node(pos)
if node.name ~= "witchcraft:pentagram" then
return
end
minetest.set_node(pos, {name="witchcraft:portal", param2=node.param2})
minetest.add_particlespawner({
amount = 25,
@ -3583,10 +3579,6 @@ minetest.register_node("witchcraft:portal", {
},
on_construct = function(pos, node, _)
minetest.after(1, function()
local node = minetest.get_node(pos)
if node.name ~= "witchcraft:portal" then
return
end
if minetest.get_modpath("mobs_animal") and minetest.get_modpath("mobs_monster") then
if math.random(2) > 1 then
minetest.add_entity(pos, "mobs_monster:oerkki")