Reformat code with IntelliJ auto-reformat function.

This commit is contained in:
Thomas--S 2017-03-28 21:04:28 +02:00
parent b7cecd7f3d
commit 73d8bdff4b
107 changed files with 3516 additions and 3297 deletions

View File

@ -99,7 +99,6 @@ if minetest.get_modpath("moreblocks") then
register_technic_stairs_alias("stairsplus", "marble", "technic", "marble") register_technic_stairs_alias("stairsplus", "marble", "technic", "marble")
register_technic_stairs_alias("stairsplus", "granite", "technic", "granite") register_technic_stairs_alias("stairsplus", "granite", "technic", "granite")
register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks") register_technic_stairs_alias("stairsplus", "marble_bricks", "technic", "marble_bricks")
end end
local iclip_def = { local iclip_def = {
@ -132,14 +131,22 @@ local iclipfence_def = {
}, },
-- connect_top = -- connect_top =
-- connect_bottom = -- connect_bottom =
connect_front = {{-1/16,3/16,-1/2,1/16,5/16,-1/8}, connect_front = {
{-1/16,-5/16,-1/2,1/16,-3/16,-1/8}}, { -1 / 16, 3 / 16, -1 / 2, 1 / 16, 5 / 16, -1 / 8 },
connect_left = {{-1/2,3/16,-1/16,-1/8,5/16,1/16}, { -1 / 16, -5 / 16, -1 / 2, 1 / 16, -3 / 16, -1 / 8 }
{-1/2,-5/16,-1/16,-1/8,-3/16,1/16}}, },
connect_back = {{-1/16,3/16,1/8,1/16,5/16,1/2}, connect_left = {
{-1/16,-5/16,1/8,1/16,-3/16,1/2}}, { -1 / 2, 3 / 16, -1 / 16, -1 / 8, 5 / 16, 1 / 16 },
connect_right = {{1/8,3/16,-1/16,1/2,5/16,1/16}, { -1 / 2, -5 / 16, -1 / 16, -1 / 8, -3 / 16, 1 / 16 }
{1/8,-5/16,-1/16,1/2,-3/16,1/16}}, },
connect_back = {
{ -1 / 16, 3 / 16, 1 / 8, 1 / 16, 5 / 16, 1 / 2 },
{ -1 / 16, -5 / 16, 1 / 8, 1 / 16, -3 / 16, 1 / 2 }
},
connect_right = {
{ 1 / 8, 3 / 16, -1 / 16, 1 / 2, 5 / 16, 1 / 16 },
{ 1 / 8, -5 / 16, -1 / 16, 1 / 2, -3 / 16, 1 / 16 }
},
}, },
connects_to = { "group:fence", "group:wood", "group:tree" }, connects_to = { "group:fence", "group:wood", "group:tree" },
groups = { fence = 1, choppy = 1, snappy = 1, oddly_breakable_by_hand = 1 }, groups = { fence = 1, choppy = 1, snappy = 1, oddly_breakable_by_hand = 1 },

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
minetest.register_craftitem("technic:silicon_wafer", { minetest.register_craftitem("technic:silicon_wafer", {
@ -23,8 +22,7 @@ minetest.register_craftitem( "technic:diamond_drill_head", {
minetest.register_tool("technic:blue_energy_crystal", { minetest.register_tool("technic:blue_energy_crystal", {
description = S("Blue Energy Crystal"), description = S("Blue Energy Crystal"),
inventory_image = minetest.inventorycube( inventory_image = minetest.inventorycube("technic_diamond_block_blue.png",
"technic_diamond_block_blue.png",
"technic_diamond_block_blue.png", "technic_diamond_block_blue.png",
"technic_diamond_block_blue.png"), "technic_diamond_block_blue.png"),
wear_represents = "technic_RE_charge", wear_represents = "technic_RE_charge",
@ -39,8 +37,7 @@ minetest.register_tool("technic:blue_energy_crystal", {
minetest.register_tool("technic:green_energy_crystal", { minetest.register_tool("technic:green_energy_crystal", {
description = S("Green Energy Crystal"), description = S("Green Energy Crystal"),
inventory_image = minetest.inventorycube( inventory_image = minetest.inventorycube("technic_diamond_block_green.png",
"technic_diamond_block_green.png",
"technic_diamond_block_green.png", "technic_diamond_block_green.png",
"technic_diamond_block_green.png"), "technic_diamond_block_green.png"),
wear_represents = "technic_RE_charge", wear_represents = "technic_RE_charge",
@ -55,8 +52,7 @@ minetest.register_tool("technic:green_energy_crystal", {
minetest.register_tool("technic:red_energy_crystal", { minetest.register_tool("technic:red_energy_crystal", {
description = S("Red Energy Crystal"), description = S("Red Energy Crystal"),
inventory_image = minetest.inventorycube( inventory_image = minetest.inventorycube("technic_diamond_block_red.png",
"technic_diamond_block_red.png",
"technic_diamond_block_red.png", "technic_diamond_block_red.png",
"technic_diamond_block_red.png"), "technic_diamond_block_red.png"),
wear_represents = "technic_RE_charge", wear_represents = "technic_RE_charge",
@ -202,8 +198,13 @@ for p = 0, 35 do
description = string.format(S("%.1f%%-Fissile Uranium Block"), p / 10), description = string.format(S("%.1f%%-Fissile Uranium Block"), p / 10),
tiles = { "technic_uranium_block.png" }, tiles = { "technic_uranium_block.png" },
is_ground_content = true, is_ground_content = true,
groups = {uranium_block=1, not_in_creative_inventory=nici, groups = {
cracky=1, level=2, radioactive=radioactivity}, uranium_block = 1,
not_in_creative_inventory = nici,
cracky = 1,
level = 2,
radioactive = radioactivity
},
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
}); });
if not ov then if not ov then

View File

@ -1,4 +1,3 @@
-- Aliases to convert from legacy node/item names -- Aliases to convert from legacy node/item names
technic.legacy_nodenames = { technic.legacy_nodenames = {

View File

@ -1,4 +1,3 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_cable 3', output = 'technic:hv_cable 3',
recipe = { recipe = {

View File

@ -215,8 +215,12 @@ minetest.register_node("technic:forcefield_emitter_off", {
minetest.register_node("technic:forcefield_emitter_on", { minetest.register_node("technic:forcefield_emitter_on", {
description = S("%s Forcefield Emitter"):format("HV"), description = S("%s Forcefield Emitter"):format("HV"),
tiles = { "technic_forcefield_emitter_on.png" }, tiles = { "technic_forcefield_emitter_on.png" },
groups = {cracky = 1, technic_machine = 1, technic_hv = 1, groups = {
not_in_creative_inventory=1}, cracky = 1,
technic_machine = 1,
technic_hv = 1,
not_in_creative_inventory = 1
},
drop = "technic:forcefield_emitter_off", drop = "technic:forcefield_emitter_off",
on_receive_fields = forcefield_receive_fields, on_receive_fields = forcefield_receive_fields,
on_destruct = function(pos) on_destruct = function(pos)
@ -241,7 +245,8 @@ minetest.register_node("technic:forcefield", {
light_source = 15, light_source = 15,
diggable = false, diggable = false,
drop = '', drop = '',
tiles = {{ tiles = {
{
name = "technic_forcefield_animated.png", name = "technic_forcefield_animated.png",
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -249,7 +254,8 @@ minetest.register_node("technic:forcefield", {
aspect_h = 16, aspect_h = 16,
length = 1.0, length = 1.0,
}, },
}}, }
},
}) })

View File

@ -1,4 +1,3 @@
technic.register_tier("HV", "High Voltage") technic.register_tier("HV", "High Voltage")
local path = technic.modpath .. "/machines/HV" local path = technic.modpath .. "/machines/HV"

View File

@ -317,8 +317,13 @@ minetest.register_node("technic:hv_nuclear_reactor_core", {
minetest.register_node("technic:hv_nuclear_reactor_core_active", { minetest.register_node("technic:hv_nuclear_reactor_core_active", {
tiles = { "technic_hv_nuclear_reactor_core.png" }, tiles = { "technic_hv_nuclear_reactor_core.png" },
groups = {cracky=1, technic_machine=1, technic_hv=1, groups = {
radioactive=4, not_in_creative_inventory=1}, cracky = 1,
technic_machine = 1,
technic_hv = 1,
radioactive = 4,
not_in_creative_inventory = 1
},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
drop = "technic:hv_nuclear_reactor_core", drop = "technic:hv_nuclear_reactor_core",

View File

@ -1,11 +1,11 @@
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
recipe = { recipe = {
{ "technic:carbon_plate", "pipeworks:filter", "technic:composite_plate" }, { "technic:carbon_plate", "pipeworks:filter", "technic:composite_plate" },
{ "technic:motor", "technic:machine_casing", "technic:diamond_drill_head" }, { "technic:motor", "technic:machine_casing", "technic:diamond_drill_head" },
{"technic:carbon_steel_block", "technic:hv_cable", "technic:carbon_steel_block"}}, { "technic:carbon_steel_block", "technic:hv_cable", "technic:carbon_steel_block" }
},
output = "technic:quarry", output = "technic:quarry",
}) })
@ -29,13 +29,10 @@ local function set_quarry_formspec(meta)
local diameter = radius * 2 + 1 local diameter = radius * 2 + 1
local nd = meta:get_int("dug") local nd = meta:get_int("dug")
local rel_y = quarry_dig_above_nodes - math.floor(nd / (diameter * diameter)) local rel_y = quarry_dig_above_nodes - math.floor(nd / (diameter * diameter))
formspec = formspec.."label[0,4;"..minetest.formspec_escape( formspec = formspec .. "label[0,4;" .. minetest.formspec_escape(nd == 0 and S("Digging not started") or
nd == 0 and S("Digging not started") or
(rel_y < -quarry_max_depth and S("Digging finished") or (rel_y < -quarry_max_depth and S("Digging finished") or
(meta:get_int("purge_on") == 1 and S("Purging cache") or (meta:get_int("purge_on") == 1 and S("Purging cache") or
S("Digging %d m "..(rel_y > 0 and "above" or "below").." machine") S("Digging %d m " .. (rel_y > 0 and "above" or "below") .. " machine"):format(math.abs(rel_y))))) .. "]"
:format(math.abs(rel_y))))
).."]"
formspec = formspec .. "button[4,2;2,1;restart;" .. S("Restart") .. "]" formspec = formspec .. "button[4,2;2,1;restart;" .. S("Restart") .. "]"
meta:set_string("formspec", formspec) meta:set_string("formspec", formspec)
end end
@ -207,9 +204,11 @@ end
minetest.register_node("technic:quarry", { minetest.register_node("technic:quarry", {
description = S("%s Quarry"):format("HV"), description = S("%s Quarry"):format("HV"),
tiles = {"technic_carbon_steel_block.png", "technic_carbon_steel_block.png", tiles = {
"technic_carbon_steel_block.png", "technic_carbon_steel_block.png", "technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png"}, "technic_carbon_steel_block.png", "technic_carbon_steel_block.png",
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png"
},
inventory_image = minetest.inventorycube("technic_carbon_steel_block.png", inventory_image = minetest.inventorycube("technic_carbon_steel_block.png",
"technic_carbon_steel_block.png^default_tool_mesepick.png", "technic_carbon_steel_block.png^default_tool_mesepick.png",
"technic_carbon_steel_block.png"), "technic_carbon_steel_block.png"),

View File

@ -1,4 +1,3 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_battery_box0', output = 'technic:lv_battery_box0',
recipe = { recipe = {

View File

@ -1,4 +1,3 @@
minetest.register_alias("lv_cable", "technic:lv_cable") minetest.register_alias("lv_cable", "technic:lv_cable")
minetest.register_craft({ minetest.register_craft({

View File

@ -183,8 +183,10 @@ end
-- The actual block inactive state -- The actual block inactive state
minetest.register_node("technic:cnc", { minetest.register_node("technic:cnc", {
description = S("%s CNC Machine"):format("LV"), description = S("%s CNC Machine"):format("LV"),
tiles = {"technic_cnc_top.png", "technic_cnc_bottom.png", "technic_cnc_side.png", tiles = {
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front.png"}, "technic_cnc_top.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front.png"
},
groups = { cracky = 2, technic_machine = 1, technic_lv = 1 }, groups = { cracky = 2, technic_machine = 1, technic_lv = 1 },
connect_sides = { "bottom", "back", "left", "right" }, connect_sides = { "bottom", "back", "left", "right" },
paramtype2 = "facedir", paramtype2 = "facedir",
@ -209,8 +211,10 @@ minetest.register_node("technic:cnc", {
-- Active state block -- Active state block
minetest.register_node("technic:cnc_active", { minetest.register_node("technic:cnc_active", {
description = S("%s CNC Machine"):format("LV"), description = S("%s CNC Machine"):format("LV"),
tiles = {"technic_cnc_top_active.png", "technic_cnc_bottom.png", "technic_cnc_side.png", tiles = {
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front_active.png"}, "technic_cnc_top_active.png", "technic_cnc_bottom.png", "technic_cnc_side.png",
"technic_cnc_side.png", "technic_cnc_side.png", "technic_cnc_front_active.png"
},
groups = { cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1 }, groups = { cracky = 2, technic_machine = 1, technic_lv = 1, not_in_creative_inventory = 1 },
connect_sides = { "bottom", "back", "left", "right" }, connect_sides = { "bottom", "back", "left", "right" },
paramtype2 = "facedir", paramtype2 = "facedir",

View File

@ -11,78 +11,96 @@ technic.cnc = {}
-- Define slope boxes for the various nodes -- Define slope boxes for the various nodes
------------------------------------------- -------------------------------------------
technic.cnc.programs = { technic.cnc.programs = {
{ suffix = "technic_cnc_stick", {
suffix = "technic_cnc_stick",
model = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 }, model = { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 },
desc = S("Stick") desc = S("Stick")
}, },
{ suffix = "technic_cnc_element_end_double", {
suffix = "technic_cnc_element_end_double",
model = { -0.3, -0.5, -0.3, 0.3, 0.5, 0.5 }, model = { -0.3, -0.5, -0.3, 0.3, 0.5, 0.5 },
desc = S("Element End Double") desc = S("Element End Double")
}, },
{ suffix = "technic_cnc_element_cross_double", {
suffix = "technic_cnc_element_cross_double",
model = { model = {
{ 0.3, -0.5, -0.3, 0.5, 0.5, 0.3 }, { 0.3, -0.5, -0.3, 0.5, 0.5, 0.3 },
{ -0.3, -0.5, -0.5, 0.3, 0.5, 0.5 }, { -0.3, -0.5, -0.5, 0.3, 0.5, 0.5 },
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3}}, { -0.5, -0.5, -0.3, -0.3, 0.5, 0.3 }
},
desc = S("Element Cross Double") desc = S("Element Cross Double")
}, },
{ suffix = "technic_cnc_element_t_double", {
suffix = "technic_cnc_element_t_double",
model = { model = {
{ -0.3, -0.5, -0.5, 0.3, 0.5, 0.3 }, { -0.3, -0.5, -0.5, 0.3, 0.5, 0.3 },
{ -0.5, -0.5, -0.3, -0.3, 0.5, 0.3 }, { -0.5, -0.5, -0.3, -0.3, 0.5, 0.3 },
{0.3, -0.5, -0.3, 0.5, 0.5, 0.3}}, { 0.3, -0.5, -0.3, 0.5, 0.5, 0.3 }
},
desc = S("Element T Double") desc = S("Element T Double")
}, },
{ suffix = "technic_cnc_element_edge_double", {
suffix = "technic_cnc_element_edge_double",
model = { model = {
{ -0.3, -0.5, -0.5, 0.3, 0.5, 0.3 }, { -0.3, -0.5, -0.5, 0.3, 0.5, 0.3 },
{-0.5, -0.5, -0.3, -0.3, 0.5, 0.3}}, { -0.5, -0.5, -0.3, -0.3, 0.5, 0.3 }
},
desc = S("Element Edge Double") desc = S("Element Edge Double")
}, },
{ suffix = "technic_cnc_element_straight_double", {
suffix = "technic_cnc_element_straight_double",
model = { -0.3, -0.5, -0.5, 0.3, 0.5, 0.5 }, model = { -0.3, -0.5, -0.5, 0.3, 0.5, 0.5 },
desc = S("Element Straight Double") desc = S("Element Straight Double")
}, },
{ suffix = "technic_cnc_element_end", {
suffix = "technic_cnc_element_end",
model = { -0.3, -0.5, -0.3, 0.3, 0, 0.5 }, model = { -0.3, -0.5, -0.3, 0.3, 0, 0.5 },
desc = S("Element End") desc = S("Element End")
}, },
{ suffix = "technic_cnc_element_cross", {
suffix = "technic_cnc_element_cross",
model = { model = {
{ 0.3, -0.5, -0.3, 0.5, 0, 0.3 }, { 0.3, -0.5, -0.3, 0.5, 0, 0.3 },
{ -0.3, -0.5, -0.5, 0.3, 0, 0.5 }, { -0.3, -0.5, -0.5, 0.3, 0, 0.5 },
{-0.5, -0.5, -0.3, -0.3, 0, 0.3}}, { -0.5, -0.5, -0.3, -0.3, 0, 0.3 }
},
desc = S("Element Cross") desc = S("Element Cross")
}, },
{ suffix = "technic_cnc_element_t", {
suffix = "technic_cnc_element_t",
model = { model = {
{ -0.3, -0.5, -0.5, 0.3, 0, 0.3 }, { -0.3, -0.5, -0.5, 0.3, 0, 0.3 },
{ -0.5, -0.5, -0.3, -0.3, 0, 0.3 }, { -0.5, -0.5, -0.3, -0.3, 0, 0.3 },
{0.3, -0.5, -0.3, 0.5, 0, 0.3}}, { 0.3, -0.5, -0.3, 0.5, 0, 0.3 }
},
desc = S("Element T") desc = S("Element T")
}, },
{ suffix = "technic_cnc_element_edge", {
suffix = "technic_cnc_element_edge",
model = { model = {
{ -0.3, -0.5, -0.5, 0.3, 0, 0.3 }, { -0.3, -0.5, -0.5, 0.3, 0, 0.3 },
{-0.5, -0.5, -0.3, -0.3, 0, 0.3}}, { -0.5, -0.5, -0.3, -0.3, 0, 0.3 }
},
desc = S("Element Edge") desc = S("Element Edge")
}, },
{ suffix = "technic_cnc_element_straight", {
suffix = "technic_cnc_element_straight",
model = { -0.3, -0.5, -0.5, 0.3, 0, 0.5 }, model = { -0.3, -0.5, -0.5, 0.3, 0, 0.5 },
desc = S("Element Straight") desc = S("Element Straight")
}, },
{ suffix = "technic_cnc_oblate_spheroid", {
suffix = "technic_cnc_oblate_spheroid",
model = "technic_oblate_spheroid.obj", model = "technic_oblate_spheroid.obj",
desc = S("Oblate spheroid"), desc = S("Oblate spheroid"),
cbox = { cbox = {
@ -95,32 +113,38 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_sphere", {
suffix = "technic_cnc_sphere",
model = "technic_sphere.obj", model = "technic_sphere.obj",
desc = S("Sphere") desc = S("Sphere")
}, },
{ suffix = "technic_cnc_cylinder_horizontal", {
suffix = "technic_cnc_cylinder_horizontal",
model = "technic_cylinder_horizontal.obj", model = "technic_cylinder_horizontal.obj",
desc = S("Horizontal Cylinder") desc = S("Horizontal Cylinder")
}, },
{ suffix = "technic_cnc_cylinder", {
suffix = "technic_cnc_cylinder",
model = "technic_cylinder.obj", model = "technic_cylinder.obj",
desc = S("Cylinder") desc = S("Cylinder")
}, },
{ suffix = "technic_cnc_twocurvededge", {
suffix = "technic_cnc_twocurvededge",
model = "technic_two_curved_edge.obj", model = "technic_two_curved_edge.obj",
desc = S("Two Curved Edge/Corner Block") desc = S("Two Curved Edge/Corner Block")
}, },
{ suffix = "technic_cnc_onecurvededge", {
suffix = "technic_cnc_onecurvededge",
model = "technic_one_curved_edge.obj", model = "technic_one_curved_edge.obj",
desc = S("One Curved Edge Block") desc = S("One Curved Edge Block")
}, },
{ suffix = "technic_cnc_spike", {
suffix = "technic_cnc_spike",
model = "technic_pyramid_spike.obj", model = "technic_pyramid_spike.obj",
desc = S("Spike"), desc = S("Spike"),
cbox = { cbox = {
@ -134,7 +158,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_pyramid", {
suffix = "technic_cnc_pyramid",
model = "technic_pyramid.obj", model = "technic_pyramid.obj",
desc = S("Pyramid"), desc = S("Pyramid"),
cbox = { cbox = {
@ -148,7 +173,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_inner_edge_upsdown", {
suffix = "technic_cnc_slope_inner_edge_upsdown",
model = "technic_innercorner_upsdown.obj", model = "technic_innercorner_upsdown.obj",
desc = S("Slope Upside Down Inner Edge/Corner"), desc = S("Slope Upside Down Inner Edge/Corner"),
sbox = { sbox = {
@ -169,7 +195,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_edge_upsdown", {
suffix = "technic_cnc_slope_edge_upsdown",
model = "technic_outercorner_upsdown.obj", model = "technic_outercorner_upsdown.obj",
desc = S("Slope Upside Down Outer Edge/Corner"), desc = S("Slope Upside Down Outer Edge/Corner"),
cbox = { cbox = {
@ -183,7 +210,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_inner_edge", {
suffix = "technic_cnc_slope_inner_edge",
model = "technic_innercorner.obj", model = "technic_innercorner.obj",
desc = S("Slope Inner Edge/Corner"), desc = S("Slope Inner Edge/Corner"),
sbox = { sbox = {
@ -204,7 +232,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_edge", {
suffix = "technic_cnc_slope_edge",
model = "technic_outercorner.obj", model = "technic_outercorner.obj",
desc = S("Slope Outer Edge/Corner"), desc = S("Slope Outer Edge/Corner"),
cbox = { cbox = {
@ -218,7 +247,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_upsdown", {
suffix = "technic_cnc_slope_upsdown",
model = "technic_slope_upsdown.obj", model = "technic_slope_upsdown.obj",
desc = S("Slope Upside Down"), desc = S("Slope Upside Down"),
cbox = { cbox = {
@ -232,7 +262,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope_lying", {
suffix = "technic_cnc_slope_lying",
model = "technic_slope_horizontal.obj", model = "technic_slope_horizontal.obj",
desc = S("Slope Lying"), desc = S("Slope Lying"),
cbox = { cbox = {
@ -246,7 +277,8 @@ technic.cnc.programs = {
} }
}, },
{ suffix = "technic_cnc_slope", {
suffix = "technic_cnc_slope",
model = "technic_slope.obj", model = "technic_slope.obj",
desc = S("Slope"), desc = S("Slope"),
cbox = { cbox = {
@ -259,17 +291,18 @@ technic.cnc.programs = {
} }
} }
}, },
} }
-- Allow disabling certain programs for some node. Default is allowing all types for all nodes -- Allow disabling certain programs for some node. Default is allowing all types for all nodes
technic.cnc.programs_disable = { technic.cnc.programs_disable = {
-- ["default:brick"] = {"technic_cnc_stick"}, -- Example: Disallow the stick for brick -- ["default:brick"] = {"technic_cnc_stick"}, -- Example: Disallow the stick for brick
-- ... -- ...
["default:dirt"] = {"technic_cnc_oblate_spheroid", "technic_cnc_slope_upsdown", "technic_cnc_edge", ["default:dirt"] = {
"technic_cnc_oblate_spheroid", "technic_cnc_slope_upsdown", "technic_cnc_edge",
"technic_cnc_inner_edge", "technic_cnc_slope_edge_upsdown", "technic_cnc_inner_edge", "technic_cnc_slope_edge_upsdown",
"technic_cnc_slope_inner_edge_upsdown", "technic_cnc_stick", "technic_cnc_slope_inner_edge_upsdown", "technic_cnc_stick",
"technic_cnc_cylinder_horizontal"} "technic_cnc_cylinder_horizontal"
}
} }
-- Generic function for registering all the different node types -- Generic function for registering all the different node types

View File

@ -1,4 +1,3 @@
minetest.register_alias("compressor", "technic:lv_compressor") minetest.register_alias("compressor", "technic:lv_compressor")
minetest.register_craft({ minetest.register_craft({

View File

@ -1,4 +1,3 @@
minetest.register_alias("extractor", "technic:lv_extractor") minetest.register_alias("extractor", "technic:lv_extractor")
minetest.register_craft({ minetest.register_craft({

View File

@ -80,10 +80,17 @@ end
minetest.register_node("technic:geothermal", { minetest.register_node("technic:geothermal", {
description = S("Geothermal %s Generator"):format("LV"), description = S("Geothermal %s Generator"):format("LV"),
tiles = {"technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png", tiles = {
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, "technic_geothermal_top.png", "technic_machine_bottom.png", "technic_geothermal_side.png",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, "technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"
technic_machine=1, technic_lv=1}, },
groups = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1
},
paramtype2 = "facedir", paramtype2 = "facedir",
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
@ -97,11 +104,19 @@ minetest.register_node("technic:geothermal", {
minetest.register_node("technic:geothermal_active", { minetest.register_node("technic:geothermal_active", {
description = S("Geothermal %s Generator"):format("LV"), description = S("Geothermal %s Generator"):format("LV"),
tiles = {"technic_geothermal_top_active.png", "technic_machine_bottom.png", "technic_geothermal_side.png", tiles = {
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"}, "technic_geothermal_top_active.png", "technic_machine_bottom.png", "technic_geothermal_side.png",
"technic_geothermal_side.png", "technic_geothermal_side.png", "technic_geothermal_side.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {
technic_machine=1, technic_lv=1, not_in_creative_inventory=1}, snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1,
not_in_creative_inventory = 1
},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
drop = "technic:geothermal", drop = "technic:geothermal",

View File

@ -1,4 +1,3 @@
minetest.register_alias("grinder", "technic:lv_grinder") minetest.register_alias("grinder", "technic:lv_grinder")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_grinder', output = 'technic:lv_grinder',

View File

@ -1,4 +1,3 @@
technic.register_tier("LV", "Low Voltage") technic.register_tier("LV", "Low Voltage")
local path = technic.modpath .. "/machines/LV" local path = technic.modpath .. "/machines/LV"

View File

@ -84,18 +84,24 @@ local function set_display(meta)
"button[1,3;1,1;track8;8]" .. "button[1,3;1,1;track8;8]" ..
"button[2,3;1,1;track9;9]" .. "button[2,3;1,1;track9;9]" ..
"button[3,1;1,1;stop;Stop]" .. "button[3,1;1,1;stop;Stop]" ..
"label[0,4;"..minetest.formspec_escape( "label[0,4;" .. minetest.formspec_escape(meta:get_int("active") == 0 and
meta:get_int("active") == 0 and
S("Stopped") or S("Stopped") or
S("Current track %s"):format(meta:get_int("current_track"))) .. "]") S("Current track %s"):format(meta:get_int("current_track"))) .. "]")
end end
minetest.register_node("technic:music_player", { minetest.register_node("technic:music_player", {
description = S("%s Music Player"):format("LV"), description = S("%s Music Player"):format("LV"),
tiles = {"technic_music_player_top.png", "technic_machine_bottom.png", "technic_music_player_side.png", tiles = {
"technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"}, "technic_music_player_top.png", "technic_machine_bottom.png", "technic_music_player_side.png",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, "technic_music_player_side.png", "technic_music_player_side.png", "technic_music_player_side.png"
technic_machine=1, technic_lv=1}, },
groups = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1
},
connect_sides = { "bottom" }, connect_sides = { "bottom" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_construct = function(pos) on_construct = function(pos)

View File

@ -10,7 +10,6 @@ minetest.register_craft({
recipe = { recipe = {
{ 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer' }, { 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer', 'technic:doped_silicon_wafer' },
{ 'technic:fine_silver_wire', 'technic:lv_cable', 'mesecons_materials:glue' }, { 'technic:fine_silver_wire', 'technic:lv_cable', 'mesecons_materials:glue' },
} }
}) })
@ -44,10 +43,17 @@ local run = function(pos, node)
end end
minetest.register_node("technic:solar_panel", { minetest.register_node("technic:solar_panel", {
tiles = {"technic_solar_panel_top.png", "technic_solar_panel_bottom.png", "technic_solar_panel_side.png", tiles = {
"technic_solar_panel_side.png", "technic_solar_panel_side.png", "technic_solar_panel_side.png"}, "technic_solar_panel_top.png", "technic_solar_panel_bottom.png", "technic_solar_panel_side.png",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, "technic_solar_panel_side.png", "technic_solar_panel_side.png", "technic_solar_panel_side.png"
technic_machine=1, technic_lv=1}, },
groups = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1
},
connect_sides = { "bottom" }, connect_sides = { "bottom" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
description = S("Small Solar %s Generator"):format("LV"), description = S("Small Solar %s Generator"):format("LV"),

View File

@ -70,12 +70,19 @@ end
minetest.register_node("technic:water_mill", { minetest.register_node("technic:water_mill", {
description = S("Hydro %s Generator"):format("LV"), description = S("Hydro %s Generator"):format("LV"),
tiles = {"technic_water_mill_top.png", "technic_machine_bottom.png", tiles = {
"technic_water_mill_top.png", "technic_machine_bottom.png",
"technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png",
"technic_water_mill_side.png", "technic_water_mill_side.png"}, "technic_water_mill_side.png", "technic_water_mill_side.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {
technic_machine=1, technic_lv=1}, snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1
},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_construct = function(pos) on_construct = function(pos)
@ -88,12 +95,20 @@ minetest.register_node("technic:water_mill", {
minetest.register_node("technic:water_mill_active", { minetest.register_node("technic:water_mill_active", {
description = S("Hydro %s Generator"):format("LV"), description = S("Hydro %s Generator"):format("LV"),
tiles = {"technic_water_mill_top_active.png", "technic_machine_bottom.png", tiles = {
"technic_water_mill_top_active.png", "technic_machine_bottom.png",
"technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png", "technic_water_mill_side.png",
"technic_water_mill_side.png", "technic_water_mill_side.png"}, "technic_water_mill_side.png", "technic_water_mill_side.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {
technic_machine=1, technic_lv=1, not_in_creative_inventory=1}, snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_lv = 1,
not_in_creative_inventory = 1
},
legacy_facedir_simple = true, legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
drop = "technic:water_mill", drop = "technic:water_mill",

View File

@ -1,4 +1,3 @@
minetest.register_alias("mv_cable", "technic:mv_cable") minetest.register_alias("mv_cable", "technic:mv_cable")
minetest.register_craft({ minetest.register_craft({

View File

@ -1,4 +1,3 @@
technic.register_tier("MV", "Medium Voltage") technic.register_tier("MV", "Medium Voltage")
local path = technic.modpath .. "/machines/MV" local path = technic.modpath .. "/machines/MV"

View File

@ -115,13 +115,11 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -154,14 +152,12 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow_active', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX, light_source = LIGHT_MAX,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_half_yellow", drop = "technic:homedecor_glowlight_half_yellow",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -196,13 +192,11 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -235,14 +229,12 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX - 1, light_source = LIGHT_MAX - 1,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_quarter_yellow", drop = "technic:homedecor_glowlight_quarter_yellow",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -278,13 +270,11 @@ minetest.register_node('technic:homedecor_glowlight_half_white', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -317,14 +307,12 @@ minetest.register_node('technic:homedecor_glowlight_half_white_active', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, 0, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX, light_source = LIGHT_MAX,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_half_white", drop = "technic:homedecor_glowlight_half_white",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -359,13 +347,11 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -398,14 +384,12 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white_active', {
type = "fixed", type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 } fixed = { -0.5, -0.5, -0.5, 0.5, -0.25, 0.5 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX - 1, light_source = LIGHT_MAX - 1,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_quarter_white", drop = "technic:homedecor_glowlight_quarter_white",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -440,13 +424,11 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow', {
type = "fixed", type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -479,14 +461,12 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', {
type = "fixed", type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX - 1, light_source = LIGHT_MAX - 1,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_small_cube_yellow", drop = "technic:homedecor_glowlight_small_cube_yellow",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
@ -521,13 +501,11 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white', {
type = "fixed", type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3 }, groups = { snappy = 3 },
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)
technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing) technic_homedecor_rotate_and_place(itemstack, placer, pointed_thing)
@ -560,14 +538,12 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', {
type = "fixed", type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 } fixed = { -0.25, -0.5, -0.25, 0.25, 0, 0.25 }
}, },
sunlight_propagates = false, sunlight_propagates = false,
paramtype = "light", paramtype = "light",
paramtype2 = "facedir", paramtype2 = "facedir",
walkable = true, walkable = true,
light_source = LIGHT_MAX - 1, light_source = LIGHT_MAX - 1,
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
groups = { snappy = 3, not_in_creative_inventory = 1 }, groups = { snappy = 3, not_in_creative_inventory = 1 },
drop = "technic:homedecor_glowlight_small_cube_white", drop = "technic:homedecor_glowlight_small_cube_white",
on_place = function(itemstack, placer, pointed_thing) on_place = function(itemstack, placer, pointed_thing)

View File

@ -81,8 +81,7 @@ local shutdown_inductive_appliances = function(pos)
local rad = power_radius local rad = power_radius
-- If the radiator is removed. turn off all appliances in region -- If the radiator is removed. turn off all appliances in region
-- If another radiator is near it will turn on the appliances again -- If another radiator is near it will turn on the appliances again
local positions = minetest.find_nodes_in_area( local positions = minetest.find_nodes_in_area({ x = pos.x - rad, y = pos.y - rad, z = pos.z - rad },
{x=pos.x-rad, y=pos.y-rad, z=pos.z-rad},
{ x = pos.x + rad, y = pos.y + rad, z = pos.z + rad }, { x = pos.x + rad, y = pos.y + rad, z = pos.z + rad },
technic.inductive_nodes) technic.inductive_nodes)
for _, pos1 in pairs(positions) do for _, pos1 in pairs(positions) do
@ -105,8 +104,7 @@ local toggle_on_off_inductive_appliances = function(pos, node, puncher)
if pos == nil then return end if pos == nil then return end
-- The supply radius -- The supply radius
local rad = power_radius local rad = power_radius
local positions = minetest.find_nodes_in_area( local positions = minetest.find_nodes_in_area({ x = pos.x - rad, y = pos.y - rad, z = pos.z - rad },
{x=pos.x-rad, y=pos.y-rad, z=pos.z-rad},
{ x = pos.x + rad, y = pos.y + rad, z = pos.z + rad }, { x = pos.x + rad, y = pos.y + rad, z = pos.z + rad },
technic.inductive_nodes) technic.inductive_nodes)
for _, pos1 in pairs(positions) do for _, pos1 in pairs(positions) do
@ -119,8 +117,10 @@ end
minetest.register_node("technic:power_radiator", { minetest.register_node("technic:power_radiator", {
description = "MV Power Radiator", description = "MV Power Radiator",
tiles = {"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png", tiles = {
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"}, "technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2 },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
drawtype = "nodebox", drawtype = "nodebox",
@ -181,8 +181,7 @@ minetest.register_abm({
local used_charge = 0 local used_charge = 0
-- Index all nodes within supply range -- Index all nodes within supply range
local positions = minetest.find_nodes_in_area( local positions = minetest.find_nodes_in_area({ x = pos.x - rad, y = pos.y - rad, z = pos.z - rad },
{x=pos.x-rad, y=pos.y-rad, z=pos.z-rad},
{ x = pos.x + rad, y = pos.y + rad, z = pos.z + rad }, { x = pos.x + rad, y = pos.y + rad, z = pos.z + rad },
technic.inductive_nodes) technic.inductive_nodes)
for _, pos1 in pairs(positions) do for _, pos1 in pairs(positions) do

View File

@ -1,4 +1,3 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:solar_array_mv 1', output = 'technic:solar_array_mv 1',
recipe = { recipe = {

View File

@ -83,10 +83,19 @@ end
minetest.register_node("technic:tool_workshop", { minetest.register_node("technic:tool_workshop", {
description = S("%s Tool Workshop"):format("MV"), description = S("%s Tool Workshop"):format("MV"),
paramtype2 = "facedir", paramtype2 = "facedir",
tiles = {"technic_workshop_top.png", "technic_machine_bottom.png", "technic_workshop_side.png", tiles = {
"technic_workshop_side.png", "technic_workshop_side.png", "technic_workshop_side.png"}, "technic_workshop_top.png", "technic_machine_bottom.png", "technic_workshop_side.png",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, "technic_workshop_side.png", "technic_workshop_side.png", "technic_workshop_side.png"
technic_machine=1, technic_mv=1, tubedevice=1, tubedevice_receiver=1}, },
groups = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_mv = 1,
tubedevice = 1,
tubedevice_receiver = 1
},
connect_sides = { "bottom", "back", "left", "right" }, connect_sides = { "bottom", "back", "left", "right" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_construct = function(pos) on_construct = function(pos)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({

View File

@ -1,4 +1,3 @@
-- Fuel driven alloy furnace. This uses no EUs: -- Fuel driven alloy furnace. This uses no EUs:
local S = technic.getter local S = technic.getter
@ -30,9 +29,11 @@ local formspec =
minetest.register_node("technic:coal_alloy_furnace", { minetest.register_node("technic:coal_alloy_furnace", {
description = machine_name, description = machine_name,
tiles = {"technic_coal_alloy_furnace_top.png", "technic_coal_alloy_furnace_bottom.png", tiles = {
"technic_coal_alloy_furnace_top.png", "technic_coal_alloy_furnace_bottom.png",
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png",
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front.png"}, "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = { cracky = 2 }, groups = { cracky = 2 },
legacy_facedir_simple = true, legacy_facedir_simple = true,
@ -54,9 +55,11 @@ minetest.register_node("technic:coal_alloy_furnace", {
minetest.register_node("technic:coal_alloy_furnace_active", { minetest.register_node("technic:coal_alloy_furnace_active", {
description = machine_name, description = machine_name,
tiles = {"technic_coal_alloy_furnace_top.png", "technic_coal_alloy_furnace_bottom.png", tiles = {
"technic_coal_alloy_furnace_top.png", "technic_coal_alloy_furnace_bottom.png",
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_side.png",
"technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front_active.png"}, "technic_coal_alloy_furnace_side.png", "technic_coal_alloy_furnace_front_active.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
light_source = 8, light_source = 8,
drop = "technic:coal_alloy_furnace", drop = "technic:coal_alloy_furnace",
@ -89,7 +92,8 @@ minetest.register_abm({
"fuel_totaltime", "fuel_totaltime",
"fuel_time", "fuel_time",
"src_totaltime", "src_totaltime",
"src_time"}) do "src_time"
}) do
if not meta:get_float(name) then if not meta:get_float(name) then
meta:set_float(name, 0.0) meta:set_float(name, 0.0)
end end

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
local function deploy_node(inv, slot_name, pos, node, machine_node) local function deploy_node(inv, slot_name, pos, node, machine_node)
@ -68,20 +67,17 @@ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = 'technic:constructor_mk1_off 1', output = 'technic:constructor_mk1_off 1',
recipe = { 'technic:nodebreaker_off', 'technic:deployer_off' }, recipe = { 'technic:nodebreaker_off', 'technic:deployer_off' },
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = 'technic:constructor_mk2_off 1', output = 'technic:constructor_mk2_off 1',
recipe = { 'technic:constructor_mk1_off', 'technic:constructor_mk1_off' }, recipe = { 'technic:constructor_mk1_off', 'technic:constructor_mk1_off' },
}) })
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",
output = 'technic:constructor_mk3_off 1', output = 'technic:constructor_mk3_off 1',
recipe = { 'technic:constructor_mk2_off', 'technic:constructor_mk2_off' }, recipe = { 'technic:constructor_mk2_off', 'technic:constructor_mk2_off' },
}) })
local function make_on(mark, length) local function make_on(mark, length)
@ -121,12 +117,14 @@ end
local function make_constructor(mark, length) local function make_constructor(mark, length)
minetest.register_node("technic:constructor_mk" .. mark .. "_off", { minetest.register_node("technic:constructor_mk" .. mark .. "_off", {
description = S("Constructor Mk%d"):format(mark), description = S("Constructor Mk%d"):format(mark),
tiles = {"technic_constructor_mk"..mark.."_top_off.png", tiles = {
"technic_constructor_mk" .. mark .. "_top_off.png",
"technic_constructor_mk" .. mark .. "_bottom_off.png", "technic_constructor_mk" .. mark .. "_bottom_off.png",
"technic_constructor_mk" .. mark .. "_side2_off.png", "technic_constructor_mk" .. mark .. "_side2_off.png",
"technic_constructor_mk" .. mark .. "_side1_off.png", "technic_constructor_mk" .. mark .. "_side1_off.png",
"technic_constructor_back.png", "technic_constructor_back.png",
"technic_constructor_front_off.png"}, "technic_constructor_front_off.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 },
mesecons = { effector = { action_on = make_on(mark, length) } }, mesecons = { effector = { action_on = make_on(mark, length) } },
@ -165,16 +163,23 @@ local function make_constructor(mark, length)
}) })
minetest.register_node("technic:constructor_mk" .. mark .. "_on", { minetest.register_node("technic:constructor_mk" .. mark .. "_on", {
tiles = {"technic_constructor_mk"..mark.."_top_on.png", tiles = {
"technic_constructor_mk" .. mark .. "_top_on.png",
"technic_constructor_mk" .. mark .. "_bottom_on.png", "technic_constructor_mk" .. mark .. "_bottom_on.png",
"technic_constructor_mk" .. mark .. "_side2_on.png", "technic_constructor_mk" .. mark .. "_side2_on.png",
"technic_constructor_mk" .. mark .. "_side1_on.png", "technic_constructor_mk" .. mark .. "_side1_on.png",
"technic_constructor_back.png", "technic_constructor_back.png",
"technic_constructor_front_on.png"}, "technic_constructor_front_on.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
drop = "technic:constructor_mk" .. mark .. "_off", drop = "technic:constructor_mk" .. mark .. "_off",
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, groups = {
mesecon=2, not_in_creative_inventory=1}, snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
mesecon = 2,
not_in_creative_inventory = 1
},
mesecons = { effector = { action_off = make_off(mark) } }, mesecons = { effector = { action_off = make_off(mark) } },
sounds = default.node_sound_stone_defaults(), sounds = default.node_sound_stone_defaults(),
allow_metadata_inventory_put = technic.machine_inventory_put, allow_metadata_inventory_put = technic.machine_inventory_put,

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
frames = {} frames = {}
@ -50,6 +49,7 @@ end
local function lines(str) local function lines(str)
local t = {} local t = {}
local function helper(line) table.insert(t, line) return "" end local function helper(line) table.insert(t, line) return "" end
helper((str:gsub("(.-)\r?\n", helper))) helper((str:gsub("(.-)\r?\n", helper)))
return t return t
end end
@ -325,7 +325,6 @@ local nodeboxes= {
end end
end, end,
}) })
end end
end end
end end
@ -341,9 +340,7 @@ minetest.register_entity("technic:frame_entity", {
textures = {}, textures = {},
visual_size = { x = 0.667, y = 0.667 }, visual_size = { x = 0.667, y = 0.667 },
}, },
node = {}, node = {},
set_node = function(self, node) set_node = function(self, node)
self.node = node self.node = node
local pos = self.object:getpos() local pos = self.object:getpos()
@ -367,16 +364,13 @@ minetest.register_entity("technic:frame_entity", {
} }
self.object:set_properties(prop) self.object:set_properties(prop)
end, end,
get_staticdata = function(self) get_staticdata = function(self)
return self.node.name return self.node.name
end, end,
on_activate = function(self, staticdata) on_activate = function(self, staticdata)
self.object:set_armor_groups({ immortal = 1 }) self.object:set_armor_groups({ immortal = 1 })
self:set_node({ name = staticdata }) self:set_node({ name = staticdata })
end, end,
dig = function(self) dig = function(self)
minetest.handle_node_drops(self.object:getpos(), { ItemStack("technic:frame_111111") }, self.last_puncher) minetest.handle_node_drops(self.object:getpos(), { ItemStack("technic:frame_111111") }, self.last_puncher)
local pos = self.object:getpos() local pos = self.object:getpos()
@ -384,7 +378,6 @@ minetest.register_entity("technic:frame_entity", {
frames_pos[pos_to_string(pos)] = nil frames_pos[pos_to_string(pos)] = nil
self.object:remove() self.object:remove()
end, end,
on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir) on_punch = function(self, puncher, time_from_last_punch, tool_capabilities, dir)
local pos = self.object:getpos() local pos = self.object:getpos()
if self.damage_object == nil then if self.damage_object == nil then
@ -411,7 +404,6 @@ minetest.register_entity("technic:frame_entity", {
self.node.name = nodename self.node.name = nodename
self:set_node(self.node) self:set_node(self.node)
end, end,
on_rightclick = function(self, clicker) on_rightclick = function(self, clicker)
local pos = self.object:getpos() local pos = self.object:getpos()
local ppos = clicker:getpos() local ppos = clicker:getpos()
@ -555,8 +547,10 @@ end
minetest.register_node("technic:frame_motor", { minetest.register_node("technic:frame_motor", {
description = S("Frame Motor"), description = S("Frame Motor"),
tiles = {"pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png", tiles = {
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"}, "pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 },
paramtype2 = "facedir", paramtype2 = "facedir",
mesecons = { effector = { action_on = frame_motor_on } }, mesecons = { effector = { action_on = frame_motor_on } },
@ -818,7 +812,6 @@ minetest.register_tool("technic:template_tool",{
else else
compress_templates(pos) compress_templates(pos)
end end
end end
}) })
@ -860,8 +853,10 @@ end
minetest.register_node("technic:template_motor", { minetest.register_node("technic:template_motor", {
description = S("Template Motor"), description = S("Template Motor"),
tiles = {"pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png", tiles = {
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"}, "pipeworks_filter_top.png^[transformR90", "technic_lv_cable.png", "technic_lv_cable.png",
"technic_lv_cable.png", "technic_lv_cable.png", "technic_lv_cable.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, mesecon = 2 },
paramtype2 = "facedir", paramtype2 = "facedir",
mesecons = { effector = { action_on = template_motor_on } }, mesecons = { effector = { action_on = template_motor_on } },

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
local function inject_items(pos) local function inject_items(pos)
@ -36,7 +35,6 @@ local function inject_items (pos)
end end
end end
end end
end end
minetest.register_craft({ minetest.register_craft({
@ -64,8 +62,10 @@ end
minetest.register_node("technic:injector", { minetest.register_node("technic:injector", {
description = S("Self-Contained Injector"), description = S("Self-Contained Injector"),
tiles = {"technic_injector_top.png", "technic_injector_bottom.png", "technic_injector_side.png", tiles = {
"technic_injector_side.png", "technic_injector_side.png", "technic_injector_side.png"}, "technic_injector_top.png", "technic_injector_bottom.png", "technic_injector_side.png",
"technic_injector_side.png", "technic_injector_side.png", "technic_injector_side.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, tubedevice_receiver = 1 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, tubedevice = 1, tubedevice_receiver = 1 },
tube = { tube = {
can_insert = function(pos, node, stack, direction) can_insert = function(pos, node, stack, direction)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_alloy_furnace(data) function technic.register_alloy_furnace(data)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
technic.register_recipe_type("alloy", { technic.register_recipe_type("alloy", {

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
technic.register_power_tool("technic:battery", 10000) technic.register_power_tool("technic:battery", 10000)
@ -159,8 +158,13 @@ function technic.register_battery_box(data)
end end
for i = 0, 8 do for i = 0, 8 do
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, local groups = {
technic_machine=1, ["technic_"..ltier]=1} snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
["technic_" .. ltier] = 1
}
if i ~= 0 then if i ~= 0 then
groups.not_in_creative_inventory = 1 groups.not_in_creative_inventory = 1
end end
@ -172,12 +176,14 @@ function technic.register_battery_box(data)
minetest.register_node("technic:" .. ltier .. "_battery_box" .. i, { minetest.register_node("technic:" .. ltier .. "_battery_box" .. i, {
description = S("%s Battery Box"):format(tier), description = S("%s Battery Box"):format(tier),
tiles = {"technic_"..ltier.."_battery_box_top.png", tiles = {
"technic_" .. ltier .. "_battery_box_top.png",
"technic_" .. ltier .. "_battery_box_bottom.png", "technic_" .. ltier .. "_battery_box_bottom.png",
"technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png", "technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png",
"technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png", "technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png",
"technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png", "technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png",
"technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"}, "technic_" .. ltier .. "_battery_box_side.png^technic_power_meter" .. i .. ".png"
},
groups = groups, groups = groups,
connect_sides = { "bottom" }, connect_sides = { "bottom" },
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
@ -215,8 +221,9 @@ function technic.register_battery_box(data)
for i = 0, 8 do for i = 0, 8 do
technic.register_machine(tier, "technic:" .. ltier .. "_battery_box" .. i, technic.battery) technic.register_machine(tier, "technic:" .. ltier .. "_battery_box" .. i, technic.battery)
end end
end
end -- End registration -- End registration
function technic.charge_tools(meta, batt_charge, charge_step) function technic.charge_tools(meta, batt_charge, charge_step)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
local cable_tier = {} local cable_tier = {}
@ -26,7 +25,8 @@ local function check_connections(pos)
{ x = pos.x, y = pos.y + 1, z = pos.z }, { x = pos.x, y = pos.y + 1, z = pos.z },
{ x = pos.x, y = pos.y - 1, z = pos.z }, { x = pos.x, y = pos.y - 1, z = pos.z },
{ x = pos.x, y = pos.y, z = pos.z + 1 }, { x = pos.x, y = pos.y, z = pos.z + 1 },
{x=pos.x, y=pos.y, z=pos.z-1}} { x = pos.x, y = pos.y, z = pos.z - 1 }
}
for _, connected_pos in pairs(positions) do for _, connected_pos in pairs(positions) do
local name = minetest.get_node(connected_pos).name local name = minetest.get_node(connected_pos).name
if machines[name] or technic.get_cable_tier(name) then if machines[name] or technic.get_cable_tier(name) then
@ -146,8 +146,10 @@ function technic.register_cable(tier, size)
sunlight_propagates = true, sunlight_propagates = true,
drawtype = "nodebox", drawtype = "nodebox",
node_box = node_box, node_box = node_box,
connects_to = {"technic:"..ltier.."_cable", connects_to = {
"group:technic_"..ltier, "group:technic_all_tiers"}, "technic:" .. ltier .. "_cable",
"group:technic_" .. ltier, "group:technic_all_tiers"
},
on_construct = clear_networks, on_construct = clear_networks,
on_destruct = clear_networks, on_destruct = clear_networks,
}) })

View File

@ -21,6 +21,7 @@ local recipes = {
local function uranium_dust(p) local function uranium_dust(p)
return "technic:uranium" .. (p == 7 and "" or p) .. "_dust" return "technic:uranium" .. (p == 7 and "" or p) .. "_dust"
end end
for p = 1, 34 do for p = 1, 34 do
table.insert(recipes, { uranium_dust(p) .. " 2", uranium_dust(p - 1), uranium_dust(p + 1) }) table.insert(recipes, { uranium_dust(p) .. " 2", uranium_dust(p - 1), uranium_dust(p + 1) })
end end

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
-- handles the machine upgrades every tick -- handles the machine upgrades every tick

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_compressor(data) function technic.register_compressor(data)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
technic.register_recipe_type("compressing", { description = S("Compressing") }) technic.register_recipe_type("compressing", { description = S("Compressing") })

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_electric_furnace(data) function technic.register_electric_furnace(data)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_extractor(data) function technic.register_extractor(data)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
technic.register_recipe_type("extracting", { description = S("Extracting") }) technic.register_recipe_type("extracting", { description = S("Extracting") })
@ -41,7 +40,6 @@ if minetest.get_modpath("dye") then
output = "dye:" .. color .. " 1", output = "dye:" .. color .. " 1",
recipe = { "group:flower,color_" .. color }, recipe = { "group:flower,color_" .. color },
}) })
end end
minetest.register_craft({ minetest.register_craft({
type = "shapeless", type = "shapeless",

View File

@ -18,8 +18,13 @@ function technic.register_generator(data)
local tier = data.tier local tier = data.tier
local ltier = string.lower(tier) local ltier = string.lower(tier)
local groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, local groups = {
technic_machine=1, ["technic_"..ltier]=1} snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
["technic_" .. ltier] = 1
}
if data.tube then if data.tube then
groups.tubedevice = 1 groups.tubedevice = 1
groups.tubedevice_receiver = 1 groups.tubedevice_receiver = 1
@ -54,9 +59,11 @@ function technic.register_generator(data)
local fuellist = inv:get_list("src") local fuellist = inv:get_list("src")
local fuel local fuel
local afterfuel local afterfuel
fuel, afterfuel = minetest.get_craft_result( fuel, afterfuel = minetest.get_craft_result({
{method = "fuel", width = 1, method = "fuel",
items = fuellist}) width = 1,
items = fuellist
})
if not fuel or fuel.time == 0 then if not fuel or fuel.time == 0 then
meta:set_string("infotext", S("%s Out Of Fuel"):format(desc)) meta:set_string("infotext", S("%s Out Of Fuel"):format(desc))
technic.swap_node(pos, "technic:" .. ltier .. "_generator") technic.swap_node(pos, "technic:" .. ltier .. "_generator")
@ -88,9 +95,11 @@ function technic.register_generator(data)
minetest.register_node("technic:" .. ltier .. "_generator", { minetest.register_node("technic:" .. ltier .. "_generator", {
description = desc, description = desc,
tiles = {"technic_"..ltier.."_generator_top.png", "technic_machine_bottom.png", tiles = {
"technic_" .. ltier .. "_generator_top.png", "technic_machine_bottom.png",
"technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_front.png"}, "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_front.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = groups, groups = groups,
connect_sides = { "bottom", "back", "left", "right" }, connect_sides = { "bottom", "back", "left", "right" },
@ -118,9 +127,11 @@ function technic.register_generator(data)
minetest.register_node("technic:" .. ltier .. "_generator_active", { minetest.register_node("technic:" .. ltier .. "_generator_active", {
description = desc, description = desc,
tiles = {"technic_"..ltier.."_generator_top.png", "technic_machine_bottom.png", tiles = {
"technic_" .. ltier .. "_generator_top.png", "technic_machine_bottom.png",
"technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_side.png",
"technic_"..ltier.."_generator_side.png", "technic_"..ltier.."_generator_front_active.png"}, "technic_" .. ltier .. "_generator_side.png", "technic_" .. ltier .. "_generator_front_active.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = active_groups, groups = active_groups,
connect_sides = { "bottom" }, connect_sides = { "bottom" },

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_grinder(data) function technic.register_grinder(data)

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
technic.register_recipe_type("grinding", { description = S("Grinding") }) technic.register_recipe_type("grinding", { description = S("Grinding") })
@ -136,6 +135,7 @@ end
local function uranium_dust(p) local function uranium_dust(p)
return "technic:uranium" .. (p == 7 and "" or p) .. "_dust" return "technic:uranium" .. (p == 7 and "" or p) .. "_dust"
end end
for pa = 0, 34 do for pa = 0, 34 do
for pb = pa + 1, 35 do for pb = pa + 1, 35 do
local pc = (pa + pb) / 2 local pc = (pa + pb) / 2

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
local tube = { local tube = {
@ -136,12 +135,14 @@ function technic.register_base_machine(data)
minetest.register_node("technic:" .. ltier .. "_" .. machine_name, { minetest.register_node("technic:" .. ltier .. "_" .. machine_name, {
description = machine_desc:format(tier), description = machine_desc:format(tier),
tiles = {"technic_"..ltier.."_"..machine_name.."_top.png", tiles = {
"technic_" .. ltier .. "_" .. machine_name .. "_top.png",
"technic_" .. ltier .. "_" .. machine_name .. "_bottom.png", "technic_" .. ltier .. "_" .. machine_name .. "_bottom.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_"..ltier.."_"..machine_name.."_front.png"}, "technic_" .. ltier .. "_" .. machine_name .. "_front.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = groups, groups = groups,
tube = data.tube and tube or nil, tube = data.tube and tube or nil,
@ -171,12 +172,14 @@ function technic.register_base_machine(data)
minetest.register_node("technic:" .. ltier .. "_" .. machine_name .. "_active", { minetest.register_node("technic:" .. ltier .. "_" .. machine_name .. "_active", {
description = machine_desc:format(tier), description = machine_desc:format(tier),
tiles = {"technic_"..ltier.."_"..machine_name.."_top.png", tiles = {
"technic_" .. ltier .. "_" .. machine_name .. "_top.png",
"technic_" .. ltier .. "_" .. machine_name .. "_bottom.png", "technic_" .. ltier .. "_" .. machine_name .. "_bottom.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_" .. ltier .. "_" .. machine_name .. "_side.png", "technic_" .. ltier .. "_" .. machine_name .. "_side.png",
"technic_"..ltier.."_"..machine_name.."_front_active.png"}, "technic_" .. ltier .. "_" .. machine_name .. "_front_active.png"
},
paramtype2 = "facedir", paramtype2 = "facedir",
drop = "technic:" .. ltier .. "_" .. machine_name, drop = "technic:" .. ltier .. "_" .. machine_name,
groups = active_groups, groups = active_groups,
@ -194,6 +197,7 @@ function technic.register_base_machine(data)
technic.register_machine(tier, "technic:" .. ltier .. "_" .. machine_name, technic.receiver) technic.register_machine(tier, "technic:" .. ltier .. "_" .. machine_name, technic.receiver)
technic.register_machine(tier, "technic:" .. ltier .. "_" .. machine_name .. "_active", technic.receiver) technic.register_machine(tier, "technic:" .. ltier .. "_" .. machine_name .. "_active", technic.receiver)
end
end -- End registration -- End registration

View File

@ -70,14 +70,17 @@ function technic.get_recipe(typename, items)
local result, new_input = minetest.get_craft_result({ local result, new_input = minetest.get_craft_result({
method = "cooking", method = "cooking",
width = 1, width = 1,
items = items}) items = items
})
-- Compatibility layer -- Compatibility layer
if not result or result.time == 0 then if not result or result.time == 0 then
return nil return nil
else else
return {time = result.time, return {
time = result.time,
new_input = new_input.items, new_input = new_input.items,
output = result.item} output = result.item
}
end end
end end
local index = get_recipe_index(items) local index = get_recipe_index(items)
@ -96,9 +99,11 @@ function technic.get_recipe(typename, items)
new_input[i]:take_item(recipe.input[stack:get_name()]) new_input[i]:take_item(recipe.input[stack:get_name()])
end end
end end
return {time = recipe.time, return {
time = recipe.time,
new_input = new_input, new_input = new_input,
output = recipe.output} output = recipe.output
}
else else
return nil return nil
end end

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
function technic.register_solar_array(data) function technic.register_solar_array(data)
@ -39,9 +38,11 @@ function technic.register_solar_array(data)
end end
minetest.register_node("technic:solar_array_" .. ltier, { minetest.register_node("technic:solar_array_" .. ltier, {
tiles = {"technic_"..ltier.."_solar_array_top.png", "technic_"..ltier.."_solar_array_bottom.png", tiles = {
"technic_" .. ltier .. "_solar_array_top.png", "technic_" .. ltier .. "_solar_array_bottom.png",
"technic_" .. ltier .. "_solar_array_side.png", "technic_" .. ltier .. "_solar_array_side.png", "technic_" .. ltier .. "_solar_array_side.png", "technic_" .. ltier .. "_solar_array_side.png",
"technic_"..ltier.."_solar_array_side.png", "technic_"..ltier.."_solar_array_side.png"}, "technic_" .. ltier .. "_solar_array_side.png", "technic_" .. ltier .. "_solar_array_side.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, technic_machine = 1, ["technic_" .. ltier] = 1 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, technic_machine = 1, ["technic_" .. ltier] = 1 },
connect_sides = { "bottom" }, connect_sides = { "bottom" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),

View File

@ -104,16 +104,22 @@ local run = function(pos, node, run_stage)
end end
return return
end end
end end
minetest.register_node("technic:supply_converter", { minetest.register_node("technic:supply_converter", {
description = S("Supply Converter"), description = S("Supply Converter"),
tiles = {"technic_supply_converter_top.png", "technic_supply_converter_bottom.png", tiles = {
"technic_supply_converter_top.png", "technic_supply_converter_bottom.png",
"technic_supply_converter_side.png", "technic_supply_converter_side.png", "technic_supply_converter_side.png", "technic_supply_converter_side.png",
"technic_supply_converter_side.png", "technic_supply_converter_side.png"}, "technic_supply_converter_side.png", "technic_supply_converter_side.png"
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, },
technic_machine=1, technic_all_tiers=1}, groups = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
technic_machine = 1,
technic_all_tiers = 1
},
connect_sides = { "top", "bottom" }, connect_sides = { "top", "bottom" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
on_receive_fields = supply_converter_receive_fields, on_receive_fields = supply_converter_receive_fields,

View File

@ -50,9 +50,11 @@ minetest.register_craft({
minetest.register_node("technic:switching_station", { minetest.register_node("technic:switching_station", {
description = S("Switching Station"), description = S("Switching Station"),
tiles = {"technic_water_mill_top_active.png", "technic_water_mill_top_active.png", tiles = {
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png", "technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png"}, "technic_water_mill_top_active.png", "technic_water_mill_top_active.png",
"technic_water_mill_top_active.png", "technic_water_mill_top_active.png"
},
groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, technic_all_tiers = 1 }, groups = { snappy = 2, choppy = 2, oddly_breakable_by_hand = 2, technic_all_tiers = 1 },
connect_sides = { "bottom" }, connect_sides = { "bottom" },
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
@ -80,9 +82,11 @@ minetest.register_node("technic:switching_station",{
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("channel", fields.channel) meta:set_string("channel", fields.channel)
end, end,
mesecons = {effector = { mesecons = {
effector = {
rules = mesecon.rules.default, rules = mesecon.rules.default,
}}, }
},
digiline = { digiline = {
receptor = { action = function() end }, receptor = { action = function() end },
effector = { effector = {
@ -163,7 +167,8 @@ local traverse_network = function(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_no
{ x = pos.x, y = pos.y + 1, z = pos.z }, { x = pos.x, y = pos.y + 1, z = pos.z },
{ x = pos.x, y = pos.y - 1, z = pos.z }, { x = pos.x, y = pos.y - 1, z = pos.z },
{ x = pos.x, y = pos.y, z = pos.z + 1 }, { x = pos.x, y = pos.y, z = pos.z + 1 },
{x=pos.x, y=pos.y, z=pos.z-1}} { x = pos.x, y = pos.y, z = pos.z - 1 }
}
--print("ON") --print("ON")
for i, cur_pos in pairs(positions) do for i, cur_pos in pairs(positions) do
check_node_subp(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, cur_pos, machines, tier, sw_pos, i == 3, network_id) check_node_subp(PR_nodes, RE_nodes, BA_nodes, SP_nodes, all_nodes, cur_pos, machines, tier, sw_pos, i == 3, network_id)
@ -201,8 +206,14 @@ local get_network = function(sw_pos, pos1, tier)
i, technic.machines[tier], tier, sw_pos, minetest.hash_node_position(pos1)) i, technic.machines[tier], tier, sw_pos, minetest.hash_node_position(pos1))
i = i + 1 i = i + 1
until all_nodes[i] == nil until all_nodes[i] == nil
technic.networks[minetest.hash_node_position(pos1)] = {tier = tier, PR_nodes = PR_nodes, technic.networks[minetest.hash_node_position(pos1)] = {
RE_nodes = RE_nodes, BA_nodes = BA_nodes, SP_nodes = SP_nodes, all_nodes = all_nodes} tier = tier,
PR_nodes = PR_nodes,
RE_nodes = RE_nodes,
BA_nodes = BA_nodes,
SP_nodes = SP_nodes,
all_nodes = all_nodes
}
return PR_nodes, BA_nodes, RE_nodes return PR_nodes, BA_nodes, RE_nodes
end end
@ -417,7 +428,6 @@ minetest.register_abm({
meta1 = minetest.get_meta(pos1) meta1 = minetest.get_meta(pos1)
meta1:set_int(eu_input_str, 0) meta1:set_int(eu_input_str, 0)
end end
end, end,
}) })
@ -435,6 +445,7 @@ local function switching_station_timeout_count(pos, tier)
return false return false
end end
end end
minetest.register_abm({ minetest.register_abm({
nodenames = { "group:technic_machine" }, nodenames = { "group:technic_machine" },
interval = 1, interval = 1,

View File

@ -383,7 +383,8 @@ for _, state in pairs({"flowing", "source"}) do
minetest.register_node("technic:corium_" .. state, { minetest.register_node("technic:corium_" .. state, {
description = S(state == "source" and "Corium Source" or "Flowing Corium"), description = S(state == "source" and "Corium Source" or "Flowing Corium"),
drawtype = (state == "source" and "liquid" or "flowingliquid"), drawtype = (state == "source" and "liquid" or "flowingliquid"),
[state == "source" and "tiles" or "special_tiles"] = {{ [state == "source" and "tiles" or "special_tiles"] = {
{
name = "technic_corium_" .. state .. "_animated.png", name = "technic_corium_" .. state .. "_animated.png",
animation = { animation = {
type = "vertical_frames", type = "vertical_frames",
@ -391,7 +392,8 @@ for _, state in pairs({"flowing", "source"}) do
aspect_h = 16, aspect_h = 16,
length = 3.0, length = 3.0,
}, },
}}, }
},
paramtype = "light", paramtype = "light",
paramtype2 = (state == "flowing" and "flowingliquid" or nil), paramtype2 = (state == "flowing" and "flowingliquid" or nil),
light_source = (state == "source" and 8 or 5), light_source = (state == "source" and 8 or 5),
@ -419,13 +421,11 @@ for _, state in pairs({"flowing", "source"}) do
end end
if rawget(_G, "bucket") and bucket.register_liquid then if rawget(_G, "bucket") and bucket.register_liquid then
bucket.register_liquid( bucket.register_liquid("technic:corium_source",
"technic:corium_source",
"technic:corium_flowing", "technic:corium_flowing",
"technic:bucket_corium", "technic:bucket_corium",
"technic_bucket_corium.png", "technic_bucket_corium.png",
"Corium Bucket" "Corium Bucket")
)
end end
minetest.register_node("technic:chernobylite_block", { minetest.register_node("technic:chernobylite_block", {

View File

@ -299,8 +299,11 @@ end
local function chainsaw_dig(pos, current_charge) local function chainsaw_dig(pos, current_charge)
-- Start sawing things down -- Start sawing things down
local remaining_charge = recursive_dig(pos, current_charge) local remaining_charge = recursive_dig(pos, current_charge)
minetest.sound_play("chainsaw", {pos = pos, gain = 1.0, minetest.sound_play("chainsaw", {
max_hear_distance = 10}) pos = pos,
gain = 1.0,
max_hear_distance = 10
})
-- Now drop items for the player -- Now drop items for the player
for name, stack in pairs(produced) do for name, stack in pairs(produced) do

View File

@ -1,4 +1,3 @@
local S = technic.getter local S = technic.getter
local mesecons_materials = minetest.get_modpath("mesecons_materials") local mesecons_materials = minetest.get_modpath("mesecons_materials")

View File

@ -1,8 +1,18 @@
technic.chests.groups = {
technic.chests.groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, snappy = 2,
tubedevice=1, tubedevice_receiver=1} choppy = 2,
technic.chests.groups_noinv = {snappy=2, choppy=2, oddly_breakable_by_hand=2, oddly_breakable_by_hand = 2,
tubedevice=1, tubedevice_receiver=1, not_in_creative_inventory=1} tubedevice = 1,
tubedevice_receiver = 1
}
technic.chests.groups_noinv = {
snappy = 2,
choppy = 2,
oddly_breakable_by_hand = 2,
tubedevice = 1,
tubedevice_receiver = 1,
not_in_creative_inventory = 1
}
technic.chests.tube = { technic.chests.tube = {
insert_object = function(pos, node, stack, direction) insert_object = function(pos, node, stack, direction)
@ -35,9 +45,11 @@ end
function technic.chests.inv_move(pos, from_list, from_index, to_list, to_index, count, player) function technic.chests.inv_move(pos, from_list, from_index, to_list, to_index, count, player)
return inv_change(pos, count, player) return inv_change(pos, count, player)
end end
function technic.chests.inv_put(pos, listname, index, stack, player) function technic.chests.inv_put(pos, listname, index, stack, player)
return inv_change(pos, stack:get_count(), player) return inv_change(pos, stack:get_count(), player)
end end
function technic.chests.inv_take(pos, listname, index, stack, player) function technic.chests.inv_take(pos, listname, index, stack, player)
return inv_change(pos, stack:get_count(), player) return inv_change(pos, stack:get_count(), player)
end end

View File

@ -1,4 +1,3 @@
local material_list local material_list
if minetest.get_modpath("moreores") then if minetest.get_modpath("moreores") then
material_list = { 'silver' } material_list = { 'silver' }

View File

@ -223,8 +223,7 @@ function technic.chests:definition(name, data)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "") meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", meta:set_string("infotext",
S("%s Locked Chest (owned by %s)") S("%s Locked Chest (owned by %s)"):format(name, meta:get_string("owner")))
:format(name, meta:get_string("owner")))
pipeworks.after_place(pos) pipeworks.after_place(pos)
end end
table.insert(front, "technic_" .. lname .. "_chest_lock_overlay.png") table.insert(front, "technic_" .. lname .. "_chest_lock_overlay.png")
@ -241,9 +240,11 @@ function technic.chests:definition(name, data)
local def = { local def = {
description = desc, description = desc,
tiles = {"technic_"..lname.."_chest_top.png", "technic_"..lname.."_chest_top.png", tiles = {
"technic_" .. lname .. "_chest_top.png", "technic_" .. lname .. "_chest_top.png",
"technic_" .. lname .. "_chest_side.png", "technic_" .. lname .. "_chest_side.png", "technic_" .. lname .. "_chest_side.png", "technic_" .. lname .. "_chest_side.png",
"technic_"..lname.."_chest_side.png", table.concat(front, "^")}, "technic_" .. lname .. "_chest_side.png", table.concat(front, "^")
},
paramtype2 = "facedir", paramtype2 = "facedir",
groups = self.groups, groups = self.groups,
tube = self.tube, tube = self.tube,
@ -251,7 +252,6 @@ function technic.chests:definition(name, data)
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
after_place_node = locked_after_place, after_place_node = locked_after_place,
after_dig_node = pipeworks.after_dig, after_dig_node = pipeworks.after_dig,
on_construct = function(pos) on_construct = function(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Chest"):format(name)) meta:set_string("infotext", S("%s Chest"):format(name))
@ -331,6 +331,5 @@ function technic.chests:register(name, data)
minetest.register_node(":" .. nn .. postfix, colordef) minetest.register_node(":" .. nn .. postfix, colordef)
end end
end end
end end

View File

@ -1,4 +1,3 @@
local S = technic.worldgen.gettext local S = technic.worldgen.gettext
minetest.register_craftitem(":technic:uranium_lump", { minetest.register_craftitem(":technic:uranium_lump", {

View File

@ -1,4 +1,3 @@
local S = technic.worldgen.gettext local S = technic.worldgen.gettext
minetest.register_node(":technic:mineral_uranium", { minetest.register_node(":technic:mineral_uranium", {

View File

@ -22,19 +22,34 @@ minetest.register_craft({
minetest.register_node(":moretrees:rubber_tree_trunk", { minetest.register_node(":moretrees:rubber_tree_trunk", {
description = S("Rubber Tree"), description = S("Rubber Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png", tiles = {
"technic_rubber_tree_full.png"}, "default_tree_top.png", "default_tree_top.png",
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, "technic_rubber_tree_full.png"
flammable=2}, },
groups = {
tree = 1,
snappy = 1,
choppy = 2,
oddly_breakable_by_hand = 1,
flammable = 2
},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
minetest.register_node(":moretrees:rubber_tree_trunk_empty", { minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
description = S("Rubber Tree"), description = S("Rubber Tree"),
tiles = {"default_tree_top.png", "default_tree_top.png", tiles = {
"technic_rubber_tree_empty.png"}, "default_tree_top.png", "default_tree_top.png",
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1, "technic_rubber_tree_empty.png"
flammable=2, not_in_creative_inventory=1}, },
groups = {
tree = 1,
snappy = 1,
choppy = 2,
oddly_breakable_by_hand = 1,
flammable = 2,
not_in_creative_inventory = 1
},
sounds = default.node_sound_wood_defaults(), sounds = default.node_sound_wood_defaults(),
}) })
@ -46,7 +61,8 @@ minetest.register_node(":moretrees:rubber_tree_leaves", {
groups = { snappy = 3, leafdecay = 3, flammable = 2, leaves = 1 }, groups = { snappy = 3, leafdecay = 3, flammable = 2, leaves = 1 },
drop = { drop = {
max_items = 1, max_items = 1,
items = {{ items = {
{
items = { "moretrees:rubber_tree_sapling" }, items = { "moretrees:rubber_tree_sapling" },
rarity = 20, rarity = 20,
}, },
@ -89,7 +105,8 @@ if technic.config:get_bool("enable_rubber_tree_generation") then
local tmp = { local tmp = {
x = (maxp.x - minp.x) / 2 + minp.x, x = (maxp.x - minp.x) / 2 + minp.x,
y = (maxp.y - minp.y) / 2 + minp.y, y = (maxp.y - minp.y) / 2 + minp.y,
z = (maxp.z - minp.z) / 2 + minp.z} z = (maxp.z - minp.z) / 2 + minp.z
}
local pos = minetest.find_node_near(tmp, maxp.x - minp.x, local pos = minetest.find_node_near(tmp, maxp.x - minp.x,
{ "default:dirt_with_grass" }) { "default:dirt_with_grass" })
if pos ~= nil then if pos ~= nil then

View File

@ -86,8 +86,11 @@ minetest.register_tool("wrench:wrench", {
groupcaps = { groupcaps = {
crumbly = { times = { [2] = 3.00, [3] = 0.70 }, uses = 0, maxlevel = 1 }, crumbly = { times = { [2] = 3.00, [3] = 0.70 }, uses = 0, maxlevel = 1 },
snappy = { times = { [3] = 0.40 }, uses = 0, maxlevel = 1 }, snappy = { times = { [3] = 0.40 }, uses = 0, maxlevel = 1 },
oddly_breakable_by_hand = {times={[1]=7.00,[2]=4.00,[3]=1.40}, oddly_breakable_by_hand = {
uses=0, maxlevel=3} times = { [1] = 7.00, [2] = 4.00, [3] = 1.40 },
uses = 0,
maxlevel = 3
}
}, },
damage_groups = { fleshy = 1 }, damage_groups = { fleshy = 1 },
}, },

View File

@ -30,30 +30,38 @@ wrench.registered_nodes = {
}, },
["default:chest_locked"] = { ["default:chest_locked"] = {
lists = { "main" }, lists = { "main" },
metas = {owner = STRING, metas = {
infotext = STRING}, owner = STRING,
infotext = STRING
},
owned = true, owned = true,
}, },
["default:furnace"] = { ["default:furnace"] = {
lists = { "fuel", "src", "dst" }, lists = { "fuel", "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
fuel_totaltime = FLOAT, fuel_totaltime = FLOAT,
fuel_time = FLOAT, fuel_time = FLOAT,
src_totaltime = FLOAT, src_totaltime = FLOAT,
src_time = FLOAT}, src_time = FLOAT
},
}, },
["default:furnace_active"] = { ["default:furnace_active"] = {
lists = { "fuel", "src", "dst" }, lists = { "fuel", "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
fuel_totaltime = FLOAT, fuel_totaltime = FLOAT,
fuel_time = FLOAT, fuel_time = FLOAT,
src_totaltime = FLOAT, src_totaltime = FLOAT,
src_time = FLOAT}, src_time = FLOAT
},
store_meta_always = true, store_meta_always = true,
}, },
["default:sign_wall"] = { ["default:sign_wall"] = {
metas = {infotext = STRING, metas = {
text = STRING}, infotext = STRING,
text = STRING
},
}, },
} }

View File

@ -1,4 +1,3 @@
local INT, STRING, FLOAT = local INT, STRING, FLOAT =
wrench.META_TYPE_INT, wrench.META_TYPE_INT,
wrench.META_TYPE_STRING, wrench.META_TYPE_STRING,
@ -9,8 +8,10 @@ wrench:register_node("technic:iron_chest", {
}) })
wrench:register_node("technic:iron_locked_chest", { wrench:register_node("technic:iron_locked_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
owner = STRING}, infotext = STRING,
owner = STRING
},
owned = true, owned = true,
}) })
wrench:register_node("technic:copper_chest", { wrench:register_node("technic:copper_chest", {
@ -18,277 +19,345 @@ wrench:register_node("technic:copper_chest", {
}) })
wrench:register_node("technic:copper_locked_chest", { wrench:register_node("technic:copper_locked_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
owner = STRING}, infotext = STRING,
owner = STRING
},
owned = true, owned = true,
}) })
wrench:register_node("technic:silver_chest", { wrench:register_node("technic:silver_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
formspec = STRING}, infotext = STRING,
formspec = STRING
},
}) })
wrench:register_node("technic:silver_locked_chest", { wrench:register_node("technic:silver_locked_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
infotext = STRING,
owner = STRING, owner = STRING,
formspec = STRING}, formspec = STRING
},
owned = true, owned = true,
}) })
wrench:register_node("technic:gold_chest", { wrench:register_node("technic:gold_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
formspec = STRING}, infotext = STRING,
formspec = STRING
},
}) })
wrench:register_node("technic:gold_locked_chest", { wrench:register_node("technic:gold_locked_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
infotext = STRING,
owner = STRING, owner = STRING,
formspec = STRING}, formspec = STRING
},
owned = true, owned = true,
}) })
wrench:register_node("technic:mithril_chest", { wrench:register_node("technic:mithril_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
formspec = STRING}, infotext = STRING,
formspec = STRING
},
}) })
wrench:register_node("technic:mithril_locked_chest", { wrench:register_node("technic:mithril_locked_chest", {
lists = { "main" }, lists = { "main" },
metas = {infotext = STRING, metas = {
infotext = STRING,
owner = STRING, owner = STRING,
formspec = STRING}, formspec = STRING
},
owned = true, owned = true,
}) })
wrench:register_node("technic:lv_electric_furnace", { wrench:register_node("technic:lv_electric_furnace", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:lv_electric_furnace_active", { wrench:register_node("technic:lv_electric_furnace_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_electric_furnace", { wrench:register_node("technic:mv_electric_furnace", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_electric_furnace_active", { wrench:register_node("technic:mv_electric_furnace_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:coal_alloy_furnace", { wrench:register_node("technic:coal_alloy_furnace", {
lists = { "fuel", "src", "dst" }, lists = { "fuel", "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
fuel_totaltime = FLOAT, fuel_totaltime = FLOAT,
fuel_time = FLOAT, fuel_time = FLOAT,
src_totaltime = FLOAT, src_totaltime = FLOAT,
src_time = FLOAT}, src_time = FLOAT
},
}) })
wrench:register_node("technic:coal_alloy_furnace_active", { wrench:register_node("technic:coal_alloy_furnace_active", {
lists = { "fuel", "src", "dst" }, lists = { "fuel", "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
fuel_totaltime = FLOAT, fuel_totaltime = FLOAT,
fuel_time = FLOAT, fuel_time = FLOAT,
src_totaltime = FLOAT, src_totaltime = FLOAT,
src_time = FLOAT}, src_time = FLOAT
},
}) })
wrench:register_node("technic:alloy_furnace", { wrench:register_node("technic:alloy_furnace", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:alloy_furnace_active", { wrench:register_node("technic:alloy_furnace_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_alloy_furnace", { wrench:register_node("technic:mv_alloy_furnace", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_alloy_furnace_active", { wrench:register_node("technic:mv_alloy_furnace_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:tool_workshop", { wrench:register_node("technic:tool_workshop", {
lists = { "src", "upgrade1", "upgrade2" }, lists = { "src", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT}, tube_time = INT
},
}) })
wrench:register_node("technic:grinder", { wrench:register_node("technic:grinder", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:grinder_active", { wrench:register_node("technic:grinder_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_grinder", { wrench:register_node("technic:mv_grinder", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_grinder_active", { wrench:register_node("technic:mv_grinder_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:extractor", { wrench:register_node("technic:extractor", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:extractor_active", { wrench:register_node("technic:extractor_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_extractor", { wrench:register_node("technic:mv_extractor", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_extractor_active", { wrench:register_node("technic:mv_extractor_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:compressor", { wrench:register_node("technic:compressor", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:compressor_active", { wrench:register_node("technic:compressor_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_compressor", { wrench:register_node("technic:mv_compressor", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_compressor_active", { wrench:register_node("technic:mv_compressor_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:cnc", { wrench:register_node("technic:cnc", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT, src_time = INT,
cnc_product = STRING}, cnc_product = STRING
},
}) })
wrench:register_node("technic:cnc_active", { wrench:register_node("technic:cnc_active", {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
LV_EU_demand = INT, LV_EU_demand = INT,
LV_EU_input = INT, LV_EU_input = INT,
src_time = INT, src_time = INT,
cnc_product = STRING}, cnc_product = STRING
},
}) })
wrench:register_node("technic:mv_centrifuge", { wrench:register_node("technic:mv_centrifuge", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
wrench:register_node("technic:mv_centrifuge_active", { wrench:register_node("technic:mv_centrifuge_active", {
lists = { "src", "dst", "upgrade1", "upgrade2" }, lists = { "src", "dst", "upgrade1", "upgrade2" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
MV_EU_demand = INT, MV_EU_demand = INT,
MV_EU_input = INT, MV_EU_input = INT,
tube_time = INT, tube_time = INT,
src_time = INT}, src_time = INT
},
}) })
@ -329,13 +398,15 @@ if minetest.get_modpath("technic") then
for i = 0, 8 do for i = 0, 8 do
wrench:register_node("technic:" .. ltier .. "_battery_box" .. i, { wrench:register_node("technic:" .. ltier .. "_battery_box" .. i, {
lists = { "src", "dst" }, lists = { "src", "dst" },
metas = {infotext = STRING, metas = {
infotext = STRING,
formspec = STRING, formspec = STRING,
[tier .. "_EU_demand"] = INT, [tier .. "_EU_demand"] = INT,
[tier .. "_EU_supply"] = INT, [tier .. "_EU_supply"] = INT,
[tier .. "_EU_input"] = INT, [tier .. "_EU_input"] = INT,
internal_EU_charge = INT, internal_EU_charge = INT,
last_side_shown = INT}, last_side_shown = INT
},
}) })
end end
end end