restructured
This commit is contained in:
parent
ba60bbba38
commit
1f4dcf7512
@ -232,12 +232,6 @@ minetest.register_node("techage:chest_ta4", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "techage:chest_ta2",
|
||||
recipe = {"default:chest", "techage:tubeS", "default:steel_ingot"}
|
||||
})
|
||||
|
||||
techage.register_node("techage:chest_ta2", {"techage:chest_ta3", "techage:chest_ta4"}, {
|
||||
on_pull_item = function(pos, in_dir, num)
|
||||
local meta = minetest.get_meta(pos)
|
||||
@ -276,3 +270,10 @@ techage.register_node("techage:chest_ta2", {"techage:chest_ta3", "techage:chest_
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = "techage:chest_ta2",
|
||||
recipe = {"default:chest", "techage:tubeS", "techage:iron_ingot"}
|
||||
})
|
||||
|
@ -417,10 +417,10 @@ local node_name_ta2, node_name_ta3, node_name_ta4 =
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = node_name_ta2,
|
||||
output = node_name_ta2.." 2",
|
||||
recipe = {
|
||||
{"group:wood", "default:steel_ingot", "group:wood"},
|
||||
{"tubelib:tubeS", "default:mese_crystal", "tubelib:tubeS"},
|
||||
{"group:wood", "default:steel_ingot", "group:wood"},
|
||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||
{"techage:tubeS", "default:mese_crystal", "techage:tubeS"},
|
||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
@ -260,8 +260,8 @@ local node_name_ta2, node_name_ta3, node_name_ta4 =
|
||||
minetest.register_craft({
|
||||
output = node_name_ta2,
|
||||
recipe = {
|
||||
{"group:wood", "default:tin_ingot", "group:wood"},
|
||||
{"tubelib:tubeS", "default:steel_ingot", "tubelib:tubeS"},
|
||||
{"group:wood", "default:tin_ingot", "group:wood"},
|
||||
{"group:wood", "default:mese_crystal", "group:wood"},
|
||||
{"techage:tubeS", "techage:sieve", "techage:tubeS"},
|
||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
@ -254,9 +254,9 @@ local node_name_ta2, node_name_ta3, node_name_ta4 =
|
||||
minetest.register_craft({
|
||||
output = node_name_ta2,
|
||||
recipe = {
|
||||
{"group:wood", "default:tin_ingot", "group:wood"},
|
||||
{"tubelib:tubeS", "default:mese_crystal", "tubelib:tubeS"},
|
||||
{"group:wood", "default:tin_ingot", "group:wood"},
|
||||
{"group:wood", "default:mese_crystal", "group:wood"},
|
||||
{"techage:tubeS", "techage:hammer_steel", "techage:tubeS"},
|
||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -174,8 +174,8 @@ local node_name_ta2, node_name_ta3, node_name_ta4 =
|
||||
minetest.register_craft({
|
||||
output = node_name_ta2.." 2",
|
||||
recipe = {
|
||||
{"group:wood", "wool:dark_green", "group:wood"},
|
||||
{"tubelib:tubeS", "default:mese_crystal", "tubelib:tubeS"},
|
||||
{"group:wood", "wool:dark_green", "group:wood"},
|
||||
{"group:wood", "wool:dark_green", "group:wood"},
|
||||
{"techage:tubeS", "default:mese_crystal", "techage:tubeS"},
|
||||
{"group:wood", "techage:iron_ingot", "group:wood"},
|
||||
},
|
||||
})
|
||||
|
142
init.lua
142
init.lua
@ -2,78 +2,94 @@ techage = {
|
||||
NodeDef = {}, -- node registration info
|
||||
}
|
||||
|
||||
if minetest.global_exists("tubelib") then
|
||||
minetest.log("error", "[techage] Techage can't be used together with the mod tubelib!")
|
||||
elseif minetest.global_exists("ironage") then
|
||||
minetest.log("error", "[techage] Techage can't be used together with the mod ironage!")
|
||||
elseif minetest.global_exists("techpack") then
|
||||
minetest.log("error", "[techage] Techage can't be used together with the modpack techpack!")
|
||||
else
|
||||
techage.max_num_forceload_blocks = tonumber(minetest.setting_get("techage_max_num_forceload_blocks")) or 12
|
||||
techage.basalt_stone_enabled = minetest.setting_get("techage_basalt_stone_enabled") == "true"
|
||||
techage.machine_aging_value = tonumber(minetest.setting_get("techage_machine_aging_value")) or 100
|
||||
techage.ore_rarity = tonumber(minetest.setting_get("techage_ore_rarity")) or 1
|
||||
techage.modified_recipes_enabled = minetest.setting_get("techage_modified_recipes_enabled") == "true"
|
||||
|
||||
techage.max_num_forceload_blocks = tonumber(minetest.setting_get("techage_max_num_forceload_blocks")) or 12
|
||||
techage.basalt_stone_enabled = minetest.setting_get("techage_basalt_stone_enabled") == "true"
|
||||
techage.machine_aging_value = tonumber(minetest.setting_get("techage_machine_aging_value")) or 100
|
||||
techage.ore_rarity = tonumber(minetest.setting_get("techage_ore_rarity")) or 1
|
||||
techage.modified_recipes_enabled = minetest.setting_get("techage_modified_recipes_enabled") == "true"
|
||||
local MP = minetest.get_modpath("techage")
|
||||
|
||||
local MP = minetest.get_modpath("techage")
|
||||
-- Load support for intllib.
|
||||
dofile(MP.."/basis/intllib.lua")
|
||||
|
||||
-- Load support for intllib.
|
||||
dofile(MP.."/basis/intllib.lua")
|
||||
-- Basis features
|
||||
dofile(MP.."/basis/lib.lua") -- helper functions
|
||||
dofile(MP.."/basis/guide.lua") -- construction guide
|
||||
dofile(MP.."/basis/power.lua") -- power distribution
|
||||
dofile(MP.."/basis/node_states.lua") -- state model
|
||||
dofile(MP.."/basis/trowel.lua") -- hidden networks
|
||||
dofile(MP.."/basis/junction.lua") -- network junction box
|
||||
dofile(MP.."/basis/tubes.lua") -- tubelib replacement
|
||||
dofile(MP.."/basis/command.lua") -- tubelib replacement
|
||||
dofile(MP.."/basis/consumer.lua") -- consumer base model
|
||||
dofile(MP.."/basis/firebox.lua") -- common firebox functions
|
||||
|
||||
-- Basis features
|
||||
dofile(MP.."/basis/lib.lua") -- helper functions
|
||||
dofile(MP.."/basis/guide.lua") -- construction guide
|
||||
dofile(MP.."/basis/power.lua") -- power distribution
|
||||
dofile(MP.."/basis/node_states.lua")
|
||||
dofile(MP.."/basis/trowel.lua") -- hidden networks
|
||||
dofile(MP.."/basis/junction.lua") -- network junction box
|
||||
dofile(MP.."/basis/tubes.lua") -- tubelib replacement
|
||||
dofile(MP.."/basis/command.lua") -- tubelib replacement
|
||||
dofile(MP.."/basis/consumer.lua") -- consumer base model
|
||||
dofile(MP.."/basis/steam_pipe.lua")
|
||||
dofile(MP.."/basis/firebox.lua")
|
||||
-- Power networks
|
||||
dofile(MP.."/power/drive_axle.lua")
|
||||
dofile(MP.."/power/steam_pipe.lua")
|
||||
dofile(MP.."/power/biogas_pipe.lua")
|
||||
dofile(MP.."/power/electric_cable.lua")
|
||||
|
||||
-- Iron Age
|
||||
dofile(MP.."/iron_age/main.lua")
|
||||
dofile(MP.."/iron_age/gravelsieve.lua")
|
||||
dofile(MP.."/iron_age/hammer.lua")
|
||||
dofile(MP.."/iron_age/lighter.lua")
|
||||
dofile(MP.."/iron_age/charcoalpile.lua")
|
||||
dofile(MP.."/iron_age/coalburner.lua")
|
||||
dofile(MP.."/iron_age/meltingpot.lua")
|
||||
if techage.modified_recipes_enabled then
|
||||
dofile(MP.."/iron_age/tools.lua")
|
||||
end
|
||||
dofile(MP.."/iron_age/recipes.lua")
|
||||
dofile(MP.."/iron_age/help.lua")
|
||||
if minetest.global_exists("wielded_light") then
|
||||
dofile(MP.."/iron_age/meridium.lua")
|
||||
end
|
||||
-- Iron Age
|
||||
dofile(MP.."/iron_age/main.lua")
|
||||
dofile(MP.."/iron_age/gravelsieve.lua")
|
||||
dofile(MP.."/iron_age/hammer.lua")
|
||||
dofile(MP.."/iron_age/lighter.lua")
|
||||
dofile(MP.."/iron_age/charcoalpile.lua")
|
||||
dofile(MP.."/iron_age/coalburner.lua")
|
||||
dofile(MP.."/iron_age/meltingpot.lua")
|
||||
if techage.modified_recipes_enabled then
|
||||
dofile(MP.."/iron_age/tools.lua")
|
||||
end
|
||||
dofile(MP.."/iron_age/recipes.lua")
|
||||
dofile(MP.."/iron_age/help.lua")
|
||||
if minetest.global_exists("wielded_light") then
|
||||
dofile(MP.."/iron_age/meridium.lua")
|
||||
end
|
||||
|
||||
-- Steam Engine
|
||||
dofile(MP.."/steam_engine/drive_axle.lua")
|
||||
dofile(MP.."/steam_engine/firebox.lua")
|
||||
dofile(MP.."/steam_engine/boiler.lua")
|
||||
dofile(MP.."/steam_engine/cylinder.lua")
|
||||
dofile(MP.."/steam_engine/flywheel.lua")
|
||||
dofile(MP.."/steam_engine/gearbox.lua")
|
||||
dofile(MP.."/steam_engine/consumer.lua")
|
||||
dofile(MP.."/steam_engine/battery.lua")
|
||||
-- Steam Engine
|
||||
dofile(MP.."/steam_engine/firebox.lua")
|
||||
dofile(MP.."/steam_engine/boiler.lua")
|
||||
dofile(MP.."/steam_engine/cylinder.lua")
|
||||
dofile(MP.."/steam_engine/flywheel.lua")
|
||||
dofile(MP.."/steam_engine/gearbox.lua")
|
||||
dofile(MP.."/steam_engine/consumer.lua")
|
||||
dofile(MP.."/steam_engine/battery.lua")
|
||||
|
||||
dofile(MP.."/electric/electric_cable.lua")
|
||||
dofile(MP.."/electric/test.lua")
|
||||
dofile(MP.."/electric/generator.lua")
|
||||
dofile(MP.."/electric/consumer.lua")
|
||||
-- Basic Machines
|
||||
dofile(MP.."/basic_machines/pusher.lua")
|
||||
dofile(MP.."/basic_machines/legacy_nodes.lua")
|
||||
dofile(MP.."/basic_machines/grinder.lua")
|
||||
dofile(MP.."/basic_machines/distributor.lua")
|
||||
dofile(MP.."/basic_machines/gravelsieve.lua")
|
||||
dofile(MP.."/basic_machines/chest.lua")
|
||||
|
||||
-- Basic Machines
|
||||
dofile(MP.."/basic_machines/pusher.lua")
|
||||
dofile(MP.."/basic_machines/legacy_nodes.lua")
|
||||
dofile(MP.."/basic_machines/grinder.lua")
|
||||
dofile(MP.."/basic_machines/distributor.lua")
|
||||
dofile(MP.."/basic_machines/gravelsieve.lua")
|
||||
dofile(MP.."/basic_machines/chest.lua")
|
||||
|
||||
-- Coal power station
|
||||
dofile(MP.."/coal_power_station/firebox.lua")
|
||||
-- Coal power station
|
||||
dofile(MP.."/coal_power_station/firebox.lua")
|
||||
--dofile(MP.."/coal_power_station/boiler.lua")
|
||||
--dofile(MP.."/coal_power_station/generator.lua")
|
||||
--dofile(MP.."/coal_power_station/turbine.lua")
|
||||
--dofile(MP.."/coal_power_station/cooler.lua")
|
||||
|
||||
|
||||
--dofile(MP.."/fermenter/biogas_pipe.lua")
|
||||
--dofile(MP.."/fermenter/gasflare.lua")
|
||||
|
||||
|
||||
--dofile(MP.."/nodes/test.lua")
|
||||
--dofile(MP.."/mechanic/perf_test.lua")
|
||||
--dofile(MP.."/test/test.lua")
|
||||
--dofile(MP.."/test/generator.lua")
|
||||
--dofile(MP.."/test/consumer.lua")
|
||||
|
||||
|
||||
--dofile(MP.."/fermenter/gasflare.lua")
|
||||
|
||||
|
||||
--dofile(MP.."/nodes/test.lua")
|
||||
--dofile(MP.."/mechanic/perf_test.lua")
|
||||
end
|
@ -336,14 +336,6 @@ minetest.register_craft({
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:auto_sieve",
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
"techage:sieve", "default:mese_crystal", "default:mese_crystal",
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:compressed_gravel",
|
||||
recipe = {
|
||||
|
@ -8,7 +8,7 @@
|
||||
LGPLv2.1+
|
||||
See LICENSE.txt for more information
|
||||
|
||||
Biogas pipes
|
||||
TA4 Biogas pipes
|
||||
|
||||
]]--
|
||||
|
@ -175,3 +175,12 @@ minetest.register_node("techage:axle_on", {
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:axle 3",
|
||||
recipe = {
|
||||
{"default:junglewood", "", "default:wood"},
|
||||
{"", "techage:iron_ingot", ""},
|
||||
{"default:wood", "", "default:junglewood"},
|
||||
},
|
||||
})
|
@ -8,7 +8,7 @@
|
||||
LGPLv2.1+
|
||||
See LICENSE.txt for more information
|
||||
|
||||
Cable and junction box for electrical power distribution
|
||||
TA3/TA4 Cable and junction box for electrical power distribution
|
||||
|
||||
]]--
|
||||
|
@ -113,3 +113,11 @@ minetest.register_node("techage:steam_pipeA", {
|
||||
drop = "techage:steam_pipeS",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:steam_pipeS 3",
|
||||
recipe = {
|
||||
{'', '', "default:bronze_ingot"},
|
||||
{'', 'techage:iron_ingot', ''},
|
||||
{"default:bronze_ingot", '', ''},
|
||||
},
|
||||
})
|
BIN
sounds/techage_steamengine.ogg
Normal file
BIN
sounds/techage_steamengine.ogg
Normal file
Binary file not shown.
@ -298,3 +298,20 @@ minetest.register_node("techage:boiler2", {
|
||||
sounds = default.node_sound_metal_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:boiler1",
|
||||
recipe = {
|
||||
{"techage:iron_ingot", "", "techage:iron_ingot"},
|
||||
{"default:bronze_ingot", "", "default:bronze_ingot"},
|
||||
{"techage:iron_ingot", "default:bronze_ingot", "techage:iron_ingot"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:boiler2",
|
||||
recipe = {
|
||||
{"techage:iron_ingot", "techage:steam_pipeS", "techage:iron_ingot"},
|
||||
{"default:bronze_ingot", "", "default:bronze_ingot"},
|
||||
{"techage:iron_ingot", "", "techage:iron_ingot"},
|
||||
},
|
||||
})
|
||||
|
@ -53,10 +53,19 @@ local function start_cylinder(pos, on)
|
||||
if on and mem.running then
|
||||
consumer.turn_power_on(pos, POWER_CONSUMPTION)
|
||||
swap_node(pos, "techage:cylinder_on")
|
||||
mem.handle = minetest.sound_play("techage_steamengine", {
|
||||
pos = pos,
|
||||
max_hear_distance = 4,
|
||||
gain = 0.7,
|
||||
loop = true})
|
||||
return true
|
||||
else
|
||||
consumer.turn_power_on(pos, 0)
|
||||
swap_node(pos, "techage:cylinder")
|
||||
if mem.handle then
|
||||
minetest.sound_stop(mem.handle)
|
||||
mem.handle = nil
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
@ -147,3 +156,26 @@ minetest.register_node("techage:cylinder_on", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:cylinder",
|
||||
recipe = {
|
||||
{"basic_materials:steel_bar", "techage:iron_ingot", "default:wood"},
|
||||
{"techage:steam_pipeS", "basic_materials:gear_steel", ""},
|
||||
{"default:wood", "techage:iron_ingot", "basic_materials:steel_bar"},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_lbm({
|
||||
label = "[techage] Steam engine sound",
|
||||
name = "techage:steam_engine",
|
||||
nodenames = {"techage:cylinder_on"},
|
||||
run_at_every_load = true,
|
||||
action = function(pos, node)
|
||||
local mem = tubelib2.get_mem(pos)
|
||||
mem.handle = minetest.sound_play("techage_steamengine", {
|
||||
pos = pos,
|
||||
max_hear_distance = 4,
|
||||
gain = 0.7,
|
||||
loop = true})
|
||||
end
|
||||
})
|
||||
|
@ -135,3 +135,11 @@ minetest.register_node("techage:firebox_on", {
|
||||
on_rightclick = firebox.on_rightclick,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:firebox",
|
||||
recipe = {
|
||||
{'group:stone', 'group:stone', 'group:stone'},
|
||||
{'techage:iron_ingot', '', 'techage:iron_ingot'},
|
||||
{'group:stone', 'group:stone', 'group:stone'},
|
||||
},
|
||||
})
|
||||
|
@ -26,7 +26,7 @@ local I,_ = dofile(MP.."/intllib.lua")
|
||||
local STANDBY_TICKS = 4
|
||||
local COUNTDOWN_TICKS = 4
|
||||
local CYCLE_TIME = 8
|
||||
local POWER_CAPACITY = 8
|
||||
local POWER_CAPACITY = 12
|
||||
|
||||
local Axle = techage.Axle
|
||||
local generator = techage.generator
|
||||
@ -149,6 +149,7 @@ minetest.register_node("techage:flywheel", {
|
||||
turn_on = turn_power_on,
|
||||
read_power_consumption = generator.read_power_consumption,
|
||||
power_network = Axle,
|
||||
power_side = "R",
|
||||
animated_power_network = true,
|
||||
},
|
||||
|
||||
@ -217,6 +218,7 @@ minetest.register_node("techage:flywheel_on", {
|
||||
turn_on = turn_power_on,
|
||||
read_power_consumption = generator.read_power_consumption,
|
||||
power_network = Axle,
|
||||
power_side = "R",
|
||||
animated_power_network = true,
|
||||
},
|
||||
|
||||
@ -237,3 +239,12 @@ minetest.register_node("techage:flywheel_on", {
|
||||
is_ground_content = false,
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:flywheel",
|
||||
recipe = {
|
||||
{"basic_materials:steel_bar", "dye:red", "default:wood"},
|
||||
{"", "basic_materials:gear_steel", "techage:axle"},
|
||||
{"default:wood", "techage:iron_ingot", "basic_materials:steel_bar"},
|
||||
},
|
||||
})
|
||||
|
@ -99,3 +99,11 @@ minetest.register_node("techage:gearbox_on", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "techage:gearbox 2",
|
||||
recipe = {
|
||||
{"default:junglewood", "techage:axle", "default:wood"},
|
||||
{"techage:axle", "techage:iron_ingot", "techage:axle"},
|
||||
{"default:wood", "techage:axle", "default:junglewood"},
|
||||
},
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user