spool craft replacements

This commit is contained in:
Evert Prants 2020-05-30 09:28:42 +03:00
parent d86d68b417
commit 411dfd9e5b
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
15 changed files with 85 additions and 19 deletions

View File

@ -122,6 +122,11 @@ minetest.register_craft({
{"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"}, {"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"},
{"basic_materials:copper_wire", "basic_materials:copper_wire", "basic_materials:copper_wire"}, {"basic_materials:copper_wire", "basic_materials:copper_wire", "basic_materials:copper_wire"},
{"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"}, {"elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot", "elepower_dynamics:lead_ingot"},
},
replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
} }
}) })
@ -158,6 +163,21 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "elepower_dynamics:wound_copper_coil",
recipe = {
{"", "basic_materials:copper_wire", ""},
{"basic_materials:copper_wire", "elepower_dynamics:iron_ingot", "basic_materials:copper_wire"},
{"", "basic_materials:copper_wire", ""}
},
replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
}
})
minetest.register_craft({ minetest.register_craft({
output = "elepower_dynamics:wound_silver_coil", output = "elepower_dynamics:wound_silver_coil",
recipe = { recipe = {
@ -167,6 +187,21 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({
output = "elepower_dynamics:wound_silver_coil",
recipe = {
{"", "basic_materials:silver_wire", ""},
{"basic_materials:silver_wire", "elepower_dynamics:zinc_ingot", "basic_materials:silver_wire"},
{"", "basic_materials:silver_wire", ""}
},
replacements = {
{"basic_materials:silver_wire", "basic_materials:empty_spool"},
{"basic_materials:silver_wire", "basic_materials:empty_spool"},
{"basic_materials:silver_wire", "basic_materials:empty_spool"},
{"basic_materials:silver_wire", "basic_materials:empty_spool"},
}
})
minetest.register_craft({ minetest.register_craft({
output = "elepower_dynamics:servo_valve 3", output = "elepower_dynamics:servo_valve 3",
recipe = { recipe = {

View File

@ -141,7 +141,13 @@ end
ele.register_base_device("elepower_farming:composter", { ele.register_base_device("elepower_farming:composter", {
description = "Composter\nConvert organic matter to Biofuel", description = "Composter\nConvert organic matter to Biofuel",
groups = {oddly_breakable_by_hand = 1, cracky = 1, fluid_container = 1, tubedevice = 1, tubedevice_receiver = 1}, groups = {
oddly_breakable_by_hand = 1,
cracky = 1,
fluid_container = 1,
tubedevice = 1,
tubedevice_receiver = 1
},
fluid_buffers = { fluid_buffers = {
output = { output = {
capacity = 8000, capacity = 8000,

View File

@ -2,7 +2,7 @@
elepm.register_craft_type("alloy", { elepm.register_craft_type("alloy", {
description = "Alloying", description = "Alloying",
inputs = 2, inputs = 2,
icon = "elepower_alloy_furnace.png", icon = "elepower_machine_side.png^elepower_alloy_furnace.png",
}) })
elepm.register_crafter("elepower_machines:alloy_furnace", { elepm.register_crafter("elepower_machines:alloy_furnace", {

View File

@ -139,7 +139,13 @@ end
ele.register_base_device("elepower_machines:bucketer", { ele.register_base_device("elepower_machines:bucketer", {
description = "Bucketer", description = "Bucketer",
groups = {oddly_breakable_by_hand = 1, cracky = 1, fluid_container = 1, tube = 1}, groups = {
oddly_breakable_by_hand = 1,
cracky = 1,
fluid_container = 1,
tubedevice = 1,
tubedevice_receiver = 1,
},
fluid_buffers = { fluid_buffers = {
input = { input = {
capacity = 8000, capacity = 8000,

View File

@ -232,6 +232,7 @@ ele.register_base_device("elepower_machines:coal_alloy_furnace", {
on_timer = alloy_furnace_timer, on_timer = alloy_furnace_timer,
groups = { groups = {
tubedevice = 1, tubedevice = 1,
tubedevice_receiver = 1,
cracky = 2, cracky = 2,
} }
}) })

View File

@ -146,6 +146,7 @@ ele.register_base_device("elepower_machines:grindstone", {
on_timer = grindstone_timer, on_timer = grindstone_timer,
groups = { groups = {
tubedevice = 1, tubedevice = 1,
tubedevice_receiver = 1,
cracky = 2, cracky = 2,
}, },
}) })

View File

@ -143,7 +143,14 @@ end
ele.register_machine("elepower_machines:pcb_plant", { ele.register_machine("elepower_machines:pcb_plant", {
description = "Printed Circuit Board Plant", description = "Printed Circuit Board Plant",
groups = {oddly_breakable_by_hand = 1, cracky = 1, fluid_container = 1, ele_user = 1}, groups = {
fluid_container = 1,
cracky = 1,
ele_user = 1,
tubedevice = 1,
tubedevice_receiver = 1,
oddly_breakable_by_hand = 1,
},
fluid_buffers = { fluid_buffers = {
acid = { acid = {
capacity = 8000, capacity = 8000,

View File

@ -1,7 +1,7 @@
elepm.register_craft_type("grind", { elepm.register_craft_type("grind", {
description = "Grinding", description = "Grinding",
icon = "elepower_grinder.png", icon = "elepower_machine_side.png^elepower_grinder.png",
inputs = 1, inputs = 1,
}) })

View File

@ -163,6 +163,7 @@ minetest.register_entity("elepower_machines:wind_turbine_blades", {
timer = 0, timer = 0,
controller = {x = 0, y = 0, z = 0}, controller = {x = 0, y = 0, z = 0},
wind = false, wind = false,
on_step = function (self, dt) on_step = function (self, dt)
if self.wind then if self.wind then
local rot = self.object:get_rotation() local rot = self.object:get_rotation()

View File

@ -235,7 +235,14 @@ ele.register_machine("elepower_mining:miner_controller", {
ele_inrush = 1200, ele_inrush = 1200,
ele_usage = 128, ele_usage = 128,
paramtype2 = "facedir", paramtype2 = "facedir",
groups = {fluid_container = 1, oddly_breakable_by_hand = 1, cracky = 1, tube = 1, ele_user = 1}, groups = {
fluid_container = 1,
oddly_breakable_by_hand = 1,
cracky = 1,
tubedevice = 1,
tubedevice_receiver = 0,
ele_user = 1
},
on_construct = function (pos) on_construct = function (pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local inv = meta:get_inventory() local inv = meta:get_inventory()

View File

@ -88,6 +88,8 @@ minetest.register_craft({
{"", "elepower_dynamics:acidic_compound", ""}, {"", "elepower_dynamics:acidic_compound", ""},
}, },
replacements = { replacements = {
{'elepower_dynamics:nitrogen_container', "elepower_dynamics:gas_container"},
{'elepower_dynamics:nitrogen_container', "elepower_dynamics:gas_container"},
{'elepower_dynamics:nitrogen_container', "elepower_dynamics:gas_container"}, {'elepower_dynamics:nitrogen_container', "elepower_dynamics:gas_container"},
{'bucket:bucket_water', "bucket:bucket_empty"} {'bucket:bucket_water', "bucket:bucket_empty"}
} }
@ -100,6 +102,14 @@ minetest.register_craft({
{"basic_materials:copper_wire", "elepower_dynamics:graphite_ingot", "basic_materials:copper_wire"}, {"basic_materials:copper_wire", "elepower_dynamics:graphite_ingot", "basic_materials:copper_wire"},
{"basic_materials:copper_wire", "elepower_dynamics:copper_plate", "basic_materials:copper_wire"}, {"basic_materials:copper_wire", "elepower_dynamics:copper_plate", "basic_materials:copper_wire"},
{"basic_materials:copper_wire", "elepower_dynamics:graphite_ingot", "basic_materials:copper_wire"}, {"basic_materials:copper_wire", "elepower_dynamics:graphite_ingot", "basic_materials:copper_wire"},
},
replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
} }
}) })

View File

@ -422,7 +422,6 @@ minetest.register_node("elepower_nuclear:reactor_fluid", {
groups = { groups = {
cracky = 2, cracky = 2,
fluid_container = 1, fluid_container = 1,
tube = 1,
}, },
fluid_buffers = {}, fluid_buffers = {},
on_timer = port_timer, on_timer = port_timer,
@ -492,7 +491,6 @@ minetest.register_node("elepower_nuclear:reactor_output", {
groups = { groups = {
cracky = 2, cracky = 2,
fluid_container = 1, fluid_container = 1,
tube = 1,
}, },
fluid_buffers = {}, fluid_buffers = {},
on_timer = port_timer, on_timer = port_timer,

View File

@ -63,7 +63,7 @@ end
function ele.formspec.fluid_bar(x, y, fluid_buffer) function ele.formspec.fluid_bar(x, y, fluid_buffer)
local texture = "default_water.png" local texture = "default_water.png"
local metric = 0 local metric = 0
local tooltip = ("tooltip[%d,%d;1,2.5;%s]"):format(x, y, "Empty Buffer") local tooltip = ("tooltip[%f,%f;1,2.5;%s]"):format(x, y, "Empty Buffer")
if fluid_buffer and fluid_buffer.fluid and fluid_buffer.fluid ~= "" and if fluid_buffer and fluid_buffer.fluid and fluid_buffer.fluid ~= "" and
minetest.registered_nodes[fluid_buffer.fluid] ~= nil then minetest.registered_nodes[fluid_buffer.fluid] ~= nil then
@ -74,7 +74,7 @@ function ele.formspec.fluid_bar(x, y, fluid_buffer)
local fdesc = fluid_lib.cleanse_node_description(fluid_buffer.fluid) local fdesc = fluid_lib.cleanse_node_description(fluid_buffer.fluid)
metric = math.floor(100 * fluid_buffer.amount / fluid_buffer.capacity) metric = math.floor(100 * fluid_buffer.amount / fluid_buffer.capacity)
tooltip = ("tooltip[%d,%d;1,2.5;%s\n%s / %s %s]"):format(x, y, fdesc, tooltip = ("tooltip[%f,%f;1,2.5;%s\n%s / %s %s]"):format(x, y, fdesc,
ele.helpers.comma_value(fluid_buffer.amount), ele.helpers.comma_value(fluid_buffer.capacity), fluid_lib.unit) ele.helpers.comma_value(fluid_buffer.amount), ele.helpers.comma_value(fluid_buffer.capacity), fluid_lib.unit)
end end

View File

@ -325,15 +325,6 @@ function ele.register_base_device(nodename, nodedef)
else else
nodedef['tube'] = tube nodedef['tube'] = tube
end end
if nodedef.groups['tubedevice_receiver'] ~= 0 and nodedef['tube'] then
nodedef.groups.tubedevice_receiver = 1
end
if nodedef.groups.tube and not nodedef.groups.tubedevice then
nodedef.groups.tube = nil
nodedef.groups.tubedevice = 1
end
end end
-- Node IO Support -- Node IO Support

View File

@ -42,6 +42,9 @@ minetest.register_craft({
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:xycrone_lump", "elepower_dynamics:wound_silver_coil"}, {"elepower_dynamics:wound_silver_coil", "elepower_dynamics:xycrone_lump", "elepower_dynamics:wound_silver_coil"},
{"elepower_dynamics:xycrone_lump", "basic_materials:copper_wire", "elepower_dynamics:xycrone_lump"}, {"elepower_dynamics:xycrone_lump", "basic_materials:copper_wire", "elepower_dynamics:xycrone_lump"},
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:battery", "elepower_dynamics:wound_silver_coil"}, {"elepower_dynamics:wound_silver_coil", "elepower_dynamics:battery", "elepower_dynamics:wound_silver_coil"},
},
replacements = {
{"basic_materials:copper_wire", "basic_materials:empty_spool"},
} }
}) })