mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
84 lines
2.9 KiB
Lua
84 lines
2.9 KiB
Lua
local items = require 'config'
|
|
local main = require 'main'
|
|
local file_stage = 3
|
|
|
|
if settings.startup['PHI-CT'].value then
|
|
data.raw['utility-constants'].default.rocket_lift_weight = settings.startup['PHI-CT-ROCKET-CAPACITY'].value * 100000
|
|
data.raw['utility-constants'].default.default_item_weight = settings.startup['PHI-CT-CARGO-WEIGHT'].value
|
|
|
|
if settings.startup['PHI-CT-UTILITY'].value then
|
|
for _, t in pairs({'arithmetic-combinator', 'decider-combinator', 'programmable-speaker', 'selector-combinator'}) do
|
|
data.raw[t][t].energy_source.usage_priority = 'primary-input'
|
|
end
|
|
end
|
|
|
|
if settings.startup['PHI-CT-TILE'].value then
|
|
for _, v in pairs(data.raw) do
|
|
for _, e in pairs(v) do
|
|
if e.surface_conditions then
|
|
e.surface_conditions = nil
|
|
end
|
|
end
|
|
end
|
|
|
|
for _, t in pairs (data.raw.tile) do
|
|
if t.type and t.type == 'tile' and t.subgroup == 'nauvis-tiles' and t.autoplace and t.autoplace.probability_expression then
|
|
t.autoplace.probability_expression = '0'
|
|
end
|
|
end
|
|
|
|
if data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value] and data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value].autoplace and data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value].autoplace.probability_expression then
|
|
data.raw.tile[settings.startup['PHI-CT-TILE-CHOICE'].value].autoplace.probability_expression = '1'
|
|
end
|
|
|
|
for _, t in pairs({data.raw['simple-entity'], data.raw['optimized-decorative'], data.raw['fish']}) do
|
|
for _, e in pairs(t) do
|
|
e.autoplace = nil
|
|
end
|
|
end
|
|
|
|
local autoplace_controls = {}
|
|
|
|
for k, _ in pairs (data.raw['autoplace-control']) do
|
|
autoplace_controls[k] = {
|
|
size = 'none'
|
|
}
|
|
end
|
|
|
|
data.raw['map-gen-presets']['default']['empty-world'] = {
|
|
order = 'zz',
|
|
basic_settings = {
|
|
autoplace_controls = autoplace_controls,
|
|
water = 'none',
|
|
cliff_settings = {
|
|
name = 'none',
|
|
cliff_elevation_interval = 100,
|
|
cliff_elevation_0 = 100,
|
|
richness = 0
|
|
}
|
|
},
|
|
advanced_settings = {
|
|
pollution = {
|
|
enabled = false
|
|
},
|
|
enemy_evolution = {
|
|
enabled = false
|
|
},
|
|
enemy_expansion = {
|
|
enabled = false
|
|
}
|
|
}
|
|
}
|
|
end
|
|
end
|
|
|
|
for _, v in pairs(items['item']) do
|
|
if (v.stage <= file_stage) and v.enabled and (v.max >= v.min) then
|
|
v.category = 'item'
|
|
|
|
for j=v.min, v.max, 1 do
|
|
main.EEEC(v, j)
|
|
end
|
|
end
|
|
end
|