From 36ae0cc1a54538742f1d1f3709bb2c1840a33539 Mon Sep 17 00:00:00 2001
From: Jeija <norrepli@gmail.com>
Date: Mon, 5 Mar 2012 19:21:26 +0100
Subject: Upload after major code reorganization - Version 0.6 DEV - Split
 mesecons mod into several modules - [BUGGY?]

---
 mesecons_powerplant/depends.txt |  1 +
 mesecons_powerplant/init.lua    | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 mesecons_powerplant/depends.txt
 create mode 100644 mesecons_powerplant/init.lua

(limited to 'mesecons_powerplant')

diff --git a/mesecons_powerplant/depends.txt b/mesecons_powerplant/depends.txt
new file mode 100644
index 0000000..acaa924
--- /dev/null
+++ b/mesecons_powerplant/depends.txt
@@ -0,0 +1 @@
+mesecons
diff --git a/mesecons_powerplant/init.lua b/mesecons_powerplant/init.lua
new file mode 100644
index 0000000..a353bb4
--- /dev/null
+++ b/mesecons_powerplant/init.lua
@@ -0,0 +1,38 @@
+-- The POWER_PLANT
+
+minetest.register_node("mesecons_powerplant:power_plant", {
+	drawtype = "plantlike",
+	visual_scale = 1,
+	tile_images = {"jeija_power_plant.png"},
+	inventory_image = "jeija_power_plant.png",
+	paramtype = "light",
+	walkable = false,
+	material = minetest.digprop_leaveslike(0.2),
+	light_source = LIGHT_MAX-9,
+    	description="Power Plant",
+})
+
+minetest.register_craft({
+	output = '"mesecons_powerplant:power_plant" 1',
+	recipe = {
+		{'"mesecons:mesecon_off"'},
+		{'"mesecons:mesecon_off"'},
+		{'"default:junglegrass"'},
+	}
+})
+
+minetest.register_on_placenode(function(pos, newnode, placer)
+	if newnode.name == "mesecons_powerplant:power_plant" then
+		mesecon:receptor_on(pos)
+	end
+end)
+
+minetest.register_on_dignode(
+	function(pos, oldnode, digger)
+		if oldnode.name == "mesecons_powerplant:power_plant" then
+			mesecon:receptor_off(pos)
+		end	
+	end
+)
+
+mesecon:add_receptor_node("mesecons_powerplant:power_plant")
-- 
cgit v1.2.3