Merge remote-tracking branch 'zefram/zefram/centrifuge'
@ -1,7 +1,4 @@
|
||||
|
||||
local worldpath = minetest.get_worldpath()
|
||||
|
||||
technic.config = Settings(worldpath.."/technic.conf")
|
||||
technic.config = technic.config or Settings(minetest.get_worldpath().."/technic.conf")
|
||||
|
||||
local conf_table = technic.config:to_table()
|
||||
|
||||
@ -9,9 +6,6 @@ local defaults = {
|
||||
enable_mining_drill = "true",
|
||||
enable_mining_laser = "true",
|
||||
enable_flashlight = "false",
|
||||
enable_rubber_tree_generation = "true",
|
||||
enable_marble_generation = "true",
|
||||
enable_granite_generation = "true",
|
||||
enable_wind_mill = "false",
|
||||
enable_corium_griefing = "true",
|
||||
}
|
||||
@ -21,4 +15,3 @@ for k, v in pairs(defaults) do
|
||||
technic.config:set(k, v)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
default
|
||||
pipeworks
|
||||
technic_worldgen
|
||||
bucket?
|
||||
mesecons_mvps?
|
||||
intllib?
|
||||
|
@ -2,7 +2,7 @@
|
||||
-- namespace: technic
|
||||
-- (c) 2012-2013 by RealBadAngel <mk@realbadangel.pl>
|
||||
|
||||
technic = {}
|
||||
technic = technic or {}
|
||||
|
||||
local load_start = os.clock()
|
||||
local modpath = minetest.get_modpath("technic")
|
||||
|
@ -11,11 +11,6 @@ minetest.register_craftitem( "technic:doped_silicon_wafer", {
|
||||
inventory_image = "technic_doped_silicon_wafer.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("technic:enriched_uranium", {
|
||||
description = S("Enriched Uranium"),
|
||||
inventory_image = "technic_enriched_uranium.png",
|
||||
})
|
||||
|
||||
minetest.register_craftitem("technic:uranium_fuel", {
|
||||
description = S("Uranium Fuel"),
|
||||
inventory_image = "technic_uranium_fuel.png",
|
||||
@ -163,3 +158,37 @@ minetest.register_node("technic:machine_casing", {
|
||||
tiles = {"technic_machine_casing.png"},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
for p = 0, 35 do
|
||||
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
||||
local psuffix = p == 7 and "" or p
|
||||
local ingot = "technic:uranium"..psuffix.."_ingot"
|
||||
local block = "technic:uranium"..psuffix.."_block"
|
||||
local ov = p == 7 and minetest.override_item or nil;
|
||||
(ov or minetest.register_craftitem)(ingot, {
|
||||
description = string.format(S("%.1f%%-Fissile Uranium Ingot"), p/10),
|
||||
inventory_image = "technic_uranium_ingot.png",
|
||||
groups = {uranium_ingot=1, not_in_creative_inventory=nici},
|
||||
});
|
||||
(ov or minetest.register_node)(block, {
|
||||
description = string.format(S("%.1f%%-Fissile Uranium Block"), p/10),
|
||||
tiles = {"technic_uranium_block.png"},
|
||||
is_ground_content = true,
|
||||
groups = {uranium_block=1, not_in_creative_inventory=nici, cracky=1, level=2, radioactive=math.floor(math.sqrt(p) + 0.5)},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
});
|
||||
if not ov then
|
||||
minetest.register_craft({
|
||||
output = block,
|
||||
recipe = {
|
||||
{ingot, ingot, ingot},
|
||||
{ingot, ingot, ingot},
|
||||
{ingot, ingot, ingot},
|
||||
},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = ingot.." 9",
|
||||
recipe = {{block}},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
@ -29,6 +29,7 @@ technic.legacy_nodenames = {
|
||||
["technic:generator"] = "technic:lv_generator",
|
||||
["technic:generator_active"] = "technic:lv_generator_active",
|
||||
["technic:iron_dust"] = "technic:wrought_iron_dust",
|
||||
["technic:enriched_uranium"] = "technic:uranium35_ingot",
|
||||
}
|
||||
|
||||
for old, new in pairs(technic.legacy_nodenames) do
|
||||
|
@ -29,6 +29,8 @@ Graphite = Graphit
|
||||
Carbon Cloth = Kohlefasergewebe
|
||||
Raw Latex = Rohlatex
|
||||
Rubber Fiber = Gummifaser
|
||||
%.1f%%-Fissile Uranium Ingot =
|
||||
%.1f%%-Fissile Uranium Block =
|
||||
|
||||
## Machine misc
|
||||
Machine cannot be removed because it is not empty = Die Maschine kann nicht entfernt werden, weil sie noch nicht leer ist.
|
||||
@ -162,6 +164,7 @@ Talinite = Talinite
|
||||
Tin = Zinn
|
||||
Wrought Iron = Schmiedeeisen
|
||||
Zinc = Zink
|
||||
%.1f%%-Fissile Uranium =
|
||||
|
||||
## Tools
|
||||
RE Battery = Akkubatterie
|
||||
|
@ -29,6 +29,8 @@ Graphite = Grafito
|
||||
Carbon Cloth = Tela de Carbon
|
||||
Raw Latex = Latex Crudo
|
||||
Rubber Fiber = Fibra de Hule
|
||||
%.1f%%-Fissile Uranium Ingot =
|
||||
%.1f%%-Fissile Uranium Block =
|
||||
|
||||
## Machine misc
|
||||
Machine cannot be removed because it is not empty = La maquina no puede removerse porque no esta vacia
|
||||
@ -152,6 +154,7 @@ Talinite = Talinita
|
||||
Tin = Estanio
|
||||
Wrought Iron = Hierro Forjado
|
||||
Zinc = Zinc
|
||||
%.1f%%-Fissile Uranium =
|
||||
|
||||
## Tools
|
||||
RE Battery =
|
||||
|
@ -26,6 +26,8 @@ Graphite = Lastra in graffite
|
||||
Carbon Cloth = Fibra di carbonio
|
||||
Raw Latex = Latex grezzo
|
||||
Rubber Fiber = Fibra di gomma
|
||||
%.1f%%-Fissile Uranium Ingot =
|
||||
%.1f%%-Fissile Uranium Block =
|
||||
|
||||
## Machine misc
|
||||
Machine cannot be removed because it is not empty = La macchina non può essere rimossa perchè non è vuota
|
||||
@ -159,6 +161,7 @@ Talinite = Talinite
|
||||
Tin = Stagno
|
||||
Wrought Iron = Ferro Battuto
|
||||
Zinc = Zinco
|
||||
%.1f%%-Fissile Uranium =
|
||||
|
||||
## Tools
|
||||
RE Battery =
|
||||
|
@ -29,6 +29,8 @@ Graphite =
|
||||
Carbon Cloth =
|
||||
Raw Latex =
|
||||
Rubber Fiber =
|
||||
%.1f%%-Fissile Uranium Ingot =
|
||||
%.1f%%-Fissile Uranium Block =
|
||||
|
||||
## Machine misc
|
||||
Machine cannot be removed because it is not empty =
|
||||
@ -64,6 +66,7 @@ Controlled by Mesecon Signal =
|
||||
%s Battery Box =
|
||||
%s Cable =
|
||||
%s CNC Machine =
|
||||
%s Centrifuge =
|
||||
%s Compressor =
|
||||
%s Extractor =
|
||||
%s Forcefield Emitter =
|
||||
@ -166,6 +169,7 @@ Talinite =
|
||||
Tin =
|
||||
Wrought Iron =
|
||||
Zinc =
|
||||
%.1f%%-Fissile Uranium =
|
||||
|
||||
## Tools
|
||||
RE Battery =
|
||||
@ -190,3 +194,4 @@ Alloy cooking =
|
||||
Grinding =
|
||||
Compressing =
|
||||
Extracting =
|
||||
Separating =
|
||||
|
@ -493,7 +493,6 @@ local default_radiation_resistance_per_node = {
|
||||
["technic:mineral_uranium"] = 71,
|
||||
["technic:mineral_zinc"] = 19,
|
||||
["technic:stainless_steel_block"] = 40,
|
||||
["technic:uranium_block"] = 500,
|
||||
["technic:zinc_block"] = 36,
|
||||
["tnt:tnt"] = 11,
|
||||
["tnt:tnt_burning"] = 11,
|
||||
@ -501,6 +500,7 @@ local default_radiation_resistance_per_node = {
|
||||
local default_radiation_resistance_per_group = {
|
||||
concrete = 16,
|
||||
tree = 3.4,
|
||||
uranium_block = 500,
|
||||
wood = 1.7,
|
||||
}
|
||||
local cache_radiation_resistance = {}
|
||||
|
16
technic/machines/MV/centrifuge.lua
Normal file
@ -0,0 +1,16 @@
|
||||
minetest.register_craft({
|
||||
output = "technic:mv_centrifuge",
|
||||
recipe = {
|
||||
{ "technic:motor", "technic:copper_plate", "technic:diamond_drill_head" },
|
||||
{ "technic:copper_plate", "technic:machine_casing", "technic:copper_plate" },
|
||||
{ "pipeworks:one_way_tube", "technic:mv_cable0", "pipeworks:mese_filter" },
|
||||
}
|
||||
})
|
||||
|
||||
technic.register_centrifuge({
|
||||
tier = "MV",
|
||||
demand = { 8000, 7000, 6000 },
|
||||
speed = 2,
|
||||
upgrade = 1,
|
||||
tube = 1,
|
||||
})
|
@ -20,6 +20,7 @@ dofile(path.."/electric_furnace.lua")
|
||||
dofile(path.."/grinder.lua")
|
||||
dofile(path.."/extractor.lua")
|
||||
dofile(path.."/compressor.lua")
|
||||
dofile(path.."/centrifuge.lua")
|
||||
|
||||
dofile(path.."/tool_workshop.lua")
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("alloy", S("Alloy cooking"), 2)
|
||||
technic.register_recipe_type("alloy", {
|
||||
description = S("Alloy cooking"),
|
||||
input_size = 2,
|
||||
})
|
||||
|
||||
function technic.register_alloy_recipe(data)
|
||||
data.time = data.time or 6
|
||||
|
8
technic/machines/register/centrifuge.lua
Normal file
@ -0,0 +1,8 @@
|
||||
local S = technic.getter
|
||||
|
||||
function technic.register_centrifuge(data)
|
||||
data.typename = "separating"
|
||||
data.machine_name = "centrifuge"
|
||||
data.machine_desc = S("%s Centrifuge")
|
||||
technic.register_base_machine(data)
|
||||
end
|
46
technic/machines/register/centrifuge_recipes.lua
Normal file
@ -0,0 +1,46 @@
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("separating", {
|
||||
description = S("Separating"),
|
||||
output_size = 2,
|
||||
})
|
||||
|
||||
function technic.register_separating_recipe(data)
|
||||
data.time = data.time or 10
|
||||
technic.register_recipe("separating", data)
|
||||
end
|
||||
|
||||
local rubber_tree_planks = minetest.get_modpath("moretrees") and "moretrees:rubber_tree_planks" or "default:wood"
|
||||
|
||||
local recipes = {
|
||||
{ "technic:bronze_dust 4", "technic:copper_dust 3", "technic:tin_dust" },
|
||||
{ "technic:stainless_steel_dust 4", "technic:wrought_iron_dust 3", "technic:chromium_dust" },
|
||||
{ "technic:brass_dust 3", "technic:copper_dust 2", "technic:zinc_dust" },
|
||||
{ "moretrees:rubber_tree_trunk_empty", rubber_tree_planks.." 4", "technic:raw_latex" },
|
||||
{ "moretrees:rubber_tree_trunk", rubber_tree_planks.." 4", "technic:raw_latex" },
|
||||
}
|
||||
|
||||
-- Refining uranium via centrifuge is intended to make it a practical
|
||||
-- necessity to set up an automated cascade of centrifuges. Once the
|
||||
-- cascade has been primed, production of one 3.5%-fissile dust requires
|
||||
-- input of five 0.7%-fissile dust and 490 centrifuge operations, and
|
||||
-- produces four 0.0%-fissile dust as a byproduct. The busiest stage
|
||||
-- of the cascade is the one taking 0.7%-fissile dust, which performs 28
|
||||
-- of the 490 operations. The least busy is the one taking 3.4%-fissile
|
||||
-- dust, which performs 1 of the 490 operations.
|
||||
local function uranium_dust(p)
|
||||
return "technic:uranium"..(p == 7 and "" or p).."_dust"
|
||||
end
|
||||
for p = 1, 34 do
|
||||
table.insert(recipes, { uranium_dust(p).." 2", uranium_dust(p-1), uranium_dust(p+1) })
|
||||
end
|
||||
|
||||
if minetest.get_modpath("bushes_classic") then
|
||||
for _, berry in ipairs({ "blackberry", "blueberry", "gooseberry", "raspberry", "strawberry" }) do
|
||||
table.insert(recipes, { "bushes:"..berry.."_bush", "default:stick 20", "bushes:"..berry.." 4" })
|
||||
end
|
||||
end
|
||||
|
||||
for _, data in pairs(recipes) do
|
||||
technic.register_separating_recipe({ input = { data[1] }, output = { data[2], data[3] } })
|
||||
end
|
@ -1,7 +1,7 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("compressing", S("Compressing"))
|
||||
technic.register_recipe_type("compressing", { description = S("Compressing") })
|
||||
|
||||
function technic.register_compressor_recipe(data)
|
||||
data.time = data.time or 4
|
||||
@ -15,7 +15,7 @@ local recipes = {
|
||||
{"default:copper_ingot 5", "technic:copper_plate"},
|
||||
{"technic:coal_dust 4", "technic:graphite"},
|
||||
{"technic:carbon_cloth", "technic:carbon_plate"},
|
||||
{"technic:enriched_uranium 4", "technic:uranium_fuel"},
|
||||
{"technic:uranium35_ingot 5", "technic:uranium_fuel"},
|
||||
}
|
||||
|
||||
for _, data in pairs(recipes) do
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("extracting", S("Extracting"))
|
||||
technic.register_recipe_type("extracting", { description = S("Extracting") })
|
||||
|
||||
function technic.register_extractor_recipe(data)
|
||||
data.time = data.time or 4
|
||||
@ -24,9 +24,6 @@ local recipes = {
|
||||
{"technic:raw_latex", "technic:rubber 3"},
|
||||
{"moretrees:rubber_tree_trunk_empty", "technic:rubber"},
|
||||
{"moretrees:rubber_tree_trunk", "technic:rubber"},
|
||||
|
||||
-- Other
|
||||
{"technic:uranium 5", "technic:enriched_uranium"},
|
||||
}
|
||||
|
||||
for _, data in pairs(recipes) do
|
||||
|
@ -1,7 +1,7 @@
|
||||
|
||||
local S = technic.getter
|
||||
|
||||
technic.register_recipe_type("grinding", S("Grinding"))
|
||||
technic.register_recipe_type("grinding", { description = S("Grinding") })
|
||||
|
||||
function technic.register_grinder_recipe(data)
|
||||
data.time = data.time or 3
|
||||
@ -16,6 +16,7 @@ local recipes = {
|
||||
{"default:gold_lump", "technic:gold_dust 2"},
|
||||
{"default:iron_lump", "technic:wrought_iron_dust 2"},
|
||||
{"technic:chromium_lump", "technic:chromium_dust 2"},
|
||||
{"technic:uranium_lump", "technic:uranium_dust 2"},
|
||||
{"technic:zinc_lump", "technic:zinc_dust 2"},
|
||||
|
||||
-- Other
|
||||
@ -87,6 +88,41 @@ if minetest.get_modpath("gloopores") or minetest.get_modpath("glooptest") then
|
||||
register_dust("Talinite", "glooptest:talinite_ingot")
|
||||
end
|
||||
|
||||
for p = 0, 35 do
|
||||
local nici = (p ~= 0 and p ~= 7 and p ~= 35) and 1 or nil
|
||||
local psuffix = p == 7 and "" or p
|
||||
local ingot = "technic:uranium"..psuffix.."_ingot"
|
||||
local dust = "technic:uranium"..psuffix.."_dust"
|
||||
minetest.register_craftitem(dust, {
|
||||
description = S("%s Dust"):format(string.format(S("%.1f%%-Fissile Uranium"), p/10)),
|
||||
inventory_image = "technic_uranium_dust.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
groups = {uranium_dust=1, not_in_creative_inventory=nici},
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
recipe = dust,
|
||||
output = ingot,
|
||||
})
|
||||
technic.register_grinder_recipe({ input = {ingot}, output = dust })
|
||||
end
|
||||
|
||||
local function uranium_dust(p)
|
||||
return "technic:uranium"..(p == 7 and "" or p).."_dust"
|
||||
end
|
||||
for pa = 0, 34 do
|
||||
for pb = pa+1, 35 do
|
||||
local pc = (pa+pb)/2
|
||||
if pc == math.floor(pc) then
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
recipe = { uranium_dust(pa), uranium_dust(pb) },
|
||||
output = uranium_dust(pc).." 2",
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "technic:coal_dust",
|
||||
|
@ -19,6 +19,7 @@ dofile(path.."/alloy_recipes.lua")
|
||||
dofile(path.."/grinder_recipes.lua")
|
||||
dofile(path.."/extractor_recipes.lua")
|
||||
dofile(path.."/compressor_recipes.lua")
|
||||
dofile(path.."/centrifuge_recipes.lua")
|
||||
|
||||
-- Machines
|
||||
dofile(path.."/alloy_furnace.lua")
|
||||
@ -26,4 +27,4 @@ dofile(path.."/electric_furnace.lua")
|
||||
dofile(path.."/grinder.lua")
|
||||
dofile(path.."/extractor.lua")
|
||||
dofile(path.."/compressor.lua")
|
||||
|
||||
dofile(path.."/centrifuge.lua")
|
||||
|
@ -17,7 +17,7 @@ local tube = {
|
||||
|
||||
function technic.register_base_machine(data)
|
||||
local typename = data.typename
|
||||
local numitems = technic.recipes[typename].numitems
|
||||
local input_size = technic.recipes[typename].input_size
|
||||
local machine_name = data.machine_name
|
||||
local machine_desc = data.machine_desc
|
||||
local tier = data.tier
|
||||
@ -35,7 +35,7 @@ function technic.register_base_machine(data)
|
||||
|
||||
local formspec =
|
||||
"invsize[8,9;]"..
|
||||
"list[current_name;src;"..(4-numitems)..",1;"..numitems..",1;]"..
|
||||
"list[current_name;src;"..(4-input_size)..",1;"..input_size..",1;]"..
|
||||
"list[current_name;dst;5,1;2,2;]"..
|
||||
"list[current_player;main;0,5;8,4;]"..
|
||||
"label[0,0;"..machine_desc:format(tier).."]"
|
||||
@ -91,10 +91,26 @@ function technic.register_base_machine(data)
|
||||
meta:set_int("src_time", meta:get_int("src_time") + 1)
|
||||
if meta:get_int("src_time") >= result.time / data.speed then
|
||||
meta:set_int("src_time", 0)
|
||||
local result_stack = ItemStack(result.output)
|
||||
if inv:room_for_item("dst", result_stack) then
|
||||
local output = result.output
|
||||
if type(output) ~= "table" then output = { output } end
|
||||
local output_stacks = {}
|
||||
for _, o in ipairs(output) do
|
||||
table.insert(output_stacks, ItemStack(o))
|
||||
end
|
||||
local room_for_output = true
|
||||
inv:set_size("dst_tmp", inv:get_size("dst"))
|
||||
inv:set_list("dst_tmp", inv:get_list("dst"))
|
||||
for _, o in ipairs(output_stacks) do
|
||||
if not inv:room_for_item("dst_tmp", o) then
|
||||
room_for_output = false
|
||||
break
|
||||
end
|
||||
inv:add_item("dst_tmp", o)
|
||||
end
|
||||
if room_for_output then
|
||||
inv:set_list("src", result.new_input)
|
||||
inv:add_item("dst", result_stack)
|
||||
inv:set_list("dst", inv:get_list("dst_tmp"))
|
||||
else
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -121,7 +137,7 @@ function technic.register_base_machine(data)
|
||||
meta:set_int("tube_time", 0)
|
||||
meta:set_string("formspec", formspec)
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("src", numitems)
|
||||
inv:set_size("src", input_size)
|
||||
inv:set_size("dst", 4)
|
||||
inv:set_size("upgrade1", 1)
|
||||
inv:set_size("upgrade2", 1)
|
||||
|
@ -1,15 +1,19 @@
|
||||
|
||||
technic.recipes = {cooking = {numitems = 1}}
|
||||
function technic.register_recipe_type(typename, desc, numitems)
|
||||
numitems = numitems or 1
|
||||
if unified_inventory and unified_inventory.register_craft_type then
|
||||
technic.recipes = { cooking = { input_size = 1, output_size = 1 } }
|
||||
function technic.register_recipe_type(typename, origdata)
|
||||
local data = {}
|
||||
for k, v in pairs(origdata) do data[k] = v end
|
||||
data.input_size = data.input_size or 1
|
||||
data.output_size = data.output_size or 1
|
||||
if unified_inventory and unified_inventory.register_craft_type and data.output_size == 1 then
|
||||
unified_inventory.register_craft_type(typename, {
|
||||
description = desc,
|
||||
height = numitems,
|
||||
description = data.description,
|
||||
height = data.input_size,
|
||||
width = 1,
|
||||
})
|
||||
end
|
||||
technic.recipes[typename] = {numitems = numitems, recipes = {}}
|
||||
data.recipes = {}
|
||||
technic.recipes[typename] = data
|
||||
end
|
||||
|
||||
local function get_recipe_index(items)
|
||||
@ -26,7 +30,13 @@ local function register_recipe(typename, data)
|
||||
for i, stack in ipairs(data.input) do
|
||||
data.input[i] = ItemStack(stack):to_string()
|
||||
end
|
||||
if type(data.output) == "table" then
|
||||
for i, v in ipairs(data.output) do
|
||||
data.output[i] = ItemStack(data.output[i]):to_string()
|
||||
end
|
||||
else
|
||||
data.output = ItemStack(data.output):to_string()
|
||||
end
|
||||
|
||||
local recipe = {time = data.time, input = {}, output = data.output}
|
||||
local index = get_recipe_index(data.input)
|
||||
@ -35,7 +45,7 @@ local function register_recipe(typename, data)
|
||||
end
|
||||
|
||||
technic.recipes[typename].recipes[index] = recipe
|
||||
if unified_inventory then
|
||||
if unified_inventory and technic.recipes[typename].output_size == 1 then
|
||||
unified_inventory.register_craft({
|
||||
type = typename,
|
||||
output = data.output,
|
||||
@ -70,7 +80,6 @@ function technic.get_recipe(typename, items)
|
||||
local new_input = {}
|
||||
for i, stack in ipairs(items) do
|
||||
if stack:get_count() < recipe.input[stack:get_name()] then
|
||||
print(stack:get_name())
|
||||
return nil
|
||||
else
|
||||
new_input[i] = ItemStack(stack)
|
||||
|
Before Width: | Height: | Size: 301 B |
BIN
technic/textures/technic_mv_centrifuge_bottom.png
Normal file
After Width: | Height: | Size: 674 B |
BIN
technic/textures/technic_mv_centrifuge_front.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
technic/textures/technic_mv_centrifuge_front_active.png
Normal file
After Width: | Height: | Size: 686 B |
BIN
technic/textures/technic_mv_centrifuge_side.png
Normal file
After Width: | Height: | Size: 636 B |
BIN
technic/textures/technic_mv_centrifuge_top.png
Normal file
After Width: | Height: | Size: 814 B |
BIN
technic/textures/technic_uranium_dust.png
Normal file
After Width: | Height: | Size: 229 B |
BIN
technic/textures/technicx32/technic_uranium_dust.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'technic:copper_locked_chest 1',
|
||||
recipe = {
|
||||
{'technic:wrought_iron_ingot'},
|
||||
{'default:steel_ingot'},
|
||||
{'technic:copper_chest'},
|
||||
}
|
||||
})
|
||||
|
@ -1,6 +1,3 @@
|
||||
default
|
||||
technic
|
||||
technic_worldgen
|
||||
pipeworks
|
||||
intllib?
|
||||
|
||||
|
@ -20,7 +20,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'technic:gold_locked_chest',
|
||||
recipe = {
|
||||
{'technic:wrought_iron_ingot'},
|
||||
{'default:steel_ingot'},
|
||||
{'technic:gold_chest'},
|
||||
}
|
||||
})
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
modpath = minetest.get_modpath("technic_chests")
|
||||
|
||||
technic = technic or {}
|
||||
technic.chests = {}
|
||||
|
||||
dofile(modpath.."/common.lua")
|
||||
|
@ -1,26 +1,32 @@
|
||||
local cast_iron_ingot
|
||||
if minetest.get_modpath("technic_worldgen") then
|
||||
cast_iron_ingot = "technic:cast_iron_ingot"
|
||||
else
|
||||
cast_iron_ingot = "default:steel_ingot"
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:iron_chest 1',
|
||||
recipe = {
|
||||
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||
{'technic:cast_iron_ingot','default:chest','technic:cast_iron_ingot'},
|
||||
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
|
||||
{cast_iron_ingot,'default:chest',cast_iron_ingot},
|
||||
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:iron_locked_chest 1',
|
||||
recipe = {
|
||||
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||
{'technic:cast_iron_ingot','default:chest_locked','technic:cast_iron_ingot'},
|
||||
{'technic:cast_iron_ingot','technic:cast_iron_ingot','technic:cast_iron_ingot'},
|
||||
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
|
||||
{cast_iron_ingot,'default:chest_locked',cast_iron_ingot},
|
||||
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:iron_locked_chest 1',
|
||||
recipe = {
|
||||
{'technic:wrought_iron_ingot'},
|
||||
{'default:steel_ingot'},
|
||||
{'technic:iron_chest'},
|
||||
}
|
||||
})
|
||||
|
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'technic:mithril_locked_chest 1',
|
||||
recipe = {
|
||||
{'technic:wrought_iron_ingot'},
|
||||
{'default:steel_ingot'},
|
||||
{'technic:mithril_chest'},
|
||||
}
|
||||
})
|
||||
|
@ -49,7 +49,9 @@ end
|
||||
local function check_color_buttons(pos, meta, chest_name, fields)
|
||||
for i = 1, 16 do
|
||||
if fields["color_button"..i] then
|
||||
technic.swap_node(pos, chest_name..colorid_to_postfix(i))
|
||||
local node = minetest.get_node(pos)
|
||||
node.name = chest_name..colorid_to_postfix(i)
|
||||
minetest.swap_node(pos, node)
|
||||
meta:set_string("color", i)
|
||||
return
|
||||
end
|
||||
|
@ -19,7 +19,7 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = 'technic:silver_locked_chest',
|
||||
recipe = {
|
||||
{'technic:wrought_iron_ingot'},
|
||||
{'default:steel_ingot'},
|
||||
{'technic:silver_chest'},
|
||||
}
|
||||
})
|
||||
|
15
technic_worldgen/config.lua
Normal file
@ -0,0 +1,15 @@
|
||||
technic.config = technic.config or Settings(minetest.get_worldpath().."/technic.conf")
|
||||
|
||||
local conf_table = technic.config:to_table()
|
||||
|
||||
local defaults = {
|
||||
enable_granite_generation = "true",
|
||||
enable_marble_generation = "true",
|
||||
enable_rubber_tree_generation = "true",
|
||||
}
|
||||
|
||||
for k, v in pairs(defaults) do
|
||||
if conf_table[k] == nil then
|
||||
technic.config:set(k, v)
|
||||
end
|
||||
end
|
@ -1,11 +1,19 @@
|
||||
|
||||
local S = technic.worldgen.gettext
|
||||
|
||||
minetest.register_craftitem(":technic:uranium", {
|
||||
description = S("Uranium"),
|
||||
inventory_image = "technic_uranium.png",
|
||||
minetest.register_craftitem(":technic:uranium_lump", {
|
||||
description = S("Uranium Lump"),
|
||||
inventory_image = "technic_uranium_lump.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
})
|
||||
minetest.register_alias("technic:uranium", "technic:uranium_lump")
|
||||
|
||||
minetest.register_craftitem(":technic:uranium_ingot", {
|
||||
description = S("Uranium Ingot"),
|
||||
inventory_image = "technic_uranium_ingot.png",
|
||||
on_place_on_ground = minetest.craftitem_place_item,
|
||||
groups = {uranium_ingot=1},
|
||||
})
|
||||
|
||||
minetest.register_craftitem(":technic:chromium_lump", {
|
||||
description = S("Chromium Lump"),
|
||||
@ -74,7 +82,7 @@ local function register_block(block, ingot)
|
||||
})
|
||||
end
|
||||
|
||||
register_block("technic:uranium_block", "technic:uranium")
|
||||
register_block("technic:uranium_block", "technic:uranium_ingot")
|
||||
register_block("technic:chromium_block", "technic:chromium_ingot")
|
||||
register_block("technic:zinc_block", "technic:zinc_ingot")
|
||||
register_block("technic:brass_block", "technic:brass_ingot")
|
||||
@ -94,6 +102,12 @@ minetest.register_craft({
|
||||
output = "technic:chromium_ingot",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'cooking',
|
||||
recipe = "technic:uranium_lump",
|
||||
output = "technic:uranium_ingot",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = 'cooking',
|
||||
recipe = minetest.registered_aliases["technic:wrought_iron_ingot"],
|
||||
|
@ -1,4 +1,3 @@
|
||||
default
|
||||
technic
|
||||
intllib?
|
||||
mg?
|
||||
|
@ -1,5 +1,6 @@
|
||||
local modpath = minetest.get_modpath("technic_worldgen")
|
||||
|
||||
technic = technic or {}
|
||||
technic.worldgen = {}
|
||||
if intllib then
|
||||
technic.worldgen.gettext = intllib.Getter()
|
||||
@ -7,6 +8,7 @@ else
|
||||
technic.worldgen.gettext = function(s) return s end
|
||||
end
|
||||
|
||||
dofile(modpath.."/config.lua")
|
||||
dofile(modpath.."/nodes.lua")
|
||||
dofile(modpath.."/oregen.lua")
|
||||
dofile(modpath.."/crafts.lua")
|
||||
|
@ -3,7 +3,8 @@
|
||||
# by Xanthin
|
||||
|
||||
## crafts.lua
|
||||
Uranium = Uran
|
||||
Uranium Lump = Uranklumpen
|
||||
Uranium Ingot = Uranbarren
|
||||
Chromium Lump = Chromklumpen
|
||||
Chromium Ingot = Chrombarren
|
||||
Zinc Lump = Zinkklumpen
|
||||
|
@ -2,7 +2,8 @@
|
||||
# technic_worldgen translation template
|
||||
|
||||
###crafts.lua
|
||||
Uranium =
|
||||
Uranium Lump =
|
||||
Uranium Ingot =
|
||||
Chromium Lump =
|
||||
Chromium Ingot =
|
||||
Zinc Lump =
|
||||
|
@ -7,7 +7,7 @@ minetest.register_node( ":technic:mineral_uranium", {
|
||||
is_ground_content = true,
|
||||
groups = {cracky=3, radioactive=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
drop = 'craft "technic:uranium" 1',
|
||||
drop = 'craft "technic:uranium_lump" 1',
|
||||
})
|
||||
|
||||
minetest.register_node( ":technic:mineral_chromium", {
|
||||
@ -56,7 +56,7 @@ minetest.register_node(":technic:uranium_block", {
|
||||
description = S("Uranium Block"),
|
||||
tiles = { "technic_uranium_block.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1, level=2, radioactive=3},
|
||||
groups = {uranium_block=1, cracky=1, level=2, radioactive=3},
|
||||
sounds = default.node_sound_stone_defaults()
|
||||
})
|
||||
|
||||
|
BIN
technic_worldgen/textures/technic_uranium_ingot.png
Normal file
After Width: | Height: | Size: 300 B |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |