ore workaround
This commit is contained in:
parent
6a6a846d5f
commit
873cefe201
4 changed files with 18 additions and 2 deletions
|
|
@ -4,6 +4,9 @@ Date: 2024-12-27
|
|||
Fixes:
|
||||
- Fix size of ore pictures
|
||||
- Ensure recycling changes always happen regardless of mod load order
|
||||
- Proper workaround for ore generation when added to exsting game: acts as normal generation now
|
||||
Changes:
|
||||
- LDS casting now uses titanium plates, with vacuum (thanks SafTheLamb for the recipe idea)
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 2.0.6
|
||||
Date: 2024-12-27
|
||||
|
|
|
|||
|
|
@ -95,6 +95,19 @@ function util.warptorio2_expansion_helper()
|
|||
end
|
||||
end
|
||||
|
||||
function util.ore_fix()
|
||||
for _, resource in pairs(me.resources) do
|
||||
local map_gen_settings = game.surfaces.nauvis.map_gen_settings
|
||||
if map_gen_settings.autoplace_controls[resource] == nil then
|
||||
map_gen_settings.autoplace_controls[resource] = {}
|
||||
end
|
||||
if map_gen_settings.autoplace_settings.entity.settings[resource] == nil then
|
||||
map_gen_settings.autoplace_settings.entity.settings[resource] = {}
|
||||
end
|
||||
game.surfaces.nauvis.map_gen_settings = map_gen_settings
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- A workaround for generating ores until this bug is fixed:
|
||||
-- https://forums.factorio.com/viewtopic.php?f=7&t=124996&p=655013#p655013
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
local util = require("control-util")
|
||||
|
||||
script.on_init(util.check_fluid_mining)
|
||||
|
||||
script.on_event(defines.events.on_chunk_generated, util.ore_workaround)
|
||||
script.on_configuration_changed(util.ore_fix)
|
||||
|
|
|
|||
1
me.lua
1
me.lua
|
|
@ -1,6 +1,7 @@
|
|||
local me = {}
|
||||
|
||||
me.name = "bztitanium"
|
||||
me.resources = {"titanium-ore"}
|
||||
me.fluid_mining = true
|
||||
me.titanium_plate = ""
|
||||
me.titanium_processing = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue