Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions info.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"dependencies": [
"base >= 1.0",
"? SeaBlock >= 0.5.6",
"? no-belts >= 0.5.1",
"! Braver_New_World"
]
}
27 changes: 18 additions & 9 deletions scenarios/bnw/control.lua
Original file line number Diff line number Diff line change
@@ -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 = {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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)

Expand Down