From 4795fdd05944bf89fadd5345aaca74a2fb6ee04d Mon Sep 17 00:00:00 2001 From: Simon <44922798+SimonFlapse@users.noreply.github.com> Date: Sat, 9 Mar 2019 23:42:03 +0100 Subject: [PATCH] Redmew QoL additions (#870) Added research_queue_enabled switch Fixed construction robots placed by players in early game is unminable. Also Fixed construction robots being bugged as unminable --- config.lua | 4 +++- features/redmew_qol.lua | 11 ++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/config.lua b/config.lua index bbfbbde0..509a1d46 100644 --- a/config.lua +++ b/config.lua @@ -307,7 +307,9 @@ global.config = { -- turns on entity info aka alt-mode on first joining set_alt_on_create = true, -- prevents personal construction robots from being mined by other players - save_bots = true + save_bots = true, + -- enable research_queue + research_queue = true }, -- adds a useless button with the biter percentage evolution_progress = { diff --git a/features/redmew_qol.lua b/features/redmew_qol.lua index 316a59c1..9257992b 100644 --- a/features/redmew_qol.lua +++ b/features/redmew_qol.lua @@ -156,7 +156,7 @@ local function preserve_bot(event) if logistic_network == nil or not logistic_network.valid then --prevents an orphan bot from being unremovable - entity.minable = false + entity.minable = true return end @@ -166,6 +166,7 @@ local function preserve_bot(event) --checks if construction-robot is part of a mobile logistic network if owner.name ~= 'player' then + entity.minable = true return end @@ -338,4 +339,12 @@ if config.save_bots then Event.add(defines.events.on_selected_entity_changed, preserve_bot) end +if config.research_queue then + Event.on_init( + function() + game.forces.player.research_queue_enabled = true + end + ) +end + return Public