Decouple from default start and fixes

Start to remove all default references to default mod into a single file so they can be more easily updated.
Add recipes for blue/red paper.
Add Silver Wire to internal copy of basic materials
This commit is contained in:
Sirrobzeroone 2021-08-11 20:25:00 +10:00
parent 56d89df934
commit 3d28ad39b5
68 changed files with 2150 additions and 809 deletions

View File

@ -1,3 +1,7 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
if minetest.get_modpath("basic_materials") == nil then
--------------
@ -98,9 +102,9 @@ if minetest.get_modpath("basic_materials") == nil then
burntime = 30,
})
-----------------
-- COPPER WIRE --
-----------------
----------
-- WIRE --
----------
minetest.register_craftitem(":basic_materials:copper_wire", {
description = "Copper Wire",
@ -112,12 +116,43 @@ if minetest.get_modpath("basic_materials") == nil then
output = "basic_materials:copper_wire 2",
type = "shapeless",
recipe = {
"default:copper_ingot",
epi.copper_ingot,
"basic_materials:empty_spool",
"basic_materials:empty_spool",
},
})
minetest.register_craftitem(":basic_materials:silver_wire", {
description = "Silver Wire",
inventory_image = "elepower_bm_silver_wire.png",
groups = {copper = 1, wire = 1, component = 1}
})
minetest.register_craft( {
output = "basic_materials:silver_wire 2",
type = "shapeless",
recipe = {
epi.silver_ingot,
"basic_materials:empty_spool",
"basic_materials:empty_spool",
},
})
---------------------
-- Heating Element --
---------------------
minetest.register_craftitem(":basic_materials:heating_element", {
description = "Heating element",
inventory_image = "elepower_bm_heating_element.png",
})
minetest.register_craft( {
output = "basic_materials:heating_element 2",
recipe = {
{ epi.copper_ingot, epi.mese_crystal_fragment, epi.copper_ingot }
},
})
-----------
-- MOTOR --
-----------
@ -131,9 +166,9 @@ if minetest.get_modpath("basic_materials") == nil then
minetest.register_craft({
output = "basic_materials:motor 3",
recipe = {
{"default:steel_ingot", "elepower_dynamics:wound_copper_coil", "default:steel_ingot"},
{epi.steel_ingot, "elepower_dynamics:wound_copper_coil", epi.steel_ingot},
{"basic_materials:copper_wire", "elepower_dynamics:wound_copper_coil", "basic_materials:copper_wire"},
{"default:steel_ingot", "elepower_dynamics:capacitor", "default:steel_ingot"},
{epi.steel_ingot, "elepower_dynamics:capacitor", epi.steel_ingot},
}
})
@ -177,7 +212,7 @@ if minetest.get_modpath("basic_materials") == nil then
output = "basic_materials:steel_wire 2",
type = "shapeless",
recipe = {
"default:steel_ingot",
epi.steel_ingot,
"basic_materials:empty_spool",
"basic_materials:empty_spool",
},
@ -186,8 +221,8 @@ if minetest.get_modpath("basic_materials") == nil then
minetest.register_craft( {
output = "basic_materials:steel_strip 12",
recipe = {
{ "", "default:steel_ingot", "" },
{ "default:steel_ingot", "", "" },
{ "", epi.steel_ingot, "" },
{ epi.steel_ingot, "", "" },
},
})

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epg = ele.external.graphic
local eps = ele.external.sounds
-- Electric power
ele.register_conduit("elepower_dynamics:conduit", {
description = "Power Conduit",
@ -15,57 +20,62 @@ ele.register_conduit("elepower_dynamics:conduit_wall", {
groups = {cracky = 1}
})
if ele.external.conduit_dirt_with_grass == true then
ele.register_conduit("elepower_dynamics:conduit_dirt_with_grass", {
description = "Power Conduit Grass Outlet",
tiles = {"default_grass.png^elepower_conduit_node_socket.png",
"default_dirt.png",
"default_dirt.png^default_grass_side.png"
tiles = {epg.grass.."^elepower_conduit_node_socket.png",
epg.dirt,
epg.dirt.."^"..epg.grass_side
},
use_texture_alpha = "clip",
ele_conductor_density = 4/8,
groups = {crumbly = 3, soil = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25}
})
sounds = eps.node_sound_dirt_c
})
end
if ele.external.conduit_dirt_with_dry_grass == true then
ele.register_conduit("elepower_dynamics:conduit_dirt_with_dry_grass", {
description = "Power Conduit Dry Grass Outlet",
tiles = {"default_dry_grass.png^elepower_conduit_node_socket.png",
"default_dirt.png",
"default_dirt.png^default_dry_grass_side.png"
tiles = {epg.grass_dry.."^elepower_conduit_node_socket.png",
epg.dirt,
epg.dirt.."^"..epg.grass_side_dry
},
use_texture_alpha = "clip",
ele_conductor_density = 4/8,
groups = {crumbly = 3, soil = 1},
sounds = default.node_sound_dirt_defaults({
footstep = {name = "default_grass_footstep", gain = 0.25}
})
sounds = eps.node_sound_dirt_c
})
end
if ele.external.conduit_stone_block == true then
ele.register_conduit("elepower_dynamics:conduit_stone_block", {
description = "Power Conduit Stone Block",
tiles = {"default_stone_block.png^elepower_conduit_node_socket.png",
"default_stone_block.png^elepower_conduit_node_socket.png",
"default_stone_block.png^elepower_conduit_node_socket.png"
tiles = {epg.stone_block.."^elepower_conduit_node_socket.png",
epg.stone_block.."^elepower_conduit_node_socket.png",
epg.stone_block.."^elepower_conduit_node_socket.png"
},
use_texture_alpha = "clip",
ele_conductor_density = 4/8,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone
})
end
if ele.external.conduit_stone_block_desert == true then
ele.register_conduit("elepower_dynamics:conduit_stone_block_desert", {
description = "Power Conduit Desert Stone Block",
tiles = {"default_desert_stone_block.png^elepower_conduit_node_socket.png",
"default_desert_stone_block.png^elepower_conduit_node_socket.png",
"default_desert_stone_block.png^elepower_conduit_node_socket.png"
tiles = {epg.desert_stone_block.."^elepower_conduit_node_socket.png",
epg.desert_stone_block.."^elepower_conduit_node_socket.png",
epg.desert_stone_block.."^elepower_conduit_node_socket.png"
},
use_texture_alpha = "clip",
ele_conductor_density = 4/8,
groups = {cracky = 2, stone = 1},
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone
})
end
-- Fluid
fluid_lib.register_transfer_node("elepower_dynamics:opaque_duct", {

View File

@ -1,23 +1,28 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local ept = ele.external.tools
---------------
-- Overrides --
---------------
-- Remove iron_lump -> steel_ingot, because dynamics adds iron ingot
--minetest.clear_craft({type = "cooking", output = "default:steel_ingot"})
--minetest.clear_craft({type = "cooking", output = epi.steel_ingot})
-----------
-- Tools --
-----------
if ept.enable_iron_lead_tools == true then
-- Pickaxes
minetest.register_craft({
output = 'elepower_dynamics:pick_iron',
recipe = {
{'elepower_dynamics:iron_ingot', 'elepower_dynamics:iron_ingot', 'elepower_dynamics:iron_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{'',epi.group_stick, ''},
{'',epi.group_stick, ''},
}
})
@ -25,8 +30,8 @@ minetest.register_craft({
output = 'elepower_dynamics:pick_lead',
recipe = {
{'elepower_dynamics:lead_ingot', 'elepower_dynamics:lead_ingot', 'elepower_dynamics:lead_ingot'},
{'', 'group:stick', ''},
{'', 'group:stick', ''},
{'',epi.group_stick, ''},
{'',epi.group_stick, ''},
}
})
@ -36,8 +41,8 @@ minetest.register_craft({
output = 'elepower_dynamics:shovel_iron',
recipe = {
{'elepower_dynamics:iron_ingot'},
{'group:stick'},
{'group:stick'},
{epi.group_stick},
{epi.group_stick},
}
})
@ -45,8 +50,8 @@ minetest.register_craft({
output = 'elepower_dynamics:shovel_lead',
recipe = {
{'elepower_dynamics:lead_ingot'},
{'group:stick'},
{'group:stick'},
{epi.group_stick},
{epi.group_stick},
}
})
@ -56,8 +61,8 @@ minetest.register_craft({
output = 'elepower_dynamics:axe_iron',
recipe = {
{'elepower_dynamics:iron_ingot', 'elepower_dynamics:iron_ingot'},
{'elepower_dynamics:iron_ingot', 'group:stick'},
{'', 'group:stick'},
{'elepower_dynamics:iron_ingot',epi.group_stick},
{'',epi.group_stick},
}
})
@ -65,8 +70,8 @@ minetest.register_craft({
output = 'elepower_dynamics:axe_lead',
recipe = {
{'elepower_dynamics:lead_ingot', 'elepower_dynamics:lead_ingot'},
{'elepower_dynamics:lead_ingot', 'group:stick'},
{'', 'group:stick'},
{'elepower_dynamics:lead_ingot',epi.group_stick},
{'',epi.group_stick},
}
})
@ -77,7 +82,7 @@ minetest.register_craft({
recipe = {
{'elepower_dynamics:iron_ingot'},
{'elepower_dynamics:iron_ingot'},
{'group:stick'},
{epi.group_stick},
}
})
@ -86,12 +91,12 @@ minetest.register_craft({
recipe = {
{'elepower_dynamics:lead_ingot'},
{'elepower_dynamics:lead_ingot'},
{'group:stick'},
{epi.group_stick},
}
})
end
-- Bucket
minetest.register_craft({
output = 'bucket:bucket_empty',
recipe = {
@ -139,41 +144,49 @@ minetest.register_craft({
}
})
if ele.external.conduit_dirt_with_grass == true then
minetest.register_craft({
output = "elepower_dynamics:conduit_dirt_with_grass 1",
recipe = {
{"","farming:seed_wheat",""},
{"",epi.seed_wheat ,""},
{"","elepower_dynamics:conduit" ,""},
{"","default:dirt" ,""}
{"",epi.dirt ,""}
}
})
end
if ele.external.conduit_dirt_with_dry_grass == true then
minetest.register_craft({
output = "elepower_dynamics:conduit_dirt_with_dry_grass 1",
recipe = {
{"","farming:wheat",""},
{"",epi.wheat ,""},
{"","elepower_dynamics:conduit",""},
{"","default:dirt" ,""}
{"",epi.dirt ,""}
}
})
end
if ele.external.conduit_stone_block == true then
minetest.register_craft({
output = "elepower_dynamics:conduit_stone_block 1",
recipe = {
{"" ,"stairs:slab_stone_block" ,""},
{"stairs:slab_stone_block","elepower_dynamics:conduit","stairs:slab_stone_block"},
{"" ,"stairs:slab_stone_block" ,""}
{"" ,epi.slab_stone_block ,""},
{epi.slab_stone_block,"elepower_dynamics:conduit",epi.slab_stone_block},
{"" ,epi.slab_stone_block ,""}
}
})
end
if ele.external.conduit_stone_block_desert == true then
minetest.register_craft({
output = "elepower_dynamics:conduit_stone_block_desert 1",
recipe = {
{"" ,"stairs:slab_desert_stone_block" ,""},
{"stairs:slab_desert_stone_block","elepower_dynamics:conduit","stairs:slab_desert_stone_block"},
{"" ,"stairs:slab_desert_stone_block" ,""}
{"" ,epi.slab_desert_stone_block ,""},
{epi.slab_desert_stone_block,"elepower_dynamics:conduit",epi.slab_desert_stone_block},
{"" ,epi.slab_desert_stone_block ,""}
}
})
end
@ -191,9 +204,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_dynamics:portable_tank",
recipe = {
{"default:glass", "elepower_dynamics:fluid_duct", "default:glass"},
{"default:glass", "default:glass", "default:glass"},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
{epi.glass,"elepower_dynamics:fluid_duct",epi.glass},
{epi.glass,epi.glass,epi.glass},
{epi.bronze_ingot,epi.bronze_ingot,epi.bronze_ingot},
}
})
@ -204,9 +217,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_dynamics:wound_copper_coil",
recipe = {
{"", "default:copper_ingot", ""},
{"default:copper_ingot", "elepower_dynamics:iron_ingot", "default:copper_ingot"},
{"", "default:copper_ingot", ""}
{"" ,epi.copper_ingot , ""},
{epi.copper_ingot, "elepower_dynamics:iron_ingot", epi.copper_ingot},
{"" , epi.copper_ingot , ""}
}
})
@ -228,9 +241,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_dynamics:wound_silver_coil",
recipe = {
{"", "moreores:silver_ingot", ""},
{"moreores:silver_ingot", "elepower_dynamics:zinc_ingot", "moreores:silver_ingot"},
{"", "moreores:silver_ingot", ""}
{"" , epi.silver_ingot, ""},
{epi.silver_ingot, "elepower_dynamics:zinc_ingot",epi.silver_ingot},
{"" , epi.silver_ingot, ""}
}
})
@ -260,8 +273,8 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_dynamics:tree_tap",
recipe = {
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"", "", "default:steel_ingot"},
{epi.steel_ingot, epi.steel_ingot, epi.steel_ingot},
{"", "", epi.steel_ingot},
}
})
@ -269,8 +282,8 @@ minetest.register_craft({
output = "elepower_dynamics:chip 6",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
{"default:mese_crystal_fragment", "group:color_black", "default:mese_crystal_fragment"},
{"default:copper_ingot", "moreores:silver_ingot", "default:copper_ingot"},
{epi.mese_crystal_fragment,epi.group_color_black, epi.mese_crystal_fragment},
{epi.copper_ingot, epi.silver_ingot, epi.copper_ingot},
}
})
@ -278,17 +291,17 @@ minetest.register_craft({
output = "elepower_dynamics:capacitor 6",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
{"moreores:silver_ingot", "default:mese_crystal", "moreores:silver_ingot"},
{"default:copper_ingot", "group:color_violet", "default:copper_ingot"},
{epi.silver_ingot, epi.mese_crystal, epi.silver_ingot},
{epi.copper_ingot, epi.group_color_violet, epi.copper_ingot},
}
})
minetest.register_craft({
output = "elepower_dynamics:pcb_blank 3",
recipe = {
{"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"},
{"default:copper_ingot", "default:mese_crystal", "default:copper_ingot"},
{"default:gold_ingot", "default:gold_ingot", "default:gold_ingot"},
{epi.copper_ingot,epi.copper_ingot, epi.copper_ingot},
{epi.copper_ingot,epi.mese_crystal, epi.copper_ingot},
{epi.gold_ingot ,epi.gold_ingot, epi.gold_ingot},
}
})
@ -296,7 +309,7 @@ minetest.register_craft({
output = "elepower_dynamics:pcb_blank",
recipe = {
{"", "elepower_dynamics:copper_plate", ""},
{"default:mese_crystal_fragment", "default:mese_crystal_fragment", "default:mese_crystal_fragment"},
{epi.mese_crystal_fragment, epi.mese_crystal_fragment, epi.mese_crystal_fragment},
{"", "elepower_dynamics:gold_plate", ""},
}
})
@ -309,16 +322,16 @@ minetest.register_craft({
"elepower_dynamics:copper_dust",
"elepower_dynamics:copper_dust",
"elepower_dynamics:copper_dust",
"farming:seed_wheat",
epi.seed_wheat,
}
})
minetest.register_craft({
output = "elepower_dynamics:uv_bulb",
recipe = {
{"group:color_blue", "group:color_violet", "group:color_blue"},
{"", "default:meselamp", ""},
{"", "default:glass", ""},
{epi.group_color_blue, epi.group_color_violet, epi.group_color_blue},
{"", epi.mese_lamp, ""},
{"", epi.glass, ""},
}
})
@ -327,9 +340,9 @@ minetest.clear_craft({output = "fluid_transfer:fluid_transfer_pump"})
minetest.register_craft({
output = "fluid_transfer:fluid_transfer_pump 3",
recipe = {
{"group:stone", "elepower_dynamics:control_circuit", "group:stone"},
{epi.group_stone, "elepower_dynamics:control_circuit",epi.group_stone},
{"elepower_dynamics:electrum_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:electrum_gear"},
{"group:stone", "elepower_dynamics:fluid_duct", "group:stone"},
{epi.group_stone, "elepower_dynamics:fluid_duct", epi.group_stone},
}
})
@ -337,26 +350,26 @@ minetest.register_craft({
output = "elepower_dynamics:battery 2",
recipe = {
{"elepower_dynamics:zinc_dust", "elepower_dynamics:graphite_rod", "elepower_dynamics:lead_dust"},
{"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"},
{"elepower_dynamics:tin_plate", "default:mese_crystal_fragment", "elepower_dynamics:tin_plate"},
{"elepower_dynamics:tin_plate", epi.mese_crystal_fragment, "elepower_dynamics:tin_plate"},
{"elepower_dynamics:tin_plate", epi.mese_crystal_fragment, "elepower_dynamics:tin_plate"},
}
})
minetest.register_craft({
output = "elepower_dynamics:lcd_panel",
recipe = {
{"group:color_red", "group:color_green", "group:color_blue"},
{"moreores:silver_ingot", "elepower_dynamics:wound_copper_coil", "moreores:silver_ingot"},
{"", "default:meselamp", ""}
{epi.group_color_red, epi.group_color_green, epi.group_color_blue},
{epi.silver_ingot, "elepower_dynamics:wound_copper_coil", epi.silver_ingot},
{"", epi.mese_lamp, ""}
}
})
minetest.register_craft({
output = "elepower_dynamics:pv_cell",
recipe = {
{"default:glass", "default:glass", "default:glass"},
{"group:color_blue", "elepower_dynamics:silicon_wafer_doped", "group:color_blue"},
{"default:mese_crystal_fragment", "elepower_dynamics:wound_copper_coil", "default:mese_crystal_fragment"}
{epi.glass, epi.glass, epi.glass},
{epi.group_color_blue, "elepower_dynamics:silicon_wafer_doped", epi.group_color_blue},
{epi.mese_crystal_fragment, "elepower_dynamics:wound_copper_coil", epi.mese_crystal_fragment}
}
})
@ -365,7 +378,7 @@ minetest.register_craft({
recipe = {
{"elepower_dynamics:chip", "elepower_dynamics:chip", "elepower_dynamics:chip"},
{"elepower_dynamics:capacitor", "elepower_dynamics:pcb", "elepower_dynamics:capacitor"},
{"default:copper_ingot", "default:mese_crystal", "default:copper_ingot"},
{epi.copper_ingot, epi.mese_crystal, epi.copper_ingot},
}
})
@ -393,12 +406,12 @@ minetest.register_craft({
minetest.register_craft({
type = "cooking",
output = "elepower_dynamics:iron_ingot",
recipe = "default:iron_lump"
recipe = epi.iron_lump
})
minetest.register_craft({
type = "cooking",
output = "default:steel_ingot",
output = epi.steel_ingot,
recipe = "elepower_dynamics:iron_ingot"
})
@ -438,7 +451,7 @@ for mat, data in pairs(elepd.registered_gears) do
local immebreak = false
if mat == "wood" then
found = "group:stick"
found = epi.group_stick
immebreak = true
end

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epi = ele.external.ing
----------------
-- Craftitems --
----------------
@ -164,7 +169,7 @@ minetest.register_craftitem("elepower_dynamics:pcb_blank", {
-- Limited etchings
if uses == 10 then
minetest.set_node(pos, {name = "default:water_source"})
minetest.set_node(pos, {name = epr.water_source})
else
meta:set_int("uses", uses)
end
@ -188,7 +193,7 @@ minetest.register_craftitem("elepower_dynamics:acidic_compound", {
local pos = pointed_thing.under
local node = minetest.get_node(pos)
if node.name ~= "default:water_source" then
if node.name ~= epi.water_source then
return itemstack
end
@ -303,6 +308,6 @@ minetest.register_craftitem("elepower_dynamics:pv_cell", {
-- Overrides --
---------------
minetest.override_item("default:steel_ingot", {
description = "Steel Ingot\nLow carbon steel"
minetest.override_item(epi.steel_ingot, {
description = "Low Carbon Steel Ingot"
})

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
-- Etching Acid
ele.helpers.register_liquid("etching_acid", {
@ -40,7 +44,7 @@ bucket.register_liquid("elepower_dynamics:lithium_source", "elepower_dynamics:li
minetest.register_node("elepower_dynamics:steam", {
description = "Steam",
groups = {not_in_creative_inventory = 1, gas = 1},
liquid_form = "default:water_source",
liquid_form = epr.water_source,
tiles = {"elepower_steam.png"},
})

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epg = ele.external.graphic
local eps = ele.external.sounds
---------------
-- Overrides --
---------------
@ -14,34 +19,34 @@ minetest.register_alias_force("elepower_dynamics:fluid_duct", "fluid_transfer:fl
minetest.register_node("elepower_dynamics:stone_with_lead", {
description = "Lead Ore",
tiles = {"default_stone.png^elepower_mineral_lead.png"},
tiles = {epg.stone.."^elepower_mineral_lead.png"},
groups = {cracky = 2},
drop = 'elepower_dynamics:lead_lump',
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone,
})
minetest.register_node("elepower_dynamics:stone_with_nickel", {
description = "Nickel Ore",
tiles = {"default_stone.png^elepower_mineral_nickel.png"},
tiles = {epg.stone.."^elepower_mineral_nickel.png"},
groups = {cracky = 2},
drop = 'elepower_dynamics:nickel_lump',
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone,
})
minetest.register_node("elepower_dynamics:stone_with_viridisium", {
description = "Viridisium Ore",
tiles = {"default_stone.png^elepower_mineral_viridisium.png"},
tiles = {epg.stone.."^elepower_mineral_viridisium.png"},
groups = {cracky = 3},
drop = 'elepower_dynamics:viridisium_lump',
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone,
})
minetest.register_node("elepower_dynamics:stone_with_zinc", {
description = "Zinc Ore",
tiles = {"default_stone.png^elepower_mineral_zinc.png"},
tiles = {epg.stone.."^elepower_mineral_zinc.png"},
groups = {cracky = 3},
drop = 'elepower_dynamics:zinc_lump',
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone,
})
-- Other
@ -51,18 +56,18 @@ minetest.register_node("elepower_dynamics:particle_board", {
tiles = {"elepower_particle_board.png"},
groups = {choppy = 2, wood = 1},
drop = 'elepower_dynamics:wood_dust 4',
sounds = default.node_sound_wood_defaults(),
sounds = eps.node_sound_wood,
})
minetest.register_node("elepower_dynamics:hardened_glass", {
description = "Hardened Obsidian Glass\nDoes not let light through",
drawtype = "glasslike_framed_optional",
tiles = {"default_obsidian_glass.png", "elepower_hard_glass_detail.png"},
tiles = {epg.obsidian_glass, "elepower_hard_glass_detail.png"},
paramtype2 = "glasslikeliquidlevel",
is_ground_content = false,
sunlight_propagates = false,
use_texture_alpha = "clip",
sounds = default.node_sound_glass_defaults(),
sounds = eps.node_sound_glass,
groups = {cracky = 3},
})
@ -73,7 +78,7 @@ minetest.register_node("elepower_dynamics:viridisium_block", {
tiles = {"elepower_viridisium_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
sounds = default.node_sound_metal_defaults(),
sounds = eps.node_sound_metal,
})
minetest.register_node("elepower_dynamics:lead_block", {
@ -81,7 +86,7 @@ minetest.register_node("elepower_dynamics:lead_block", {
tiles = {"elepower_lead_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 2},
sounds = default.node_sound_metal_defaults(),
sounds = eps.node_sound_metal,
})
minetest.register_node("elepower_dynamics:invar_block", {
@ -89,7 +94,7 @@ minetest.register_node("elepower_dynamics:invar_block", {
tiles = {"elepower_invar_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 3},
sounds = default.node_sound_metal_defaults(),
sounds = eps.node_sound_metal,
})
minetest.register_node("elepower_dynamics:nickel_block", {
@ -97,7 +102,7 @@ minetest.register_node("elepower_dynamics:nickel_block", {
tiles = {"elepower_nickel_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 3},
sounds = default.node_sound_metal_defaults(),
sounds = eps.node_sound_metal,
})
minetest.register_node("elepower_dynamics:zinc_block", {
@ -105,5 +110,5 @@ minetest.register_node("elepower_dynamics:zinc_block", {
tiles = {"elepower_zinc_block.png"},
is_ground_content = false,
groups = {cracky = 1, level = 3},
sounds = default.node_sound_metal_defaults(),
sounds = eps.node_sound_metal,
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -1,6 +1,11 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local eps = ele.external.sounds
if ele.external.tools.enable_iron_lead_tools == true then
-- Pickaxes
minetest.register_tool("elepower_dynamics:pick_iron", {
description = "Iron Pickaxe",
inventory_image = "elepower_tool_ironpick.png",
@ -12,7 +17,7 @@ minetest.register_tool("elepower_dynamics:pick_iron", {
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
minetest.register_tool("elepower_dynamics:pick_lead", {
@ -26,7 +31,7 @@ minetest.register_tool("elepower_dynamics:pick_lead", {
},
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
-- Shovels
@ -43,7 +48,7 @@ minetest.register_tool("elepower_dynamics:shovel_iron", {
},
damage_groups = {fleshy=3},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
minetest.register_tool("elepower_dynamics:shovel_lead", {
@ -58,7 +63,7 @@ minetest.register_tool("elepower_dynamics:shovel_lead", {
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
-- Axes
@ -74,7 +79,7 @@ minetest.register_tool("elepower_dynamics:axe_iron", {
},
damage_groups = {fleshy=4},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
minetest.register_tool("elepower_dynamics:axe_lead", {
@ -88,7 +93,7 @@ minetest.register_tool("elepower_dynamics:axe_lead", {
},
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
-- Swords
@ -104,7 +109,7 @@ minetest.register_tool("elepower_dynamics:sword_iron", {
},
damage_groups = {fleshy=5},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
minetest.register_tool("elepower_dynamics:sword_lead", {
@ -118,5 +123,7 @@ minetest.register_tool("elepower_dynamics:sword_lead", {
},
damage_groups = {fleshy=7},
},
sound = {breaks = "default_tool_breaks"},
sound = {breaks = eps.tool_breaks},
})
end

View File

@ -1,14 +1,17 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
--------------
-- Worldgen --
--------------
-- Lead
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_lead",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 12,
clust_size = 3,
@ -19,7 +22,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_lead",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 14 * 14 * 14,
clust_num_ores = 5,
clust_size = 3,
@ -30,7 +33,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_lead",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
@ -43,7 +46,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_nickel",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 25 * 25 * 25,
clust_num_ores = 4,
clust_size = 3,
@ -54,7 +57,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_nickel",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 25 * 25 * 25,
clust_num_ores = 4,
clust_size = 3,
@ -65,7 +68,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_nickel",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 15 * 15 * 15,
clust_num_ores = 5,
clust_size = 3,
@ -76,7 +79,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_nickel",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 5,
clust_size = 3,
@ -89,7 +92,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_viridisium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 25 * 25 * 25,
clust_num_ores = 5,
clust_size = 3,
@ -100,7 +103,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_viridisium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 20 * 20 * 20,
clust_num_ores = 5,
clust_size = 3,
@ -111,7 +114,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_viridisium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 10 * 10 * 10,
clust_num_ores = 5,
clust_size = 3,
@ -124,7 +127,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_zinc",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 25 * 25 * 25,
clust_num_ores = 2,
clust_size = 3,
@ -135,7 +138,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_zinc",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 20 * 20 * 20,
clust_num_ores = 5,
clust_size = 3,
@ -146,7 +149,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_dynamics:stone_with_zinc",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 12 * 12 * 12,
clust_num_ores = 5,
clust_size = 3,

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
-----------
-- Nodes --
-----------
@ -7,9 +11,9 @@
minetest.register_craft({
output = "elepower_farming:device_frame",
recipe = {
{"basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet"},
{"default:glass", "default:mese_crystal", "default:glass"},
{"basic_materials:plastic_sheet", "default:glass", "basic_materials:plastic_sheet"},
{"basic_materials:plastic_sheet", epi.glass, "basic_materials:plastic_sheet"},
{epi.glass, epi.mese_crystal, epi.glass},
{"basic_materials:plastic_sheet", epi.glass, "basic_materials:plastic_sheet"},
}
})
@ -18,7 +22,7 @@ minetest.register_craft({
output = "elepower_farming:planter",
recipe = {
{"elepower_dynamics:nickel_ingot", "elepower_dynamics:control_circuit", "elepower_dynamics:nickel_ingot"},
{"farming:hoe_steel", "elepower_farming:device_frame", "farming:hoe_steel"},
{epi.hoe_steel, "elepower_farming:device_frame", epi.hoe_steel},
{"elepower_dynamics:wound_copper_coil", "basic_materials:motor", "elepower_dynamics:wound_copper_coil"},
}
})
@ -28,7 +32,7 @@ minetest.register_craft({
output = "elepower_farming:harvester",
recipe = {
{"elepower_dynamics:nickel_ingot", "elepower_dynamics:control_circuit", "elepower_dynamics:nickel_ingot"},
{"default:axe_steel", "elepower_farming:device_frame", "farming:hoe_steel"},
{epi.axe_steel, "elepower_farming:device_frame", epi.hoe_steel},
{"basic_materials:motor", "elepower_dynamics:diamond_gear", "basic_materials:motor"},
}
})

View File

@ -1,9 +1,13 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec(timer, biomass_buffer, output_buffer)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.fluid_bar(0, 0.75, biomass_buffer)..
ele.formspec.fluid_bar(7, 0.75, output_buffer)..
"list[context;src;1,0.5;3,3;]"..
@ -14,7 +18,7 @@ local function get_formspec(timer, biomass_buffer, output_buffer)
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function is_plant(itemname)

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
-- How many seconds there are between runs
local HARVESTER_TICK = 10
@ -81,9 +85,9 @@ end
local function get_formspec(timer, power, sludge, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.state_switcher(7, 2.5, state)..
ele.formspec.power_meter(power)..
ele.formspec.fluid_bar(7, 0, sludge)..
@ -93,7 +97,7 @@ local function get_formspec(timer, power, sludge, state)
"list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local eps = ele.external.sounds
local epi = ele.external.ing
-- How many seconds there are between runs
local PLANTER_TICK = 10
@ -180,26 +185,26 @@ local function plant(pos, range, stack, inv)
if (regN[base_node.name].soil == nil or
regN[base_node.name].soil.wet == nil or
regN[base_node.name].soil.dry == nil) and
regN["farming:soil"] == nil then
regN[epi.farming_soil] == nil then
till = false
end
if till then
minetest.sound_play("default_dig_crumbly", {
minetest.sound_play(eps.dig_crumbly, {
pos = base_pos,
gain = 0.5,
})
local soil = regN[base_node.name].soil
local wet_soil = "farming:soil_wet"
local wet_soil = epi.farming_soil_wet
-- Determine soil name
-- Make sure we don't replace wet soil
if soil then
wet_soil = soil.wet or "farming:soil_wet"
wet_soil = soil.wet or epi_farming_soil_wet
soil = soil.dry
else
soil = "farming:soil"
soil = epi.farming_soil
end
if base_node.name ~= soil and base_node.name ~= wet_soil then

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
-- How many seconds there are between runs
local SPAWNER_TICK = 10
@ -91,9 +95,9 @@ end
local function get_formspec(timer, power, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
ele.formspec.create_bar(1, 0, 100 - timer, "#00ff11", true)..
@ -104,7 +108,7 @@ local function get_formspec(timer, power, state)
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)

View File

@ -1,12 +1,16 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local CAPACITY = 8000
local fluid_table = {
["default:tree"] = { fpc = 100, fluid = "elepower_farming:tree_sap_source" },
["default:jungletree"] = { fpc = 50, fluid = "elepower_farming:resin_source" },
["default:pine_tree"] = { fpc = 100, fluid = "elepower_farming:resin_source" },
["default:acacia_tree"] = { fpc = 50, fluid = "elepower_farming:resin_source" },
["default:aspen_tree"] = { fpc = 50, fluid = "elepower_farming:resin_source" },
[epi.tree] = { fpc = 100, fluid = "elepower_farming:tree_sap_source" },
[epi.jungle_tree] = { fpc = 50, fluid = "elepower_farming:resin_source" },
[epi.pine_tree] = { fpc = 100, fluid = "elepower_farming:resin_source" },
[epi.acacia_tree] = { fpc = 50, fluid = "elepower_farming:resin_source" },
[epi.aspen_tree] = { fpc = 50, fluid = "elepower_farming:resin_source" },
}
minetest.register_node("elepower_farming:tree_extractor", {

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local tree_fluid_recipes = {
["elepower_farming:tree_sap_source"] = {
water = 1000,
@ -23,9 +27,9 @@ local tree_fluid_recipes = {
local function get_formspec(timer, power, fluid_buffer, water_buffer, output_buffer, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.create_bar(1, 0, 100 - timer, "#00ff11", true)..
ele.formspec.fluid_bar(2, 0, fluid_buffer)..
@ -37,7 +41,7 @@ local function get_formspec(timer, power, fluid_buffer, water_buffer, output_buf
"list[current_player;main;0,5.5;8,3;8]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)
@ -170,7 +174,7 @@ ele.register_machine("elepower_farming:tree_processor", {
},
water = {
capacity = 8000,
accepts = {"default:water_source"},
accepts = {epr.water_source},
drainable = false,
},
output = {

View File

@ -2,6 +2,11 @@
-- This code is taken from TreeCapitator by HybridDog (WTFPL)
-- https://github.com/HybridDog/treecapitator
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local load_time_start = minetest.get_us_time()
------------------------------------- Settings ---------------------------------
@ -10,8 +15,8 @@ local load_time_start = minetest.get_us_time()
elefarm.tc = {
stem_height_min = 3,
default_tree = {
trees = {"default:tree"},
leaves = {"default:leaves"},
trees = {epi.tree},
leaves = {epi.leaves},
range = 2,
fruits = {},
type = "default",
@ -1024,32 +1029,32 @@ local mgname = minetest.get_mapgen_setting"mg_name"
if mgname == "v6" then
elefarm.tc.register_tree{
trees = {"default:tree"},
leaves = {"default:leaves"},
trees = {epi.tree},
leaves = {epi.leaves},
range = 2,
fruits = {"default:apple"}
fruits = {epi.apple}
}
elefarm.tc.register_tree({
trees = {"default:jungletree"},
leaves = {"default:jungleleaves"},
trees = {epi.jungle_tree},
leaves = {epi.jungle_leaves},
range = 3
})
else
elefarm.tc.register_tree{
trees = {"default:tree"},
leaves = {"default:leaves"},
trees = {epi.tree},
leaves = {epi.leaves},
range = 2,
range_up = 4,
range_down = 0,
fruits = {"default:apple", "default:tree"},
fruits = {epi.apple, epi.tree},
trunk_fruit_vertical = true
}
elefarm.tc.register_tree({
trees = {"default:jungletree"},
leaves = {"default:jungleleaves"},
fruits = {"default:jungletree"},
trees = {epi.jungle_tree},
leaves = {epi.jungle_leaves},
fruits = {epi.jungle_tree},
range = 4,
range_up = 14,
range_down = 5,
@ -1058,9 +1063,9 @@ else
})
elefarm.tc.register_tree({
trees = {"default:jungletree"},
leaves = {"default:jungleleaves"},
fruits = {"default:jungletree"},
trees = {epi.jungle_tree},
leaves = {epi.jungle_leaves},
fruits = {epi.jungle_tree},
range = 4,
range_up = 14,
range_down = 3,
@ -1071,8 +1076,8 @@ else
end
elefarm.tc.register_tree({
trees = {"default:pine_tree"},
leaves = {"default:pine_needles"},
trees = {epi.pine_tree},
leaves = {epi.pine_needles},
-- the +2 height is used to also support the coned pine trees
range_up = 2 +2,
range_down = 6,
@ -1080,29 +1085,29 @@ elefarm.tc.register_tree({
})
elefarm.tc.register_tree({
trees = {"default:acacia_tree"},
leaf = "default:acacia_leaves",
trees = {epi.acacia_tree},
leaf = epi.acacia_leaves,
no_param2test = true,
--leavesrange = 4,
type = "acacia"
})
elefarm.tc.register_tree({
trees = {"default:aspen_tree"},
leaves = {"default:aspen_leaves"},
trees = {epi.aspen_tree},
leaves = {epi.aspen_leaves},
range = 4,
})
if minetest.get_modpath("farming_plus") then
elefarm.tc.register_tree({
trees = {"default:tree"},
trees = {epi.tree},
leaves = {"farming_plus:banana_leaves"},
range = 2,
fruits = {"farming_plus:banana"}
})
elefarm.tc.register_tree({
trees = {"default:tree"},
trees = {epi.tree},
leaves = {"farming_plus:cocoa_leaves"},
range = 2,
fruits = {"farming_plus:cocoa"}
@ -1147,7 +1152,7 @@ if minetest.get_modpath("moretrees") then
elefarm.tc.register_tree{
trees = {"moretrees:apple_tree_trunk"},
leaves = {"moretrees:apple_tree_leaves"},
fruits = {"default:apple", "moretrees:apple_tree_trunk"},
fruits = {epi.apple, "moretrees:apple_tree_trunk"},
trunk_fruit_vertical = true,
range = 9,
range_up = 3,
@ -1266,7 +1271,7 @@ if minetest.get_modpath("moretrees") then
elefarm.tc.register_tree{ -- small and 2x2 jungletree at once
trees = {"moretrees:jungletree_trunk"},
leaves = {"default:jungleleaves", "moretrees:jungletree_leaves_red"},
leaves = {epi.jungle_leaves, "moretrees:jungletree_leaves_red"},
fruits = {"moretrees:jungletree_trunk"},
requisite_leaves = {"moretrees:jungletree_leaves_red"},
trunk_fruit_vertical = true,
@ -1280,7 +1285,7 @@ if minetest.get_modpath("moretrees") then
elefarm.tc.register_tree{
trees = {"moretrees:jungletree_trunk"},
leaves = {"default:jungleleaves", "moretrees:jungletree_leaves_yellow",
leaves = {epi.jungle_leaves, "moretrees:jungletree_leaves_yellow",
"moretrees:jungletree_leaves_red"},
fruits = {"moretrees:jungletree_trunk"},
requisite_leaves = {"moretrees:jungletree_leaves_yellow"},
@ -1336,8 +1341,8 @@ end
-- code from amadin and narrnika
if minetest.get_modpath("ethereal") then
elefarm.tc.register_tree({
trees = {"default:jungletree"},
leaves = {"default:jungleleaves"},
trees = {epi.jungle_tree},
leaves = {epi.jungle_leaves},
range = 3,
height = 20,
max_nodes = 145,
@ -1354,9 +1359,9 @@ if minetest.get_modpath("ethereal") then
type = "default",
})
elefarm.tc.register_tree({
trees = {"default:tree"},
leaves = {"default:leaves", "ethereal:orange_leaves"},
fruits = {"default:apple", "ethereal:orange"},
trees = {epi.tree},
leaves = {epi.leaves, "ethereal:orange_leaves"},
fruits = {epi.apple, "ethereal:orange"},
range = 2,
type = "default",
})

View File

@ -11,18 +11,25 @@
------------------------------------------------------
-- Crafting Recipes --
------------------------------------------------------
local glass = "default:glass"
local glass_slab = "stairs:slab_glass"
local stick = "default:stick"
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local glass = epi.glass
local glass_slab = epi.slab_glass
local stick = epi.stick
local steel_wire = "basic_materials:steel_wire"
local steel_strip = "basic_materials:steel_strip"
local plastic_strip = "basic_materials:plastic_strip"
local plastic_sheet = "basic_materials:plastic_sheet"
local empty_spool = "basic_materials:empty_spool"
local mese_dust = "elepower_dynamics:mese_dust"
local dye_red = "dye:red"
local dye_green = "dye:green"
local dye_blue = "dye:blue"
local s_wood = "stairs:slab_wood"
local dye_red = epi.dye_red
local dye_green = epi.dye_green
local dye_blue = epi.dye_blue
local s_wood = epi.slab_wood
local group_color_blue = epi.group_color_blue
local group_color_violet = epi.group_color_violet
minetest.register_craft( {
output = "elepower_lighting:electrum_strip 12",
@ -40,7 +47,7 @@ minetest.register_craft({
output = "elepower_dynamics:uv_bulb",
recipe = {
{ "" ,"elepower_lighting:bulb_glass" , "" },
{"group:color_blue","elepower_lighting:incandescent_bulb_element" ,"group:color_violet"},
{group_color_blue,"elepower_lighting:incandescent_bulb_element" ,group_color_violet},
{ "" ,steel_strip , "" }
}
})
@ -177,6 +184,10 @@ minetest.register_craft({
{ "" , "" , "" },
{stick, "" ,steel_wire},
{ "" , "" , "" }
},
replacements = {
{stick, stick},
{steel_wire, empty_spool}
}
})

View File

@ -11,12 +11,30 @@
------------------------------------------------------
-- Crafting Shades --
------------------------------------------------------
local stick = "default:stick"
local paper = "default:paper"
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local stick = epi.stick
local paper = epi.paper
local dye_red = epi.dye_red
local dye_blue = epi.dye_blue
local paper_red = "elepower_lighting:paper_red"
local paper_blue = "elepower_lighting:paper_blue"
local colors = {["default:paper"] = "",["elepower_lighting:paper_red"] = "_red",["elepower_lighting:paper_blue"] = "_blue"}
local colors = {[paper] = "",["elepower_lighting:paper_red"] = "_red",["elepower_lighting:paper_blue"] = "_blue"}
minetest.register_craft({
output = "elepower_lighting:paper_red 3",
type = "shapeless",
recipe = {paper,paper,paper,dye_red},
})
minetest.register_craft({
output = "elepower_lighting:paper_blue 3",
type = "shapeless",
recipe = {paper,paper,paper,dye_blue},
})
for paper,color in pairs(colors) do
minetest.register_craft({

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
--*****************--
-- MACHINE RECIPES --
--*****************--
@ -10,18 +14,18 @@
local alloy_recipes = {
{
recipe = { "elepower_dynamics:iron_ingot", "elepower_dynamics:coal_dust 4" },
output = "default:steel_ingot",
output = epi.steel_ingot,
},
{
recipe = { "default:copper_ingot 2", "default:tin_ingot" },
output = "default:bronze_ingot 3",
recipe = { epi.copper_ingot.." 2", epi.tin_ingot },
output = epi.bronze_ingot.." 3",
},
{
recipe = { "elepower_dynamics:iron_ingot 3", "elepower_dynamics:nickel_ingot" },
output = "elepower_dynamics:invar_ingot 4",
},
{
recipe = { "default:gold_ingot 2", "elepower_dynamics:invar_ingot" },
recipe = { epi.gold_ingot.." 2", "elepower_dynamics:invar_ingot" },
output = "elepower_dynamics:electrum_ingot 3",
},
{
@ -29,7 +33,7 @@ local alloy_recipes = {
output = "elepower_dynamics:silicon_wafer",
},
{
recipe = { "default:coal_lump", "elepower_dynamics:coal_dust 4" },
recipe = { epi.coal_lump, "elepower_dynamics:coal_dust 4" },
output = "elepower_dynamics:graphite_ingot",
},
{
@ -38,17 +42,17 @@ local alloy_recipes = {
time = 8,
},
{
recipe = { "default:obsidian_glass", "elepower_dynamics:lead_ingot 4" },
recipe = { epi.obsidian_glass, "elepower_dynamics:lead_ingot 4" },
output = "elepower_dynamics:hardened_glass 4",
time = 8,
},
{
recipe = { "default:copper_ingot 2", "moreores:silver_ingot" },
recipe = { epi.copper_ingot.." 2", epi.silver_ingot },
output = "basic_materials:brass_ingot 3",
time = 8,
},
{
recipe = { "default:bronze_ingot", "default:steel_ingot 4" },
recipe = { epi.bronze_ingot, epi.steel_ingot.." 4" },
output = "elepower_machines:heat_casing 4",
},
}
@ -106,36 +110,36 @@ end
local grinding_recipes = {
{
recipe = { "farming:wheat" },
output = "farming:flour 2",
recipe = { epi.wheat },
output = epi.flour.." 2",
time = 4,
},
{
recipe = { "default:desert_sand 4" },
recipe = { epi.desert_sand.." 4" },
output = "basic_materials:silicon",
},
{
recipe = { "default:sand 4" },
recipe = { epi.sand.." 4" },
output = "basic_materials:silicon",
},
{
recipe = { "default:cobble" },
output = "default:gravel 4",
recipe = { epi.cobble },
output = epi.gravel.." 4",
},
{
recipe = { "default:gravel" },
output = "default:sand 4",
recipe = { epi.gravel },
output = epi.sand.." 4",
},
{
recipe = { "default:mese" },
output = "default:mese_crystal 9",
recipe = { epi.mese },
output = epi.mese_crystal.." 9",
},
{
recipe = { "default:mese_crystal" },
output = "default:mese_crystal_fragment 9",
recipe = { epi.mese_crystal },
output = epi.mese_crystal_fragment.." 9",
},
{
recipe = { "default:mese_crystal_fragment" },
recipe = { epi.mese_crystal_fragment },
output = "elepower_dynamics:mese_dust",
},
{
@ -223,13 +227,13 @@ local compressor_recipes = {
time = 20,
},
{
recipe = { "default:mese_crystal_fragment 4", "default:mese_crystal_fragment 4" },
output = "default:mese_crystal",
recipe = { epi.mese_crystal_fragment.." 4", epi.mese_crystal_fragment.." 4" },
output = epi.mese_crystal,
time = 2,
},
{
recipe = { "default:mese_crystal 4","default:mese_crystal 4" },
output = "default:mese",
recipe = { epi.mese_crystal.." 4",epi.mese_crystal.." 4" },
output = epi.mese,
time = 2,
},
{
@ -304,7 +308,7 @@ local soldering_recipes = {
time = 8,
},
{
recipe = { "default:copper_ingot 4", "elepower_dynamics:microcontroller 4", "elepower_dynamics:electrum_ingot 2" },
recipe = { epi.copper_ingot.." 4", "elepower_dynamics:microcontroller 4", "elepower_dynamics:electrum_ingot 2" },
output = "elepower_dynamics:soc",
time = 28,
},
@ -388,7 +392,7 @@ minetest.register_craft({
output = "elepower_machines:hardened_capacitor",
recipe = {
{"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"},
{"elepower_dynamics:invar_plate", "default:mese_crystal", "elepower_dynamics:invar_plate"},
{"elepower_dynamics:invar_plate", epi.mese_crystal , "elepower_dynamics:invar_plate"},
{"elepower_dynamics:invar_plate", "elepower_dynamics:capacitor" , "elepower_dynamics:invar_plate"},
}
})
@ -397,7 +401,7 @@ minetest.register_craft({
output = "elepower_machines:reinforced_capacitor",
recipe = {
{"elepower_dynamics:invar_plate", "elepower_dynamics:invar_plate", "elepower_dynamics:invar_plate"},
{"elepower_dynamics:electrum_plate", "default:mese_crystal", "elepower_dynamics:electrum_plate"},
{"elepower_dynamics:electrum_plate", epi.mese_crystal , "elepower_dynamics:electrum_plate"},
{"elepower_dynamics:electrum_plate", "elepower_machines:hardened_capacitor", "elepower_dynamics:electrum_plate"},
}
})
@ -406,7 +410,7 @@ minetest.register_craft({
output = "elepower_machines:resonant_capacitor",
recipe = {
{"elepower_dynamics:electrum_plate", "elepower_dynamics:electrum_plate", "elepower_dynamics:electrum_plate"},
{"elepower_dynamics:viridisium_plate", "default:mese_crystal", "elepower_dynamics:viridisium_plate"},
{"elepower_dynamics:viridisium_plate", epi.mese_crystal , "elepower_dynamics:viridisium_plate"},
{"elepower_dynamics:viridisium_plate", "elepower_machines:reinforced_capacitor", "elepower_dynamics:viridisium_plate"},
}
})
@ -441,9 +445,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:wind_turbine_blade",
recipe = {
{"", "default:wood", "default:wood"},
{"default:stick", "default:wood", "default:wood"},
{"default:stick", "default:stick", ""},
{"" , epi.group_wood , epi.group_wood},
{epi.group_stick, epi.group_wood , epi.group_wood},
{epi.group_stick, epi.group_stick, ""},
}
})
@ -451,7 +455,7 @@ minetest.register_craft({
output = "elepower_machines:wind_turbine_blades",
recipe = {
{"elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade"},
{"elepower_machines:wind_turbine_blade", "default:wood", "elepower_machines:wind_turbine_blade"},
{"elepower_machines:wind_turbine_blade", epi.group_wood , "elepower_machines:wind_turbine_blade"},
{"elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade", "elepower_machines:wind_turbine_blade"},
}
})
@ -462,9 +466,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:coal_alloy_furnace",
recipe = {
{"default:brick", "default:brick", "default:brick"},
{"default:furnace", "", "default:furnace"},
{"default:brick", "default:brick", "default:brick"},
{epi.brick, epi.brick , epi.brick},
{epi.brick, epi.coal_lump, epi.brick},
{epi.brick, epi.brick , epi.brick},
}
})
@ -472,18 +476,18 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:grindstone",
recipe = {
{"group:stone", "group:stone", "group:stone"},
{"default:flint", "default:flint", "default:flint"},
{"default:cobble", "default:cobble", "default:cobble"},
{epi.group_stone, epi.group_stone, epi.group_stone},
{epi.flint , epi.flint , epi.flint },
{epi.cobble , epi.cobble , epi.cobble }
}
})
minetest.register_craft({
output = "elepower_machines:crank",
recipe = {
{"group:stick", "group:stick", "group:stick"},
{"", "", "group:stick"},
{"", "", "group:stick"},
{epi.group_stick, epi.group_stick, epi.group_stick},
{"" , "" , epi.group_stick},
{"" , "" , epi.group_stick}
}
})
@ -491,9 +495,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:machine_block",
recipe = {
{"default:steel_ingot", "default:glass", "default:steel_ingot"},
{"default:glass", "elepower_dynamics:brass_gear", "default:glass"},
{"default:steel_ingot", "basic_materials:motor", "default:steel_ingot"},
{epi.steel_ingot, epi.glass , epi.steel_ingot},
{epi.glass , "elepower_dynamics:brass_gear", epi.glass },
{epi.steel_ingot, "basic_materials:motor" , epi.steel_ingot}
}
})
@ -501,9 +505,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:generator",
recipe = {
{"", "default:steel_ingot", ""},
{"default:steel_ingot", "elepower_machines:machine_block", "default:steel_ingot"},
{"elepower_dynamics:wound_copper_coil", "default:furnace", "elepower_dynamics:wound_copper_coil"}
{"" , epi.steel_ingot , "" },
{epi.steel_ingot , "elepower_machines:machine_block", epi.steel_ingot },
{"elepower_dynamics:wound_copper_coil", epi.coal_lump , "elepower_dynamics:wound_copper_coil"}
}
})
@ -512,7 +516,7 @@ minetest.register_craft({
output = "elepower_machines:fuel_burner",
recipe = {
{"elepower_dynamics:wound_copper_coil", "elepower_dynamics:integrated_circuit", "elepower_dynamics:wound_copper_coil"},
{"default:brick", "elepower_dynamics:portable_tank", "default:brick"},
{epi.brick , "elepower_dynamics:portable_tank" , epi.brick},
{"elepower_dynamics:servo_valve" , "elepower_machines:generator" , "elepower_dynamics:servo_valve"},
}
})
@ -522,12 +526,8 @@ minetest.register_craft({
output = "elepower_machines:alloy_furnace",
recipe = {
{ "" , "elepower_dynamics:integrated_circuit", "" },
{"default:brick", "elepower_machines:machine_block", "default:brick"},
{
"elepower_dynamics:wound_copper_coil",
"elepower_machines:coal_alloy_furnace",
"elepower_dynamics:wound_copper_coil"
},
{"elepower_dynamics:wound_copper_coil","basic_materials:heating_element", "elepower_dynamics:wound_copper_coil"},
{epi.brick , "elepower_machines:machine_block" , epi.brick },
}
})
@ -537,11 +537,7 @@ minetest.register_craft({
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"
},
{"elepower_dynamics:invar_gear","elepower_dynamics:wound_copper_coil","elepower_dynamics:invar_gear"}
}
})
@ -550,8 +546,8 @@ minetest.register_craft({
output = "elepower_machines:furnace",
recipe = {
{"", "elepower_dynamics:integrated_circuit", ""},
{"default:clay_brick", "elepower_machines:machine_block", "default:clay_brick"},
{"elepower_dynamics:wound_copper_coil", "default:furnace", "elepower_dynamics:wound_copper_coil"},
{"elepower_dynamics:wound_copper_coil","basic_materials:heating_element", "elepower_dynamics:wound_copper_coil"},
{epi.clay_brick, "elepower_machines:machine_block", epi.clay_brick},
}
})
@ -560,7 +556,7 @@ minetest.register_craft({
output = "elepower_machines:pulverizer",
recipe = {
{"", "elepower_dynamics:integrated_circuit", ""},
{"default:flint", "elepower_machines:machine_block", "default:flint"},
{epi.flint, "elepower_machines:machine_block", epi.flint},
{"elepower_dynamics:wound_copper_coil", "elepower_dynamics:lead_gear", "elepower_dynamics:wound_copper_coil"},
}
})
@ -590,7 +586,7 @@ minetest.register_craft({
output = "elepower_machines:accumulator",
recipe = {
{"", "fluid_transfer:fluid_duct", ""},
{"default:glass", "elepower_machines:machine_block", "default:glass"},
{epi.glass, "elepower_machines:machine_block", epi.glass},
{"elepower_dynamics:steel_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:steel_gear"},
}
})
@ -614,7 +610,7 @@ minetest.register_craft({
output = "elepower_machines:lava_generator",
recipe = {
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:control_circuit", "elepower_dynamics:wound_silver_coil"},
{"default:brick", "elepower_machines:machine_block", "default:brick"},
{epi.brick, "elepower_machines:machine_block", epi.brick},
{"elepower_dynamics:invar_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:invar_gear"},
},
})
@ -623,17 +619,17 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:compressor_piston",
recipe = {
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
{"", epi.steel_ingot, ""},
{"", epi.steel_ingot, ""},
{epi.bronze_ingot, epi.bronze_ingot, epi.bronze_ingot},
}
})
minetest.register_craft({
output = "elepower_machines:compressor_piston",
recipe = {
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"", epi.steel_ingot, ""},
{"", epi.steel_ingot, ""},
{"", "elepower_dynamics:bronze_plate", ""},
}
})
@ -644,7 +640,7 @@ minetest.register_craft({
recipe = {
{"elepower_dynamics:integrated_circuit", "elepower_machines:compressor_piston", "elepower_dynamics:wound_copper_coil"},
{"elepower_dynamics:steel_gear", "elepower_machines:machine_block", "elepower_dynamics:steel_gear"},
{"default:steel_ingot", "elepower_machines:compressor_piston", "default:steel_ingot"},
{epi.steel_ingot , "elepower_machines:compressor_piston", epi.steel_ingot }
}
})
@ -653,8 +649,8 @@ minetest.register_craft({
output = "elepower_machines:turbine_blades",
recipe = {
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", "default:steel_ingot", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", epi.steel_ingot , "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"}
}
})
@ -732,7 +728,7 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_machines:evaporator",
recipe = {
{"elepower_dynamics:steel_plate", "default:steelblock", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", epi.steel_block, "elepower_dynamics:steel_plate"},
{"elepower_dynamics:steel_plate", "elepower_machines:machine_block", "elepower_dynamics:steel_plate"},
{"elepower_dynamics:induction_coil", "elepower_dynamics:zinc_plate", "elepower_dynamics:induction_coil"},
}

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local CAPACITY = 8000
minetest.register_node("elepower_machines:accumulator", {
@ -17,7 +22,7 @@ minetest.register_node("elepower_machines:accumulator", {
},
on_construct = function ( pos )
local meta = minetest.get_meta(pos)
meta:set_string("water_fluid", "default:water_source")
meta:set_string("water_fluid", epr.water_source)
end
})
@ -66,7 +71,7 @@ minetest.register_abm({
local amount = 0
for _,fpos in pairs(positions) do
local node = minetest.get_node(fpos)
if node.name == "default:water_source" then
if node.name == epr.water_source then
amount = amount + 1000
end
end
@ -77,7 +82,7 @@ minetest.register_abm({
end
local ndef = minetest.registered_nodes[node.name]
local src = "default:water_source"
local src = epr.water_source
if ndef and ndef._heavy then
src = "elepower_nuclear:heavy_water_source"
if amount > 1000 then

View File

@ -23,7 +23,7 @@ elepm.register_crafter("elepower_machines:alloy_furnace", {
"elepower_machine_side.png", "elepower_machine_side.png", "elepower_machine_side.png^elepower_alloy_furnace_active.png",
},
},
ele_icon_material_1 ="default_copper_ingot.png",
ele_icon_material_2 ="default_tin_ingot.png",
ele_icon_material_1 ="elepower_iron_ingot.png^[multiply:#fcb15f",
ele_icon_material_2 ="elepower_iron_ingot.png^[multiply:#c1c1c1",
groups = {oddly_breakable_by_hand = 1}
})

View File

@ -1,6 +1,10 @@
-- This is a crafter type machine base.
-- It accepts a recipe type registered beforehand.
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
-- Specialized formspec for crafters
function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, machine_name, state)
local craftstats = elepm.craft.types[craft_type]
@ -141,9 +145,9 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, mach
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
"list[context;src;"..x..","..y..";"..in_width..","..in_height..";]"..
@ -157,7 +161,7 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, mach
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end

View File

@ -1,17 +1,22 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec_default(power, percent, buffer, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 2.5, state)..
ele.formspec.fluid_bar(7, 0, buffer)..
"image[3.5,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
(percent)..":default_furnace_fire_fg.png]"..
"image[3.5,1.5;1,1;"..epg.furnace_fire_bg.."^[lowpart:"..
(percent)..":"..epg.furnace_fire_fg.."]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
-- A generator that creates power using a fuel

View File

@ -1,9 +1,12 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec_default(power, percent, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
"list[context;src;3,1.5;1,1;]"..
@ -14,7 +17,7 @@ local function get_formspec_default(power, percent, state)
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
function elepm.register_fuel_generator(nodename, nodedef)

View File

@ -1,9 +1,12 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec_default(power)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"image[2,0.5;1,1;gui_furnace_arrow_bg.png^[transformR180]"..
"list[context;src;2,1.5;1,1;]"..
@ -16,7 +19,7 @@ local function get_formspec_default(power)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function can_dig(pos, player)

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec(mode, buffer, state)
if not mode then
mode = 0
@ -10,9 +14,9 @@ local function get_formspec(mode, buffer, state)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.state_switcher(0, 0, state)..
ele.formspec.fluid_bar(7, 0.75, buffer)..
"list[context;src;3.5,1;1,1;]"..
@ -26,7 +30,7 @@ local function get_formspec(mode, buffer, state)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)

View File

@ -1,15 +1,20 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec(fuel_percent, item_percent)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
"list[context;src;2,0.5;2,1;]"..
"list[context;fuel;2.5,2.5;1,1;]"..
"image[2.5,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
(100-fuel_percent)..":default_furnace_fire_fg.png]"..
"image[4,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"image[2.5,1.5;1,1;"..epg.furnace_fire_bg.."^[lowpart:"..
(100-fuel_percent)..":"..epg.furnace_fire_fg.."]"..
"image[4,1.5;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(item_percent)..":"..epg.gui_furnace_arrow_fg.."^[transformR270]"..
"list[context;dst;5,0.96;2,2;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -19,7 +24,7 @@ local function get_formspec(fuel_percent, item_percent)
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function can_dig(pos, player)

View File

@ -1,7 +1,11 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
elepm.electrolyzer_recipes = {
{
recipe = "default:water_source 1000",
recipe = epr.water_source.." 1000",
output = {
"elepower_dynamics:hydrogen 600",
"elepower_dynamics:oxygen 400",
@ -35,9 +39,9 @@ local function get_formspec(time, power, input, out1, out2, state)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.fluid_bar(1, 0, input)..
"image[1.2,2.45;0.5,0.5;elepower_gui_icon_fluid_electrolyzer_in.png]"..
@ -53,7 +57,7 @@ local function get_formspec(time, power, input, out1, out2, state)
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function get_electrolysis_result(buffer)
@ -174,7 +178,7 @@ ele.register_machine("elepower_machines:electrolyzer", {
ele_inrush = 128,
fluid_buffers = {
input = {
accepts = {"default:water_source", "elepower_nuclear:heavy_water_source",
accepts = {epr.water_source, "elepower_nuclear:heavy_water_source",
"group:biomass", "group:electrolysis_recipe"},
drainable = false,
capacity = 8000,

View File

@ -1,14 +1,19 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec(power, input, output, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(3.5, 1, state)..
ele.formspec.fluid_bar(1, 0, input)..
ele.formspec.fluid_bar(7, 0, output)..
"image[3.5,2;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[3.5,2;1,1;"..epg.gui_furnace_arrow_bg.."^[transformR270]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
@ -16,7 +21,7 @@ local function get_formspec(power, input, output, state)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)

View File

@ -1,14 +1,19 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local SPEED = 8
local function get_formspec(item_percent)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
"list[context;src;1.6,1;1,1;]"..
"image[3.5,1;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"image[3.5,1;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(item_percent)..":"..epg.gui_furnace_arrow_fg.."^[transformR270]"..
"list[context;dst;4.5,1;2,1;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -16,7 +21,7 @@ local function get_formspec(item_percent)
"listring[current_player;main]"..
"listring[context;src]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function can_dig(pos, player)
@ -154,7 +159,7 @@ ele.register_base_device("elepower_machines:grindstone", {
minetest.register_node("elepower_machines:crank", {
description = "Hand Crank\nPlace on Grindstone and hold Right-Click",
groups = {choppy = 1, oddly_breakable_by_hand = 1},
tiles = {"default_wood.png"},
tiles = {epg.wood},
use_texture_alpha = "clip",
drawtype = "nodebox",
paramtype = "light",

View File

@ -1,16 +1,21 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local epi = ele.external.ing
local TIME = 5
local cooler_recipes = {
["default:cobble"] = {
[epi.cobble] = {
lava = 0,
water = 0,
},
["default:obsidian"] = {
[epi.obsidian] = {
lava = 1000,
water = 0,
},
["default:stone"] = {
[epr.stone] = {
lava = 0,
water = 1000,
},
@ -30,25 +35,25 @@ local function get_formspec(item_percent, coolant_buffer, hot_buffer, power, rec
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(3.5, 2.5, state)..
ele.formspec.fluid_bar(1, 0, coolant_buffer)..
ele.formspec.fluid_bar(7, 0, hot_buffer)..
"list[context;dst;3.5,1.5;1,1;]"..
"image[2.5,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"image[4.5,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(item_percent)..":gui_furnace_arrow_fg.png^[transformFXR90]"..
"image[2.5,1.5;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(item_percent)..":"..epg.gui_furnace_arrow_fg.."^[transformR270]"..
"image[4.5,1.5;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(item_percent)..":"..epg.gui_furnace_arrow_fg.."^[transformFXR90]"..
table.concat(rclist, "")..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function lava_cooler_timer(pos, elapsed)
@ -131,11 +136,11 @@ ele.register_machine("elepower_machines:lava_cooler", {
fluid_buffers = {
coolant = {
capacity = 8000,
accepts = {"default:water_source"},
accepts = {epr.water_source},
},
hot = {
capacity = 8000,
accepts = {"default:lava_source"},
accepts = {epi.lava_source},
}
},
tiles = {
@ -148,8 +153,8 @@ ele.register_machine("elepower_machines:lava_cooler", {
inv:set_size("dst", 1)
meta:set_string("recipe", "default:cobble")
meta:set_string("formspec", get_formspec(0,nil,nil,nil,cooler_recipes, "default:cobble"))
meta:set_string("recipe", epi.cobble)
meta:set_string("formspec", get_formspec(0,nil,nil,nil,cooler_recipes, epi.cobble))
end,
on_timer = lava_cooler_timer,
on_receive_fields = function (pos, formname, fields, sender)

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ref
ele.register_fluid_generator("elepower_machines:lava_generator", {
description = "Lava Generator",
ele_usage = 64,
@ -16,7 +20,7 @@ ele.register_fluid_generator("elepower_machines:lava_generator", {
fluid_buffers = {
lava = {
capacity = 8000,
accepts = {"default:lava_source"},
accepts = {epi.lava_source},
drainable = false
}
},

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec(power, input, state, active, percent)
local t = "image[3.5,1.75;1,1;elepower_uv_bulb.png]"
@ -11,14 +16,14 @@ local function get_formspec(power, input, state, active, percent)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
ele.formspec.fluid_bar(1, 0, input)..
"image[3.5,1;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(percent)..":gui_furnace_arrow_fg.png^[transformR270]"..
"image[3.5,1;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(percent)..":"..epg.gui_furnace_arrow_fg.."^[transformR270]"..
t..
"list[context;src;2.5,1;1,1;]"..
"list[context;dst;4.5,1;1,1;]"..
@ -29,7 +34,7 @@ local function get_formspec(power, input, state, active, percent)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)

View File

@ -1,19 +1,23 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epi = ele.external.ing
local c_air = minetest.get_content_id("air")
local function get_formspec(power, fluid, state, level)
if not level then level = 0 end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.state_switcher(7, 2.5, state)..
ele.formspec.power_meter(power)..
ele.formspec.fluid_bar(7, 0, fluid)..
"label[1,0;Pump level: "..level.."]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
-- Dig a node in a certain radius on the same Y level
@ -92,7 +96,7 @@ local function timer(pos, elapsed)
local dig_node = pliquid
local amount = 1000
if pliquid == "elepower_nuclear:heavy_water_source" and heavy then
dig_node = "default:water_source"
dig_node = epr.water_source
amount = 200
end
@ -115,7 +119,7 @@ local function timer(pos, elapsed)
-- Valid liquid, proceed pumping
if bucket.liquids[node.name] and bucket.liquids[node.name].source == node.name then
if node.name == "default:water_source" and heavy then
if node.name == epr.water_source and heavy then
node.name = "elepower_nuclear:heavy_water_source"
end
@ -130,7 +134,7 @@ local function timer(pos, elapsed)
if pliquid ~= "" then
-- Filter was installed
if pliquid == "default:water_source" and heavy and fl_buffer.amount > 0 then
if pliquid == epr.water_source and heavy and fl_buffer.amount > 0 then
pliquid = "elepower_nuclear:heavy_water_source"
fl_buffer.amount = 0
refresh = true
@ -143,7 +147,7 @@ local function timer(pos, elapsed)
local dug = dig_node_leveled_radius(ppos, 16, dig_node)
if not dug then
local node = minetest.get_node_or_nil(ppos)
if node.name == "default:water_source" and heavy then
if node.name == epr.water_source and heavy then
node.name = "elepower_nuclear:heavy_water_source"
end

View File

@ -1,15 +1,19 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec(power, percent, buffer, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(3.5, 1.5, state)..
ele.formspec.fluid_bar(7, 0, buffer)..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
ele.register_fluid_generator("elepower_machines:steam_turbine", {

View File

@ -1,15 +1,19 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec_default(power, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
-- Primitive wind checking function
@ -164,7 +168,7 @@ minetest.register_entity("elepower_machines:wind_turbine_blades", {
visual = "mesh",
mesh = "elepower_wind_blades.obj",
physical = true,
textures = {"default_wood.png"},
textures = {epg.wood},
backface_culling = false,
visual_size = {x = 10, y = 10},
},

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
minetest.register_craft({
output = "elepower_mining:miner_controller",
recipe = {
@ -11,16 +15,16 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_mining:miner_core",
recipe = {
{"default:steelblock", "elepower_dynamics:invar_gear", "default:steelblock"},
{epi.steel_block, "elepower_dynamics:invar_gear", epi.steel_block},
{"elepower_dynamics:invar_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:invar_gear"},
{"default:steelblock", "elepower_dynamics:invar_gear", "default:steelblock"},
{epi.steel_block, "elepower_dynamics:invar_gear", epi.steel_block},
}
})
minetest.register_craft({
output = "elepower_mining:miner_drill",
recipe = {
{"default:steelblock", "elepower_dynamics:induction_coil_advanced", "default:steelblock"},
{epi.steel_block, "elepower_dynamics:induction_coil_advanced", epi.steel_block},
{"basic_materials:motor", "elepower_machines:machine_block", "basic_materials:motor"},
{"elepower_tools:hand_drill", "elepower_tools:hand_drill", "elepower_tools:hand_drill"},
}

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local structures = {}
local ores = {}
local TIMER = 10
@ -100,9 +104,9 @@ local function get_formspec(timer, power, buffer, state)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(0, 2.5, state)..
ele.formspec.fluid_bar(7, 0, buffer)..
@ -113,7 +117,7 @@ local function get_formspec(timer, power, buffer, state)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer(pos, elapsed)
@ -195,7 +199,7 @@ local function on_timer(pos, elapsed)
meta:set_string("formspec", get_formspec(wp, pow_buffer, buffer, state))
meta:set_int("storage", pow_buffer.storage)
meta:set_int("water_fluid_storage", buffer.amount)
meta:set_string("water_fluid", "default:water_source")
meta:set_string("water_fluid", epr.water_source)
meta:set_int("work", work)
return refresh
@ -227,7 +231,7 @@ ele.register_machine("elepower_mining:miner_controller", {
fluid_buffers = {
water = {
capacity = 16000,
accepts = {"default:water_source"},
accepts = {epr.water_source},
drainable = false,
},
},
@ -320,7 +324,7 @@ local function add_ores()
and drop ~= item.ore
and drop ~= ""
and item.ore_type == "scatter"
and item.wherein == "default:stone"
and item.wherein == epr.stone
and item.clust_scarcity ~= nil and item.clust_scarcity > 0
and item.clust_num_ores ~= nil and item.clust_num_ores > 0
and item.y_max ~= nil and item.y_min ~= nil then

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
-- Radiation-shielded Lead Machine Chassis
minetest.register_craft({
output = "elepower_nuclear:machine_block",
@ -204,9 +208,9 @@ elepm.register_craft({
minetest.register_craft({
output = "elepower_nuclear:control_rod",
recipe = {
{"", "elepower_dynamics:silver_plate", "moreores:silver_ingot"},
{"elepower_dynamics:silver_plate", "moreores:silver_ingot", "elepower_dynamics:silver_plate"},
{"moreores:silver_ingot", "elepower_dynamics:silver_plate", ""},
{"", "elepower_dynamics:silver_plate", epi.silver_ingot},
{"elepower_dynamics:silver_plate", epi.silver_ingot, "elepower_dynamics:silver_plate"},
{epi.silver_ingot, "elepower_dynamics:silver_plate", ""},
}
})
@ -225,8 +229,8 @@ minetest.register_craft({
output = "elepower_nuclear:pressure_vessel",
recipe = {
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"},
{"default:steelblock", "elepower_dynamics:portable_tank", "default:steelblock"},
{"elepower_dynamics:steel_plate", "default:steelblock", "elepower_dynamics:steel_plate"},
{epi.steel_block, "elepower_dynamics:portable_tank", epi.steel_block},
{"elepower_dynamics:steel_plate", epi.steel_block, "elepower_dynamics:steel_plate"},
}
})

View File

@ -1,15 +1,22 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
-- Nuclear fuel enrichment plant
local function get_formspec(craft_type, power, progress, pos)
if not progress then progress = 0 end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"list[context;src;2,0.75;1,1;]"..
"image[3.5,0.75;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(progress)..":gui_furnace_arrow_fg.png^[transformR270]"..
"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]"..
"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]"..
@ -19,7 +26,7 @@ local function get_formspec(craft_type, power, progress, pos)
"listring[current_player;main]"..
"listring[context;dst]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
elepm.register_craft_type("enrichment", {

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local epr = ele.external.ref
--[[
Reactor fitness check:
8x8x8 area surrounding the core must either contain..
@ -31,8 +36,8 @@ local function calculate_fitness(pos)
local data = manip:get_data()
local ids = {
c_water = minetest.get_content_id("default:water_source"),
c_lava = minetest.get_content_id("default:lava_source"),
c_water = minetest.get_content_id(epr.water_source),
c_lava = minetest.get_content_id(epi.lava_source),
}
local excession = 0
@ -144,9 +149,9 @@ local function get_core_formspec(heat, power)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
"list[context;fuel;2.5,0;3,3;]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
@ -158,7 +163,7 @@ local function get_core_formspec(heat, power)
"listring[current_player;main]"..
"listring[context;fuel]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function get_controller_formspec(rod_pos, selected)
@ -182,9 +187,9 @@ local function get_controller_formspec(rod_pos, selected)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
table.concat( ctrls, "" )..
"button[0,3.5;1.5,0.5;next;Next]"..
"button[1.5,3.5;1.5,0.5;prev;Previous]"..
@ -199,20 +204,20 @@ local function get_controller_formspec(rod_pos, selected)
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function get_port_formspec(cool, hot)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.fluid_bar(0, 0, cool)..
ele.formspec.fluid_bar(7, 0, hot)..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function reactor_core_timer(pos)
@ -556,7 +561,7 @@ ele.register_base_device("elepower_nuclear:reactor_fluid_port", {
fluid_buffers = {
cool = {
capacity = 16000,
accepts = {"default:water_source", "elepower_nuclear:coolant_source"},
accepts = {epr.water_source, "elepower_nuclear:coolant_source"},
drainable = false,
},
hot = {

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local struct_cache = {}
local iC = 1 -- Casing
@ -117,9 +121,9 @@ local function controller_formspec(in1, in2, out, power, time, state)
end
return "size[8,3.25]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.fluid_bar(1, 0, in1)..
ele.formspec.fluid_bar(2, 0, in2)..

View File

@ -1,18 +1,23 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epg = ele.external.graphic
local function get_formspec(heat, cold, water, steam)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.fluid_bar(0, 0, heat)..
ele.formspec.fluid_bar(1, 0, cold)..
"image[3.5,1;1,1;gui_furnace_arrow_bg.png^[transformR270]"..
"image[3.5,1;1,1;"..epg.gui_furnace_arrow_bg.."^[transformR270]"..
ele.formspec.fluid_bar(6, 0, water)..
ele.formspec.fluid_bar(7, 0, steam)..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local heat_recipes = {
@ -122,7 +127,7 @@ ele.register_machine("elepower_nuclear:heat_exchanger", {
},
water = {
capacity = 64000,
accepts = {"default:water_source"},
accepts = {epr.water_source},
drainable = false,
},
steam = {

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.reg
local epg = ele.external.graphic
local recipes = {
{
input = "elepower_dynamics:lithium_gas 100",
@ -24,17 +29,17 @@ local function get_recipe(input)
end
local function get_formspec(inp, outp, solar, percent)
local bar = "image[3.5,1.5;1,1;gui_furnace_arrow_bg.png^[transformR270]"
local bar = "image[3.5,1.5;1,1;"..epg.gui_furnace_arrow_bg.."^[transformR270]"
if percent ~= nil then
bar = "image[3.5,1.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..
(percent)..":gui_furnace_arrow_fg.png^[transformR270]"
bar = "image[3.5,1.5;1,1;"..epg.gui_furnace_arrow_bg.."^[lowpart:"..
(percent)..":"..epg.gui_furnace_arrow_fg.."^[transformR270]"
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.fluid_bar(0, 0, inp)..
bar..
"label[3.4,0.5;Light: "..solar.."%]"..
@ -42,7 +47,7 @@ local function get_formspec(inp, outp, solar, percent)
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function on_timer (pos, elapsed)

View File

@ -1,4 +1,9 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epg = ele.external.graphic
local eps = ele.external.sounds
minetest.register_node("elepower_nuclear:machine_block", {
description = "Radiation-shielded Lead Machine Chassis\nContains dangerous ionizing radiation",
tiles = {
@ -10,10 +15,10 @@ minetest.register_node("elepower_nuclear:machine_block", {
minetest.register_node("elepower_nuclear:stone_with_uranium", {
description = "Uranium Ore",
tiles = {"default_stone.png^elenuclear_mineral_uranium.png"},
tiles = {epg.stone.."^elenuclear_mineral_uranium.png"},
groups = {cracky = 2},
drop = 'elepower_nuclear:uranium_lump',
sounds = default.node_sound_stone_defaults(),
sounds = eps.node_sound_stone,
})
minetest.register_node("elepower_nuclear:fusion_coil", {

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 458 B

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
--------------
-- Worldgen --
--------------
@ -8,7 +12,7 @@
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_nuclear:stone_with_uranium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 16 * 16 * 16,
clust_num_ores = 5,
clust_size = 3,
@ -19,7 +23,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_nuclear:stone_with_uranium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 16 * 16 * 16,
clust_num_ores = 5,
clust_size = 3,
@ -30,7 +34,7 @@ minetest.register_ore({
minetest.register_ore({
ore_type = "scatter",
ore = "elepower_nuclear:stone_with_uranium",
wherein = "default:stone",
wherein = epr.stone,
clust_scarcity = 16 * 16 * 16,
clust_num_ores = 5,
clust_size = 3,

File diff suppressed because it is too large Load Diff

View File

@ -1,3 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epg = ele.external.graphic
-- Formspec helpers
ele.formspec = {}
@ -62,7 +67,7 @@ end
-- Fluid bar for formspec
function ele.formspec.fluid_bar(x, y, fluid_buffer)
local texture = "default_water.png"
local texture = epg.water
local metric = 0
local tooltip = ("tooltip[%f,%f;1,2.5;%s]"):format(x, y, "Empty Buffer")

View File

@ -1,3 +1,6 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local eps = ele.external.sounds
-----------------------
-- Utility Functions --
@ -150,7 +153,7 @@ function ele.helpers.register_liquid(liquid, def)
liquidtype = state,
liquid_alternative_source = mod..":"..liquid.."_source",
liquid_alternative_flowing = mod..":"..liquid.."_flowing",
sounds = default.node_sound_water_defaults(),
sounds = eps.node_sound_water,
}
for key,val in pairs(def) do

View File

@ -11,6 +11,7 @@ ele.unit = "EpU"
ele.unit_description = "Elepower Unit"
-- APIs
dofile(modpath..'/external_nodes_items.lua')
dofile(modpath..'/helpers.lua')
dofile(modpath..'/network.lua')
dofile(modpath..'/formspec.lua')

View File

@ -1,10 +1,14 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
-- Solar Generator
minetest.register_craft({
output = "elepower_solar:solar_generator",
recipe = {
{"default:glass", "elepower_dynamics:pv_cell", "default:glass"},
{"elepower_dynamics:pv_cell", "default:glass", "elepower_dynamics:pv_cell"},
{"default:steel_ingot", "elepower_dynamics:battery", "default:steel_ingot"},
{epi.glass, "elepower_dynamics:pv_cell", epi.glass},
{"elepower_dynamics:pv_cell", epi.glass, "elepower_dynamics:pv_cell"},
{epi.steel_ingot, "elepower_dynamics:battery", epi.steel_ingot},
}
})

View File

@ -1,17 +1,21 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec_default(power, percent, state)
if not percent then percent = 0 end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
ele.formspec.state_switcher(7, 0, state)..
"image[3.5,1.5;1,1;elepower_gui_icon_elepower_bg.png^[lowpart:"..
(percent)..":elepower_gui_icon_elepower.png]"..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
-- A generator that creates power using sunlight

View File

@ -1,9 +1,15 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local epi = ele.external.ing
-- Thermal Evaporation Plant
-- Used to extract salt from water
elethermal.cache = {}
local results = {
{
input = "default:water_source 1000",
input = epr.water_source.." 1000",
output = "elepower_thermal:brine_source 100",
heat = 400
},
@ -143,9 +149,9 @@ local function controller_formspec (input, output, heat)
(100 * heat / 1000)..":elethermal_gradient.png^[transformR270]"
end
return "size[8,4.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
bar..
"tooltip[1.5,3.5;6,1;Heat: "..heat.."K]"..
ele.formspec.fluid_bar(0, 0, input)..
@ -259,7 +265,7 @@ minetest.register_node("elepower_thermal:evaporator_controller", {
fluid_buffers = {
input = {
capacity = 8000,
accepts = {"elepower_thermal:brine_source", "default:water_source"},
accepts = {"elepower_thermal:brine_source", epr.water_source},
drainable = false,
},
output = {

View File

@ -11,6 +11,10 @@
---------------------------------------------------
-- Additional Information --
---------------------------------------------------
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local epr = ele.external.ref
-- This is a store of custom text and data metrics used
-- by the tome. In some cases some of these could be added
@ -263,7 +267,7 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
hu_img_1 = {"container[1.0,6.6]"..
-- line 1
"style_type[item_image_button;bgimg=elepower_tome_bgimg_2.png]"..
"item_image_button[0.375,0.25;1,1;default:blueberry_bush_leaves;leaves;]"..
"item_image_button[0.375,0.25;1,1;"..epi.blueberry_bush_leaves..";leaves;]"..
"tooltip[leaves;Any Leaves;#30434c;#f9f9f9]"..
"style[num;font_size=-2;font=bold;textcolor=#FFF]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>174</b></right></style>]"..
@ -286,7 +290,7 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
"tooltip[1.875,1.625;0.75,0.75;Crafting;#30434c;#f9f9f9]"..
"item_image_button[2.75,1.5;1,1;basic_materials:empty_spool;basic_materials:empty_spool;]"..
"hypertext[2.75,2.15;1,1;num;<style size=12><right><b>24</b></right></style>]"..
"item_image_button[3.875,1.5;1,1;default:copper_ingot;default:copper_ingot;]"..
"item_image_button[3.875,1.5;1,1;"..epi.copper_ingot..";"..epi.copper_ingot..";]"..
"hypertext[3.875,2.15;1,1;num;<style size=12><right><b>12</b></right></style>]"..
"image[5,1.625;0.75,0.75;elepower_tome_icon_crafting.png]"..
"tooltip[5,1.625;0.75,0.75;Crafting;#30434c;#f9f9f9]"..
@ -295,13 +299,13 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
-- line 3 -- bug single digits vanish randomly
"item_image_button[0.25,2.75;1,1;basic_materials:copper_wire;basic_materials:copper_wire;]"..
"hypertext[0.25,3.4;1,1;num;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[1.375,2.75;1,1;default:mese_crystal_fragment;default:mese_crystal_fragment;]"..
"item_image_button[1.375,2.75;1,1;"..epi.mese_crystal_fragment..";"..epi.mese_crystal_fragment..";]"..
"hypertext[1.375,3.4;1,1;num;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[2.5,2.75;1,1;basic_materials:plastic_sheet;basic_materials:plastic_sheet;]"..
"hypertext[2.5,3.4;1,1;num2;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[3.625,2.75;1,1;default:steel_ingot;default:steel_ingot;]"..
"item_image_button[3.625,2.75;1,1;"..epi.steel_ingot..";"..epi.steel_ingot..";]"..
"hypertext[3.625,3.4;1,1;num;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[4.75,2.75;1,1;default:copper_ingot;default:copper_ingot;]"..
"item_image_button[4.75,2.75;1,1;"..epi.copper_ingot..";"..epi.copper_ingot..";]"..
"hypertext[4.75,3.4;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"image[5.875,2.875;0.75,0.75;elepower_tome_icon_crafting.png]"..
"tooltip[5.875,2.875;0.75,0.75;Crafting;#30434c;#f9f9f9]"..
@ -312,20 +316,20 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
"style_type[item_image_button;bgimg=elepower_tome_bgimg_2.png]"..
--line 1
"container[2.5,0]"..
"item_image_button[0.375,0.25;1,1;default:stone;default:stone;]"..
"item_image_button[0.375,0.25;1,1;"..epr.stone..";"..epr.stone..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>08</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_icon_crafting.png]"..
"tooltip[1.5,0.25;0.75,0.75;Crafting;#30434c;#f9f9f9]"..
"item_image_button[2.375,0.25;1,1;default:furnace;default:furnace;]"..
"item_image_button[2.375,0.25;1,1;"..epi.furnace..";"..epi.furnace..";]"..
"hypertext[2.375,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"container_end[]"..
-- line 2
"container[2.5,1.25]"..
"item_image_button[0.375,0.25;1,1;default:sand;default:sand;]"..
"item_image_button[0.375,0.25;1,1;"..epi.sand..";"..epi.sand..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>03</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_icon_cooking.png]"..
"tooltip[1.5,0.25;0.75,0.75;Cooking;#30434c;#f9f9f9]"..
"item_image_button[2.375,0.25;1,1;default:glass;default:glass;]"..
"item_image_button[2.375,0.25;1,1;"..epi.glass..";"..epi.glass..";]"..
"hypertext[2.375,0.9;1,1;num;<style size=12><right><b>03</b></right></style>]"..
"container_end[]"..
-- line 3
@ -341,7 +345,7 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
"container_end[]"..
-- line 4
"container[0.875,3.75]"..
"item_image_button[0.375,0.25;1,1;default:copper_ingot;default:copper_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.copper_ingot..";"..epi.copper_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"item_image_button[1.5,0.25;1,1;moreores:silver_ingot;moreores:silver_ingot;]"..
"hypertext[1.5,0.9;1,1;num;<style size=12><right><b>02</b></right></style>]"..
@ -356,9 +360,9 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
"container_end[]"..
-- line 5
"container[0.75,5]"..
"item_image_button[0.375,0.25;1,1;default:steel_ingot;default:steel_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.steel_ingot..";"..epi.steel_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"item_image_button[1.5,0.25;1,1;default:glass;default:glass;]"..
"item_image_button[1.5,0.25;1,1;"..epi.glass..";"..epi.glass..";]"..
"hypertext[1.5,0.9;1,1;num;<style size=12><right><b>03</b></right></style>]"..
"item_image_button[2.625,0.25;1,1;elepower_dynamics:brass_gear;elepower_dynamics:brass_gear;]"..
"hypertext[2.625,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
@ -371,11 +375,11 @@ eletome.ai.nodes["getting_started"] = {how_use_1 = "This is a getting started
"container_end[]"..
-- line 6
"container[0.75,6.25]"..
"item_image_button[0.375,0.25;1,1;default:steel_ingot;default:steel_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.steel_ingot..";"..epi.steel_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>03</b></right></style>]"..
"item_image_button[1.5,0.25;1,1;elepower_dynamics:wound_copper_coil;elepower_dynamics:wound_copper_coil;]"..
"hypertext[1.5,0.9;1,1;num;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[2.625,0.25;1,1;default:furnace;default:furnace;]"..
"item_image_button[2.625,0.25;1,1;"..epi.furnace..";"..epi.furnace..";]"..
"hypertext[2.625,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"item_image_button[3.75,0.25;1,1;elepower_machines:machine_block;elepower_machines:machine_block;]"..
"hypertext[3.75,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
@ -408,7 +412,7 @@ eletome.ai.nodes["first_pcb_creation"] = {how_use_1 = "More advanced machines re
"style_type[item_image_button;bgimg=elepower_tome_bgimg_2.png]"..
--line 1
"container[0.5,0]"..
"item_image_button[0.375,0.25;1,1;default:copper_ingot;default:copper_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.copper_ingot..";"..epi.copper_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_icon_grinding.png]"..
"tooltip[1.5,0.25;0.75,0.75;Grinding;#30434c;#f9f9f9]"..
@ -427,7 +431,7 @@ eletome.ai.nodes["first_pcb_creation"] = {how_use_1 = "More advanced machines re
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_mouse_rght_click.png]"..
"tooltip[1.5,0.25;0.75,0.75;Right Click;#30434c;#f9f9f9]"..
"item_image_button[2.375,0.25;1,1;default:water_source;default:water_source;]"..
"item_image_button[2.375,0.25;1,1;"..epr.water_source..";"..epr.water_source..";]"..
"hypertext[2.375,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"image[3.5,0.375;0.75,0.75;elepower_tome_icon_output.png]"..
"tooltip[3.5,0.25;0.75,0.75;Turns Into;#30434c;#f9f9f9]"..
@ -436,11 +440,11 @@ eletome.ai.nodes["first_pcb_creation"] = {how_use_1 = "More advanced machines re
"container_end[]"..
-- line 3
"container[1.125,2.5]"..
"item_image_button[0.375,0.25;1,1;default:copper_ingot;default:copper_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.copper_ingot..";"..epi.copper_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>05</b></right></style>]"..
"item_image_button[1.5,0.25;1,1;default:gold_ingot;default:gold_ingot;]"..
"item_image_button[1.5,0.25;1,1;"..epi.gold_ingot..";"..epi.gold_ingot..";]"..
"hypertext[1.5,0.9;1,1;num;<style size=12><right><b>03</b></right></style>]"..
"item_image_button[2.625,0.25;1,1;default:mese_crystal;default:mese_crystal;]"..
"item_image_button[2.625,0.25;1,1;"..epi.mese_crystal..";"..epi.mese_crystal..";]"..
"hypertext[2.625,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"image[3.75,0.375;0.75,0.75;elepower_tome_icon_crafting.png]"..
"tooltip[3.75,0.25;0.75,0.75;Crafting;#30434c;#f9f9f9]"..
@ -477,7 +481,7 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
"style_type[item_image_button;bgimg=elepower_tome_bgimg_2.png]"..
-- line 1
"container[0.15,-0.1]"..
"item_image_button[0.375,0.25;1,1;default:blueberry_bush_leaves;leaves;]"..
"item_image_button[0.375,0.25;1,1;"..epi.blueberry_bush_leaves..";leaves;]"..
"tooltip[leaves;Any Leaves;#30434c;#f9f9f9]"..
"style[num;font_size=-2;font=bold;textcolor=#FFF]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>126</b></right></style>]"..
@ -525,13 +529,13 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
"container_end[]"..
-- line 4
"container[-0.4,3.65]"..
"item_image_button[0.375,0.25;1,1;default:coal_lump;default:coal_lump;]"..
"item_image_button[0.375,0.25;1,1;"..epi.coal_lump..";"..epi.coal_lump..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_icon_grinding.png]"..
"tooltip[1.5,0.25;0.75,0.75;Grinding;#30434c;#f9f9f9]"..
"item_image_button[2.375,0.25;1,1;elepower_dynamics:coal_dust;elepower_dynamics:coal_dust;]"..
"hypertext[2.375,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"item_image_button[3.5,0.25;1,1;default:coal_lump;default:coal_lump;]"..
"item_image_button[3.5,0.25;1,1;"..epi.coal_lump..";"..epi.coal_lump..";]"..
"hypertext[3.5,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"image[4.625,0.375;0.75,0.75;elepower_tome_icon_alloying.png]"..
"tooltip[4.625,0.375;0.75,0.75;Alloying;#30434c;#f9f9f9]"..
@ -545,7 +549,7 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
"container_end[]"..
-- line 5
"container[2.25,4.9]"..
"item_image_button[0.375,0.25;1,1;default:tin_ingot;default:tin_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.tin_ingot..";"..epi.tin_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>08</b></right></style>]"..
"image[1.5,0.375;0.75,0.75;elepower_tome_icon_compressing.png]"..
"tooltip[1.5,0.375;0.75,0.75;Compressing;#30434c;#f9f9f9]"..
@ -573,7 +577,7 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
"container[0,7.4]"..
"item_image_button[0.25,0.25;1,1;elepower_dynamics:tin_plate;elepower_dynamics:tin_plate;]"..
"hypertext[0.25,0.9;1,1;num;<style size=12><right><b>04</b></right></style>]"..
"item_image_button[1.375,0.25;1,1;default:mese_crystal_fragment;default:mese_crystal_fragment;]"..
"item_image_button[1.375,0.25;1,1;"..epi.mese_crystal_fragment..";"..epi.mese_crystal_fragment..";]"..
"hypertext[1.375,0.9;1,1;num;<style size=12><right><b>02</b></right></style>]"..
"item_image_button[2.5,0.25;1,1;elepower_dynamics:graphite_rod;elepower_dynamics:graphite_rod;]"..
"hypertext[2.5,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
@ -589,7 +593,7 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
"container_end[]"..
-- line 8
"container[1,8.65]"..
"item_image_button[0.375,0.25;1,1;default:steel_ingot;default:steel_ingot;]"..
"item_image_button[0.375,0.25;1,1;"..epi.steel_ingot..";"..epi.steel_ingot..";]"..
"hypertext[0.375,0.9;1,1;num;<style size=12><right><b>01</b></right></style>]"..
"item_image_button[1.5,0.25;1,1;elepower_dynamics:wound_silver_coil;elepower_dynamics:wound_silver_coil;]"..
"hypertext[1.5,0.9;1,1;num;<style size=12><right><b>02</b></right></style>]"..
@ -605,11 +609,11 @@ eletome.ai.nodes["upgrading_machines"] = { how_use_1 = "Some machines can be upg
}
-- Generators Page
eletome.ai.nodes["elepower_machines:generator"] = {lb_top_img = "default:coal_lump",
eletome.ai.nodes["elepower_machines:generator"] = {lb_top_img = epi.coal_lump,
lb_top_tt = "Burnable Items",
lb_btm_tt = " EpU generated\nper second"
}
eletome.ai.nodes["elepower_machines:lava_generator"] = {lb_top_img = "default:lava_source",
eletome.ai.nodes["elepower_machines:lava_generator"] = {lb_top_img = epi.lava_source,
lb_btm_tt = " EpU generated\nper 125 lava/second"
}
eletome.ai.nodes["elepower_machines:fuel_burner"] = {lb_top_img = "elepower_farming:biofuel_source",
@ -651,7 +655,7 @@ eletome.ai.nodes["elepower_machines:super_power_cell_0"] = {lb_top_img = "e
}
-- (Simple) Machines Page
eletome.ai.nodes["elepower_machines:alloy_furnace"] = {lb_top_img = "default_tin_ingot.png",
eletome.ai.nodes["elepower_machines:alloy_furnace"] = {lb_top_img = "elepower_iron_ingot.png^[multiply:#c1c1c1",
lb_top_tt ="2 Materials\nto be Alloyed",
lb_btm_tt = " used per second",
}

View File

@ -1,5 +1,8 @@
local materials = {iron = "elepower_dynamics:iron_ingot", carbon = "elepower_dynamics:carbon_sheet"}
local materials = {}
if ele.external.armor.enable_iron_armor == true then
materials.iron = "elepower_dynamics:iron_ingot"
-- Iron Armor
armor:register_armor("elepower_tools:helmet_iron", {
@ -46,6 +49,11 @@ armor:register_armor("elepower_tools:boots_iron", {
damage_groups = {cracky=2, snappy=3, choppy=2, crumbly=1, level=2},
})
end
if ele.external.armor.enable_carbon_fiber_armor == true then
materials.carbon = "elepower_dynamics:carbon_sheet"
-- Carbon Fiber Armor
armor:register_armor("elepower_tools:helmet_carbon", {
description = "Carbon Fiber Helmet",
@ -91,6 +99,8 @@ armor:register_armor("elepower_tools:boots_carbon", {
damage_groups = {cracky=3, snappy=2, choppy=3, crumbly=2, level=1},
})
end
for k, v in pairs(materials) do
minetest.register_craft({
output = "elepower_tools:helmet_"..k,

View File

@ -1,10 +1,13 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
-- Drill
minetest.register_craft({
output = "elepower_tools:drill_bit",
recipe = {
{"", "default:steel_ingot", ""},
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
{"" ,epi.steel_ingot, "" },
{epi.steel_ingot,epi.steel_ingot,epi.steel_ingot}
}
})
@ -12,7 +15,7 @@ minetest.register_craft({
output = "elepower_tools:hand_drill",
recipe = {
{"" , "elepower_dynamics:wound_copper_coil", "elepower_tools:drill_bit"},
{"default:steel_ingot", "elepower_dynamics:battery", "default:steel_ingot"},
{epi.steel_ingot, "elepower_dynamics:battery" , epi.steel_ingot},
{"basic_materials:motor", "elepower_dynamics:capacitor", ""},
}
})
@ -21,9 +24,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_tools:chain",
recipe = {
{"", "default:steel_ingot", "default:steel_ingot"},
{"default:steel_ingot", "elepower_dynamics:steel_plate", "default:steel_ingot"},
{"default:steel_ingot", "default:steel_ingot", ""},
{"" , epi.steel_ingot ,epi.steel_ingot},
{epi.steel_ingot, "elepower_dynamics:steel_plate",epi.steel_ingot},
{epi.steel_ingot, epi.steel_ingot , "" }
}
})
@ -31,7 +34,7 @@ minetest.register_craft({
output = "elepower_tools:chainsaw",
recipe = {
{"", "elepower_dynamics:wound_copper_coil", "elepower_tools:chain"},
{"default:steel_ingot", "elepower_dynamics:battery", "default:steel_ingot"},
{epi.steel_ingot, "elepower_dynamics:battery", epi.steel_ingot},
{"basic_materials:motor", "elepower_dynamics:capacitor", ""},
}
})
@ -40,7 +43,7 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_tools:soldering_iron",
recipe = {
{"", "elepower_dynamics:battery", "default:steel_ingot"},
{"", "elepower_dynamics:battery",epi.steel_ingot},
{"", "elepower_dynamics:wound_silver_coil", ""},
{"elepower_dynamics:wound_silver_coil", "", ""},
}
@ -50,9 +53,9 @@ minetest.register_craft({
minetest.register_craft({
output = "elepower_tools:repair_core",
recipe = {
{"", "default:diamondblock", "elepower_dynamics:steel_plate"},
{"" , epi.diamond_block, "elepower_dynamics:steel_plate"},
{"elepower_dynamics:lead_plate" , "elepower_dynamics:xycrone_lump", "elepower_dynamics:lead_plate"},
{"elepower_dynamics:steel_plate", "default:mese", ""},
{"elepower_dynamics:steel_plate", epi.mese, ""},
}
})

View File

@ -1,9 +1,12 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function get_formspec(power, state)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"list[context;tool;3.5,1.5;1,1;]"..
ele.formspec.state_switcher(7, 0, state)..
@ -12,7 +15,7 @@ local function get_formspec(power, state)
"listring[current_player;main]"..
"listring[context;tool]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function is_tool (istack)

View File

@ -1,3 +1,6 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function upgrade_formspec (upgrades, desc)
local posY = 0.5
@ -15,15 +18,15 @@ local function upgrade_formspec (upgrades, desc)
end
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
"label[0,0;Modifying "..desc.."]"..
fspec..
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function set_component_list (pos, list)

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epi = ele.external.ing
local easycrafting = minetest.settings:get("elepower_easy_crafting") == "true"
local ingot = "elepower_dynamics:viridisium_ingot"
if easycrafting then
@ -10,7 +14,7 @@ minetest.register_craft({
output = "elepower_wireless:matter_receiver",
recipe = {
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:soc", "elepower_dynamics:wound_silver_coil"},
{"elepower_dynamics:electrum_gear", "default:steelblock", "elepower_dynamics:electrum_gear"},
{"elepower_dynamics:electrum_gear", epi.steel_block, "elepower_dynamics:electrum_gear"},
{"elepower_dynamics:xycrone_lump", ingot, "elepower_dynamics:xycrone_lump"},
}
})
@ -20,7 +24,7 @@ minetest.register_craft({
output = "elepower_wireless:matter_transmitter",
recipe = {
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:soc", "elepower_dynamics:wound_silver_coil"},
{"elepower_dynamics:xycrone_lump", "default:steelblock", "elepower_dynamics:xycrone_lump"},
{"elepower_dynamics:xycrone_lump", epi.steel_block, "elepower_dynamics:xycrone_lump"},
{"elepower_dynamics:electrum_gear", ingot, "elepower_dynamics:electrum_gear"},
}
})
@ -30,7 +34,7 @@ minetest.register_craft({
output = "elepower_wireless:dialler",
recipe = {
{"elepower_dynamics:wound_silver_coil", "elepower_dynamics:soc", "elepower_dynamics:wound_silver_coil"},
{"elepower_dynamics:wound_copper_coil", "default:steelblock", "elepower_dynamics:wound_copper_coil"},
{"elepower_dynamics:wound_copper_coil", epi.steel_block, "elepower_dynamics:wound_copper_coil"},
{"elepower_dynamics:electrum_gear", "elepower_dynamics:lcd_panel", "elepower_dynamics:electrum_gear"},
}
})

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local function escape_comma(str)
return str:gsub(",","\\,")
end
@ -36,9 +40,9 @@ local function get_formspec(power, player, transmitters, receivers)
if re_selct then re_spc = ";" .. re_selct end
return "size[8,10.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"textlist[1,0;6.8,2.5;transmitter;" .. table.concat(list_tr, ",") .. tr_spc .. "]"..
"textlist[1,3;6.8,2.5;receiver;" .. table.concat(list_re, ",") .. re_spc .. "]"..
@ -47,7 +51,7 @@ local function get_formspec(power, player, transmitters, receivers)
"list[current_player;main;0,6.25;8,1;]"..
"list[current_player;main;0,7.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 6.25)
epr.get_hotbar_bg(0, 6.25)
end
local function get_is_active_node(meta, pos)

View File

@ -1,11 +1,15 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
elewi.loaded_receivers = {}
local function get_formspec(power, name, player)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
depr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"field[1.5,0.5;5,1;name;Receiver Name;".. name .."]"..
"field_close_on_enter[name;false]"..
@ -13,7 +17,7 @@ local function get_formspec(power, name, player)
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function matter_receiver_timer(pos)

View File

@ -1,11 +1,15 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
elewi.loaded_transmitters = {}
local function get_formspec(power, name, player)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"field[1.5,0.5;5,1;name;Transmitter Name;".. name .."]"..
"field_close_on_enter[name;false]"..
@ -13,7 +17,7 @@ local function get_formspec(power, name, player)
"list[current_player;main;0,4.25;8,1;]"..
"list[current_player;main;0,5.5;8,3;8]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function matter_transmitter_timer(pos)

View File

@ -1,3 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
elewi.node_handlers = {}
local desc_cache = {}
@ -30,9 +35,9 @@ end
local function get_formspec(power)
return "size[8,8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"list[context;card;3.5,1;1,1;]"..
"list[current_player;main;0,4.25;8,1;]"..
@ -40,7 +45,7 @@ local function get_formspec(power)
"listring[current_player;main]"..
"listring[context;card]"..
"listring[current_player;main]"..
default.get_hotbar_bg(0, 4.25)
epr.get_hotbar_bg(0, 4.25)
end
local function data_from_card(card)

View File

@ -1,4 +1,8 @@
-- see elepower_papi >> external_nodes_items.lua for explanation
-- shorten table ref
local epr = ele.external.ref
local myname = "elepower_nuclear:fission_controller"
local function check(pos)
@ -115,9 +119,9 @@ local function get_formspec(pos, power, station, station_meta)
local centered = (width - 8) / 2
return "size["..width..",8.5]"..
default.gui_bg..
default.gui_bg_img..
default.gui_slots..
epr.gui_bg..
epr.gui_bg_img..
epr.gui_slots..
ele.formspec.power_meter(power)..
"list[current_player;main;"..centered..",4.25;8,1;]"..
"list[current_player;main;"..centered..",5.5;8,3;8]"..
@ -125,7 +129,7 @@ local function get_formspec(pos, power, station, station_meta)
"listring[current_player;main]"..
"listring[context;card]"..
"listring[current_player;main]"..
default.get_hotbar_bg(centered, 4.25)
epr.get_hotbar_bg(centered, 4.25)
end
local function on_receive_fields(pos, fields, sender, station, station_meta)