summaryrefslogtreecommitdiff
path: root/technic/machines
diff options
context:
space:
mode:
authorVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-22 22:28:28 -0400
committerVanessa Dannenberg <vanessa.e.dannenberg@gmail.com>2018-08-22 22:28:28 -0400
commit9c9457e1f50ebdd943695a4cce6b88fa552370f3 (patch)
tree4f6002b266179e0dd1639affffd4f09a18dfcad5 /technic/machines
parent3c47f229fcbdb7cad28bacbc579516bf3ecf6c03 (diff)
downloaddreambuilder_modpack-9c9457e1f50ebdd943695a4cce6b88fa552370f3.tar
dreambuilder_modpack-9c9457e1f50ebdd943695a4cce6b88fa552370f3.tar.gz
dreambuilder_modpack-9c9457e1f50ebdd943695a4cce6b88fa552370f3.tar.bz2
dreambuilder_modpack-9c9457e1f50ebdd943695a4cce6b88fa552370f3.tar.xz
dreambuilder_modpack-9c9457e1f50ebdd943695a4cce6b88fa552370f3.zip
update castles modpack, blox, bobblocks, coloredwood, technic,
gloopblocks, homedecor, ilights, led marquee, plasticbox, solidcolor, stained_glass, unified bricks, and unified dyes In most of these, the update is to shift over to the new "old" coloring paradigm in Unified Dyes. See its forum thread for details.
Diffstat (limited to 'technic/machines')
-rw-r--r--technic/machines/HV/init.lua8
-rw-r--r--technic/machines/LV/init.lua12
-rw-r--r--technic/machines/MV/init.lua10
-rw-r--r--technic/machines/creative.lua25
-rw-r--r--technic/machines/init.lua2
-rw-r--r--technic/machines/power_monitor.lua2
-rw-r--r--technic/machines/switching_station.lua2
7 files changed, 34 insertions, 27 deletions
diff --git a/technic/machines/HV/init.lua b/technic/machines/HV/init.lua
index d7136b4..468932d 100644
--- a/technic/machines/HV/init.lua
+++ b/technic/machines/HV/init.lua
@@ -8,9 +8,11 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
-dofile(path.."/solar_array.lua")
-dofile(path.."/nuclear_reactor.lua")
-dofile(path.."/generator.lua")
+if technic.config:get_bool("enable_producers") then
+ dofile(path.."/solar_array.lua")
+ dofile(path.."/nuclear_reactor.lua")
+ dofile(path.."/generator.lua")
+end
-- Machines
dofile(path.."/quarry.lua")
diff --git a/technic/machines/LV/init.lua b/technic/machines/LV/init.lua
index 30523c9..aeb6ce3 100644
--- a/technic/machines/LV/init.lua
+++ b/technic/machines/LV/init.lua
@@ -8,11 +8,13 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
-dofile(path.."/solar_panel.lua")
-dofile(path.."/solar_array.lua")
-dofile(path.."/geothermal.lua")
-dofile(path.."/water_mill.lua")
-dofile(path.."/generator.lua")
+if technic.config:get_bool("enable_producers") then
+ dofile(path.."/solar_panel.lua")
+ dofile(path.."/solar_array.lua")
+ dofile(path.."/geothermal.lua")
+ dofile(path.."/water_mill.lua")
+ dofile(path.."/generator.lua")
+end
-- Machines
dofile(path.."/alloy_furnace.lua")
diff --git a/technic/machines/MV/init.lua b/technic/machines/MV/init.lua
index 72a98b6..bb9542d 100644
--- a/technic/machines/MV/init.lua
+++ b/technic/machines/MV/init.lua
@@ -8,11 +8,13 @@ dofile(path.."/cables.lua")
dofile(path.."/battery_box.lua")
-- Generators
-if technic.config:get_bool("enable_wind_mill") then
- dofile(path.."/wind_mill.lua")
+if technic.config:get_bool("enable_producers") then
+ if technic.config:get_bool("enable_wind_mill") then
+ dofile(path.."/wind_mill.lua")
+ end
+ dofile(path.."/generator.lua")
+ dofile(path.."/solar_array.lua")
end
-dofile(path.."/generator.lua")
-dofile(path.."/solar_array.lua")
-- Machines
dofile(path.."/alloy_furnace.lua")
diff --git a/technic/machines/creative.lua b/technic/machines/creative.lua
index 7c09a80..39abe74 100644
--- a/technic/machines/creative.lua
+++ b/technic/machines/creative.lua
@@ -1,40 +1,41 @@
local S = technic.getter
minetest.register_abm({
- nodenames = {"group:technic_lv","group:technic_mv","group:technic_hv"},
+ nodenames = {"group:technic_lv", "group:technic_mv", "group:technic_hv"},
label = "Run Machines",
interval = 1,
chance = 1,
action = function(pos,node)
local meta = minetest.get_meta(pos)
- local pos1 = {x=pos.x,y=pos.y-1,z=pos.z}
+ local pos1 = {x=pos.x, y=pos.y-1, z=pos.z}
local tier = technic.get_cable_tier(minetest.get_node(pos1).name)
local meta = minetest.get_meta(pos)
if not tier then
- meta:set_int("active",0)
+ meta:set_int("active", 0)
return
end
- meta:set_int("active",1)
- meta:set_int("LV_EU_input",meta:get_int("LV_EU_demand"))
- meta:set_int("MV_EU_input",meta:get_int("MV_EU_demand"))
- meta:set_int("HV_EU_input",meta:get_int("HV_EU_demand"))
+ meta:set_int("active", 1)
+ meta:set_int("LV_EU_input", meta:get_int("LV_EU_demand"))
+ meta:set_int("MV_EU_input", meta:get_int("MV_EU_demand"))
+ meta:set_int("HV_EU_input", meta:get_int("HV_EU_demand"))
local nodedef = minetest.registered_nodes[node.name]
if nodedef and nodedef.technic_run then
- nodedef.technic_run(pos,node)
+ nodedef.technic_run(pos, node)
end
end,
})
minetest.register_lbm({
- nodenames = {"technic:switching_station","technic:power_monitor"},
+ nodenames = {"technic:switching_station", "technic:power_monitor"},
name = "technic:update_infotext",
label = "Update switching station / power monitor infotext",
- action = function(pos,node)
+ run_at_every_load = true,
+ action = function(pos, node)
local meta = minetest.get_meta(pos)
if node.name == "technic:switching_station" then
- meta:set_string("infotext",S("Switching Station"))
+ meta:set_string("infotext", S("Switching Station"))
elseif node.name == "technic:power_monitor" then
- meta:set_string("infotext",S("Power Monitor"))
+ meta:set_string("infotext", S("Power Monitor"))
end
end,
})
diff --git a/technic/machines/init.lua b/technic/machines/init.lua
index b8d36c1..00ea158 100644
--- a/technic/machines/init.lua
+++ b/technic/machines/init.lua
@@ -13,7 +13,7 @@ dofile(path.."/supply_converter.lua")
dofile(path.."/other/init.lua")
-if technic.config:get_bool("enable_creative_mode") then
+if technic.config:get_bool("creative_mode") then
--The switching station does not handle running machines
--in this mode, so alternative means are used to do so.
dofile(path.."/creative.lua")
diff --git a/technic/machines/power_monitor.lua b/technic/machines/power_monitor.lua
index 25836d6..0d709da 100644
--- a/technic/machines/power_monitor.lua
+++ b/technic/machines/power_monitor.lua
@@ -35,7 +35,7 @@ minetest.register_node("technic:power_monitor",{
end,
})
-if technic.config:get_bool("enable_creative_mode") then
+if technic.config:get_bool("creative_mode") then
--Power distribution is not used in this mode,
--so the power monitor is inert and never needs to run.
return
diff --git a/technic/machines/switching_station.lua b/technic/machines/switching_station.lua
index 2d96b9b..70765bf 100644
--- a/technic/machines/switching_station.lua
+++ b/technic/machines/switching_station.lua
@@ -88,7 +88,7 @@ minetest.register_node("technic:switching_station",{
},
})
-if technic.config:get_bool("enable_creative_mode") then
+if technic.config:get_bool("creative_mode") then
--Power distribution is not used in this mode,
--so the switching station is inert and none of the
--network processing is needed.