Merge 4b66e9f447c72bb03074170cfebbe9d411feb9cb into 9755127ffd92b2fc49676fbc6b446403965e005d

This commit is contained in:
Thomas--S 2017-03-29 22:04:51 +00:00 committed by GitHub
commit cc2735739b
99 changed files with 3327 additions and 3110 deletions

View File

@ -26,43 +26,43 @@ end
minetest.register_craft({ minetest.register_craft({
output = 'technic:rebar 6', output = 'technic:rebar 6',
recipe = { recipe = {
{'','', steel_ingot}, { "", "", steel_ingot },
{'',steel_ingot,''}, { "", steel_ingot, "" },
{steel_ingot, '', ''}, { steel_ingot, "", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:concrete 5', output = 'technic:concrete 5',
recipe = { recipe = {
{'default:stone','technic:rebar','default:stone'}, { "default:stone", "technic:rebar", "default:stone" },
{'technic:rebar','default:stone','technic:rebar'}, { "technic:rebar", "default:stone", "technic:rebar" },
{'default:stone','technic:rebar','default:stone'}, { "default:stone", "technic:rebar", "default:stone" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:concrete_post_platform 6', output = 'technic:concrete_post_platform 6',
recipe = { recipe = {
{'technic:concrete','technic:concrete_post','technic:concrete'}, { "technic:concrete", "technic:concrete_post", "technic:concrete" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:concrete_post 12', output = 'technic:concrete_post 12',
recipe = { recipe = {
{'default:stone','technic:rebar','default:stone'}, { "default:stone", "technic:rebar", "default:stone" },
{'default:stone','technic:rebar','default:stone'}, { "default:stone", "technic:rebar", "default:stone" },
{'default:stone','technic:rebar','default:stone'}, { "default:stone", "technic:rebar", "default:stone" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:blast_resistant_concrete 5', output = 'technic:blast_resistant_concrete 5',
recipe = { recipe = {
{'technic:concrete','technic:composite_plate','technic:concrete'}, { "technic:concrete", "technic:composite_plate", "technic:concrete" },
{'technic:composite_plate','technic:concrete','technic:composite_plate'}, { "technic:composite_plate", "technic:concrete", "technic:composite_plate" },
{'technic:concrete','technic:composite_plate','technic:concrete'}, { "technic:concrete", "technic:composite_plate", "technic:concrete" },
} }
}) })

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

@ -4,153 +4,153 @@ local mesecons_materials = minetest.get_modpath("mesecons_materials")
-- tubes crafting recipes -- tubes crafting recipes
minetest.register_craft({ minetest.register_craft({
output = 'pipeworks:accelerator_tube_1', output = "pipeworks:accelerator_tube_1",
recipe = { recipe = {
{'technic:copper_coil', 'pipeworks:tube_1', 'technic:copper_coil'}, { "technic:copper_coil", "pipeworks:tube_1", "technic:copper_coil" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'pipeworks:teleport_tube_1', output = "pipeworks:teleport_tube_1",
recipe = { recipe = {
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'}, { "default:mese_crystal", "technic:copper_coil", "default:mese_crystal" },
{'pipeworks:tube_1', 'technic:control_logic_unit', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:control_logic_unit", "pipeworks:tube_1" },
{'default:mese_crystal', 'technic:copper_coil', 'default:mese_crystal'}, { "default:mese_crystal", "technic:copper_coil", "default:mese_crystal" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:diamond_drill_head', output = "technic:diamond_drill_head",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "default:diamond", "technic:stainless_steel_ingot" },
{'default:diamond', '', 'default:diamond'}, { "default:diamond", "", "default:diamond" },
{'technic:stainless_steel_ingot', 'default:diamond', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "default:diamond", "technic:stainless_steel_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:green_energy_crystal', output = "technic:green_energy_crystal",
recipe = { recipe = {
{'default:gold_ingot', 'technic:battery', 'dye:green'}, { "default:gold_ingot", "technic:battery", "dye:green" },
{'technic:battery', 'technic:red_energy_crystal', 'technic:battery'}, { "technic:battery", "technic:red_energy_crystal", "technic:battery" },
{'dye:green', 'technic:battery', 'default:gold_ingot'}, { "dye:green", "technic:battery", "default:gold_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:blue_energy_crystal', output = "technic:blue_energy_crystal",
recipe = { recipe = {
{'moreores:mithril_ingot', 'technic:battery', 'dye:blue'}, { "moreores:mithril_ingot", "technic:battery", "dye:blue" },
{'technic:battery', 'technic:green_energy_crystal', 'technic:battery'}, { "technic:battery", "technic:green_energy_crystal", "technic:battery" },
{'dye:blue', 'technic:battery', 'moreores:mithril_ingot'}, { "dye:blue", "technic:battery", "moreores:mithril_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:red_energy_crystal', output = "technic:red_energy_crystal",
recipe = { recipe = {
{'moreores:silver_ingot', 'technic:battery', 'dye:red'}, { "moreores:silver_ingot", "technic:battery", "dye:red" },
{'technic:battery', 'default:diamondblock', 'technic:battery'}, { "technic:battery", "default:diamondblock", "technic:battery" },
{'dye:red', 'technic:battery', 'moreores:silver_ingot'}, { "dye:red", "technic:battery", "moreores:silver_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:fine_copper_wire 2', output = 'technic:fine_copper_wire 2',
recipe = { recipe = {
{'', 'default:copper_ingot', ''}, { "", "default:copper_ingot", "" },
{'', 'default:copper_ingot', ''}, { "", "default:copper_ingot", "" },
{'', 'default:copper_ingot', ''}, { "", "default:copper_ingot", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:fine_gold_wire 2', output = 'technic:fine_gold_wire 2',
recipe = { recipe = {
{'', 'default:gold_ingot', ''}, { "", "default:gold_ingot", "" },
{'', 'default:gold_ingot', ''}, { "", "default:gold_ingot", "" },
{'', 'default:gold_ingot', ''}, { "", "default:gold_ingot", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:fine_silver_wire 2', output = 'technic:fine_silver_wire 2',
recipe = { recipe = {
{'', 'moreores:silver_ingot', ''}, { "", "moreores:silver_ingot", "" },
{'', 'moreores:silver_ingot', ''}, { "", "moreores:silver_ingot", "" },
{'', 'moreores:silver_ingot', ''}, { "", "moreores:silver_ingot", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_coil 1', output = 'technic:copper_coil 1',
recipe = { recipe = {
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'}, { "technic:fine_copper_wire", "technic:wrought_iron_ingot", "technic:fine_copper_wire" },
{'technic:wrought_iron_ingot', '', 'technic:wrought_iron_ingot'}, { "technic:wrought_iron_ingot", "", "technic:wrought_iron_ingot" },
{'technic:fine_copper_wire', 'technic:wrought_iron_ingot', 'technic:fine_copper_wire'}, { "technic:fine_copper_wire", "technic:wrought_iron_ingot", "technic:fine_copper_wire" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:motor', output = "technic:motor",
recipe = { recipe = {
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:copper_coil", "technic:carbon_steel_ingot" },
{'technic:carbon_steel_ingot', 'technic:copper_coil', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:copper_coil", "technic:carbon_steel_ingot" },
{'technic:carbon_steel_ingot', 'default:copper_ingot', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "default:copper_ingot", "technic:carbon_steel_ingot" },
} }
}) })
local isolation = mesecons_materials and "mesecons_materials:fiber" or "technic:rubber" local isolation = mesecons_materials and "mesecons_materials:fiber" or "technic:rubber"
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_transformer', output = "technic:lv_transformer",
recipe = { recipe = {
{isolation, 'technic:wrought_iron_ingot', isolation}, { isolation, "technic:wrought_iron_ingot", isolation },
{'technic:copper_coil', 'technic:wrought_iron_ingot', 'technic:copper_coil'}, { "technic:copper_coil", "technic:wrought_iron_ingot", "technic:copper_coil" },
{'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot', 'technic:wrought_iron_ingot'}, { "technic:wrought_iron_ingot", "technic:wrought_iron_ingot", "technic:wrought_iron_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_transformer', output = "technic:mv_transformer",
recipe = { recipe = {
{isolation, 'technic:carbon_steel_ingot', isolation}, { isolation, "technic:carbon_steel_ingot", isolation },
{'technic:copper_coil', 'technic:carbon_steel_ingot', 'technic:copper_coil'}, { "technic:copper_coil", "technic:carbon_steel_ingot", "technic:copper_coil" },
{'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:carbon_steel_ingot", "technic:carbon_steel_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_transformer', output = "technic:hv_transformer",
recipe = { recipe = {
{isolation, 'technic:stainless_steel_ingot', isolation}, { isolation, "technic:stainless_steel_ingot", isolation },
{'technic:copper_coil', 'technic:stainless_steel_ingot', 'technic:copper_coil'}, { "technic:copper_coil", "technic:stainless_steel_ingot", "technic:copper_coil" },
{'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:stainless_steel_ingot", "technic:stainless_steel_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:control_logic_unit', output = "technic:control_logic_unit",
recipe = { recipe = {
{'', 'technic:fine_gold_wire', ''}, { "", "technic:fine_gold_wire", "" },
{'default:copper_ingot', 'technic:silicon_wafer', 'default:copper_ingot'}, { "default:copper_ingot", "technic:silicon_wafer", "default:copper_ingot" },
{'', 'technic:chromium_ingot', ''}, { "", "technic:chromium_ingot", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:mixed_metal_ingot 9', output = 'technic:mixed_metal_ingot 9',
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:stainless_steel_ingot", "technic:stainless_steel_ingot" },
{'default:bronze_ingot', 'default:bronze_ingot', 'default:bronze_ingot'}, { "default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot" },
{'moreores:tin_ingot', 'moreores:tin_ingot', 'moreores:tin_ingot'}, { "moreores:tin_ingot", "moreores:tin_ingot", "moreores:tin_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:carbon_cloth', output = "technic:carbon_cloth",
recipe = { recipe = {
{'technic:graphite', 'technic:graphite', 'technic:graphite'} { "technic:graphite", "technic:graphite", "technic:graphite" }
} }
}) })

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

@ -3,8 +3,8 @@ minetest.register_craft({
output = 'technic:hv_battery_box0', output = 'technic:hv_battery_box0',
recipe = { recipe = {
{ 'technic:mv_battery_box0', 'technic:mv_battery_box0', 'technic:mv_battery_box0' }, { 'technic:mv_battery_box0', 'technic:mv_battery_box0', 'technic:mv_battery_box0' },
{'technic:mv_battery_box0', 'technic:hv_transformer', 'technic:mv_battery_box0'}, { 'technic:mv_battery_box0', "technic:hv_transformer", 'technic:mv_battery_box0' },
{'', 'technic:hv_cable', ''}, { "", "technic:hv_cable", "" },
} }
}) })

View File

@ -1,10 +1,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_cable 3', output = 'technic:hv_cable 3',
recipe = { recipe = {
{'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'}, { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
{'technic:mv_cable', 'technic:mv_cable', 'technic:mv_cable'}, { "technic:mv_cable", "technic:mv_cable", "technic:mv_cable" },
{'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting', 'homedecor:plastic_sheeting'}, { "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
} }
}) })

View File

@ -42,8 +42,7 @@ local function update_forcefield(pos, meta, active, first)
local shape = meta:get_int("shape") local shape = meta:get_int("shape")
local range = meta:get_int("range") local range = meta:get_int("range")
local vm = VoxelManip() local vm = VoxelManip()
local MinEdge, MaxEdge = vm:read_from_map(vector.subtract(pos, range), local MinEdge, MaxEdge = vm:read_from_map(vector.subtract(pos, range), vector.add(pos, range))
vector.add(pos, range))
local area = VoxelArea:new({ MinEdge = MinEdge, MaxEdge = MaxEdge }) local area = VoxelArea:new({ MinEdge = MinEdge, MaxEdge = MaxEdge })
local data = vm:get_data() local data = vm:get_data()
@ -215,8 +214,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)
@ -238,10 +241,11 @@ minetest.register_node("technic:forcefield", {
drawtype = "glasslike", drawtype = "glasslike",
groups = { not_in_creative_inventory = 1 }, groups = { not_in_creative_inventory = 1 },
paramtype = "light", paramtype = "light",
light_source = 15, light_source = LIGHT_MAX,
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 +253,8 @@ minetest.register_node("technic:forcefield", {
aspect_h = 16, aspect_h = 16,
length = 1.0, length = 1.0,
}, },
}}, }
},
}) })

View File

@ -1,11 +1,11 @@
minetest.register_alias("hv_generator", "technic:hv_generator") minetest.register_alias("hv_generator", "technic:hv_generator")
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_generator', output = "technic:hv_generator",
recipe = { recipe = {
{'technic:carbon_plate', 'technic:mv_generator', 'technic:composite_plate'}, { "technic:carbon_plate", "technic:mv_generator", "technic:composite_plate" },
{'pipeworks:tube_1', 'technic:hv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:hv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:hv_cable", "technic:stainless_steel_ingot" },
} }
}) })

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

@ -20,16 +20,15 @@ local reactor_desc = S("@1 Nuclear Reactor Core", S("HV")),
-- FIXME: Recipe should make more sense like a rod recepticle, steam chamber, HV generator? -- FIXME: Recipe should make more sense like a rod recepticle, steam chamber, HV generator?
minetest.register_craft({ minetest.register_craft({
output = 'technic:hv_nuclear_reactor_core', output = "technic:hv_nuclear_reactor_core",
recipe = { recipe = {
{'technic:carbon_plate', 'default:obsidian_glass', 'technic:carbon_plate'}, { "technic:carbon_plate", "default:obsidian_glass", "technic:carbon_plate" },
{'technic:composite_plate', 'technic:machine_casing', 'technic:composite_plate'}, { "technic:composite_plate", "technic:machine_casing", "technic:composite_plate" },
{'technic:stainless_steel_ingot', 'technic:hv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:hv_cable", "technic:stainless_steel_ingot" },
} }
}) })
local reactor_formspec = local reactor_formspec = "invsize[8,9;]"..
"invsize[8,9;]"..
"label[0,0;"..S("Nuclear Reactor Rod Compartment").."]".. "label[0,0;"..S("Nuclear Reactor Rod Compartment").."]"..
"list[current_name;src;2,1;3,2;]".. "list[current_name;src;2,1;3,2;]"..
"list[current_player;main;0,5;8,4;]".. "list[current_player;main;0,5;8,4;]"..
@ -317,13 +316,18 @@ 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",
drawtype = "nodebox", drawtype = "nodebox",
light_source = 14, light_source = LIGHT_MAX,
paramtype = "light", paramtype = "light",
node_box = { node_box = {
type = "fixed", type = "fixed",

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

@ -4,9 +4,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:solar_array_hv 1', output = 'technic:solar_array_hv 1',
recipe = { recipe = {
{'technic:solar_array_mv', 'technic:solar_array_mv', 'technic:solar_array_mv'}, { "technic:solar_array_mv", "technic:solar_array_mv", "technic:solar_array_mv" },
{'technic:carbon_plate', 'technic:hv_transformer', 'technic:composite_plate'}, { "technic:carbon_plate", "technic:hv_transformer", "technic:composite_plate" },
{'', 'technic:hv_cable', ''}, { "", "technic:hv_cable", "" },
} }
}) })

View File

@ -2,11 +2,11 @@
-- FIXME: kpoppel: I'd like to introduce an induction heating element here... -- FIXME: kpoppel: I'd like to introduce an induction heating element here...
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_alloy_furnace', output = "technic:lv_alloy_furnace",
recipe = { recipe = {
{'default:brick', 'default:brick', 'default:brick'}, { "default:brick", "default:brick", "default:brick" },
{'default:brick', 'technic:machine_casing', 'default:brick'}, { "default:brick", "technic:machine_casing", "default:brick" },
{'default:brick', 'technic:lv_cable', 'default:brick'}, { "default:brick", "technic:lv_cable", "default:brick" },
} }
}) })

View File

@ -1,10 +1,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_battery_box0', output = 'technic:lv_battery_box0',
recipe = { recipe = {
{'group:wood', 'group:wood', 'group:wood'}, { "group:wood", "group:wood", "group:wood" },
{'technic:battery', 'technic:machine_casing', 'technic:battery'}, { "technic:battery", "technic:machine_casing", "technic:battery" },
{'technic:battery', 'technic:lv_cable', 'technic:battery'}, { "technic:battery", "technic:lv_cable", "technic:battery" },
} }
}) })

View File

@ -1,12 +1,11 @@
minetest.register_alias("lv_cable", "technic:lv_cable") minetest.register_alias("lv_cable", "technic:lv_cable")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_cable 6', output = 'technic:lv_cable 6',
recipe = { recipe = {
{'default:paper', 'default:paper', 'default:paper'}, { "default:paper", "default:paper", "default:paper" },
{'default:copper_ingot', 'default:copper_ingot', 'default:copper_ingot'}, { "default:copper_ingot", "default:copper_ingot", "default:copper_ingot" },
{'default:paper', 'default:paper', 'default:paper'}, { "default:paper", "default:paper", "default:paper" },
} }
}) })

View File

@ -11,11 +11,11 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:cnc', output = "technic:cnc",
recipe = { recipe = {
{'default:glass', 'technic:diamond_drill_head', 'default:glass'}, { "default:glass", "technic:diamond_drill_head", "default:glass" },
{'technic:control_logic_unit', 'technic:machine_casing', 'technic:motor'}, { "technic:control_logic_unit", "technic:machine_casing", "technic:motor" },
{'technic:carbon_steel_ingot', 'technic:lv_cable', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:lv_cable", "technic:carbon_steel_ingot" },
}, },
}) })
@ -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,12 +1,11 @@
minetest.register_alias("compressor", "technic:lv_compressor") minetest.register_alias("compressor", "technic:lv_compressor")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_compressor', output = "technic:lv_compressor",
recipe = { recipe = {
{'default:stone', 'technic:motor', 'default:stone'}, { "default:stone", "technic:motor", "default:stone" },
{'mesecons:piston', 'technic:machine_casing', 'mesecons:piston'}, { "mesecons:piston", "technic:machine_casing", "mesecons:piston" },
{'technic:fine_silver_wire', 'technic:lv_cable', 'technic:fine_silver_wire'}, { "technic:fine_silver_wire", "technic:lv_cable", "technic:fine_silver_wire" },
} }
}) })

View File

@ -3,11 +3,11 @@
-- FIXME: kpoppel I'd like to introduce an induction heating element here also -- FIXME: kpoppel I'd like to introduce an induction heating element here also
minetest.register_craft({ minetest.register_craft({
output = 'technic:electric_furnace', output = "technic:electric_furnace",
recipe = { recipe = {
{'default:cobble', 'default:cobble', 'default:cobble'}, { "default:cobble", "default:cobble", "default:cobble" },
{'default:cobble', 'technic:machine_casing', 'default:cobble'}, { "default:cobble", "technic:machine_casing", "default:cobble" },
{'default:cobble', 'technic:lv_cable', 'default:cobble'}, { "default:cobble", "technic:lv_cable", "default:cobble" },
} }
}) })

View File

@ -1,12 +1,11 @@
minetest.register_alias("extractor", "technic:lv_extractor") minetest.register_alias("extractor", "technic:lv_extractor")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_extractor', output = "technic:lv_extractor",
recipe = { recipe = {
{'technic:treetap', 'technic:motor', 'technic:treetap'}, { "technic:treetap", "technic:motor", "technic:treetap" },
{'technic:treetap', 'technic:machine_casing', 'technic:treetap'}, { "technic:treetap", "technic:machine_casing", "technic:treetap" },
{'', 'technic:lv_cable', ''}, { "", "technic:lv_cable", "" },
} }
}) })

View File

@ -6,11 +6,11 @@
minetest.register_alias("lv_generator", "technic:lv_generator") minetest.register_alias("lv_generator", "technic:lv_generator")
minetest.register_craft({ minetest.register_craft({
output = 'technic:lv_generator', output = "technic:lv_generator",
recipe = { recipe = {
{'default:stone', 'default:furnace', 'default:stone'}, { "default:stone", "default:furnace", "default:stone" },
{'default:stone', 'technic:machine_casing', 'default:stone'}, { "default:stone", "technic:machine_casing", "default:stone" },
{'default:stone', 'technic:lv_cable', 'default:stone'}, { "default:stone", "technic:lv_cable", "default:stone" },
} }
}) })

View File

@ -8,11 +8,11 @@ minetest.register_alias("geothermal", "technic:geothermal")
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:geothermal', output = "technic:geothermal",
recipe = { recipe = {
{'technic:granite', 'default:diamond', 'technic:granite'}, { "technic:granite", "default:diamond", "technic:granite" },
{'technic:fine_copper_wire', 'technic:machine_casing', 'technic:fine_copper_wire'}, { "technic:fine_copper_wire", "technic:machine_casing", "technic:fine_copper_wire" },
{'technic:granite', 'technic:lv_cable', 'technic:granite'}, { "technic:granite", "technic:lv_cable", "technic:granite" },
} }
}) })
@ -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,11 +1,10 @@
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",
recipe = { recipe = {
{'default:desert_stone', 'default:diamond', 'default:desert_stone'}, { "default:desert_stone", "default:diamond", "default:desert_stone" },
{'default:desert_stone', 'technic:machine_casing', 'default:desert_stone'}, { "default:desert_stone", "technic:machine_casing", "default:desert_stone" },
{'technic:granite', 'technic:lv_cable', 'technic:granite'}, { "technic:granite", "technic:lv_cable", "technic:granite" },
} }
}) })

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

@ -5,11 +5,11 @@ local S = technic.getter
minetest.register_alias("music_player", "technic:music_player") minetest.register_alias("music_player", "technic:music_player")
minetest.register_craft({ minetest.register_craft({
output = 'technic:music_player', output = "technic:music_player",
recipe = { recipe = {
{'technic:chromium_ingot', 'default:diamond', 'technic:chromium_ingot'}, { "technic:chromium_ingot", "default:diamond", "technic:chromium_ingot" },
{'default:diamond', 'technic:machine_casing', 'default:diamond'}, { "default:diamond", "technic:machine_casing", "default:diamond" },
{'default:mossycobble', 'technic:lv_cable', 'default:mossycobble'}, { "default:mossycobble", "technic:lv_cable", "default:mossycobble" },
} }
}) })
@ -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

@ -8,9 +8,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:solar_array_lv 1', output = 'technic:solar_array_lv 1',
recipe = { recipe = {
{'technic:solar_panel', 'technic:solar_panel', 'technic:solar_panel'}, { "technic:solar_panel", "technic:solar_panel", "technic:solar_panel" },
{'technic:carbon_steel_ingot', 'technic:lv_transformer', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:lv_transformer", "technic:carbon_steel_ingot" },
{'', 'technic:lv_cable', ''}, { "", "technic:lv_cable", "" },
} }
}) })

View File

@ -6,11 +6,10 @@ local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:solar_panel', output = "technic:solar_panel",
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

@ -7,11 +7,11 @@ local S = technic.getter
minetest.register_alias("water_mill", "technic:water_mill") minetest.register_alias("water_mill", "technic:water_mill")
minetest.register_craft({ minetest.register_craft({
output = 'technic:water_mill', output = "technic:water_mill",
recipe = { recipe = {
{'technic:marble', 'default:diamond', 'technic:marble'}, { "technic:marble", "default:diamond", "technic:marble" },
{'group:wood', 'technic:machine_casing', 'group:wood'}, { "group:wood", "technic:machine_casing", "group:wood" },
{'technic:marble', 'technic:lv_cable', 'technic:marble'}, { "technic:marble", "technic:lv_cable", "technic:marble" },
} }
}) })
@ -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,11 +1,11 @@
-- MV alloy furnace -- MV alloy furnace
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_alloy_furnace', output = "technic:mv_alloy_furnace",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_alloy_furnace', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_alloy_furnace", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

View File

@ -4,8 +4,8 @@ minetest.register_craft({
output = 'technic:mv_battery_box0', output = 'technic:mv_battery_box0',
recipe = { recipe = {
{ 'technic:lv_battery_box0', 'technic:lv_battery_box0', 'technic:lv_battery_box0' }, { 'technic:lv_battery_box0', 'technic:lv_battery_box0', 'technic:lv_battery_box0' },
{'technic:lv_battery_box0', 'technic:mv_transformer', 'technic:lv_battery_box0'}, { 'technic:lv_battery_box0', "technic:mv_transformer", 'technic:lv_battery_box0' },
{'', 'technic:mv_cable', ''}, { "", "technic:mv_cable", "" },
} }
}) })

View File

@ -1,12 +1,11 @@
minetest.register_alias("mv_cable", "technic:mv_cable") minetest.register_alias("mv_cable", "technic:mv_cable")
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_cable 3', output = 'technic:mv_cable 3',
recipe = { recipe = {
{'technic:rubber', 'technic:rubber', 'technic:rubber'}, { "technic:rubber", "technic:rubber", "technic:rubber" },
{'technic:lv_cable', 'technic:lv_cable', 'technic:lv_cable'}, { "technic:lv_cable", "technic:lv_cable", "technic:lv_cable" },
{'technic:rubber', 'technic:rubber', 'technic:rubber'}, { "technic:rubber", "technic:rubber", "technic:rubber" },
} }
}) })

View File

@ -1,11 +1,11 @@
-- MV compressor -- MV compressor
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_compressor', output = "technic:mv_compressor",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_compressor', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_compressor", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

View File

@ -6,11 +6,11 @@
-- FIXME: kpoppel I'd like to introduce an induction heating element here also -- FIXME: kpoppel I'd like to introduce an induction heating element here also
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_electric_furnace', output = "technic:mv_electric_furnace",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_electric_furnace', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_electric_furnace", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

View File

@ -1,11 +1,11 @@
-- MV extractor -- MV extractor
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_extractor', output = "technic:mv_extractor",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_extractor', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_extractor", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

View File

@ -1,11 +1,11 @@
minetest.register_alias("generator_mv", "technic:generator_mv") minetest.register_alias("generator_mv", "technic:generator_mv")
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_generator', output = "technic:mv_generator",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_generator', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_generator", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

View File

@ -1,11 +1,11 @@
-- MV grinder -- MV grinder
minetest.register_craft({ minetest.register_craft({
output = 'technic:mv_grinder', output = "technic:mv_grinder",
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:lv_grinder', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:lv_grinder", "technic:stainless_steel_ingot" },
{'pipeworks:tube_1', 'technic:mv_transformer', 'pipeworks:tube_1'}, { "pipeworks:tube_1", "technic:mv_transformer", "pipeworks:tube_1" },
{'technic:stainless_steel_ingot', 'technic:mv_cable', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_cable", "technic:stainless_steel_ingot" },
} }
}) })

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

@ -96,7 +96,7 @@ local technic_homedecor_rotate_and_place = function(itemstack, placer, pointed_t
end end
-- Yellow -- Half node -- Yellow -- Half node
minetest.register_node('technic:homedecor_glowlight_half_yellow', { minetest.register_node("technic:homedecor_glowlight_half_yellow", {
description = S("Yellow Glowlight (thick)"), description = S("Yellow Glowlight (thick)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -135,7 +133,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_half_yellow_active', { minetest.register_node("technic:homedecor_glowlight_half_yellow_active", {
description = S("Yellow Glowlight (thick)"), description = S("Yellow Glowlight (thick)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -177,7 +173,7 @@ minetest.register_node('technic:homedecor_glowlight_half_yellow_active', {
}) })
-- Yellow -- Quarter node -- Yellow -- Quarter node
minetest.register_node('technic:homedecor_glowlight_quarter_yellow', { minetest.register_node("technic:homedecor_glowlight_quarter_yellow", {
description = S("Yellow Glowlight (thin)"), description = S("Yellow Glowlight (thin)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -216,7 +210,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', { minetest.register_node("technic:homedecor_glowlight_quarter_yellow_active", {
description = S("Yellow Glowlight (thin)"), description = S("Yellow Glowlight (thin)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -259,7 +251,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_yellow_active', {
-- White -- half node -- White -- half node
minetest.register_node('technic:homedecor_glowlight_half_white', { minetest.register_node("technic:homedecor_glowlight_half_white", {
description = S("White Glowlight (thick)"), description = S("White Glowlight (thick)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -298,7 +288,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_half_white_active', { minetest.register_node("technic:homedecor_glowlight_half_white_active", {
description = S("White Glowlight (thick)"), description = S("White Glowlight (thick)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -340,7 +328,7 @@ minetest.register_node('technic:homedecor_glowlight_half_white_active', {
}) })
-- White -- Quarter node -- White -- Quarter node
minetest.register_node('technic:homedecor_glowlight_quarter_white', { minetest.register_node("technic:homedecor_glowlight_quarter_white", {
description = S("White Glowlight (thin)"), description = S("White Glowlight (thin)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -379,7 +365,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_quarter_white_active', { minetest.register_node("technic:homedecor_glowlight_quarter_white_active", {
description = S("White Glowlight (thin)"), description = S("White Glowlight (thin)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -421,7 +405,7 @@ minetest.register_node('technic:homedecor_glowlight_quarter_white_active', {
}) })
-- Glowlight "cubes" - yellow -- Glowlight "cubes" - yellow
minetest.register_node('technic:homedecor_glowlight_small_cube_yellow', { minetest.register_node("technic:homedecor_glowlight_small_cube_yellow", {
description = S("Yellow Glowlight (small cube)"), description = S("Yellow Glowlight (small cube)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -460,7 +442,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', { minetest.register_node("technic:homedecor_glowlight_small_cube_yellow_active", {
description = S("Yellow Glowlight (small cube)"), description = S("Yellow Glowlight (small cube)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -502,7 +482,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_yellow_active', {
}) })
-- Glowlight "cubes" - white -- Glowlight "cubes" - white
minetest.register_node('technic:homedecor_glowlight_small_cube_white', { minetest.register_node("technic:homedecor_glowlight_small_cube_white", {
description = S("White Glowlight (small cube)"), description = S("White Glowlight (small cube)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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)
@ -541,7 +519,7 @@ minetest.register_node('technic:homedecor_glowlight_small_cube_white', {
end end
}) })
minetest.register_node('technic:homedecor_glowlight_small_cube_white_active', { minetest.register_node("technic:homedecor_glowlight_small_cube_white_active", {
description = S("White Glowlight (small cube)"), description = S("White Glowlight (small cube)"),
drawtype = "nodebox", drawtype = "nodebox",
tiles = { tiles = {
@ -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

@ -16,9 +16,9 @@ local power_radius = 12
minetest.register_craft({ minetest.register_craft({
output = 'technic:power_radiator 1', output = 'technic:power_radiator 1',
recipe = { recipe = {
{'technic:stainless_steel_ingot', 'technic:mv_transformer', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mv_transformer", "technic:stainless_steel_ingot" },
{'technic:copper_coil', 'technic:machine_casing', 'technic:copper_coil'}, { "technic:copper_coil", "technic:machine_casing", "technic:copper_coil" },
{'technic:rubber', 'technic:mv_cable', 'technic:rubber'}, { "technic:rubber", "technic:mv_cable", "technic:rubber" },
} }
}) })
@ -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,10 +1,9 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:solar_array_mv 1', output = 'technic:solar_array_mv 1',
recipe = { recipe = {
{'technic:solar_array_lv', 'technic:solar_array_lv', 'technic:solar_array_lv'}, { "technic:solar_array_lv", "technic:solar_array_lv", "technic:solar_array_lv" },
{'technic:carbon_steel_ingot', 'technic:mv_transformer', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:mv_transformer", "technic:carbon_steel_ingot" },
{'', 'technic:mv_cable', ''}, { "", "technic:mv_cable", "" },
} }
}) })

View File

@ -6,11 +6,11 @@ minetest.register_alias("tool_workshop", "technic:tool_workshop")
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:tool_workshop', output = "technic:tool_workshop",
recipe = { recipe = {
{'group:wood', 'default:diamond', 'group:wood'}, { "group:wood", "default:diamond", "group:wood" },
{'mesecons_pistons:piston_sticky_off', 'technic:machine_casing', 'technic:carbon_cloth'}, { "mesecons_pistons:piston_sticky_off", "technic:machine_casing", "technic:carbon_cloth" },
{'default:obsidian', 'technic:mv_cable', 'default:obsidian'}, { "default:obsidian", "technic:mv_cable", "default:obsidian" },
} }
}) })
@ -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,21 +1,20 @@
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:wind_mill_frame 5', output = 'technic:wind_mill_frame 5',
recipe = { recipe = {
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "", "technic:carbon_steel_ingot" },
{'', 'technic:carbon_steel_ingot', ''}, { "", "technic:carbon_steel_ingot", "" },
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "", "technic:carbon_steel_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:wind_mill', output = "technic:wind_mill",
recipe = { recipe = {
{'', 'technic:motor', ''}, { "", "technic:motor", "" },
{'technic:carbon_steel_ingot', 'technic:carbon_steel_block', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "technic:carbon_steel_block", "technic:carbon_steel_ingot" },
{'', 'technic:mv_cable', ''}, { "", "technic:mv_cable", "" },
} }
}) })

View File

@ -1,14 +1,13 @@
-- Fuel driven alloy furnace. This uses no EUs: -- Fuel driven alloy furnace. This uses no EUs:
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:coal_alloy_furnace', output = "technic:coal_alloy_furnace",
recipe = { recipe = {
{'default:brick', 'default:brick', 'default:brick'}, { "default:brick", "default:brick", "default:brick" },
{'default:brick', '', 'default:brick'}, { "default:brick", "", "default:brick" },
{'default:brick', 'default:brick', 'default:brick'}, { "default:brick", "default:brick", "default:brick" },
} }
}) })
@ -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)
@ -67,21 +66,18 @@ end
minetest.register_craft({ 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 } },
@ -873,56 +868,56 @@ minetest.register_node("technic:template_motor",{
-- Crafts -- Crafts
minetest.register_craft({ minetest.register_craft({
output = 'technic:frame_111111', output = "technic:frame_111111",
recipe = { recipe = {
{'', 'default:stick', ''}, { "", "default:stick", "" },
{'default:stick', 'technic:brass_ingot', 'default:stick'}, { "default:stick", "technic:brass_ingot", "default:stick" },
{'', 'default:stick', ''}, { "", "default:stick", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:frame_motor', output = "technic:frame_motor",
recipe = { recipe = {
{'', 'technic:frame_111111', ''}, { "", "technic:frame_111111", "" },
{'group:mesecon_conductor_craftable', 'technic:motor', 'group:mesecon_conductor_craftable'}, { "group:mesecon_conductor_craftable", "technic:motor", "group:mesecon_conductor_craftable" },
{'', 'technic:frame_111111', ''}, { "", "technic:frame_111111", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:template 10', output = 'technic:template 10',
recipe = { recipe = {
{'', 'technic:brass_ingot', ''}, { "", "technic:brass_ingot", "" },
{'technic:brass_ingot', 'default:mese_crystal', 'technic:brass_ingot'}, { "technic:brass_ingot", "default:mese_crystal", "technic:brass_ingot" },
{'', 'technic:brass_ingot', ''}, { "", "technic:brass_ingot", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:template_replacer', output = "technic:template_replacer",
recipe = {{'technic:template'}} recipe = { { "technic:template" } }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:template', output = "technic:template",
recipe = {{'technic:template_replacer'}} recipe = { { "technic:template_replacer" } }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:template_motor', output = "technic:template_motor",
recipe = { recipe = {
{'', 'technic:template', ''}, { "", "technic:template", "" },
{'group:mesecon_conductor_craftable', 'technic:motor', 'group:mesecon_conductor_craftable'}, { "group:mesecon_conductor_craftable", "technic:motor", "group:mesecon_conductor_craftable" },
{'', 'technic:template', ''}, { "", "technic:template", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:template_tool', output = "technic:template_tool",
recipe = { recipe = {
{'', 'technic:template', ''}, { "", "technic:template", "" },
{'default:mese_crystal', 'default:stick', 'default:mese_crystal'}, { "default:mese_crystal", "default:stick", "default:mese_crystal" },
{'', 'default:stick', ''}, { "", "default:stick", "" },
} }
}) })

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,15 +35,14 @@ local function inject_items (pos)
end end
end end
end end
end end
minetest.register_craft({ minetest.register_craft({
output = 'technic:injector 1', output = 'technic:injector 1',
recipe = { recipe = {
{'', 'technic:control_logic_unit',''}, { "", "technic:control_logic_unit", "" },
{'', 'default:chest',''}, { "", "default:chest", "" },
{'', 'pipeworks:tube_1',''}, { "", "pipeworks:tube_1", "" },
} }
}) })
@ -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)
@ -7,11 +6,11 @@ technic.register_power_tool("technic:green_energy_crystal", 150000)
technic.register_power_tool("technic:blue_energy_crystal", 450000) technic.register_power_tool("technic:blue_energy_crystal", 450000)
minetest.register_craft({ minetest.register_craft({
output = 'technic:battery', output = "technic:battery",
recipe = { recipe = {
{'group:wood', 'default:copper_ingot', 'group:wood'}, { "group:wood", "default:copper_ingot", "group:wood" },
{'group:wood', 'moreores:tin_ingot', 'group:wood'}, { "group:wood", "moreores:tin_ingot", "group:wood" },
{'group:wood', 'default:copper_ingot', 'group:wood'}, { "group:wood", "default:copper_ingot", "group:wood" },
} }
}) })
@ -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") })
@ -23,8 +22,8 @@ local recipes = {
minetest.register_craft({ minetest.register_craft({
output = "default:sand 0", output = "default:sand 0",
recipe = { recipe = {
{'group:sand', 'group:sand'}, { "group:sand", "group:sand" },
{'group:sand', 'group:sand'} { "group:sand", "group:sand" }
}, },
}) })

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") })
@ -33,7 +32,7 @@ local recipes = {
minetest.register_craft({ minetest.register_craft({
output = "default:sandstone 0", output = "default:sandstone 0",
recipe = { recipe = {
{'default:sandstone'} { "default:sandstone" }
}, },
}) })
@ -65,14 +64,14 @@ end
-- defuse common grinder unfriendly recipes -- defuse common grinder unfriendly recipes
if minetest.get_modpath("fake_fire") then -- from homedecor_modpack if minetest.get_modpath("fake_fire") then -- from homedecor_modpack
minetest.register_craft({ output='default:cobble 0', recipe={{'default:cobble'}}}) minetest.register_craft({ output = 'default:cobble 0', recipe = { { "default:cobble" } } })
minetest.register_craft({ output='default:gravel 0', recipe={{'default:gravel'}}}) minetest.register_craft({ output = 'default:gravel 0', recipe = { { "default:gravel" } } })
end end
-- dusts -- dusts
local function register_dust(name, ingot) local function register_dust(name, ingot)
local lname = string.lower(name) local lname = string.lower(name)
lname = string.gsub(lname, ' ', '_') lname = string.gsub(lname, ' ', "_")
minetest.register_craftitem("technic:"..lname.."_dust", { minetest.register_craftitem("technic:"..lname.."_dust", {
description = S("%s Dust"):format(S(name)), description = S("%s Dust"):format(S(name)),
inventory_image = "technic_"..lname.."_dust.png", inventory_image = "technic_"..lname.."_dust.png",
@ -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

@ -15,7 +15,7 @@ technic.register_compressor_recipe({ input = {sawdust .. " 4"}, output = "defaul
-- tree/wood grindings -- tree/wood grindings
local function register_tree_grinding(name, tree, wood, extract, grinding_color) local function register_tree_grinding(name, tree, wood, extract, grinding_color)
local lname = string.lower(name) local lname = string.lower(name)
lname = string.gsub(lname, ' ', '_') lname = string.gsub(lname, ' ', "_")
local grindings_name = "technic:"..lname.."_grindings" local grindings_name = "technic:"..lname.."_grindings"
local inventory_image = "technic_"..lname.."_grindings.png" local inventory_image = "technic_"..lname.."_grindings.png"
if grinding_color then if grinding_color then

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,
@ -134,9 +140,9 @@ minetest.register_node("technic:supply_converter", {
minetest.register_craft({ minetest.register_craft({
output = 'technic:supply_converter 1', output = 'technic:supply_converter 1',
recipe = { recipe = {
{'technic:fine_gold_wire', 'technic:rubber', 'technic:doped_silicon_wafer'}, { "technic:fine_gold_wire", "technic:rubber", "technic:doped_silicon_wafer" },
{'technic:mv_transformer', 'technic:machine_casing', 'technic:lv_transformer'}, { "technic:mv_transformer", "technic:machine_casing", "technic:lv_transformer" },
{'technic:mv_cable', 'technic:rubber', 'technic:lv_cable'}, { "technic:mv_cable", "technic:rubber", "technic:lv_cable" },
} }
}) })

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

@ -89,9 +89,9 @@ technic.register_can({
minetest.register_craft({ minetest.register_craft({
output = 'technic:water_can 1', output = 'technic:water_can 1',
recipe = { recipe = {
{'technic:zinc_ingot', 'technic:rubber','technic:zinc_ingot'}, { "technic:zinc_ingot", "technic:rubber", "technic:zinc_ingot" },
{'technic:carbon_steel_ingot', '', 'technic:carbon_steel_ingot'}, { "technic:carbon_steel_ingot", "", "technic:carbon_steel_ingot" },
{'technic:zinc_ingot', 'technic:carbon_steel_ingot', 'technic:zinc_ingot'}, { "technic:zinc_ingot", "technic:carbon_steel_ingot", "technic:zinc_ingot" },
} }
}) })
@ -107,8 +107,8 @@ technic.register_can({
minetest.register_craft({ minetest.register_craft({
output = 'technic:lava_can 1', output = 'technic:lava_can 1',
recipe = { recipe = {
{'technic:zinc_ingot', 'technic:stainless_steel_ingot','technic:zinc_ingot'}, { "technic:zinc_ingot", "technic:stainless_steel_ingot", "technic:zinc_ingot" },
{'technic:stainless_steel_ingot', '', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "", "technic:stainless_steel_ingot" },
{'technic:zinc_ingot', 'technic:stainless_steel_ingot', 'technic:zinc_ingot'}, { "technic:zinc_ingot", "technic:stainless_steel_ingot", "technic:zinc_ingot" },
} }
}) })

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

@ -4,36 +4,36 @@ local power_usage_per_node = {200, 500, 800}
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:mining_drill', output = "technic:mining_drill",
recipe = { recipe = {
{'moreores:tin_ingot', 'technic:diamond_drill_head', 'moreores:tin_ingot'}, { "moreores:tin_ingot", "technic:diamond_drill_head", "moreores:tin_ingot" },
{'technic:stainless_steel_ingot', 'technic:motor', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:motor", "technic:stainless_steel_ingot" },
{'', 'technic:red_energy_crystal', 'default:copper_ingot'}, { "", "technic:red_energy_crystal", "default:copper_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:mining_drill_mk2', output = "technic:mining_drill_mk2",
recipe = { recipe = {
{'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, { "technic:diamond_drill_head", "technic:diamond_drill_head", "technic:diamond_drill_head" },
{'technic:stainless_steel_ingot', 'technic:mining_drill', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mining_drill", "technic:stainless_steel_ingot" },
{'', 'technic:green_energy_crystal', ''}, { "", "technic:green_energy_crystal", "" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:mining_drill_mk3', output = "technic:mining_drill_mk3",
recipe = { recipe = {
{'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, { "technic:diamond_drill_head", "technic:diamond_drill_head", "technic:diamond_drill_head" },
{'technic:stainless_steel_ingot', 'technic:mining_drill_mk2', 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mining_drill_mk2", "technic:stainless_steel_ingot" },
{'', 'technic:blue_energy_crystal', ''}, { "", "technic:blue_energy_crystal", "" },
} }
}) })
for i = 1, 4 do for i = 1, 4 do
minetest.register_craft({ minetest.register_craft({
output = 'technic:mining_drill_mk3', output = "technic:mining_drill_mk3",
recipe = { recipe = {
{'technic:diamond_drill_head', 'technic:diamond_drill_head', 'technic:diamond_drill_head'}, { "technic:diamond_drill_head", "technic:diamond_drill_head", "technic:diamond_drill_head" },
{'technic:stainless_steel_ingot', 'technic:mining_drill_mk2_'..i, 'technic:stainless_steel_ingot'}, { "technic:stainless_steel_ingot", "technic:mining_drill_mk2_"..i, "technic:stainless_steel_ingot" },
{'', 'technic:blue_energy_crystal', ''}, { "", "technic:blue_energy_crystal", "" },
} }
}) })
end end

View File

@ -8,27 +8,27 @@ local mining_lasers_list = {
local S = technic.getter local S = technic.getter
minetest.register_craft({ minetest.register_craft({
output = 'technic:laser_mk1', output = "technic:laser_mk1",
recipe = { recipe = {
{'default:diamond', 'technic:brass_ingot', 'default:obsidian_glass'}, { "default:diamond", "technic:brass_ingot", "default:obsidian_glass" },
{'', 'technic:brass_ingot', 'technic:red_energy_crystal'}, { "", "technic:brass_ingot", "technic:red_energy_crystal" },
{'', '', 'default:copper_ingot'}, { "", "", "default:copper_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:laser_mk2', output = "technic:laser_mk2",
recipe = { recipe = {
{'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk1'}, { "default:diamond", "technic:carbon_steel_ingot", "technic:laser_mk1" },
{'', 'technic:carbon_steel_ingot', 'technic:green_energy_crystal'}, { "", "technic:carbon_steel_ingot", "technic:green_energy_crystal" },
{'', '', 'default:copper_ingot'}, { "", "", "default:copper_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:laser_mk3', output = "technic:laser_mk3",
recipe = { recipe = {
{'default:diamond', 'technic:carbon_steel_ingot', 'technic:laser_mk2'}, { "default:diamond", "technic:carbon_steel_ingot", "technic:laser_mk2" },
{'', 'technic:carbon_steel_ingot', 'technic:blue_energy_crystal'}, { "", "technic:carbon_steel_ingot", "technic:blue_energy_crystal" },
{'', '', 'default:copper_ingot'}, { "", "", "default:copper_ingot" },
} }
}) })

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

@ -52,10 +52,10 @@ minetest.register_tool("technic:vacuum", {
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:vacuum', output = "technic:vacuum",
recipe = { recipe = {
{'pipeworks:tube_1', 'pipeworks:filter', 'technic:battery'}, { "pipeworks:tube_1", "pipeworks:filter", "technic:battery" },
{'pipeworks:tube_1', 'technic:motor', 'technic:battery'}, { "pipeworks:tube_1", "technic:motor", "technic:battery" },
{'technic:stainless_steel_ingot', '', ''}, { "technic:stainless_steel_ingot", "", "" },
} }
}) })

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,26 +1,26 @@
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_chest 1', output = 'technic:copper_chest 1',
recipe = { recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, { "default:copper_ingot", "default:copper_ingot", "default:copper_ingot" },
{'default:copper_ingot','technic:iron_chest','default:copper_ingot'}, { "default:copper_ingot", "technic:iron_chest", "default:copper_ingot" },
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, { "default:copper_ingot", "default:copper_ingot", "default:copper_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_locked_chest 1', output = 'technic:copper_locked_chest 1',
recipe = { recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, { "default:copper_ingot", "default:copper_ingot", "default:copper_ingot" },
{'default:copper_ingot','technic:iron_locked_chest','default:copper_ingot'}, { "default:copper_ingot", "technic:iron_locked_chest", "default:copper_ingot" },
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'}, { "default:copper_ingot", "default:copper_ingot", "default:copper_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:copper_locked_chest 1', output = 'technic:copper_locked_chest 1',
recipe = { recipe = {
{'default:steel_ingot'}, { "default:steel_ingot" },
{'technic:copper_chest'}, { "technic:copper_chest" },
} }
}) })

View File

@ -1,37 +1,36 @@
local material_list local material_list
if minetest.get_modpath("moreores") then if minetest.get_modpath("moreores") then
material_list = { 'silver' } material_list = { "silver" }
else else
-- Make the gold chest obtainable for mere mortals (the silver chest is not obtainable) -- Make the gold chest obtainable for mere mortals (the silver chest is not obtainable)
material_list = { 'copper', 'silver' } material_list = { "copper", "silver" }
end end
for _, material in ipairs(material_list) do for _, material in ipairs(material_list) do
minetest.register_craft({ minetest.register_craft({
output = 'technic:gold_chest', output = "technic:gold_chest",
recipe = { recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, { "default:gold_ingot", "default:gold_ingot", "default:gold_ingot" },
{'default:gold_ingot',"technic:"..material.."_chest",'default:gold_ingot'}, { "default:gold_ingot", "technic:"..material.."_chest", "default:gold_ingot" },
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, { "default:gold_ingot", "default:gold_ingot", "default:gold_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:gold_locked_chest', output = "technic:gold_locked_chest",
recipe = { recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, { "default:gold_ingot", "default:gold_ingot", "default:gold_ingot" },
{'default:gold_ingot',"technic:"..material.."_locked_chest",'default:gold_ingot'}, { "default:gold_ingot", "technic:"..material.."_locked_chest", "default:gold_ingot" },
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'}, { "default:gold_ingot", "default:gold_ingot", "default:gold_ingot" },
} }
}) })
end end
minetest.register_craft({ minetest.register_craft({
output = 'technic:gold_locked_chest', output = "technic:gold_locked_chest",
recipe = { recipe = {
{'default:steel_ingot'}, { "default:steel_ingot" },
{'technic:gold_chest'}, { "technic:gold_chest" },
} }
}) })

View File

@ -9,7 +9,7 @@ minetest.register_craft({
output = 'technic:iron_chest 1', output = 'technic:iron_chest 1',
recipe = { recipe = {
{ cast_iron_ingot, cast_iron_ingot, cast_iron_ingot }, { cast_iron_ingot, cast_iron_ingot, cast_iron_ingot },
{cast_iron_ingot,'default:chest',cast_iron_ingot}, { cast_iron_ingot, "default:chest", cast_iron_ingot },
{ cast_iron_ingot, cast_iron_ingot, cast_iron_ingot }, { cast_iron_ingot, cast_iron_ingot, cast_iron_ingot },
} }
}) })
@ -18,7 +18,7 @@ minetest.register_craft({
output = 'technic:iron_locked_chest 1', output = 'technic:iron_locked_chest 1',
recipe = { recipe = {
{ cast_iron_ingot, cast_iron_ingot, cast_iron_ingot }, { cast_iron_ingot, cast_iron_ingot, cast_iron_ingot },
{cast_iron_ingot,'default:chest_locked',cast_iron_ingot}, { cast_iron_ingot, "default:chest_locked", cast_iron_ingot },
{ cast_iron_ingot, cast_iron_ingot, cast_iron_ingot }, { cast_iron_ingot, cast_iron_ingot, cast_iron_ingot },
} }
}) })
@ -26,8 +26,8 @@ minetest.register_craft({
minetest.register_craft({ minetest.register_craft({
output = 'technic:iron_locked_chest 1', output = 'technic:iron_locked_chest 1',
recipe = { recipe = {
{'default:steel_ingot'}, { "default:steel_ingot" },
{'technic:iron_chest'}, { "technic:iron_chest" },
} }
}) })

View File

@ -2,18 +2,18 @@ if minetest.get_modpath("moreores") then
minetest.register_craft({ minetest.register_craft({
output = 'technic:mithril_chest 1', output = 'technic:mithril_chest 1',
recipe = { recipe = {
{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "moreores:mithril_ingot", "moreores:mithril_ingot" },
{'moreores:mithril_ingot','technic:gold_chest','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "technic:gold_chest", "moreores:mithril_ingot" },
{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "moreores:mithril_ingot", "moreores:mithril_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:mithril_locked_chest 1', output = 'technic:mithril_locked_chest 1',
recipe = { recipe = {
{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "moreores:mithril_ingot", "moreores:mithril_ingot" },
{'moreores:mithril_ingot','technic:gold_locked_chest','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "technic:gold_locked_chest", "moreores:mithril_ingot" },
{'moreores:mithril_ingot','moreores:mithril_ingot','moreores:mithril_ingot'}, { "moreores:mithril_ingot", "moreores:mithril_ingot", "moreores:mithril_ingot" },
} }
}) })
end end
@ -21,8 +21,8 @@ end
minetest.register_craft({ minetest.register_craft({
output = 'technic:mithril_locked_chest 1', output = 'technic:mithril_locked_chest 1',
recipe = { recipe = {
{'default:steel_ingot'}, { "default:steel_ingot" },
{'technic:mithril_chest'}, { "technic:mithril_chest" },
} }
}) })

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,28 +1,28 @@
if minetest.get_modpath("moreores") then if minetest.get_modpath("moreores") then
minetest.register_craft({ minetest.register_craft({
output = 'technic:silver_chest', output = "technic:silver_chest",
recipe = { recipe = {
{'moreores:silver_ingot','moreores:silver_ingot','moreores:silver_ingot'}, { "moreores:silver_ingot", "moreores:silver_ingot", "moreores:silver_ingot" },
{'moreores:silver_ingot','technic:copper_chest','moreores:silver_ingot'}, { "moreores:silver_ingot", "technic:copper_chest", "moreores:silver_ingot" },
{'moreores:silver_ingot','moreores:silver_ingot','moreores:silver_ingot'}, { "moreores:silver_ingot", "moreores:silver_ingot", "moreores:silver_ingot" },
} }
}) })
minetest.register_craft({ minetest.register_craft({
output = 'technic:silver_locked_chest', output = "technic:silver_locked_chest",
recipe = { recipe = {
{'moreores:silver_ingot','moreores:silver_ingot','moreores:silver_ingot'}, { "moreores:silver_ingot", "moreores:silver_ingot", "moreores:silver_ingot" },
{'moreores:silver_ingot','technic:copper_locked_chest','moreores:silver_ingot'}, { "moreores:silver_ingot", "technic:copper_locked_chest", "moreores:silver_ingot" },
{'moreores:silver_ingot','moreores:silver_ingot','moreores:silver_ingot'}, { "moreores:silver_ingot", "moreores:silver_ingot", "moreores:silver_ingot" },
} }
}) })
end end
minetest.register_craft({ minetest.register_craft({
output = 'technic:silver_locked_chest', output = "technic:silver_locked_chest",
recipe = { recipe = {
{'default:steel_ingot'}, { "default:steel_ingot" },
{'technic:silver_chest'}, { "technic:silver_chest" },
} }
}) })

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", {
@ -103,45 +102,45 @@ register_block("technic:carbon_steel_block", "technic:carbon_steel_ingot")
register_block("technic:stainless_steel_block", "technic:stainless_steel_ingot") register_block("technic:stainless_steel_block", "technic:stainless_steel_ingot")
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:zinc_lump", recipe = "technic:zinc_lump",
output = "technic:zinc_ingot", output = "technic:zinc_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:chromium_lump", recipe = "technic:chromium_lump",
output = "technic:chromium_ingot", output = "technic:chromium_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:uranium_lump", recipe = "technic:uranium_lump",
output = "technic:uranium_ingot", output = "technic:uranium_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:lead_lump", recipe = "technic:lead_lump",
output = "technic:lead_ingot", output = "technic:lead_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = minetest.registered_aliases["technic:wrought_iron_ingot"], recipe = minetest.registered_aliases["technic:wrought_iron_ingot"],
output = "technic:cast_iron_ingot", output = "technic:cast_iron_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:cast_iron_ingot", recipe = "technic:cast_iron_ingot",
cooktime = 2, cooktime = 2,
output = "technic:wrought_iron_ingot", output = "technic:wrought_iron_ingot",
}) })
minetest.register_craft({ minetest.register_craft({
type = 'cooking', type = "cooking",
recipe = "technic:carbon_steel_ingot", recipe = "technic:carbon_steel_ingot",
cooktime = 2, cooktime = 2,
output = "technic:wrought_iron_ingot", output = "technic:wrought_iron_ingot",

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", {
@ -144,8 +143,8 @@ minetest.register_node(":technic:brass_block", {
minetest.register_craft({ minetest.register_craft({
output = 'technic:marble_bricks 4', output = 'technic:marble_bricks 4',
recipe = { recipe = {
{'technic:marble','technic:marble'}, { "technic:marble", "technic:marble" },
{'technic:marble','technic:marble'} { "technic:marble", "technic:marble" }
} }
}) })

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,297 +19,365 @@ 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
},
}) })
local chest_mark_colors = { local chest_mark_colors = {
'_black', "_black",
'_blue', "_blue",
'_brown', "_brown",
'_cyan', "_cyan",
'_dark_green', "_dark_green",
'_dark_grey', "_dark_grey",
'_green', "_green",
'_grey', "_grey",
'_magenta', "_magenta",
'_orange', "_orange",
'_pink', "_pink",
'_red', "_red",
'_violet', "_violet",
'_white', "_white",
'_yellow', "_yellow",
'', "",
} }
for i = 1, 15 do for i = 1, 15 do
@ -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