1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-12-26 02:30:38 +01:00

Fix witchcraft potion creation

Fix witchcraft brewstand use
Disable experience mod
This commit is contained in:
sys4-fr 2017-03-20 21:43:17 +01:00
parent 072e5139eb
commit ece1600e19
4 changed files with 98 additions and 20 deletions

View File

@ -3,3 +3,4 @@ witchcraft?
bones?
bonemeal?
vessels?
farming?

View File

@ -60,5 +60,71 @@ if minetest.get_modpath("witchcraft") then
{"group:potion", "vessels:shelf", "group:potion"},
}
})
-- Rewrite potion table which is buggy
witchcraft.pot_new =
{
{"blue", "blue2", "default:leaves", "brown", "default:dirt", "red", "purple"}, -- replace waterlily by leaves (flowers_plus incompatibility i think...)
{"blue2", "green", "default:papyrus", "", "", "gred", "magenta"},
{"green", "green2", "default:sapling", "", "", "yellow", "yllwgrn"},
{"green2", "yellow", "default:mese_crystal_fragment", "", "", "blue", "cyan"},
{"yellow", "ggreen", "flowers:mushroom_brown", "", "", "green", "yllwgrn"},
{"ggreen", "cyan", "witchcraft:slime_bottle", "", "", "gcyan", "aqua"},
{"cyan", "gcyan", "witchcraft:bottle_medicine", "", "", "blue", "blue2"},
{"gcyan", "orange", "default:torch", "", "", "ggreen", "aqua"},
{"orange", "yllwgrn", "tnt:gunpowder", "", "", "red", "redbrown"},
{"yllwgrn", "gold", "default:steel_ingot", "", "", "green", "green2"},
{"gold", "aqua", "default:diamond", "", "", "", ""},
{"aqua", "", "", "", "", "", ""},
{"brown", "redbrown", "flowers:mushroom_red", "", "", "red", "redbrown"},
{"redbrown", "gred", "default:apple", "", "", "", ""},
{"gred", "red", "witchcraft:herb_bottle", "", "", "blue2", "magenta"}, -- replace witchcraft:herbs (inexistant) by herb_bottle
{"red", "magenta", "witchcraft:tooth", "", "", "blue", "purple"},
{"magenta", "gpurple", "witchcraft:slime_bottle", "", "", "cyan", "darkpurple"}, -- item name corrected (was inverted)
{"gpurple", "purple", "witchcraft:bone_bottle", "", "", "yllwgrn", "green2"},
{"purple", "darkpurple", "default:glass", "", "", "yellow", "green"},
{"darkpurple", "silver", "default:steel_ingot", "", "", "", ""},
{"silver", "grey", "witchcraft:bone", "", "", "", ""},
{"grey", "aqua", "default:diamond", "", "", "", ""},
}
-- Override potion green effect if farming_redo is loaded (bad call in original mod)
if farming.mod and farming.mod == "redo" then
minetest.override_item(
"witchcraft:potion_green",
{
description = "Melon Potion",
on_use = function(item, user, pointed_thing)
local player = user:get_player_name()
if pointed_thing.type == "node" and
minetest.get_node(pointed_thing.above).name == "air" then
if not minetest.is_protected(pointed_thing.above, player) then
minetest.set_node(pointed_thing.above, {name="farming:melon_8"})
else
minetest.chat_send_player(player, "This area is protected.")
end
end
local playerpos = user:getpos();
minetest.add_particlespawner(
5, --amount
0.1, --time
{x=playerpos.x-1, y=playerpos.y+1, z=playerpos.z-1}, --minpos
{x=playerpos.x+1, y=playerpos.y+1, z=playerpos.z+1}, --maxpos
{x=-0, y=-0, z=-0}, --minvel
{x=0, y=0, z=0}, --maxvel
{x=-0.5,y=4,z=-0.5}, --minacc
{x=0.5,y=4,z=0.5}, --maxacc
0.5, --minexptime
1, --maxexptime
1, --minsize
2, --maxsize
false, --collisiondetection
"witchcraft_effect.png" --texture
)
item:replace("vessels:glass_bottle")
return item
end
})
end
end
end

View File

@ -557,11 +557,16 @@ minetest.override_item("default:obsidian", {
})
-- override mese crystal fragment for making an obsidian portal
minetest.after(0.1, function()
minetest.override_item("default:mese_crystal_fragment", {
minetest.after(
0.1,
function()
minetest.override_item(
"default:mese_crystal_fragment",
{
on_place = function(stack, player, pt)
if pt.under
and minetest.get_node(pt.under).name == "default:obsidian" then
local n = minetest.get_node(pt.under)
if n
and n.name == "default:obsidian" then
--print("[nether] tries to enable a portal")
local done = make_portal(pt.under)
if done then
@ -573,6 +578,12 @@ minetest.after(0.1, function()
stack:take_item()
end
end
elseif n then
local ndef = minetest.registered_nodes[n.name]
if ndef and ndef.on_rightclick and
player and not player:get_player_control().sneak then
return ndef.on_rightclick(pt.under, n, player, stack) or stack
end
end
return stack
end

View File

@ -247,7 +247,7 @@ load_mod_enchanting = true
load_mod_witchcraft = true
load_mod_playereffects = true
load_mod_meshnode = true
load_mod_experience = true
load_mod_experience = false
load_mod_bonemeal = true
load_mod_tnt = true
load_mod_playeranim = true