I managed to hack it by modifying the list mentioned above as well as two more places in the same file (searched for "copper"), to include the added bz resources. I think a real fix would be for the nauvis.resource
list to not be hardcoded and instead be populated by reading which resources exist from the global data
variable however that seems to require more invasive changes since data
is not available when nauvis.resource
is set. (First time I looked at factorio mods so I might be very wrong about all this but the hack did get the resources generated again).
local function contains(table, elem)
for i, v in ipairs(table) do
if v == elem then
return true
end
end
return false
end
local function add_missing_elements(output, input)
for i, v in ipairs(input) do
if not contains(output, v) then
table.insert(output, v)
end
end
end
nauvis.resource = { "crude-oil", "coal", "copper-ore", "iron-ore", "stone", "uranium-ore", "tin-ore", "aluminum-ore", "lead-ore", "gas", "tungsten-ore", "zircon", "titanium-ore", "graphite" }
nauvis.tile = { -- game.tile_prototypes (with autoplace)
"concrete", "stone-path", "tutorial-grid", "refined-concrete", "refined-hazard-concrete-left", "refined-hazard-concrete-right", "hazard-concrete-left", "hazard-concrete-right",
"grass-1", "grass-2", "grass-3", "grass-4", "dirt-1", "dirt-2", "dirt-3", "dirt-4", "dirt-5", "dirt-6", "dirt-7", "dry-dirt", "sand-1", "sand-2", "sand-3",
"red-desert-0", "red-desert-1", "red-desert-2", "red-desert-3", "lab-dark-1", "lab-dark-2", "lab-white", "landfill", "out-of-map", "water", "deepwater",
}
nauvis.noise = { -- game.noise_layer_prototypes (isn't used nor needed for planets)
"aux", "brown-fluff", "coal", "copper-ore", "crude-oil", "dirt-1", "dirt-2", "dirt-3", "dirt-4", "dirt-5", "dirt-6", "dirt-7", "dry-dirt",
"elevation", "elevation-persistence", "enemy-base", "fluff", "garballo",
"grass-1", "grass-2", "grass-3", "grass-4", "grass1", "grass2", "green-fluff", "iron-ore", "moisture", "pita", "pita-mini",
"red-desert-0", "red-desert-1", "red-desert-2", "red-desert-3", "red-desert-decal", "rocks",
"sand-1", "sand-2", "sand-3", "sand-decal", "sand-dune-decal", "starting-area", "stone", "temperature",
"trees", "trees-1", "trees-10", "trees-11", "trees-12", "trees-13", "trees-14", "trees-15", "trees-2", "trees-3", "trees-4", "trees-5", "trees-6", "trees-7", "trees-8", "trees-9",
"uranium-ore", }
add_missing_elements(nauvis.noise, nauvis.resource)
nauvis.decor = { -- game.decorative_prototypes (with autoplace)
"brown-hairy-grass", "green-hairy-grass", "brown-carpet-grass",
"green-carpet-grass", "green-small-grass", "green-asterisk",
"brown-asterisk-mini", "green-asterisk-mini", "brown-asterisk",
"red-asterisk", "dark-mud-decal", "light-mud-decal", "puberty-decal",
"red-desert-decal", "sand-decal", "sand-dune-decal", "green-pita",
"red-pita", "green-croton", "red-croton", "green-pita-mini", "brown-fluff",
"brown-fluff-dry", "green-desert-bush", "red-desert-bush", "white-desert-bush",
"garballo-mini-dry", "garballo", "green-bush-mini", "lichen", "rock-medium",
"rock-small", "rock-tiny", "big-ship-wreck-grass", "sand-rock-medium", "sand-rock-small", "small-ship-wreck-grass"
}
nauvis.entities = { -- game.entity_prototypes (with autoplace)
"fish", "tree-01", "tree-02", "tree-03", "tree-04", "tree-05", "tree-09", "tree-02-red", "tree-07", "tree-06", "tree-06-brown",
"tree-09-brown", "tree-09-red", "tree-08", "tree-08-brown", "tree-08-red", "dead-dry-hairy-tree", "dead-grey-trunk",
"dead-tree-desert", "dry-hairy-tree", "dry-tree", "rock-huge", "rock-big", "sand-rock-big", "small-worm-turret",
"medium-worm-turret", "big-worm-turret", "behemoth-worm-turret", "biter-spawner", "spitter-spawner",
"crude-oil", "coal", "copper-ore", "iron-ore", "stone", "uranium-ore",
}
add_missing_elements(nauvis.entities, nauvis.resource)