From 2c9e3db74711289a0454a407f0bb0a2da1a6eb31 Mon Sep 17 00:00:00 2001 From: Cortland Klein Date: Tue, 26 Apr 2022 23:51:30 +0900 Subject: [PATCH 1/2] Add more logistic chests when No Belts is enabled No Belts removes the ability to place belts and usually starts by giving a bunch of starter logistic chests to have a reasonable chance to rush research and mall to make more. Since BNW has no inventory but instead starter items here, let's have some additional initial chests here. :) --- scenarios/bnw/control.lua | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/scenarios/bnw/control.lua b/scenarios/bnw/control.lua index 7dba6a6..add28b3 100644 --- a/scenarios/bnw/control.lua +++ b/scenarios/bnw/control.lua @@ -1,4 +1,4 @@ -local function get_default_qb_slots(seablock_enabled) +local function get_default_qb_slots(seablock_enabled, nobelts_enabled) local qb_slots if seablock_enabled then qb_slots = { @@ -177,7 +177,7 @@ local function inventoryChanged(event) end end -local function setupForce(force, surface, x, y, seablock_enabled) +local function setupForce(force, surface, x, y, seablock_enabled, nobelts_enabled) if not global.forces then global.forces = {} end @@ -337,11 +337,19 @@ local function setupForce(force, surface, x, y, seablock_enabled) chest_inventory.insert{name = "offshore-pump", count = 1} chest_inventory.insert{name = "assembling-machine-1", count = 4} chest_inventory.insert{name = "roboport", count = 4} - chest_inventory.insert{name = "logistic-chest-storage", count = 2} - chest_inventory.insert{name = "logistic-chest-passive-provider", count = 4} - chest_inventory.insert{name = "logistic-chest-requester", count = 4} - chest_inventory.insert{name = "logistic-chest-buffer", count = 4} - chest_inventory.insert{name = "logistic-chest-active-provider", count = 4} + if nobelts_enabled then + chest_inventory.insert{name = "logistic-chest-storage", count = 38} + chest_inventory.insert{name = "logistic-chest-passive-provider", count = 40} + chest_inventory.insert{name = "logistic-chest-requester", count = 40} + chest_inventory.insert{name = "logistic-chest-buffer", count = 40} + chest_inventory.insert{name = "logistic-chest-active-provider", count = 40} + else + chest_inventory.insert{name = "logistic-chest-storage", count = 2} + chest_inventory.insert{name = "logistic-chest-passive-provider", count = 4} + chest_inventory.insert{name = "logistic-chest-requester", count = 4} + chest_inventory.insert{name = "logistic-chest-buffer", count = 4} + chest_inventory.insert{name = "logistic-chest-active-provider", count = 4} + end chest_inventory.insert{name = "lab", count = 2} if seablock_enabled then -- need some stuff for SeaBlock so we won't get stuck (also slightly accelerate gameplay) @@ -446,8 +454,9 @@ script.on_event(defines.events.on_player_created, function(event) player.cheat_mode = true local seablock_enabled = game.active_mods["SeaBlock"] and true or false + local nobelts_enabled = game.active_mods["no-belts"] and true or false - local default_qb_slots = get_default_qb_slots(seablock_enabled) + local default_qb_slots = get_default_qb_slots(seablock_enabled, nobelts_enabled) -- Set-up a sane default for the quickbar for i = 1, 100 do @@ -460,7 +469,7 @@ script.on_event(defines.events.on_player_created, function(event) global.bnw_scenario_version = game.active_mods["brave-new-world"] -- setup force - setupForce(player.force, player.surface, 0, 0, seablock_enabled) + setupForce(player.force, player.surface, 0, 0, seablock_enabled, nobelts_enabled) preventMining(player) end) From 199ddb311623a4ae391acdd534e7d2bc07ce5b97 Mon Sep 17 00:00:00 2001 From: Cortland Klein Date: Tue, 26 Apr 2022 23:54:04 +0900 Subject: [PATCH 2/2] Add no-belts as an optional dependency To make it more clear that behavior will change when no-belts mod is also installed, let's add it as an optional dependency here as well. --- info.json | 1 + 1 file changed, 1 insertion(+) diff --git a/info.json b/info.json index 25ae553..a1f52c7 100644 --- a/info.json +++ b/info.json @@ -10,6 +10,7 @@ "dependencies": [ "base >= 1.0", "? SeaBlock >= 0.5.6", + "? no-belts >= 0.5.1", "! Braver_New_World" ] }