summaryrefslogtreecommitdiff
path: root/emergencyphone/init.lua
blob: 90124a8389bdeaa26f53bfce7bd71ba191713745 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--[[
	StreetsMod: Emergency Phone
]]
if streets.extendedBy.wool == true then
	 minetest.register_node(":streets:emergencyphone",{
		description = "Emergency Phone",
		tiles = {"streets_sos_top.png","streets_sos_bottom.png","streets_sos_side.png","streets_sos_side.png","streets_sos_side.png","streets_sos_front.png"},
		groups = {cracky = 3},
		paramtype2 = "facedir",
		light_source = 5,
		on_rightclick = function(pos,node,clicker)
			if clicker:is_player() and clicker:get_hp() < 6 then
				clicker:set_hp(6)
				minetest.log("action",clicker:get_player_name() .. " healed by emergency phone at pos (" .. pos.x .. "," .. pos.y .. "," .. pos.z .. ")")
			end
		end
	 })
	 minetest.register_alias("streets:emergency_phone","streets:emergencyphone") 
	minetest.register_craft({
		output = "streets:emergencyphone",
		recipe = {
			{"wool:orange","default:torch","wool:orange"},
			{"wool:orange","default:apple","wool:orange"},
			{"default:steel_ingot","default:diamondblock","default:steel_ingot"}
		}
	})
end