summaryrefslogtreecommitdiff
path: root/mesecons/init.lua
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-08-11 22:58:00 +0200
committerJeija <norrepli@gmail.com>2012-08-11 22:58:00 +0200
commit6b1941a38011c06de22a800c9fdffd278b6610e4 (patch)
tree053965d8b9b2d0984de761015265cd58c115bcfe /mesecons/init.lua
parenta57b8f4a07e7c535dff7d0c6ff68d7580f90e4bd (diff)
downloadmesecons-6b1941a38011c06de22a800c9fdffd278b6610e4.tar
mesecons-6b1941a38011c06de22a800c9fdffd278b6610e4.tar.gz
mesecons-6b1941a38011c06de22a800c9fdffd278b6610e4.tar.bz2
mesecons-6b1941a38011c06de22a800c9fdffd278b6610e4.tar.xz
mesecons-6b1941a38011c06de22a800c9fdffd278b6610e4.zip
Add new nodebox style wires. Can be activated by setting NEW_STYLE_WIRES to true (in mesecons/settings.lua)
Diffstat (limited to 'mesecons/init.lua')
-rw-r--r--mesecons/init.lua49
1 files changed, 5 insertions, 44 deletions
diff --git a/mesecons/init.lua b/mesecons/init.lua
index 7142e8a..e796691 100644
--- a/mesecons/init.lua
+++ b/mesecons/init.lua
@@ -80,8 +80,6 @@
--The function # mesecon:register_conductor(onstate, offstate) is the only thing you need to do,
--the mod does everything else for you (turn the conductor on and off...)
--- INCLUDE SETTINGS
-dofile(minetest.get_modpath("mesecons").."/settings.lua")
-- PUBLIC VARIABLES
mesecon={} -- contains all functions and all global variables
@@ -93,51 +91,13 @@ mesecon.pwr_srcs_off={}
mesecon.rules={}
mesecon.conductors={}
+-- INCLUDE SETTINGS
+dofile(minetest.get_modpath("mesecons").."/settings.lua")
+
--Internal API
dofile(minetest.get_modpath("mesecons").."/internal_api.lua");
-
--- MESECONS
-
-minetest.register_node("mesecons:mesecon_off", {
- drawtype = "raillike",
- tile_images = {"jeija_mesecon_off.png", "jeija_mesecon_curved_off.png", "jeija_mesecon_t_junction_off.png", "jeija_mesecon_crossing_off.png"},
- inventory_image = "jeija_mesecon_off.png",
- wield_image = "jeija_mesecon_off.png",
- paramtype = "light",
- is_ground_content = true,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
- },
- groups = {dig_immediate=3},
- description="Mesecons",
-})
-
-minetest.register_node("mesecons:mesecon_on", {
- drawtype = "raillike",
- tile_images = {"jeija_mesecon_on.png", "jeija_mesecon_curved_on.png", "jeija_mesecon_t_junction_on.png", "jeija_mesecon_crossing_on.png"},
- paramtype = "light",
- is_ground_content = true,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
- },
- groups = {dig_immediate=3, not_in_creaive_inventory=1},
- drop = '"mesecons:mesecon_off" 1',
- light_source = LIGHT_MAX-11,
-})
-
-minetest.register_craft({
- output = '"mesecons:mesecon_off" 16',
- recipe = {
- {'"default:mese"'},
- }
-})
-
-- API API API API API API API API API API API API API API API API API API
function mesecon:add_receptor_node(nodename, rules, get_rules) --rules table is optional; if rules depend on param2 pass (nodename, nil, function get_rules)
@@ -231,4 +191,5 @@ mesecon:add_rules("default",
print("[MESEcons] Main mod Loaded!")
-mesecon:register_conductor("mesecons:mesecon_on", "mesecons:mesecon_off")
+--The actual wires
+dofile(minetest.get_modpath("mesecons").."/wires.lua");