reactor and doser prepared
sound bugfix for the power station turbine
This commit is contained in:
parent
0a27fb122c
commit
0ee5c82b49
21
chemistry/recipes.lua
Normal file
21
chemistry/recipes.lua
Normal file
@ -0,0 +1,21 @@
|
||||
--[[
|
||||
|
||||
TechAge
|
||||
=======
|
||||
|
||||
Copyright (C) 2019 Joachim Stolberg
|
||||
|
||||
GPL v3
|
||||
See LICENSE.txt for more information
|
||||
|
||||
TA4 Doser
|
||||
|
||||
]]--
|
||||
|
||||
recipes.add("ta4_doser", {
|
||||
output = "techage:ta4_epoxy 3",
|
||||
input = {
|
||||
"techage:oil_source 2",
|
||||
"basic_materials:oil_extract 1",
|
||||
}
|
||||
})
|
@ -118,38 +118,42 @@ local function dosing(pos, mem, elapsed)
|
||||
State:idle(pos, mem)
|
||||
return
|
||||
end
|
||||
-- -- available liquids
|
||||
-- local liquids = get_liquids(pos)
|
||||
-- local recipe = recipes.get(mem, "ta4_doser")
|
||||
-- if not liquids or not recipe then return end
|
||||
-- -- inputs
|
||||
-- for _,item in pairs(recipe.input) do
|
||||
-- if item.name ~= "" then
|
||||
-- print("dosing", item.name, dump(liquids))
|
||||
-- local outdir = liquids[item.name]
|
||||
-- if not outdir then
|
||||
-- State:fault(pos, mem, S("input missing"))
|
||||
-- return
|
||||
-- end
|
||||
-- if liquid.take(pos, outdir, item.name, item.num) < item.num then
|
||||
-- State:fault(pos, mem, S("input missing"))
|
||||
-- return
|
||||
-- end
|
||||
-- end
|
||||
-- end
|
||||
-- available liquids
|
||||
local liquids = get_liquids(pos)
|
||||
local recipe = recipes.get(mem, "ta4_doser")
|
||||
if not liquids or not recipe then return end
|
||||
-- inputs
|
||||
for _,item in pairs(recipe.input) do
|
||||
if item.name ~= "" then
|
||||
print("dosing", item.name, dump(liquids))
|
||||
local outdir = liquids[item.name]
|
||||
if not outdir then
|
||||
State:fault(pos, mem, S("input missing"))
|
||||
return
|
||||
end
|
||||
if liquid.take(pos, outdir, item.name, item.num) < item.num then
|
||||
State:fault(pos, mem, S("input missing"))
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
-- output
|
||||
--if not reactor_cmnd(pos, "output", recipe.output.name) then
|
||||
local leftover
|
||||
leftover = reactor_cmnd(pos, "output", {name = "techage:gasoline", amount = 1, player_name = "singleplayer"})
|
||||
leftover = reactor_cmnd(pos, "output", {
|
||||
name = recipe.output.name,
|
||||
amount = recipe.output.num})
|
||||
if not leftover or leftover > 0 then
|
||||
State:fault(pos, mem, S("output blocked"))
|
||||
return
|
||||
end
|
||||
--if not reactor_cmnd(pos, "waste", recipe.waste.name) then
|
||||
leftover = reactor_cmnd(pos, "waste", {name = "techage:bitumen", amount = 1, player_name = "singleplayer"})
|
||||
if not leftover or leftover > 0 then
|
||||
State:fault(pos, mem, S("output blocked"))
|
||||
return
|
||||
if recipe.waste.name ~= "" then
|
||||
leftover = reactor_cmnd(pos, "waste", {
|
||||
name = recipe.waste.name,
|
||||
amount = recipe.waste.num})
|
||||
if not leftover or leftover > 0 then
|
||||
State:fault(pos, mem, S("output blocked"))
|
||||
return
|
||||
end
|
||||
end
|
||||
State:keep_running(pos, mem, COUNTDOWN_TICKS)
|
||||
end
|
||||
@ -257,11 +261,3 @@ if minetest.global_exists("unified_inventory") then
|
||||
height = 2,
|
||||
})
|
||||
end
|
||||
|
||||
recipes.add("ta4_doser", {
|
||||
output = "techage:ta4_epoxy 3",
|
||||
input = {
|
||||
"techage:oil_source 2",
|
||||
"basic_materials:oil_extract 1",
|
||||
}
|
||||
})
|
6
init.lua
6
init.lua
@ -219,9 +219,9 @@ else
|
||||
dofile(MP.."/energy_storage/nodes.lua")
|
||||
|
||||
-- Chemistry
|
||||
dofile(MP.."/chemistry/ta4_reactor.lua")
|
||||
dofile(MP.."/chemistry/ta4_stand.lua")
|
||||
dofile(MP.."/chemistry/ta4_doser.lua")
|
||||
--dofile(MP.."/chemistry/ta4_reactor.lua")
|
||||
--dofile(MP.."/chemistry/ta4_stand.lua")
|
||||
--dofile(MP.."/chemistry/ta4_doser.lua")
|
||||
|
||||
-- Hydrogen
|
||||
dofile(MP.."/hydrogen/hydrogen.lua")
|
||||
|
@ -273,9 +273,13 @@ empty=leer
|
||||
input missing=Zufuhr fehlt
|
||||
light=Licht
|
||||
no fuel or no power=kein Strom oder Brennstoff
|
||||
no power=kein Strom
|
||||
off=aus
|
||||
on=an
|
||||
output blocked=Ausgang blockiert
|
||||
power=Strom
|
||||
reactor defect=Reaktor defekt
|
||||
reactor defect or no power=Reaktor defekt oder kein Strom
|
||||
reactor has no power=Reaktor hat keinen Strom
|
||||
removed=entfernt
|
||||
stopped=gestoppt
|
||||
|
@ -56,6 +56,7 @@ Meridium Axe=Meridium Axt
|
||||
Meridium Pickaxe=Meridium Pickel
|
||||
Meridium Shovel=Meridium Schaufel
|
||||
Meridium Sword=Meridium Schwert
|
||||
More water expected (2 m deep)!=
|
||||
Network Data=Netzwerkdaten
|
||||
No plan available=Kein Plan verfügar
|
||||
No wind at this altitude!=Kein Wind auf dieser Höhe
|
||||
@ -75,7 +76,7 @@ Power=Energie
|
||||
Primary available=Primär verfügbar
|
||||
Primary needed=Primär benötigt
|
||||
Pusher=Schieber
|
||||
Recipe=Rezepte
|
||||
Recipe=Rezept
|
||||
Remove derrick=Entferne Ölturm
|
||||
Rinsing=Waschen
|
||||
River Water Barrel=Flusswasserfass
|
||||
@ -213,6 +214,7 @@ TA4 Pipe Inlet=TA4 Rohrzulauf
|
||||
TA4 Protected Chest=TA4 Gesicherte Kiste
|
||||
TA4 Pump=TA4 Pumpe
|
||||
TA4 Reactor=Reaktor
|
||||
TA4 Reactor Base=
|
||||
TA4 Reactor Filler Pipe=TA4 Reaktor Einfüllstutzen
|
||||
TA4 Rotor Blade=TA4 Rotorblatt
|
||||
TA4 Silicon Wafer=TA4 Silizium-Wafer
|
||||
@ -249,7 +251,6 @@ Usmium Nuggets=Usmium Nuggets
|
||||
WLAN Chip=WLAN Chip
|
||||
Water=Wasser
|
||||
Water Barrel=Wasserfass
|
||||
Wrong place for wind turbines!=Falscher Ort für Windkraftanlagen
|
||||
[TA4 Wind Turbine]=[TA4 Windkraftanlage]
|
||||
[TA] Area is protected!=[TA] Bereich ist geschützt
|
||||
[TA] Derrick is being built!=[TA] Bohrturm wird errichtet
|
||||
@ -279,3 +280,4 @@ reactor has no power=Reaktor hat keinen Strom
|
||||
removed=entfernt
|
||||
stopped=gestoppt
|
||||
##### not used anymore #####
|
||||
Wrong place for wind turbines!=Falscher Ort für Windkraftanlagen
|
@ -271,9 +271,13 @@ empty=
|
||||
input missing=
|
||||
light=
|
||||
no fuel or no power=
|
||||
no power=
|
||||
off=
|
||||
on=
|
||||
output blocked=
|
||||
power=
|
||||
reactor defect=
|
||||
reactor defect or no power=
|
||||
reactor has no power=
|
||||
removed=
|
||||
stopped=
|
@ -20,8 +20,6 @@ minetest.register_node("techage:bauxite_stone", {
|
||||
groups = {cracky = 3, stone = 1},
|
||||
drop = 'techage:bauxite_cobble',
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
--paramtype = "light",
|
||||
--light_source = minetest.LIGHT_MAX
|
||||
})
|
||||
|
||||
minetest.register_node("techage:bauxite_cobble", {
|
||||
@ -41,21 +39,21 @@ minetest.register_node("techage:bauxite_gravel", {
|
||||
})
|
||||
|
||||
minetest.register_ore({
|
||||
ore_type = "blob",
|
||||
ore = "techage:bauxite_stone",
|
||||
wherein = {"default:stone"},
|
||||
clust_scarcity = 12 * 12 * 12,
|
||||
clust_size = 5,
|
||||
y_max = -100,
|
||||
y_min = -200,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 8, y = 8, z = 8},
|
||||
seed = 1234, --2316,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
biomes = {"underground"}
|
||||
ore_type = "blob",
|
||||
ore = "techage:bauxite_stone",
|
||||
wherein = {"default:stone", "default:desert_stone"},
|
||||
clust_scarcity = 16 * 16 * 16,
|
||||
clust_size = 6,
|
||||
y_max = -50,
|
||||
y_min = -150,
|
||||
noise_threshold = 0.0,
|
||||
noise_params = {
|
||||
offset = 0.5,
|
||||
scale = 0.2,
|
||||
spread = {x = 5, y = 5, z = 5},
|
||||
seed = 41524,
|
||||
octaves = 1,
|
||||
persist = 0.0
|
||||
},
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user