diff options
author | webdesigner97 <Christian_D_97@gmx.de> | 2013-10-16 10:10:19 +0200 |
---|---|---|
committer | webdesigner97 <Christian_D_97@gmx.de> | 2013-10-16 10:10:19 +0200 |
commit | 5508d85d407282c391336bdcb8937a26f21e8c6d (patch) | |
tree | 576e28479f4fd8f3647e970abaa2bccfecd42425 /emergencyphone | |
parent | fe7607750f24d1ee8daa38d648fc39e056ef6779 (diff) | |
download | roads-5508d85d407282c391336bdcb8937a26f21e8c6d.tar roads-5508d85d407282c391336bdcb8937a26f21e8c6d.tar.gz roads-5508d85d407282c391336bdcb8937a26f21e8c6d.tar.bz2 roads-5508d85d407282c391336bdcb8937a26f21e8c6d.tar.xz roads-5508d85d407282c391336bdcb8937a26f21e8c6d.zip |
Lightened code
Diffstat (limited to 'emergencyphone')
-rw-r--r-- | emergencyphone/init.lua | 44 |
1 files changed, 21 insertions, 23 deletions
diff --git a/emergencyphone/init.lua b/emergencyphone/init.lua index 90124a8..2dc818f 100644 --- a/emergencyphone/init.lua +++ b/emergencyphone/init.lua @@ -1,27 +1,25 @@ --[[ 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 +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 - }) - 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
\ No newline at end of file + 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"} + } +})
\ No newline at end of file |