Fix shortcuts
This commit is contained in:
parent
208f4750b5
commit
a991ac6f26
2 changed files with 18 additions and 12 deletions
|
|
@ -16,6 +16,16 @@ Recipe:new("spidertron")
|
|||
:replaceIngredient("efficiency-module-3", 50)
|
||||
:addIngredient("speed-module-3", 50)
|
||||
|
||||
-- Move wires
|
||||
table.insert(data.raw.technology["automation-2"].effects, {
|
||||
type = "unlock-circuit-network",
|
||||
modifier = true
|
||||
})
|
||||
data.raw.shortcut["give-copper-wire"].technology_to_unlock = "automation-2"
|
||||
data.raw.shortcut["give-red-wire"].technology_to_unlock = "automation-2"
|
||||
data.raw.shortcut["give-green-wire"].technology_to_unlock = "automation-2"
|
||||
data.raw["tips-and-tricks-item"]["circuit-network"].trigger.triggers[1].technology = "automation-2"
|
||||
|
||||
-- Clear production/utility science
|
||||
util.removeEverythingRecursivelyByTechnology("uranium-mining", { hideEntities = { "heat-pipe", "nuclear-reactor" } })
|
||||
util.removeEverythingRecursivelyByTechnology("circuit-network", { skip = { "iron-stick" }, hideEntity = true })
|
||||
|
|
@ -30,12 +40,6 @@ util.removeEverythingByTechnology("personal-roboport-mk2-equipment")
|
|||
util.removeEverythingByTechnology("battery-mk2-equipment")
|
||||
util.removeEverythingByItem("discharge-defense-remote")
|
||||
|
||||
-- Add circuit network again
|
||||
table.insert(data.raw.technology["automation-2"].effects, {
|
||||
type = "unlock-circuit-network",
|
||||
modifier = true
|
||||
})
|
||||
|
||||
-- Move rocket
|
||||
Technology:new("rocket-silo")
|
||||
:removePrerequisite("productivity-module-3")
|
||||
|
|
@ -70,9 +74,6 @@ util.replacePrerequisite("processing-unit", "chemical-science-pack")
|
|||
util.removeEverythingByTechnology("processing-unit", { skip = { "advanced-circuit" } })
|
||||
|
||||
-- Remove tips and tricks
|
||||
data.raw["tips-and-tricks-item"]["spidertron-control"] = nil
|
||||
data.raw["tips-and-tricks-item"]["copy-paste-spidertron"] = nil
|
||||
data.raw["tips-and-tricks-item"]["circuit-network"] = nil
|
||||
data.raw["tips-and-tricks-item"]["connect-switch"] = nil
|
||||
|
||||
-- Remove menu simulations
|
||||
|
|
@ -124,7 +125,6 @@ util.removeEverythingByItem("depleted-uranium-fuel-cell")
|
|||
util.removeEntity("defender", { hideEntity = true })
|
||||
util.removeEntity("distractor", { hideEntity = true })
|
||||
util.removeEntity("destroyer", { hideEntity = true })
|
||||
util.removeEverythingByItem("spidertron-remote")
|
||||
util.removeEverythingByItem("artillery-targeting-remote")
|
||||
|
||||
-- Buff rocket silo
|
||||
|
|
|
|||
|
|
@ -128,8 +128,14 @@ util.removeEverythingByTechnology = function(name, options)
|
|||
data.raw.technology[name] = nil
|
||||
|
||||
for shortcutName, shortcut in pairs(data.raw.shortcut) do
|
||||
if shortcut.technology_to_unlock then
|
||||
data.raw.shortcut[shortcutName] = nil
|
||||
if shortcut.technology_to_unlock == name then
|
||||
if options and options.skip then
|
||||
if not table.contains(options.skip, shortcutName) then
|
||||
data.raw.shortcut[shortcutName] = nil
|
||||
end
|
||||
else
|
||||
data.raw.shortcut[shortcutName] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue