1
0
mirror of https://github.com/D00Med/witchcraft.git synced 2025-06-28 22:26:36 +02:00

14 Commits

Author SHA1 Message Date
e1a9f5fc6f Fix crash and other things
- Fix crash nalc/nalc-server-mods#101
- Fix issue infinite spawn mobs
  nalc/nalc-server-mods#90
- Fix brewing stand for non compatible potions
  nalc/nalc-server-mods#100
2022-07-12 22:47:02 +02:00
44c2a84c6e Fix issue infinite spawn mobs nalc/nalc-server-mods#90
Fix issue craft splash potion(not sure, confirm if it's good) nalc/nalc-server-mods#89
Fix issue brewing stand accept but disapear wrong potion nalc/nalc-server-mods#100
2022-07-11 00:36:56 +02:00
dcdf6b3a9b fix crash nalc/nalc-server-mods#101
and remove deprecated depends.txt
2022-07-10 22:51:13 +02:00
06a3ca6265 Fix crash when right clic with no wielded item on pot 2021-08-16 21:35:00 +02:00
0cbc98900a Fix a merge error 2021-03-15 21:02:18 +01:00
0a06acc1d8 Merge remote-tracking branch 'upstream/master' 2021-03-14 23:24:34 +01:00
b500873215 Fix taking wielded items with some ingredients + add mod.conf 2020-07-15 01:37:23 +02:00
0e277c51fb Tidy code and remove stack_max limit of Glass Bottle 2020-07-13 00:44:28 +02:00
36d76ca7fb Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-14 23:10:12 +02:00
32e3f8928b Ajoute message de chargement du mod dans le journal "action" 2019-01-19 20:25:08 +01:00
c515b58ca1 La dent s'obtient aléatoirement en ramassant du sable 2018-11-03 14:52:41 +01:00
8bf04f444e Correction du lancé de sorts pour les parchemins
Changement d'un ingrédient de potion : lilypad remplace waterlily
2018-11-02 21:36:54 +01:00
dd3a7d13c7 Corrige un crash avec la splash potion orange
Corrige la collision avec la gauge bar
2018-11-02 20:40:25 +01:00
fef074b9ed Change le craft de la dent avec le sable du desert. 2018-10-13 17:03:32 +02:00
3 changed files with 21 additions and 19 deletions

View File

@ -38,13 +38,17 @@ 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"
if minetest.get_item_group(wield_item, "potion") ~= 0 then
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
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,
})

View File

@ -1,13 +0,0 @@
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_green'},
{'witchcraft:potion_green2'},
}
})
minetest.register_craft({
@ -565,7 +565,7 @@ witchcraft.pot = {
{"blue", "brown", "default:dirt", "blue2", "moreplants:bullrush", "red", "purple"},
{"blue2", "yellow", "default:steelblock", "yellow", "default:copperblock", "green2", "aqua"},
{"darkpurple", "cyan", "flowers:mushroom_red", "green", "moreplants:weed", "yellow", "redbrown"},
{"purple", "blue2", "flowers:waterlily", "gpurple", "default:mese_crystal", "magenta", "darkpurple"},
{"purple", "blue2", "nalc_flowers:lily_pad", "gpurple", "default:mese_crystal", "magenta", "darkpurple"},
{"magenta", "purple", "witchcraft:bottle_eyes", "darkpurple", "moreplants:mushroom", "purple", "darkpurple"},
{"red", "grey", "default:gravel", "yllwgrn", "default:flint", "blue", "purple"},
{"redbrown", "magenta", "flowers:mushroom_brown", "magenta", "default:stone", "grey", "brown"},
@ -587,7 +587,7 @@ witchcraft.pot = {
--new recipes
witchcraft.pot_new = {
{"blue", "blue2", "flowers:waterlily", "brown", "default:dirt", "red", "purple"},
{"blue", "blue2", "nalc_flowers:lily_pad", "brown", "default:dirt", "red", "purple"},
{"blue2", "green", "default:papyrus", "", "", "gred", "magenta"},
{"green", "green2", "default:sapling", "", "", "yellow", "yllwgrn"},
{"green2", "yellow", "default:mese_crystal_fragment", "", "", "blue", "cyan"},
@ -655,6 +655,7 @@ for _, row in ipairs(witchcraft.pot_new) do --change 'pot_new' to 'pot' for the
},
on_rightclick = function(pos, node, clicker, itemstack, _)
local wield_item = itemstack:get_name()
if wield_item == "" then return nil end
if wield_item == "vessels:glass_bottle" then
local wield_items_count = itemstack:get_count()
@ -3166,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(-mtime+0.5)
user:override_day_night_ratio(math.min(math.max(-mtime+0.5, 0), 1))
minetest.after(10, function()
user:override_day_night_ratio(nil)
end)
@ -3390,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(mtime+0.5)
person:override_day_night_ratio(math.min(math.max(mtime+0.5, 0), 1))
minetest.after(duration, function()
person:override_day_night_ratio(nil)
end)
@ -3536,6 +3537,10 @@ 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,
@ -3578,6 +3583,10 @@ 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")
@ -3627,3 +3636,5 @@ minetest.register_node("witchcraft:candle", {
dofile(minetest.get_modpath("witchcraft").."/scrolls.lua")
dofile(minetest.get_modpath("witchcraft").."/brewing_stand.lua")
minetest.log("action", "[witchcraft] loaded.")