update pipeworks and technic
@ -196,6 +196,19 @@ local function punch_filter(data, filtpos, filtnode, msg)
|
||||
["technic:tool_workshop"] = "src",
|
||||
}
|
||||
|
||||
-- make sure there's something appropriate to inject the item into
|
||||
local todir = pipeworks.facedir_to_right_dir(filtnode.param2)
|
||||
local topos = vector.add(filtpos, todir)
|
||||
local tonode = minetest.get_node(topos)
|
||||
local todef = minetest.registered_nodes[tonode.name]
|
||||
|
||||
if not todef
|
||||
or not (minetest.get_item_group(tonode.name, "tube") == 1
|
||||
or minetest.get_item_group(tonode.name, "tubedevice") == 1
|
||||
or minetest.get_item_group(tonode.name, "tubedevice_receiver") == 1) then
|
||||
return
|
||||
end
|
||||
|
||||
if fromtube then fromtube.input_inventory = input_special_cases[fromnode.name] or fromtube.input_inventory end
|
||||
if not (fromtube and fromtube.input_inventory) then return end
|
||||
|
||||
|
@ -111,7 +111,7 @@ local function update_meta(meta, can_receive)
|
||||
meta:set_string("formspec","size[8.6,2.2]"..
|
||||
"field[0.6,0.6;7,1;channel;Channel:;${channel}]"..
|
||||
"label[7.3,0;Receive]"..
|
||||
"image_button[7.3,0.3;1,1;pipeworks_button_" .. cr_state .. ".png;cr" .. (can_receive and 0 or 1) .. ";;;false;pipeworks_button_interm.png]"..
|
||||
"image_button[7.3,0.3;1,0.6;pipeworks_button_" .. cr_state .. ".png;cr" .. (can_receive and 0 or 1) .. ";;;false;pipeworks_button_interm.png]"..
|
||||
"image[0.3,1.3;1,1;pipeworks_teleport_tube_inv.png]"..
|
||||
"label[1.6,1.2;channels are public by default]" ..
|
||||
"label[1.6,1.5;use <player>:<channel> for fully private channels]" ..
|
||||
|
@ -1,6 +1,23 @@
|
||||
-- check if we have the necessary dependencies to allow actually using these materials in the crafts
|
||||
local mesecons_materials = minetest.get_modpath("mesecons_materials")
|
||||
|
||||
-- Remove some recipes
|
||||
-- Bronze
|
||||
minetest.clear_craft({
|
||||
type = "shapeless",
|
||||
output = "default:bronze_ingot"
|
||||
})
|
||||
|
||||
-- Accelerator tube
|
||||
minetest.clear_craft({
|
||||
output = "pipeworks:accelerator_tube_1",
|
||||
})
|
||||
|
||||
-- Teleport tube
|
||||
minetest.clear_craft({
|
||||
output = "pipeworks:teleport_tube_1",
|
||||
})
|
||||
|
||||
-- tubes crafting recipes
|
||||
|
||||
minetest.register_craft({
|
||||
@ -163,33 +180,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
-- Remove some recipes
|
||||
-- Bronze
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "default:bronze_ingot 0",
|
||||
recipe = {"default:copper_ingot", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
-- Accelerator tube
|
||||
minetest.register_craft({
|
||||
output = "pipeworks:accelerator_tube_1 0",
|
||||
recipe = {
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
},
|
||||
})
|
||||
|
||||
-- Teleport tube
|
||||
minetest.register_craft({
|
||||
output = "pipeworks:teleport_tube_1 0",
|
||||
recipe = {
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" },
|
||||
{ "default:desert_stone", "default:mese", "default:desert_stone" },
|
||||
{ "homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting" }
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "default:dirt 2",
|
||||
|
@ -3,6 +3,7 @@ local digilines_path = minetest.get_modpath("digilines")
|
||||
|
||||
local S = technic.getter
|
||||
local tube_entry = "^pipeworks_tube_connection_metallic.png"
|
||||
local cable_entry = "^technic_cable_connection_overlay.png"
|
||||
|
||||
local fs_helpers = pipeworks.fs_helpers
|
||||
|
||||
@ -132,7 +133,14 @@ function technic.register_battery_box(data)
|
||||
end
|
||||
|
||||
local run = function(pos, node)
|
||||
local below = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
local meta = minetest.get_meta(pos)
|
||||
|
||||
if below.name ~= "technic:"..ltier.."_cable" then
|
||||
meta:set_string("infotext", S("%s Battery Box Has No Network"):format(tier))
|
||||
return
|
||||
end
|
||||
|
||||
local eu_input = meta:get_int(tier.."_EU_input")
|
||||
local current_charge = meta:get_int("internal_EU_charge")
|
||||
|
||||
@ -208,20 +216,27 @@ function technic.register_battery_box(data)
|
||||
groups.tubedevice_receiver = 1
|
||||
end
|
||||
|
||||
local tentry = tube_entry
|
||||
local top_tex = "technic_"..ltier.."_battery_box_top.png"..tube_entry
|
||||
local front_tex = "technic_"..ltier.."_battery_box_front.png^technic_power_meter"..i..".png"
|
||||
local side_tex = "technic_"..ltier.."_battery_box_side.png"..tube_entry
|
||||
local bottom_tex = "technic_"..ltier.."_battery_box_bottom.png"..tube_entry
|
||||
|
||||
if ltier == "lv" then
|
||||
tentry = ""
|
||||
top_tex = "technic_"..ltier.."_battery_box_top.png"
|
||||
front_tex = "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"
|
||||
side_tex = "technic_"..ltier.."_battery_box_side.png^technic_power_meter"..i..".png"
|
||||
bottom_tex = "technic_"..ltier.."_battery_box_bottom.png"..cable_entry
|
||||
end
|
||||
|
||||
minetest.register_node("technic:"..ltier.."_battery_box"..i, {
|
||||
description = S("%s Battery Box"):format(tier),
|
||||
tiles = {
|
||||
"technic_"..ltier.."_battery_box_top.png"..tentry,
|
||||
"technic_"..ltier.."_battery_box_bottom.png"..tentry,
|
||||
"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"},
|
||||
top_tex,
|
||||
bottom_tex,
|
||||
side_tex,
|
||||
side_tex,
|
||||
side_tex,
|
||||
front_tex},
|
||||
groups = groups,
|
||||
connect_sides = {"bottom"},
|
||||
tube = data.tube and tube or nil,
|
||||
|
@ -182,7 +182,7 @@ function technic.register_cable(tier, size)
|
||||
tiles = {"technic_"..ltier.."_cable.png"},
|
||||
groups = table.copy(groups),
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
drop = "technic:"..ltier.."_cable",
|
||||
drop = "technic:"..ltier.."_cable_plate_1",
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
drawtype = "nodebox",
|
||||
@ -210,6 +210,10 @@ function technic.register_cable(tier, size)
|
||||
end
|
||||
end
|
||||
minetest.set_node(pointed_thing.above, {name = "technic:"..ltier.."_cable_plate_"..num})
|
||||
if not (creative and creative.is_enabled_for(placer)) then
|
||||
itemstack:take_item()
|
||||
end
|
||||
return itemstack
|
||||
end
|
||||
else
|
||||
def.groups.not_in_creative_inventory = 1
|
||||
@ -227,6 +231,13 @@ function technic.register_cable(tier, size)
|
||||
{"", "", c},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = c,
|
||||
recipe = {
|
||||
{"technic:"..ltier.."_cable_plate_1"},
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
|
@ -108,14 +108,17 @@ function technic.register_generator(data)
|
||||
)
|
||||
end
|
||||
|
||||
local tentry = tube_entry
|
||||
if ltier == "lv" then tentry = "" end
|
||||
|
||||
minetest.register_node("technic:"..ltier.."_generator", {
|
||||
description = desc,
|
||||
tiles = {
|
||||
"technic_"..ltier.."_generator_top.png"..tube_entry,
|
||||
"technic_machine_bottom.png"..tube_entry,
|
||||
"technic_"..ltier.."_generator_side.png"..tube_entry,
|
||||
"technic_"..ltier.."_generator_side.png"..tube_entry,
|
||||
"technic_"..ltier.."_generator_side.png"..tube_entry,
|
||||
"technic_"..ltier.."_generator_top.png"..tentry,
|
||||
"technic_machine_bottom.png"..tentry,
|
||||
"technic_"..ltier.."_generator_side.png"..tentry,
|
||||
"technic_"..ltier.."_generator_side.png"..tentry,
|
||||
"technic_"..ltier.."_generator_side.png"..tentry,
|
||||
"technic_"..ltier.."_generator_front.png"
|
||||
},
|
||||
paramtype2 = "facedir",
|
||||
|
@ -30,8 +30,7 @@ local recipes = {
|
||||
}
|
||||
|
||||
-- defuse the sandstone -> 4 sand recipe to avoid infinite sand bugs (also consult the inverse compressor recipe)
|
||||
minetest.register_craft({
|
||||
output = "default:sandstone 0",
|
||||
minetest.clear_craft({
|
||||
recipe = {
|
||||
{'default:sandstone'}
|
||||
},
|
||||
|
Before Width: | Height: | Size: 293 B After Width: | Height: | Size: 299 B |
Before Width: | Height: | Size: 653 B After Width: | Height: | Size: 338 B |
BIN
technic/textures/technic_hv_battery_box_front.png
Normal file
After Width: | Height: | Size: 452 B |
Before Width: | Height: | Size: 777 B After Width: | Height: | Size: 475 B |
Before Width: | Height: | Size: 792 B After Width: | Height: | Size: 575 B |
Before Width: | Height: | Size: 738 B After Width: | Height: | Size: 591 B |
Before Width: | Height: | Size: 594 B After Width: | Height: | Size: 236 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 738 B After Width: | Height: | Size: 591 B |
BIN
technic/textures/technic_mv_battery_box_front.png
Normal file
After Width: | Height: | Size: 239 B |
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 159 B |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 197 B |