2018-06-18 07:09:43 +00:00
|
|
|
|
|
|
|
----------------
|
|
|
|
-- Craftitems --
|
|
|
|
----------------
|
|
|
|
|
|
|
|
-- Ingots
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:lead_ingot", {
|
|
|
|
description = "Lead Ingot",
|
|
|
|
inventory_image = "elepower_lead_ingot.png",
|
|
|
|
groups = {lead = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:iron_ingot", {
|
|
|
|
description = "Iron Ingot",
|
|
|
|
inventory_image = "elepower_iron_ingot.png",
|
|
|
|
groups = {iron = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-21 14:35:39 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:nickel_ingot", {
|
|
|
|
description = "Nickel Ingot",
|
|
|
|
inventory_image = "elepower_nickel_ingot.png",
|
|
|
|
groups = {nickel = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:invar_ingot", {
|
|
|
|
description = "Invar Ingot",
|
|
|
|
inventory_image = "elepower_invar_ingot.png",
|
|
|
|
groups = {invar = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:electrum_ingot", {
|
|
|
|
description = "Electrum Ingot",
|
|
|
|
inventory_image = "elepower_electrum_ingot.png",
|
|
|
|
groups = {electrum = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:viridisium_ingot", {
|
|
|
|
description = "Viridisium Ingot",
|
|
|
|
inventory_image = "elepower_viridisium_ingot.png",
|
|
|
|
groups = {viridisium = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
2018-07-02 14:37:00 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:zinc_ingot", {
|
|
|
|
description = "Zinc Ingot",
|
|
|
|
inventory_image = "elepower_zinc_ingot.png",
|
|
|
|
groups = {zinc = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
2018-07-21 23:03:17 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:graphite_ingot", {
|
|
|
|
description = "Graphite Ingot",
|
|
|
|
inventory_image = "elepower_graphite_ingot.png",
|
|
|
|
groups = {graphite = 1, ingot = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-18 07:09:43 +00:00
|
|
|
-- Lumps
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:lead_lump", {
|
|
|
|
description = "Lead Lump",
|
|
|
|
inventory_image = "elepower_lead_lump.png",
|
|
|
|
groups = {lead = 1, lump = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-21 14:35:39 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:nickel_lump", {
|
|
|
|
description = "Nickel Lump",
|
|
|
|
inventory_image = "elepower_nickel_lump.png",
|
|
|
|
groups = {nickel = 1, lump = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:viridisium_lump", {
|
|
|
|
description = "Viridisium Lump",
|
|
|
|
inventory_image = "elepower_viridisium_lump.png",
|
|
|
|
groups = {viridisium = 1, lump = 1}
|
|
|
|
})
|
|
|
|
|
2018-07-02 14:37:00 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:zinc_lump", {
|
|
|
|
description = "Zinc Lump",
|
|
|
|
inventory_image = "elepower_zinc_lump.png",
|
|
|
|
groups = {zinc = 1, lump = 1}
|
|
|
|
})
|
|
|
|
|
2018-08-01 14:41:01 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:xycrone_lump", {
|
2018-08-02 17:32:31 +00:00
|
|
|
description = "Xycrone\nUsed for Quantum Entanglement\nUnstable",
|
2018-08-01 14:41:01 +00:00
|
|
|
inventory_image = "elepower_xycrone.png",
|
|
|
|
groups = {xycrone = 1, lump = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
-- Special
|
2018-06-18 07:09:43 +00:00
|
|
|
|
2019-01-27 19:24:12 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:graphite_rod", {
|
|
|
|
description = "Graphite Rod",
|
|
|
|
inventory_image = "elepower_graphite_rod.png",
|
|
|
|
groups = {graphite = 1, rod = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-18 07:09:43 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:carbon_fiber", {
|
|
|
|
description = "Carbon Fibers",
|
|
|
|
inventory_image = "elepower_carbon_fiber.png",
|
|
|
|
groups = {carbon_fiber = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:carbon_sheet", {
|
|
|
|
description = "Carbon Fiber Sheet",
|
|
|
|
inventory_image = "elepower_carbon_fiber_sheet.png",
|
|
|
|
groups = {carbon_fiber_sheet = 1, sheet = 1}
|
|
|
|
})
|
|
|
|
|
2018-07-01 15:56:31 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:silicon_wafer", {
|
|
|
|
description = "Silicon Wafer",
|
|
|
|
inventory_image = "elepower_silicon_wafer.png",
|
|
|
|
groups = {wafer = 1}
|
|
|
|
})
|
|
|
|
|
2018-08-01 14:41:01 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:silicon_wafer_doped", {
|
2018-09-14 14:29:34 +00:00
|
|
|
description = "Doped Silicon Wafer",
|
2018-07-01 15:56:31 +00:00
|
|
|
inventory_image = "elepower_silicon_wafer_solar.png",
|
|
|
|
groups = {wafer = 2}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:tree_tap", {
|
|
|
|
description = "Steel Treetap",
|
|
|
|
inventory_image = "elepower_tree_tap.png",
|
|
|
|
groups = {treetap = 1, static_component = 1}
|
|
|
|
})
|
|
|
|
|
2018-08-03 18:16:48 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:tin_can", {
|
|
|
|
description = "Tin Can",
|
|
|
|
inventory_image = "elepower_tin_can.png",
|
|
|
|
groups = {can = 1, food_grade = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-24 09:10:47 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:pcb_blank", {
|
2018-08-01 14:41:01 +00:00
|
|
|
description = "Printed Circuit Board (PCB) Blank\nUse Etching Acid to etch",
|
2018-06-24 09:10:47 +00:00
|
|
|
inventory_image = "elepower_blank_pcb.png",
|
|
|
|
liquids_pointable = true,
|
2019-01-27 16:41:49 +00:00
|
|
|
groups = {blank_board = 1, static_component = 1},
|
|
|
|
on_place = function (itemstack, placer, pointed_thing)
|
|
|
|
local pos = pointed_thing.under
|
|
|
|
if not pos or pointed_thing.type ~= "node" then return itemstack end
|
|
|
|
|
|
|
|
local node = minetest.get_node_or_nil(pos)
|
|
|
|
if not node or node.name ~= "elepower_dynamics:etching_acid_source" then
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
|
|
|
local istack = itemstack:get_name()
|
|
|
|
if not placer or placer:get_player_name() == "" then
|
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
|
|
|
local out = ItemStack("elepower_dynamics:pcb")
|
|
|
|
local inv = placer:get_inventory()
|
|
|
|
local meta = minetest.get_meta(pos)
|
|
|
|
local uses = meta:get_int("uses")
|
|
|
|
|
|
|
|
uses = uses + 1
|
|
|
|
itemstack:take_item(1)
|
|
|
|
|
|
|
|
if inv:room_for_item("main", out) then
|
|
|
|
inv:add_item("main", out)
|
|
|
|
else
|
|
|
|
minetest.item_drop(out, placer, pos)
|
|
|
|
end
|
|
|
|
|
|
|
|
-- Limited etchings
|
|
|
|
if uses == 10 then
|
|
|
|
minetest.set_node(pos, {name = "default:water_source"})
|
|
|
|
else
|
|
|
|
meta:set_int("uses", uses)
|
|
|
|
end
|
|
|
|
|
|
|
|
return itemstack
|
|
|
|
end
|
2018-06-24 09:10:47 +00:00
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:pcb", {
|
|
|
|
description = "Printed Circuit Board (PCB)",
|
|
|
|
inventory_image = "elepower_pcb.png",
|
|
|
|
groups = {pcb = 1, static_component = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-24 09:10:47 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:acidic_compound", {
|
2019-01-22 15:07:04 +00:00
|
|
|
description = "Acidic Compound\nRight-Click on Water to turn it into Etching Acid",
|
2018-06-24 09:10:47 +00:00
|
|
|
inventory_image = "elepower_acidic_compound.png",
|
|
|
|
liquids_pointable = true,
|
|
|
|
groups = {acid = 1, static_component = 1},
|
|
|
|
on_place = function (itemstack, placer, pointed_thing)
|
|
|
|
local pos = pointed_thing.under
|
|
|
|
local node = minetest.get_node(pos)
|
|
|
|
|
2018-06-25 19:01:17 +00:00
|
|
|
if node.name ~= "default:water_source" then
|
2018-06-24 09:10:47 +00:00
|
|
|
return itemstack
|
|
|
|
end
|
|
|
|
|
|
|
|
minetest.set_node(pos, {name = "elepower_dynamics:etching_acid_source"})
|
|
|
|
itemstack:take_item(1)
|
|
|
|
|
|
|
|
return itemstack
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
-- Electronics
|
|
|
|
|
2018-06-18 12:24:59 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:wound_copper_coil", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Wound Copper Coil\nTier 1 Coil",
|
2018-06-18 12:24:59 +00:00
|
|
|
inventory_image = "elepower_copper_coil.png",
|
2018-06-21 08:09:01 +00:00
|
|
|
groups = {copper = 1, coil = 1, component = 1}
|
2018-06-18 12:24:59 +00:00
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:wound_silver_coil", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Wound Silver Coil\nTier 2 Coil",
|
2018-06-22 18:03:41 +00:00
|
|
|
inventory_image = "elepower_silver_coil.png",
|
|
|
|
groups = {silver = 1, coil = 1, component = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-21 13:08:32 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:induction_coil", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Induction Coil\nTier 3 Coil",
|
2018-06-21 13:08:32 +00:00
|
|
|
inventory_image = "elepower_induction_coil.png",
|
|
|
|
groups = {induction_coil = 1, component = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:induction_coil_advanced", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Advanced Induction Coil\nSuitable for high-power applications\nTier 4 Coil",
|
2018-06-21 13:08:32 +00:00
|
|
|
inventory_image = "elepower_induction_coil_advanced.png",
|
|
|
|
groups = {induction_coil = 1, component = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:chip", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Chip\nTier 1 Chip",
|
2018-06-22 18:03:41 +00:00
|
|
|
inventory_image = "elepower_chip.png",
|
2018-07-01 15:56:31 +00:00
|
|
|
groups = {chip = 1, component = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:microcontroller", {
|
|
|
|
description = "Microcontroller\nTier 2 Chip",
|
|
|
|
inventory_image = "elepower_microcontroller.png",
|
|
|
|
groups = {chip = 2, component = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:soc", {
|
|
|
|
description = "System on a Chip (SoC)\nTier 3 Chip",
|
|
|
|
inventory_image = "elepower_soc.png",
|
|
|
|
groups = {chip = 3, component = 1}
|
2018-06-22 18:03:41 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:capacitor", {
|
2018-12-12 13:04:53 +00:00
|
|
|
description = "Capacitor\nTier 1 Capacitor",
|
2018-06-22 18:03:41 +00:00
|
|
|
inventory_image = "elepower_capacitor.png",
|
2018-12-12 13:04:53 +00:00
|
|
|
groups = {capacitor = 1, component = 1}
|
2018-06-22 18:03:41 +00:00
|
|
|
})
|
|
|
|
|
2020-05-01 19:50:52 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:uv_bulb", {
|
|
|
|
description = "Ultraviolet Light Bulb",
|
|
|
|
inventory_image = "elepower_uv_bulb.png",
|
|
|
|
groups = {component = 1, bulb = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
-- Assembled Components
|
|
|
|
|
2018-08-03 18:16:48 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:battery", {
|
|
|
|
description = "Battery",
|
|
|
|
inventory_image = "elepower_battery.png",
|
|
|
|
groups = {battery = 1, component = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-22 18:03:41 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:servo_valve", {
|
|
|
|
description = "Servo Valve",
|
|
|
|
inventory_image = "elepower_servo_valve.png",
|
|
|
|
groups = {servo_valve = 1, assembled_component = 1}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:integrated_circuit", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Integrated Circuit\nTier 1 Circuit",
|
2018-06-22 18:03:41 +00:00
|
|
|
inventory_image = "elepower_ic.png",
|
2018-07-01 15:56:31 +00:00
|
|
|
groups = {circuit = 1, assembled_component = 1}
|
2018-06-22 18:03:41 +00:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craftitem("elepower_dynamics:control_circuit", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Integrated Control Circuit\nTier 2 Circuit",
|
2018-06-22 18:03:41 +00:00
|
|
|
inventory_image = "elepower_ic_2.png",
|
2018-07-01 15:56:31 +00:00
|
|
|
groups = {circuit = 2, assembled_component = 1, control_circuit = 1}
|
2018-06-22 18:03:41 +00:00
|
|
|
})
|
|
|
|
|
2018-06-30 19:23:30 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:micro_circuit", {
|
2018-07-01 15:56:31 +00:00
|
|
|
description = "Microcontroller Circuit\nTier 3 Circuit",
|
2018-06-30 19:23:30 +00:00
|
|
|
inventory_image = "elepower_ic_3.png",
|
2018-07-01 15:56:31 +00:00
|
|
|
groups = {circuit = 3, assembled_component = 1, control_circuit = 2}
|
2018-06-30 19:23:30 +00:00
|
|
|
})
|
|
|
|
|
2018-08-13 17:02:22 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:lcd_panel", {
|
|
|
|
description = "LCD Panel",
|
|
|
|
inventory_image = "elepower_lcd_panel.png",
|
|
|
|
groups = {lcd = 1, assembled_component = 1}
|
|
|
|
})
|
|
|
|
|
2018-08-21 17:43:10 +00:00
|
|
|
minetest.register_craftitem("elepower_dynamics:pv_cell", {
|
|
|
|
description = "Photovoltaic Cell",
|
|
|
|
inventory_image = "elepower_pv_cell.png",
|
|
|
|
groups = {pv = 1, assembled_component = 1}
|
|
|
|
})
|
|
|
|
|
2018-06-18 07:09:43 +00:00
|
|
|
---------------
|
|
|
|
-- Overrides --
|
|
|
|
---------------
|
2018-12-15 19:51:46 +00:00
|
|
|
|
|
|
|
minetest.override_item("default:steel_ingot", {
|
|
|
|
description = "Steel Ingot\nLow carbon steel"
|
|
|
|
})
|