forked from nalc/witchcraft
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e1a9f5fc6f | |||
| 44c2a84c6e | |||
| dcdf6b3a9b | 
| @@ -38,13 +38,17 @@ minetest.register_node("witchcraft:brewing_stand", { | |||||||
| 	on_rightclick = function(pos, node, clicker, item, _) | 	on_rightclick = function(pos, node, clicker, item, _) | ||||||
| 		local wield_item = item:get_name() | 		local wield_item = item:get_name() | ||||||
| 		local new_item = wield_item.."_2" | 		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}) | 			minetest.set_node(pos, {name="witchcraft:brewing_stand_active", param2=node.param2}) | ||||||
| 			item:take_item() | 			item:take_item() | ||||||
| 			minetest.after(30, function() | 			minetest.after(30, function() | ||||||
| 				minetest.set_node(pos, {name="witchcraft:brewing_stand_unready", param2=node.param2}) | 				minetest.set_node(pos, {name="witchcraft:brewing_stand_unready", param2=node.param2}) | ||||||
| 				minetest.add_item(pos, new_item) | 				minetest.add_item(pos, new_item) | ||||||
| 			end) | 			end) | ||||||
|  | 		else | ||||||
|  | 			minetest.chat_send_player(player_name, "Sorry, it's not a potion/not upgradable!") | ||||||
| 		end | 		end | ||||||
| 	end, | 	end, | ||||||
| }) | }) | ||||||
|   | |||||||
							
								
								
									
										13
									
								
								depends.txt
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								depends.txt
									
									
									
									
									
								
							| @@ -1,13 +0,0 @@ | |||||||
| default |  | ||||||
| vessels |  | ||||||
| tnt |  | ||||||
| fire |  | ||||||
| playereffects |  | ||||||
| player_monoids? |  | ||||||
| farming? |  | ||||||
| lightning? |  | ||||||
| pmobs? |  | ||||||
| hud_hunger? |  | ||||||
| hunger_ng? |  | ||||||
| moreplants? |  | ||||||
| horror? |  | ||||||
							
								
								
									
										14
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								init.lua
									
									
									
									
									
								
							| @@ -466,7 +466,7 @@ minetest.register_craft({ | |||||||
| 	output = 'witchcraft:splash_green', | 	output = 'witchcraft:splash_green', | ||||||
| 	recipe = { | 	recipe = { | ||||||
| 		{'vessels:glass_fragments'}, | 		{'vessels:glass_fragments'}, | ||||||
| 		{'witchcraft:potion_green'}, | 		{'witchcraft:potion_green2'}, | ||||||
| 	} | 	} | ||||||
| }) | }) | ||||||
| minetest.register_craft({ | minetest.register_craft({ | ||||||
| @@ -3167,7 +3167,7 @@ minetest.register_node("witchcraft:potion_ggreen", { | |||||||
| 		}) | 		}) | ||||||
| 		local mtime = minetest.get_timeofday() | 		local mtime = minetest.get_timeofday() | ||||||
| 		if mtime >= 0.25 and mtime <= 0.75 then | 		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() | 			minetest.after(10, function() | ||||||
| 				user:override_day_night_ratio(nil) | 				user:override_day_night_ratio(nil) | ||||||
| 			end) | 			end) | ||||||
| @@ -3391,7 +3391,7 @@ minetest.register_node("witchcraft:potion_blue2_2", { | |||||||
| function lightchange(person, duration) | function lightchange(person, duration) | ||||||
| 	local mtime = minetest.get_timeofday() | 	local mtime = minetest.get_timeofday() | ||||||
| 	if mtime <= 0.25 or mtime >= 0.75 then | 	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() | 		minetest.after(duration, function() | ||||||
| 			person:override_day_night_ratio(nil) | 			person:override_day_night_ratio(nil) | ||||||
| 		end) | 		end) | ||||||
| @@ -3537,6 +3537,10 @@ minetest.register_node("witchcraft:pentagram", { | |||||||
| 	on_rightclick = function(pos, node, _) | 	on_rightclick = function(pos, node, _) | ||||||
| 		if minetest.get_modpath("mobs") then | 		if minetest.get_modpath("mobs") then | ||||||
| 			minetest.after(0.5, function() | 			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.set_node(pos, {name="witchcraft:portal", param2=node.param2}) | ||||||
| 				minetest.add_particlespawner({ | 				minetest.add_particlespawner({ | ||||||
| 						amount = 25, | 						amount = 25, | ||||||
| @@ -3579,6 +3583,10 @@ minetest.register_node("witchcraft:portal", { | |||||||
| 	}, | 	}, | ||||||
| 	on_construct = function(pos, node, _) | 	on_construct = function(pos, node, _) | ||||||
| 		minetest.after(1, function() | 		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 minetest.get_modpath("mobs_animal") and minetest.get_modpath("mobs_monster") then | ||||||
| 				if math.random(2) > 1 then | 				if math.random(2) > 1 then | ||||||
| 					minetest.add_entity(pos, "mobs_monster:oerkki") | 					minetest.add_entity(pos, "mobs_monster:oerkki") | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user