Skip to content

Commit

Permalink
Add more legacy URL support.
Browse files Browse the repository at this point in the history
  • Loading branch information
KirkMcDonald committed Oct 16, 2024
1 parent cc81cea commit 5372e0c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions init.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,18 @@ let OIL_EXCLUSION = new Map([
])

function fixLegacySettings(settings) {
if ((settings.has("min") || settings.has("furnace")) && !settings.has("buildings")) {
if ((settings.has("use_3") || settings.has("min") || settings.has("furnace")) && !settings.has("buildings")) {
let parts = []
if (settings.has("min")) {
parts.push("assembling-machine-" + settings.get("min"))
let n = settings.get("min")
if (n === "4") {
n = "3"
}
parts.push("assembling-machine-" + n)
settings.delete("min")
} else if (settings.has("use_3")) {
parts.push("assembling-machine-3")
settings.delete("use_3")
}
if (settings.has("furnace")) {
parts.push(settings.get("furnace"))
Expand Down

0 comments on commit 5372e0c

Please sign in to comment.