Oarcinae / FactorioScenarioMultiplayerSpawn

A mod for Factorio which provides each player a unique starting spawn point in a multiplayer game.
MIT License
54 stars 30 forks source link

Add loaders #84

Closed Oarcinae closed 5 years ago

Oarcinae commented 5 years ago
-- Map loaders to logistics tech for unlocks.
local loaders_technology_map = {
    ['logistics'] = 'loader',
    ['logistics-2'] = 'fast-loader',
    ['logistics-3'] = 'express-loader'
}

----------------------------------------
-- On Research Finished
-- This is where you can permanently remove researched techs
----------------------------------------

script.on_event(defines.events.on_research_finished, function(event)
    --monitor finished research, unlock loader if belts are unlocked.
    if LOADERS_ENABLED then
        local research = event.research
        local recipe = loaders_technology_map[research.name]
        if recipe then
            research.force.recipes[recipe].enabled = true
        end
    end
end)
Oarcinae commented 5 years ago

Credit to redmew_qol.lua

CaspianDrago commented 5 years ago

Enabled via simple in config.lua `-- Enable Loaders

LOADERS_ENABLED = true`

Oarcinae commented 5 years ago

Done, will be released in the next push.