Power: Add ME Cable

This commit is contained in:
octacian 2017-03-01 21:38:53 -08:00
parent 8bb8a49701
commit 45f3ca4732
4 changed files with 38 additions and 9 deletions

View File

@ -128,8 +128,14 @@ function microexpansion.register_node(itemstring, def)
end
-- Colour description
def.description = desc_colour(def.status, def.description)
-- Update connect_sides
if def.connect_sides == "nobottom" then
def.connect_sides = { "top", "front", "left", "back", "right" }
elseif def.connect_sides == "machine" then
def.connect_sides = { "top", "bottom", "left", "back", "right" }
end
-- Register craftitem
-- Register node
minetest.register_node(BASENAME..":"..itemstring, def)
-- if recipe, Register recipe

View File

@ -1,7 +1,4 @@
-- ctrl.lua
--[[
WARNING: this is the MAIN power controller, be very careful when making changed.
]]
-- power/ctrl.lua
local me = microexpansion
@ -34,6 +31,29 @@ me.register_node("ctrl", {
{-0.1875, -0.5, -0.1875, 0.1875, -0.25, 0.1875}, -- Bottom2
},
},
groups = { cracky = 1 },
groups = { cracky = 1, me_connect = 1, },
connect_sides = "nobottom",
status = "no",
})
-- [register node] Cable
me.register_node("cable", {
description = "ME Cable",
tiles = {
"cable",
},
drawtype = "nodebox",
node_box = {
type = "connected",
fixed = {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
connect_top = {-0.25, -0.25, -0.25, 0.25, 0.5, 0.25}, -- y+
connect_bottom = {-0.25, -0.5, -0.25, 0.25, 0.25, 0.25}, -- y-
connect_front = {-0.25, -0.25, -0.5, 0.25, 0.25, 0.25}, -- z-
connect_back = {-0.25, -0.25, 0.25, 0.25, 0.25, 0.5 }, -- z+
connect_left = {-0.5, -0.25, -0.25, 0.25, 0.25, 0.25}, -- x-
connect_right = {-0.25, -0.25, -0.25, 0.5, 0.25, 0.25}, -- x+
},
connects_to = {"group:me_connect"},
groups = { crumbly = 1, me_connect = 1, },
status = "no",
})

View File

@ -21,7 +21,8 @@ me.register_node("fuel_fired_generator", {
},
}
},
groups = { cracky = 1 },
groups = { cracky = 1, me_connect = 1, },
connect_sides = "machine",
paramtype2 = "facedir",
status = "no",
})
@ -45,7 +46,8 @@ me.register_node("super_smelter", {
},
},
},
groups = { cracky = 1 },
groups = { cracky = 1, me_connect = 1, },
connect_sides = "machine",
paramtype2 = "facedir",
status = "no",
})
@ -61,7 +63,8 @@ me.register_node("geo_generator", {
"machine_sides",
"geogen_front",
},
groups = { cracky = 1 },
groups = { cracky = 1, me_connect = 1, },
connect_sides = "machine",
paramtype2 = "facedir",
status = "no",
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B