summaryrefslogtreecommitdiff
path: root/mesecons_solarpanel
diff options
context:
space:
mode:
authorAnthony <azhang9@gmail.com>2012-08-07 09:37:51 -0700
committerAnthony <azhang9@gmail.com>2012-08-07 09:37:51 -0700
commit98fc808c68a2008d4df14cf43a8416e6661a39f6 (patch)
treeaaacb15b9cc65ceaad34c79a420e9fc1bc76be74 /mesecons_solarpanel
parent31c01b04250cce421b5f66d247c1068a295836bc (diff)
parent83aa17606d9497388d0dc846a0f3caee9a4d221c (diff)
downloadmesecons-98fc808c68a2008d4df14cf43a8416e6661a39f6.tar
mesecons-98fc808c68a2008d4df14cf43a8416e6661a39f6.tar.gz
mesecons-98fc808c68a2008d4df14cf43a8416e6661a39f6.tar.bz2
mesecons-98fc808c68a2008d4df14cf43a8416e6661a39f6.tar.xz
mesecons-98fc808c68a2008d4df14cf43a8416e6661a39f6.zip
Merge pull request #8 from Kotolegokot/master
Solar panel nodebox
Diffstat (limited to 'mesecons_solarpanel')
-rw-r--r--mesecons_solarpanel/init.lua18
1 files changed, 15 insertions, 3 deletions
diff --git a/mesecons_solarpanel/init.lua b/mesecons_solarpanel/init.lua
index 6665d89..bea4b61 100644
--- a/mesecons_solarpanel/init.lua
+++ b/mesecons_solarpanel/init.lua
@@ -1,19 +1,31 @@
-- Solar Panel
minetest.register_node("mesecons_solarpanel:solar_panel", {
- drawtype = "raillike",
+ drawtype = "nodebox",
tile_images = {"jeija_solar_panel.png"},
inventory_image = "jeija_solar_panel.png",
wield_image = "jeija_solar_panel.png",
paramtype = "light",
+ paramtype2 = "wallmounted",
walkable = false,
is_ground_content = true,
+ node_box = {
+ type = "wallmounted",
+ wall_bottom = {-0.4375, -0.5, -0.4375, 0.4375, -0.45, 0.4375},
+ wall_top = {-0.4375, 0.45, -0.4375, 0.4375, 0.5, 0.4375},
+ wall_side = {-0.5, -0.4375, -0.4375, -0.45, 0.4375, 0.4375},
+ },
selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
+ type = "wallmounted",
+ wall_bottom = {-0.4375, -0.5, -0.4375, 0.4375, -0.45, 0.4375},
+ wall_top = {-0.4375, 0.45, -0.4375, 0.4375, 0.5, 0.4375},
+ wall_side = {-0.5, -0.4375, -0.4375, -0.45, 0.4375, 0.4375},
},
furnace_burntime = 5,
groups = {dig_immediate=3},
description="Solar Panel",
+ after_dig_node = function(pos, node, digger)
+ mesecon:receptor_off(pos)
+ end,
})
minetest.register_craft({