diff --git a/elepower_dynamics/crafting.lua b/elepower_dynamics/crafting.lua index 280cfe9..68177cd 100644 --- a/elepower_dynamics/crafting.lua +++ b/elepower_dynamics/crafting.lua @@ -193,7 +193,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "elepower_dynamics:chip", + output = "elepower_dynamics:chip 3", recipe = { {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"}, {"default:mese_crystal", "dye:black", "default:mese_crystal"}, @@ -202,7 +202,7 @@ minetest.register_craft({ }) minetest.register_craft({ - output = "elepower_dynamics:capacitor", + output = "elepower_dynamics:capacitor 3", recipe = { {"homedecor:plastic_sheeting", "homedecor:plastic_sheeting", "homedecor:plastic_sheeting"}, {"moreores:silver_ingot", "default:mese_crystal", "moreores:silver_ingot"}, @@ -244,15 +244,6 @@ minetest.register_craft({ } }) -minetest.register_craft({ - output = "elepower_dynamics:control_circuit", - recipe = { - {"elepower_dynamics:chip", "elepower_dynamics:chip", "elepower_dynamics:chip"}, - {"elepower_dynamics:capacitor", "elepower_dynamics:integrated_circuit", "elepower_dynamics:capacitor"}, - {"default:gold_ingot", "elepower_dynamics:viridisium_ingot", "default:gold_ingot"}, - } -}) - -------------- -- Smelting -- -------------- diff --git a/elepower_dynamics/craftitems.lua b/elepower_dynamics/craftitems.lua index 90fb154..989e424 100644 --- a/elepower_dynamics/craftitems.lua +++ b/elepower_dynamics/craftitems.lua @@ -75,6 +75,24 @@ minetest.register_craftitem("elepower_dynamics:carbon_sheet", { groups = {carbon_fiber_sheet = 1, sheet = 1} }) +minetest.register_craftitem("elepower_dynamics:silicon", { + description = "Silicon", + inventory_image = "elepower_silicon.png", + groups = {silicon = 1, lump = 1} +}) + +minetest.register_craftitem("elepower_dynamics:silicon_wafer", { + description = "Silicon Wafer", + inventory_image = "elepower_silicon_wafer.png", + groups = {wafer = 1} +}) + +minetest.register_craftitem("elepower_dynamics:silicon_wafer_solar", { + description = "Silicon Wafer\nFor Solar Panel Crafting", + inventory_image = "elepower_silicon_wafer_solar.png", + groups = {wafer = 2} +}) + minetest.register_craftitem("elepower_dynamics:tree_tap", { description = "Steel Treetap", inventory_image = "elepower_tree_tap.png", @@ -117,13 +135,13 @@ minetest.register_craftitem("elepower_dynamics:acidic_compound", { -- Electronics minetest.register_craftitem("elepower_dynamics:wound_copper_coil", { - description = "Wound Copper Coil", + description = "Wound Copper Coil\nTier 1 Coil", inventory_image = "elepower_copper_coil.png", groups = {copper = 1, coil = 1, component = 1} }) minetest.register_craftitem("elepower_dynamics:wound_silver_coil", { - description = "Wound Silver Coil", + description = "Wound Silver Coil\nTier 2 Coil", inventory_image = "elepower_silver_coil.png", groups = {silver = 1, coil = 1, component = 1} }) @@ -135,21 +153,33 @@ minetest.register_craftitem("elepower_dynamics:copper_wire", { }) minetest.register_craftitem("elepower_dynamics:induction_coil", { - description = "Induction Coil", + description = "Induction Coil\nTier 3 Coil", inventory_image = "elepower_induction_coil.png", groups = {induction_coil = 1, component = 1} }) minetest.register_craftitem("elepower_dynamics:induction_coil_advanced", { - description = "Advanced Induction Coil\nSuitable for high-power applications", + description = "Advanced Induction Coil\nSuitable for high-power applications\nTier 4 Coil", inventory_image = "elepower_induction_coil_advanced.png", groups = {induction_coil = 1, component = 1} }) minetest.register_craftitem("elepower_dynamics:chip", { - description = "Chip", + description = "Chip\nTier 1 Chip", inventory_image = "elepower_chip.png", - groups = {ic = 2, component = 1} + 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} }) minetest.register_craftitem("elepower_dynamics:capacitor", { @@ -167,21 +197,21 @@ minetest.register_craftitem("elepower_dynamics:servo_valve", { }) minetest.register_craftitem("elepower_dynamics:integrated_circuit", { - description = "Integrated Circuit", + description = "Integrated Circuit\nTier 1 Circuit", inventory_image = "elepower_ic.png", - groups = {ic = 1, assembled_component = 1} + groups = {circuit = 1, assembled_component = 1} }) minetest.register_craftitem("elepower_dynamics:control_circuit", { - description = "Integrated Control Circuit", + description = "Integrated Control Circuit\nTier 2 Circuit", inventory_image = "elepower_ic_2.png", - groups = {ic = 2, assembled_component = 1, control_circuit = 1} + groups = {circuit = 2, assembled_component = 1, control_circuit = 1} }) minetest.register_craftitem("elepower_dynamics:micro_circuit", { - description = "Microcontroller Circuit", + description = "Microcontroller Circuit\nTier 3 Circuit", inventory_image = "elepower_ic_3.png", - groups = {ic = 3, assembled_component = 1, control_circuit = 2} + groups = {circuit = 3, assembled_component = 1, control_circuit = 2} }) --------------- diff --git a/elepower_dynamics/dusts.lua b/elepower_dynamics/dusts.lua index 5a735e8..aafb057 100644 --- a/elepower_dynamics/dusts.lua +++ b/elepower_dynamics/dusts.lua @@ -29,84 +29,29 @@ function elepd.register_dust(mat, data) end -- Default dust list +local dusts = { + {"bronze", "Bronze", "#fa7b26"}, + {"copper", "Copper", "#fcb15f"}, + {"gold", "Gold", "#ffff47"}, + {"steel", "Steel", "#ffffff"}, + {"tin", "Tin", "#c1c1c1"}, + {"mithril", "Mithril", "#8686df"}, + {"silver", "Silver", "#d7e2e8"}, + {"lead", "Lead", "#aeaedc"}, + {"iron", "Iron", "#dddddd"}, + {"coal", "Coal", "#222222"}, + {"diamond", "Diamond", "#02c1e8"}, + {"nickel", "Nickel", "#d6d5ab"}, + {"invar", "Invar", "#9fa5b2"}, + {"electrum", "Electrum", "#ebeb90"}, + {"viridisium", "Viridisium", "#5b9751"}, + {"wood", "Sawdust", "#847454", true} +} -elepd.register_dust("bronze", { - description = "Bronze", - color = "#fa7b26" -}) - -elepd.register_dust("copper", { - description = "Copper", - color = "#fcb15f" -}) - -elepd.register_dust("gold", { - description = "Gold", - color = "#ffff47" -}) - -elepd.register_dust("steel", { - description = "Steel", - color = "#ffffff" -}) - -elepd.register_dust("tin", { - description = "Tin", - color = "#c1c1c1" -}) - -elepd.register_dust("mithril", { - description = "Mithril", - color = "#8686df" -}) - -elepd.register_dust("silver", { - description = "Silver", - color = "#d7e2e8" -}) - -elepd.register_dust("lead", { - description = "Lead", - color = "#aeaedc" -}) - -elepd.register_dust("iron", { - description = "Iron", - color = "#dddddd" -}) - -elepd.register_dust("coal", { - description = "Coal", - color = "#222222" -}) - -elepd.register_dust("diamond", { - description = "Diamond", - color = "#02c1e8" -}) - -elepd.register_dust("nickel", { - description = "Nickel", - color = "#d6d5ab" -}) - -elepd.register_dust("invar", { - description = "Invar", - color = "#9fa5b2" -}) - -elepd.register_dust("electrum", { - description = "Electrum", - color = "#ebeb90" -}) - -elepd.register_dust("viridisium", { - description = "Viridisium", - color = "#5b9751" -}) - -elepd.register_dust("wood", { - description = "Sawdust", - force_description = true, - color = "#847454" -}) +for _,dust in ipairs(dusts) do + elepd.register_dust(dust[1], { + description = dust[2], + color = dust[3], + force_description = dust[4], + }) +end diff --git a/elepower_dynamics/gears.lua b/elepower_dynamics/gears.lua index 069652c..3fda1ae 100644 --- a/elepower_dynamics/gears.lua +++ b/elepower_dynamics/gears.lua @@ -1,7 +1,7 @@ ----------------------- --- Ground materials -- ----------------------- +----------- +-- Gears -- +----------- elepd.registered_gears = {} @@ -19,84 +19,33 @@ function elepd.register_gear(mat, data) inventory_image = "elepower_gear.png^[multiply:" .. data.color, groups = { ["gear_" .. mat] = 1, - dust = 1 + gear = 1 } }) end --- Default dust list +-- Default gear list +local gears = { + {"bronze", "Bronze", "#fa7b26"}, + {"copper", "Copper", "#fcb15f"}, + {"gold", "Gold", "#ffff47"}, + {"steel", "Steel", "#ffffff"}, + {"tin", "Tin", "#c1c1c1"}, + {"mithril", "Mithril", "#8686df"}, + {"silver", "Silver", "#d7e2e8"}, + {"lead", "Lead", "#aeaedc"}, + {"iron", "Iron", "#dddddd"}, + {"coal", "Coal", "#222222"}, + {"diamond", "Diamond", "#02c1e8"}, + {"nickel", "Nickel", "#d6d5ab"}, + {"invar", "Invar", "#9fa5b2"}, + {"electrum", "Electrum", "#ebeb90"}, + {"viridisium", "Viridisium", "#5b9751"}, +} -elepd.register_gear("bronze", { - description = "Bronze", - color = "#fa7b26" -}) - -elepd.register_gear("copper", { - description = "Copper", - color = "#fcb15f" -}) - -elepd.register_gear("gold", { - description = "Gold", - color = "#ffff47" -}) - -elepd.register_gear("steel", { - description = "Steel", - color = "#ffffff" -}) - -elepd.register_gear("tin", { - description = "Tin", - color = "#c1c1c1" -}) - -elepd.register_gear("mithril", { - description = "Mithril", - color = "#8686df" -}) - -elepd.register_gear("silver", { - description = "Silver", - color = "#d7e2e8" -}) - -elepd.register_gear("lead", { - description = "Lead", - color = "#aeaedc" -}) - -elepd.register_gear("iron", { - description = "Iron", - color = "#dddddd" -}) - -elepd.register_gear("diamond", { - description = "Diamond", - color = "#02c1e8" -}) - -elepd.register_gear("wood", { - description = "Wood", - color = "#847454" -}) - -elepd.register_gear("nickel", { - description = "Nickel", - color = "#d6d5ab" -}) - -elepd.register_gear("invar", { - description = "Invar", - color = "#9fa5b2" -}) - -elepd.register_gear("electrum", { - description = "Electrum", - color = "#ebeb90" -}) - -elepd.register_gear("viridisium", { - description = "Viridisium", - color = "#5b9751" -}) +for _,gear in ipairs(gears) do + elepd.register_gear(gear[1], { + description = gear[2], + color = gear[3] + }) +end diff --git a/elepower_dynamics/textures/elepower_microcontroller.png b/elepower_dynamics/textures/elepower_microcontroller.png new file mode 100644 index 0000000..d4236dd Binary files /dev/null and b/elepower_dynamics/textures/elepower_microcontroller.png differ diff --git a/elepower_dynamics/textures/elepower_silicon.png b/elepower_dynamics/textures/elepower_silicon.png new file mode 100644 index 0000000..9e1a35a Binary files /dev/null and b/elepower_dynamics/textures/elepower_silicon.png differ diff --git a/elepower_dynamics/textures/elepower_silicon_wafer.png b/elepower_dynamics/textures/elepower_silicon_wafer.png new file mode 100644 index 0000000..ba5bf98 Binary files /dev/null and b/elepower_dynamics/textures/elepower_silicon_wafer.png differ diff --git a/elepower_dynamics/textures/elepower_silicon_wafer_solar.png b/elepower_dynamics/textures/elepower_silicon_wafer_solar.png new file mode 100644 index 0000000..801fba8 Binary files /dev/null and b/elepower_dynamics/textures/elepower_silicon_wafer_solar.png differ diff --git a/elepower_dynamics/textures/elepower_soc.png b/elepower_dynamics/textures/elepower_soc.png new file mode 100644 index 0000000..9de9dcc Binary files /dev/null and b/elepower_dynamics/textures/elepower_soc.png differ diff --git a/elepower_machines/crafting.lua b/elepower_machines/crafting.lua index 626bfa8..bfb8ad9 100644 --- a/elepower_machines/crafting.lua +++ b/elepower_machines/crafting.lua @@ -24,7 +24,11 @@ local alloy_recipes = { { recipe = { "default:gold_ingot 2", "elepower_dynamics:invar_ingot" }, output = "elepower_dynamics:electrum_ingot 3", - } + }, + { + recipe = { "elepower_dynamics:silicon", "elepower_dynamics:gold_dust 4" }, + output = "elepower_dynamics:silicon_wafer", + }, } -- Register alloy furnace recipes @@ -78,6 +82,20 @@ elepm.register_craft({ output = "farming:flour 2" }) +elepm.register_craft({ + type = "grind", + recipe = { "default:desert_sand 4" }, + output = "elepower_dynamics:silicon", + time = 8, +}) + +elepm.register_craft({ + type = "grind", + recipe = { "elepower_dynamics:silicon_wafer" }, + output = "elepower_dynamics:silicon_wafer_solar", + time = 18, +}) + ------------- -- Sawmill -- ------------- @@ -114,6 +132,43 @@ minetest.after(0.2, function () end end) +--------------- +-- Soldering -- +--------------- + +local soldering_recipes = { + { + recipe = { "elepower_dynamics:silicon_wafer", "elepower_dynamics:chip 4", "elepower_dynamics:lead_ingot 2" }, + output = "elepower_dynamics:microcontroller", + time = 8, + }, + { + recipe = { "elepower_dynamics:silicon_wafer", "elepower_dynamics:microcontroller 4", "elepower_dynamics:electrum_ingot 2" }, + output = "elepower_dynamics:soc", + time = 28, + }, + { + recipe = { "elepower_dynamics:microcontroller", "elepower_dynamics:control_circuit", "elepower_dynamics:capacitor 5" }, + output = "elepower_dynamics:micro_circuit", + time = 18, + }, + { + recipe = { "elepower_dynamics:chip 8", "elepower_dynamics:integrated_circuit 2", "elepower_dynamics:capacitor 4" }, + output = "elepower_dynamics:control_circuit", + time = 20, + } +} + +-- Register solderer recipes +for _,i in pairs(soldering_recipes) do + elepm.register_craft({ + type = "solder", + recipe = i.recipe, + output = i.output, + time = i.time or 4 + }) +end + --******************-- -- CRAFTING RECIPES -- --******************-- @@ -177,6 +232,20 @@ minetest.register_craft({ } }) +-- Solderer +minetest.register_craft({ + output = "elepower_machines:solderer", + recipe = { + {"", "elepower_dynamics:integrated_circuit", ""}, + {"elepower_dynamics:chip", "elepower_machines:machine_block", "elepower_dynamics:chip"}, + { + "elepower_dynamics:invar_gear", + "elepower_dynamics:wound_copper_coil", + "elepower_dynamics:invar_gear" + }, + } +}) + -- Furnace minetest.register_craft({ output = "elepower_machines:furnace", diff --git a/elepower_machines/formspec.lua b/elepower_machines/formspec.lua index e8449fc..91c78bf 100644 --- a/elepower_machines/formspec.lua +++ b/elepower_machines/formspec.lua @@ -25,9 +25,11 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent) local x = 1.5 if in_height == 2 then y = 1 - x = 1 elseif in_height >= 3 then y = 0.5 + end + + if in_width >= 2 then x = 1 end diff --git a/elepower_machines/machines/assembler.lua b/elepower_machines/machines/assembler.lua deleted file mode 100644 index 1e849ed..0000000 --- a/elepower_machines/machines/assembler.lua +++ /dev/null @@ -1,17 +0,0 @@ - -elepm.register_craft_type("assembly", { - description = "Assembly", - inputs = 9, -}) - -elepm.register_crafter("elepower_machines:assembler", { - description = "Assembler", - craft_type = "assembly", - tiles = { - "elepower_machine_top.png", "elepower_machine_base.png", "elepower_machine_side.png", - "elepower_machine_side.png", "elepower_machine_side.png", "elepower_machine_side.png", - }, - groups = {oddly_breakable_by_hand = 1}, - ele_capacity = 64000, - ele_usage = 124 -}) diff --git a/elepower_machines/machines/init.lua b/elepower_machines/machines/init.lua index 324ba32..f2b8903 100644 --- a/elepower_machines/machines/init.lua +++ b/elepower_machines/machines/init.lua @@ -11,6 +11,4 @@ dofile(elepm.modpath.."/machines/sawmill.lua") dofile(elepm.modpath.."/machines/generator.lua") dofile(elepm.modpath.."/machines/storage.lua") dofile(elepm.modpath.."/machines/lava_cooler.lua") - --- Hardened -dofile(elepm.modpath.."/machines/assembler.lua") +dofile(elepm.modpath.."/machines/solderer.lua") diff --git a/elepower_machines/machines/solderer.lua b/elepower_machines/machines/solderer.lua new file mode 100644 index 0000000..d12821f --- /dev/null +++ b/elepower_machines/machines/solderer.lua @@ -0,0 +1,17 @@ + +elepm.register_craft_type("solder", { + description = "Soldering", + inputs = 3, +}) + +elepm.register_crafter("elepower_machines:solderer", { + description = "Solderer", + craft_type = "solder", + tiles = { + "elepower_machine_top.png", "elepower_machine_base.png", "elepower_machine_side.png", + "elepower_machine_side.png", "elepower_machine_side.png", "elepower_solderer.png", + }, + groups = {oddly_breakable_by_hand = 1, cracky = 2}, + ele_capacity = 28000, + ele_usage = 128, +}) diff --git a/elepower_machines/textures/elepower_solderer.png b/elepower_machines/textures/elepower_solderer.png new file mode 100644 index 0000000..8d08f75 Binary files /dev/null and b/elepower_machines/textures/elepower_solderer.png differ diff --git a/elepower_papi/machine.lua b/elepower_papi/machine.lua index b3a9289..0088a78 100644 --- a/elepower_papi/machine.lua +++ b/elepower_papi/machine.lua @@ -97,7 +97,7 @@ local function preserve_metadata(pos, oldnode, oldmeta, drops) for i,stack in pairs(drops) do local stack_meta = stack:get_meta() stack_meta:set_int("storage", storage) - stack_meta:set_string("description", nodedesc.."\nCharge: " .. storage .. "/" .. capacity .. " " .. ele.unit) + stack_meta:set_string("description", nodedesc .. "\n" .. ele.capacity_text(capacity, storage)) drops[i] = stack end