Fix "Mods mismatch!" error when overhaul setting is not synced.
Conditional "require" context is known as causing that.
This commit is contained in:
parent
531c21dc46
commit
81b1aa3228
2 changed files with 7 additions and 4 deletions
4
data.lua
4
data.lua
|
@ -122,9 +122,7 @@ if data.raw.technology["atomic-bomb"] then
|
||||||
end
|
end
|
||||||
|
|
||||||
--overhaul
|
--overhaul
|
||||||
if settings.startup['overhaul_mode'].value == true then
|
require('scripts/overhaul')
|
||||||
require('scripts/overhaul')
|
|
||||||
end
|
|
||||||
|
|
||||||
--white hole
|
--white hole
|
||||||
require('scripts/gravitation/gr_make_white_hole_recipes')
|
require('scripts/gravitation/gr_make_white_hole_recipes')
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
if settings.startup['overhaul_mode'].value == true then
|
||||||
|
-- indent ignored
|
||||||
|
|
||||||
local function add_to_recipe(recipe, item, item_amount)
|
local function add_to_recipe(recipe, item, item_amount)
|
||||||
if not data.raw.recipe[recipe] then
|
if not data.raw.recipe[recipe] then
|
||||||
return
|
return
|
||||||
|
@ -174,4 +177,6 @@ tech_structure = {"tech", "pre_tech"}
|
||||||
|
|
||||||
add_to_recipes(change_table_index(building_table, recipe_structure))
|
add_to_recipes(change_table_index(building_table, recipe_structure))
|
||||||
add_to_recipes(change_table_index(item_table, recipe_structure))
|
add_to_recipes(change_table_index(item_table, recipe_structure))
|
||||||
add_to_techs(change_table_index(tech_table, tech_structure))
|
add_to_techs(change_table_index(tech_table, tech_structure))
|
||||||
|
|
||||||
|
end --indent ignored
|
Loading…
Add table
Add a link
Reference in a new issue