2021-08-11 10:25:00 +00:00
|
|
|
|
|
|
|
-- see elepower_papi >> external_nodes_items.lua for explanation
|
|
|
|
-- shorten table ref
|
|
|
|
local epr = ele.external.ref
|
|
|
|
|
2018-07-21 23:03:17 +00:00
|
|
|
-- Nuclear fuel enrichment plant
|
|
|
|
|
2018-07-22 10:34:42 +00:00
|
|
|
local function get_formspec(craft_type, power, progress, pos)
|
|
|
|
if not progress then progress = 0 end
|
2018-07-21 23:03:17 +00:00
|
|
|
return "size[8,8.5]"..
|
2021-08-11 10:25:00 +00:00
|
|
|
epr.gui_bg..
|
|
|
|
epr.gui_bg_img..
|
|
|
|
epr.gui_slots..
|
2018-07-21 23:03:17 +00:00
|
|
|
ele.formspec.power_meter(power)..
|
|
|
|
"list[context;src;2,0.75;1,1;]"..
|
2021-08-11 10:25:00 +00:00
|
|
|
"image[3.5,0.75;1,1;elenuclear_gui_icon_bg.png^[lowpart:"..
|
|
|
|
(progress)..":elenuclear_gui_icon_fg.png]"..
|
|
|
|
--"image[3.5,0.75;1,1;elenuclear_gui_icon_bg.png^[lowpart:"..
|
|
|
|
--(progress)..":elenuclear_gui_icon_fg.png]"..
|
2018-07-21 23:03:17 +00:00
|
|
|
"list[context;dst;5,0.25;2,2;]"..
|
|
|
|
"list[current_player;main;0,4.25;8,1;]"..
|
|
|
|
"list[current_player;main;0,5.5;8,3;8]"..
|
|
|
|
"image[7,3;1,1;elenuclear_radioactive.png]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
"listring[context;src]"..
|
|
|
|
"listring[current_player;main]"..
|
|
|
|
"listring[context;dst]"..
|
|
|
|
"listring[current_player;main]"..
|
2021-08-11 10:25:00 +00:00
|
|
|
epr.get_hotbar_bg(0, 4.25)
|
2018-07-21 23:03:17 +00:00
|
|
|
end
|
|
|
|
|
2018-07-22 10:34:42 +00:00
|
|
|
elepm.register_craft_type("enrichment", {
|
|
|
|
description = "Enrichment",
|
|
|
|
inputs = 1,
|
2019-01-22 15:07:04 +00:00
|
|
|
icon = "elenuclear_enrichment_plant.png",
|
2018-07-22 10:34:42 +00:00
|
|
|
})
|
2018-07-21 23:03:17 +00:00
|
|
|
|
2018-07-22 10:34:42 +00:00
|
|
|
elepm.register_crafter("elepower_nuclear:enrichment_plant", {
|
2018-07-21 23:03:17 +00:00
|
|
|
description = "Enrichment Plant",
|
2018-07-22 10:34:42 +00:00
|
|
|
craft_type = "enrichment",
|
2018-07-21 23:03:17 +00:00
|
|
|
tiles = {
|
2018-07-27 15:47:49 +00:00
|
|
|
"elenuclear_machine_top.png", "elepower_lead_block.png", "elenuclear_machine_side.png",
|
2018-07-21 23:03:17 +00:00
|
|
|
"elenuclear_machine_side.png", "elenuclear_machine_side.png", "elenuclear_enrichment_plant.png",
|
|
|
|
},
|
2018-07-22 10:34:42 +00:00
|
|
|
groups = {ele_user = 1, cracky = 3},
|
2019-01-22 21:14:38 +00:00
|
|
|
ele_capacity = 8000,
|
2018-07-22 10:34:42 +00:00
|
|
|
ele_usage = 1000,
|
|
|
|
ele_inrush = 8000,
|
|
|
|
get_formspec = get_formspec,
|
2018-07-21 23:03:17 +00:00
|
|
|
})
|