Add plates, more crafting recipes!

This commit is contained in:
Evert Prants 2018-07-28 21:46:28 +03:00
parent 2201104df1
commit 017255cc1f
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
8 changed files with 122 additions and 2 deletions

View File

@ -14,6 +14,7 @@ dofile(modpath.."/nodes.lua")
dofile(modpath.."/liquids.lua") dofile(modpath.."/liquids.lua")
dofile(modpath.."/tanks.lua") dofile(modpath.."/tanks.lua")
dofile(modpath.."/dusts.lua") dofile(modpath.."/dusts.lua")
dofile(modpath.."/plates.lua")
dofile(modpath.."/gears.lua") dofile(modpath.."/gears.lua")
dofile(modpath.."/worldgen.lua") dofile(modpath.."/worldgen.lua")
dofile(modpath.."/crafting.lua") dofile(modpath.."/crafting.lua")

View File

@ -0,0 +1,56 @@
------------
-- Plates --
------------
elepd.registered_plates = {}
function elepd.register_plate(mat, data)
local mod = minetest.get_current_modname()
local itemname = mod..":"..mat.."_plate"
data.item = itemname
elepd.registered_plates[mat] = data
-- Make descriptions overridable
local description = data.description .. " Plate"
if data.force_description then
description = data.description
end
minetest.register_craftitem(itemname, {
description = description,
inventory_image = "elepower_plate.png^[multiply:" .. data.color,
groups = {
["plate_" .. mat] = 1,
plate = 1
}
})
end
-- Default plate list
local plates = {
{"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"},
{"diamond", "Diamond", "#02c1e8"},
{"nickel", "Nickel", "#d6d5ab"},
{"invar", "Invar", "#9fa5b2"},
{"electrum", "Electrum", "#ebeb90"},
{"viridisium", "Viridisium", "#5b9751"},
{"zinc", "Zinc", "#598a9e"},
}
for _,plate in ipairs(plates) do
elepd.register_plate(plate[1], {
description = plate[2],
color = plate[3],
force_description = plate[4],
})
end

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

View File

@ -160,6 +160,16 @@ local soldering_recipes = {
recipe = { "elepower_dynamics:chip 8", "elepower_dynamics:integrated_circuit 2", "elepower_dynamics:capacitor 4" }, recipe = { "elepower_dynamics:chip 8", "elepower_dynamics:integrated_circuit 2", "elepower_dynamics:capacitor 4" },
output = "elepower_dynamics:control_circuit", output = "elepower_dynamics:control_circuit",
time = 20, time = 20,
},
{
recipe = { "elepower_dynamics:wound_copper_coil 4", "elepower_dynamics:wound_silver_coil 2", "elepower_dynamics:copper_wire" },
output = "elepower_dynamics:induction_coil",
time = 16,
},
{
recipe = { "elepower_dynamics:induction_coil 4", "elepower_dynamics:copper_wire", "elepower_dynamics:viridisium_dust 2" },
output = "elepower_dynamics:induction_coil_advanced",
time = 18,
} }
} }

View File

@ -19,6 +19,56 @@ minetest.register_craft({
} }
}) })
-- Graphite Moderator
minetest.register_craft({
output = "elepower_nuclear:graphite_moderator",
recipe = {
{"", "elepower_nuclear:graphite_rod", ""},
{"elepower_nuclear:graphite_rod", "elepower_dynamics:graphite_ingot", "elepower_nuclear:graphite_rod"},
{"", "elepower_nuclear:graphite_rod", ""},
}
})
-- Reactor Controller
minetest.register_craft({
output = "elepower_nuclear:fission_controller",
recipe = {
{"elepower_dynamics:wound_copper_coil", "elepower_nuclear:graphite_moderator", "elepower_dynamics:wound_copper_coil"},
{"elepower_nuclear:graphite_moderator", "elepower_nuclear:machine_block", "elepower_nuclear:graphite_moderator"},
{"elepower_dynamics:viridisium_gear", "elepower_nuclear:graphite_moderator", "elepower_dynamics:viridisium_gear"},
}
})
-- Reactor Core
minetest.register_craft({
output = "elepower_nuclear:fission_core",
recipe = {
{"elepower_dynamics:induction_coil_advanced", "elepower_dynamics:graphite_ingot", "elepower_dynamics:induction_coil_advanced"},
{"elepower_nuclear:graphite_moderator", "elepower_nuclear:machine_block", "elepower_nuclear:graphite_moderator"},
{"elepower_dynamics:viridisium_gear", "elepower_dynamics:copper_plate", "elepower_dynamics:viridisium_gear"},
}
})
-- Reactor Fluid Port
minetest.register_craft({
output = "elepower_nuclear:reactor_fluid_port",
recipe = {
{"elepower_dynamics:portable_tank", "elepower_dynamics:copper_plate", "elepower_dynamics:portable_tank"},
{"elepower_nuclear:graphite_moderator", "elepower_nuclear:machine_block", "elepower_nuclear:graphite_moderator"},
{"elepower_dynamics:viridisium_gear", "elepower_dynamics:copper_plate", "elepower_dynamics:viridisium_gear"},
}
})
-- Heat Exchanger
minetest.register_craft({
output = "elepower_nuclear:heat_exchanger",
recipe = {
{"elepower_dynamics:portable_tank", "elepower_dynamics:copper_plate", "elepower_dynamics:portable_tank"},
{"elepower_dynamics:copper_plate", "elepower_nuclear:machine_block", "elepower_dynamics:copper_plate"},
{"elepower_dynamics:portable_tank", "elepower_dynamics:copper_plate", "elepower_dynamics:portable_tank"},
}
})
elepm.register_craft({ elepm.register_craft({
type = "enrichment", type = "enrichment",
output = { "elepower_nuclear:uranium_dust", "elepower_nuclear:depleted_uranium_dust 3"}, output = { "elepower_nuclear:uranium_dust", "elepower_nuclear:depleted_uranium_dust 3"},

View File

@ -65,3 +65,8 @@ minetest.register_craftitem("elepower_nuclear:graphite_rod", {
description = "Graphite Rod", description = "Graphite Rod",
inventory_image = "elenuclear_graphite_rod.png" inventory_image = "elenuclear_graphite_rod.png"
}) })
minetest.register_craftitem("elepower_nuclear:graphite_moderator", {
description = "Graphite Moderator",
inventory_image = "elenuclear_graphite_moderator.png"
})

View File

@ -9,10 +9,8 @@ local function get_formspec(heat, cold, water, steam)
"image[3.5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]".. "image[3.5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
ele.formspec.fluid_bar(6, 0, water).. ele.formspec.fluid_bar(6, 0, water)..
ele.formspec.fluid_bar(7, 0, steam).. ele.formspec.fluid_bar(7, 0, steam)..
"list[context;dst;5,1;1,1;]"..
"list[current_player;main;0,4.25;8,1;]".. "list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]".. "list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]".. "listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25) default.get_hotbar_bg(0, 4.25)
end end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 954 KiB

After

Width:  |  Height:  |  Size: 946 KiB