summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorest31 <MTest31@outlook.com>2015-03-23 03:25:01 +0100
committerest31 <MTest31@outlook.com>2015-03-23 03:41:03 +0100
commit1615681e894d4ce97fd9d70d3b52aecf20ebc2b2 (patch)
tree46caf10625ae90f9f19f3c34c84ef03b39a3685a
parent3f179e4c53388ad6af15ec2bd9ba0f364a65b1e3 (diff)
Fix autoloading for solar arrays
This autoloads the node above a solar array, so that its light value can be determined. Previously, solar arrays in unloaded blocks would report an input of 0 to the switching station.
-rw-r--r--technic/machines/register/solar_array.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/technic/machines/register/solar_array.lua b/technic/machines/register/solar_array.lua
index 57914a4..39f50d2 100644
--- a/technic/machines/register/solar_array.lua
+++ b/technic/machines/register/solar_array.lua
@@ -17,6 +17,8 @@ function technic.register_solar_array(data)
pos1.y = pos.y + 1
pos1.x = pos.x
pos1.z = pos.z
+
+ technic.get_or_load_node(pos1)
local light = minetest.get_node_light(pos1, nil)
local time_of_day = minetest.get_timeofday()
local meta = minetest.get_meta(pos)