Space exploration productivity deprecated


Allows productivity modules is SE buildings.

Tweaks
2 years ago
1.1
1.55K

i "-spaced" entities

2 years ago
(updated 2 years ago)

Just found out that there actually are "-spaced" entities, se-fuel-refinery-spaced for example. This reverts them all to whatever the original entity allows:

-- "-spaced" entities are copies of normal entities that originally allowed productivity
-- see __space_exploration__/prototypes/phase-3/space-collision.lua
for _, type in pairs({"beacon", "assembling-machine", "furnace", "lab"}) do -- these have allowed_effects
  for _, entity in pairs(data.raw[type]) do
    local _, _, ground_entity_name = string.find(entity.name, "(.+)%-spaced$")
    if ground_entity_name then
      local ground_entity = data.raw[type][ground_entity_name]
      if ground_entity then
        entity.allowed_effects = ground_entity.allowed_effects
      end
    end
  end
end