Thermal Solar Power deprecated


Adds the ability to build an early to mid game thermal solar complex with built-in energy storage for the night with varied features.

Content
4 years ago
0.16 - 0.18
42
Power

b Does not listen to script events.

4 years ago
(updated 4 years ago)

Solar panels do not warm up when placed by script, eg. Bluebuild, Repair Turrets, etc.

local function on_built(entity)
...
end

local function on_remove(entity)
...
end

local pre_remove_events = {defines.events.on_pre_player_mined_item, defines.events.on_robot_pre_mined, defines.events.on_entity_died, defines.events.script_raised_destroy}
script.on_event(pre_remove_events, function(event) on_remove(event.entity) end)

local build_events = {defines.events.on_built_entity, defines.events.on_robot_built_entity}
script.on_event(build_events, function(event) on_built(event.created_entity) end)

local script_build_events = {defines.events.script_raised_built, defines.events.script_raised_revive}
script.on_event(script_build_events, function(event) on_built(event.entity) end)

script.on_event(defines.events.on_entity_cloned, function(event) on_built(event.destination) end)

local script_build_events = {defines.events.script_raised_built, defines.events.script_raised_revive}
script.on_event(script_build_events, function(event) on_built(event.entity) end)

script.on_event(defines.events.on_entity_cloned, function(event) on_built(event.destination) end)

New response