fix runtime crash with Cerys
This commit is contained in:
parent
593aa98edb
commit
2ce902437f
3 changed files with 14 additions and 2 deletions
|
|
@ -1,4 +1,9 @@
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 2.0.3
|
||||||
|
Date: 2024-12-24
|
||||||
|
Fixes:
|
||||||
|
- Fix runtime crash with Cerys mod
|
||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 2.0.2
|
Version: 2.0.2
|
||||||
Date: 2024-12-24
|
Date: 2024-12-24
|
||||||
Fixes:
|
Fixes:
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,14 @@ end
|
||||||
-- https://forums.factorio.com/viewtopic.php?f=7&t=124996&p=655013#p655013
|
-- https://forums.factorio.com/viewtopic.php?f=7&t=124996&p=655013#p655013
|
||||||
function util.ore_workaround(event)
|
function util.ore_workaround(event)
|
||||||
for i, ore in pairs(util.me.ores_for_workaround) do
|
for i, ore in pairs(util.me.ores_for_workaround) do
|
||||||
if event.surface.map_gen_settings.autoplace_controls["titanium-ore"] then return end
|
if (
|
||||||
|
event.surface and
|
||||||
|
event.surface.map_gen_settings and
|
||||||
|
event.surface.map_gen_settings.autoplace_controls and
|
||||||
|
event.surface.map_gen_settings.autoplace_controls["titanium-ore"]
|
||||||
|
) then
|
||||||
|
return
|
||||||
|
end
|
||||||
if event.surface.name ~= "nauvis" then return end
|
if event.surface.name ~= "nauvis" then return end
|
||||||
if math.random() < settings.global[util.me.name.."-ore-workaround-probability"].value then
|
if math.random() < settings.global[util.me.name.."-ore-workaround-probability"].value then
|
||||||
util.generate_ore(event, ore.name, ore.amount, ore.tiles)
|
util.generate_ore(event, ore.name, ore.amount, ore.tiles)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "bztitanium",
|
"name": "bztitanium",
|
||||||
"version": "2.0.2",
|
"version": "2.0.3",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"title": "Titanium",
|
"title": "Titanium",
|
||||||
"author": "Brevven",
|
"author": "Brevven",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue