mirror of
https://github.com/sirrobzeroone/elepower.git
synced 2024-08-20 12:54:05 +02:00
crafting recipes for fusion reactor parts, heavy water accumulator
This commit is contained in:
parent
535f658ce7
commit
5ba9be3253
@ -376,6 +376,15 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_machines:heavy_filter",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:steel_plate", "fluid_transfer:fluid_duct", "elepower_dynamics:steel_plate"},
|
||||||
|
{"basic_materials:silicon", "elepower_dynamics:servo_valve", "basic_materials:silicon"},
|
||||||
|
{"elepower_dynamics:graphite_ingot", "fluid_transfer:fluid_duct", "elepower_dynamics:graphite_ingot"}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
-- Nodes
|
-- Nodes
|
||||||
|
|
||||||
-- Coal-fired Alloy Furnace
|
-- Coal-fired Alloy Furnace
|
||||||
@ -509,7 +518,7 @@ minetest.register_craft({
|
|||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "elepower_machines:accumulator",
|
output = "elepower_machines:accumulator",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"", "elepower_dynamics:fluid_duct", ""},
|
{"", "fluid_transfer:fluid_duct", ""},
|
||||||
{"default:glass", "elepower_machines:machine_block", "default:glass"},
|
{"default:glass", "elepower_machines:machine_block", "default:glass"},
|
||||||
{"elepower_dynamics:steel_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:steel_gear"},
|
{"elepower_dynamics:steel_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:steel_gear"},
|
||||||
}
|
}
|
||||||
@ -520,7 +529,7 @@ minetest.register_craft({
|
|||||||
output = "elepower_machines:lava_cooler",
|
output = "elepower_machines:lava_cooler",
|
||||||
recipe = {
|
recipe = {
|
||||||
{"bucket:bucket_water", "elepower_dynamics:control_circuit", "bucket:bucket_lava"},
|
{"bucket:bucket_water", "elepower_dynamics:control_circuit", "bucket:bucket_lava"},
|
||||||
{"elepower_dynamics:fluid_duct", "elepower_machines:machine_block", "elepower_dynamics:fluid_duct"},
|
{"fluid_transfer:fluid_duct", "elepower_machines:machine_block", "fluid_transfer:fluid_duct"},
|
||||||
{"elepower_dynamics:servo_valve", "elepower_dynamics:tin_gear", "elepower_dynamics:servo_valve"},
|
{"elepower_dynamics:servo_valve", "elepower_dynamics:tin_gear", "elepower_dynamics:servo_valve"},
|
||||||
},
|
},
|
||||||
replacements = {
|
replacements = {
|
||||||
@ -617,3 +626,13 @@ minetest.register_craft({
|
|||||||
{"elepower_dynamics:servo_valve", "elepower_dynamics:wound_copper_coil", "elepower_dynamics:servo_valve"},
|
{"elepower_dynamics:servo_valve", "elepower_dynamics:wound_copper_coil", "elepower_dynamics:servo_valve"},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Advanced Machine Block
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_machines:advanced_machine_block 8",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:lead_ingot", "elepower_dynamics:electrum_plate"},
|
||||||
|
{"elepower_dynamics:lead_ingot", "elepower_machines:machine_block", "elepower_dynamics:lead_ingot"},
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:lead_ingot", "elepower_dynamics:electrum_plate"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
@ -37,3 +37,28 @@ minetest.register_craftitem("elepower_machines:super_capacitor", {
|
|||||||
groups = {capacitor = 5, ele_upgrade_component = 1},
|
groups = {capacitor = 5, ele_upgrade_component = 1},
|
||||||
inventory_image = "elepower_upgrade_supercapacitor.png"
|
inventory_image = "elepower_upgrade_supercapacitor.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Accumulator filter
|
||||||
|
|
||||||
|
minetest.register_craftitem("elepower_machines:heavy_filter", {
|
||||||
|
description = "Liquid Weight Filter\nMakes water pumps pump only Heavy Water\nRight-Click to apply to Water Accumulator",
|
||||||
|
groups = {accumulator_filter = 1},
|
||||||
|
inventory_image = "elepower_accumulator_filter.png",
|
||||||
|
on_place = function (itemstack, placer, pointed_thing)
|
||||||
|
if not placer or not placer:is_player() then return itemstack end
|
||||||
|
local pos = pointed_thing.under
|
||||||
|
if pointed_thing.type ~= "node" or minetest.is_protected(pos, placer:get_player_name()) then return itemstack end
|
||||||
|
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
if node.name ~= "elepower_machines:accumulator" then return itemstack end
|
||||||
|
|
||||||
|
minetest.swap_node(pos, {name = "elepower_machines:accumulator_heavy"})
|
||||||
|
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_int("water_fluid_storage", 0)
|
||||||
|
meta:set_string("water_fluid", "elepower_nuclear:heavy_water_source")
|
||||||
|
|
||||||
|
itemstack:take_item(1)
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
})
|
||||||
|
@ -10,7 +10,8 @@ minetest.register_node("elepower_machines:accumulator", {
|
|||||||
},
|
},
|
||||||
fluid_buffers = {
|
fluid_buffers = {
|
||||||
water = {
|
water = {
|
||||||
capacity = CAPACITY
|
capacity = CAPACITY,
|
||||||
|
drainable = true,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_construct = function ( pos )
|
on_construct = function ( pos )
|
||||||
@ -19,8 +20,32 @@ minetest.register_node("elepower_machines:accumulator", {
|
|||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
minetest.register_node("elepower_machines:accumulator_heavy", {
|
||||||
|
description = "Water Accumulator (Heavy Water)",
|
||||||
|
groups = {fluid_container = 1, oddly_breakable_by_hand = 1, cracky = 1, not_in_creative_inventory = 1},
|
||||||
|
tiles = {
|
||||||
|
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png", "elepower_machine_accumulator.png",
|
||||||
|
"elepower_machine_accumulator.png", "elepower_machine_accumulator.png", "elepower_machine_accumulator.png",
|
||||||
|
},
|
||||||
|
drop = {
|
||||||
|
max_items = 2,
|
||||||
|
items = { { items = {"elepower_machines:accumulator", "elepower_machines:heavy_filter"}, rarity = 1 } }
|
||||||
|
},
|
||||||
|
fluid_buffers = {
|
||||||
|
water = {
|
||||||
|
capacity = CAPACITY,
|
||||||
|
drainable = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
on_construct = function ( pos )
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
meta:set_string("water_fluid", "elepower_nuclear:heavy_water_source")
|
||||||
|
end,
|
||||||
|
_heavy = true
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_abm({
|
minetest.register_abm({
|
||||||
nodenames = {"elepower_machines:accumulator"},
|
nodenames = {"elepower_machines:accumulator", "elepower_machines:accumulator_heavy"},
|
||||||
label = "elefluidAccumulator",
|
label = "elefluidAccumulator",
|
||||||
interval = 2,
|
interval = 2,
|
||||||
chance = 1/5,
|
chance = 1/5,
|
||||||
@ -49,6 +74,15 @@ minetest.register_abm({
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
|
local src = "default:water_source"
|
||||||
|
if ndef and ndef._heavy then
|
||||||
|
src = "elepower_nuclear:heavy_water_source"
|
||||||
|
if amount > 1000 then
|
||||||
|
amount = math.floor(amount / 8)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
local give = 0
|
local give = 0
|
||||||
if buffer.amount + amount > buffer.capacity then
|
if buffer.amount + amount > buffer.capacity then
|
||||||
give = buffer.capacity - buffer.amount
|
give = buffer.capacity - buffer.amount
|
||||||
@ -59,9 +93,10 @@ minetest.register_abm({
|
|||||||
buffer.amount = buffer.amount + give
|
buffer.amount = buffer.amount + give
|
||||||
|
|
||||||
meta:set_int("water_fluid_storage", buffer.amount)
|
meta:set_int("water_fluid_storage", buffer.amount)
|
||||||
meta:set_string("water_fluid", "default:water_source")
|
meta:set_string("water_fluid", src)
|
||||||
meta:set_string("infotext", fluid_lib.buffer_to_string(buffer))
|
meta:set_string("infotext", fluid_lib.buffer_to_string(buffer))
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
fluid_lib.register_node("elepower_machines:accumulator")
|
fluid_lib.register_node("elepower_machines:accumulator")
|
||||||
|
fluid_lib.register_node("elepower_machines:accumulator_heavy")
|
||||||
|
BIN
elepower_machines/textures/elepower_accumulator_filter.png
Normal file
BIN
elepower_machines/textures/elepower_accumulator_filter.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 643 B |
@ -101,6 +101,56 @@ minetest.register_craft({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
-- Fusion Reactor Coil
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_nuclear:fusion_coil",
|
||||||
|
recipe = {
|
||||||
|
{"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:graphite_ingot", "basic_materials:copper_wire"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Fusion Reactor Controller
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_nuclear:reactor_controller",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:soc", "elepower_dynamics:electrum_plate"},
|
||||||
|
{"elepower_machines:resonant_capacitor", "elepower_machines:advanced_machine_block", "elepower_machines:resonant_capacitor"},
|
||||||
|
{"elepower_dynamics:viridisium_plate", "elepower_dynamics:lcd_panel", "elepower_dynamics:viridisium_plate"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Fusion Reactor Power Port
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_nuclear:reactor_power",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:soc", "elepower_dynamics:electrum_plate"},
|
||||||
|
{"elepower_dynamics:induction_coil_advanced", "elepower_machines:advanced_machine_block", "elepower_dynamics:induction_coil_advanced"},
|
||||||
|
{"elepower_dynamics:viridisium_plate", "elepower_machines:resonant_capacitor", "elepower_dynamics:viridisium_plate"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Fusion Reactor Fluid Port
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_nuclear:reactor_fluid",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:soc", "elepower_dynamics:electrum_plate"},
|
||||||
|
{"fluid_transfer:fluid_duct", "elepower_machines:advanced_machine_block", "elepower_dynamics:servo_valve"},
|
||||||
|
{"elepower_dynamics:viridisium_plate", "elepower_dynamics:xycrone_lump", "elepower_dynamics:viridisium_plate"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Fusion Reactor Fluid Port (Output)
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "elepower_nuclear:reactor_output",
|
||||||
|
recipe = {
|
||||||
|
{"elepower_dynamics:electrum_plate", "elepower_dynamics:soc", "elepower_dynamics:electrum_plate"},
|
||||||
|
{"elepower_dynamics:servo_valve", "elepower_machines:advanced_machine_block", "fluid_transfer:fluid_duct"},
|
||||||
|
{"elepower_dynamics:viridisium_plate", "elepower_dynamics:xycrone_lump", "elepower_dynamics:viridisium_plate"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
-- Enrichment recipes --
|
-- Enrichment recipes --
|
||||||
------------------------
|
------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user