mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 02:55:22 +09:00
277 lines
9.5 KiB
Lua
277 lines
9.5 KiB
Lua
--[[
|
|
** CONFIG
|
|
if mods['Krastorio2'] then
|
|
items['item']['kr-mineral-water-pumpjack'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'mining-drill',
|
|
name = 'kr-mineral-water-pumpjack',
|
|
ref_name = 'kr-mineral-water-pumpjack',
|
|
tech = 'kr-mineral-water-gathering',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-MINING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-gas-power-station'] = {
|
|
enabled = settings.startup['PHI-EN'].value,
|
|
stage = 2,
|
|
type = 'generator',
|
|
name = 'kr-gas-power-station',
|
|
ref_name = 'kr-gas-power-station',
|
|
tech = 'compound-energy',
|
|
min = 2,
|
|
max = settings.startup['PHI-EN-STEAM-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-crusher'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'furnace',
|
|
name = 'kr-crusher',
|
|
ref_name = 'kr-crusher',
|
|
tech = 'kr-crusher',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-fluid-burner'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'furnace',
|
|
name = 'kr-fluid-burner',
|
|
ref_name = 'kr-fluid-burner',
|
|
tech = 'kr-fluid-excess-handling',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-air-purifier'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'furnace',
|
|
name = 'kr-air-purifier',
|
|
ref_name = 'kr-air-purifier',
|
|
tech = 'kr-air-purification',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-advanced-furnace'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-advanced-furnace',
|
|
ref_name = 'kr-advanced-furnace',
|
|
tech = 'kr-advanced-furnace',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-FURNACE-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-advanced-chemical-plant'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-advanced-chemical-plant',
|
|
ref_name = 'kr-advanced-chemical-plant',
|
|
tech = 'kr-advanced-chemical-plant',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-OIL-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-advanced-assembling-machine'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-advanced-assembling-machine',
|
|
ref_name = 'kr-advanced-assembling-machine',
|
|
tech = 'kr-automation',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-greenhouse'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-greenhouse',
|
|
ref_name = 'kr-greenhouse',
|
|
tech = 'kr-greenhouse',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-bio-lab'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-bio-lab',
|
|
ref_name = 'kr-bio-lab',
|
|
tech = 'kr-bio-processing',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-electrolysis-plant'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-electrolysis-plant',
|
|
ref_name = 'kr-electrolysis-plant',
|
|
tech = 'kr-fluids-chemistry',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-filtration-plant'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-filtration-plant',
|
|
ref_name = 'kr-filtration-plant',
|
|
tech = 'kr-fluids-chemistry',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-fuel-refinery'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-fuel-refinery',
|
|
ref_name = 'kr-fuel-refinery',
|
|
tech = 'kr-fuel',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-atmospheric-condenser'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-atmospheric-condenser',
|
|
ref_name = 'kr-atmospheric-condenser',
|
|
tech = 'kr-atmosphere-condensation',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-advanced-lab'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'lab',
|
|
name = 'biusart-lab',
|
|
ref_name = 'biusart-lab',
|
|
tech = 'kr-advanced-lab',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-LAB-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-singularity-lab'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'lab',
|
|
name = 'kr-singularity-lab',
|
|
ref_name = 'kr-singularity-lab',
|
|
tech = 'kr-singularity-lab',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-LAB-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-research-server'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-research-server',
|
|
ref_name = 'kr-research-server',
|
|
tech = 'kr-research-server',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-quantum-computer'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-quantum-computer',
|
|
ref_name = 'kr-quantum-computer',
|
|
tech = 'kr-quantum-computer',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-matter-plant'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-matter-plant',
|
|
ref_name = 'kr-matter-plant',
|
|
tech = 'kr-matter-processing',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-matter-assembler'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'assembling-machine',
|
|
name = 'kr-matter-assembler',
|
|
ref_name = 'kr-matter-assembler',
|
|
tech = 'kr-matter-processing',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-ASSEMBLING-TIER'].value
|
|
}
|
|
|
|
items['item']['kr-quarry-drill'] = {
|
|
enabled = settings.startup['PHI-MB'].value,
|
|
stage = 2,
|
|
type = 'mining-drill',
|
|
name = 'kr-quarry-drill',
|
|
ref_name = 'kr-quarry-drill',
|
|
tech = 'kr-quarry-minerals-extraction',
|
|
min = 2,
|
|
max = settings.startup['PHI-MB-MINING-TIER'].value
|
|
}
|
|
end
|
|
|
|
** MAIN
|
|
if source.name == 'kr-gas-power-station' then
|
|
item.fluid_usage_per_tick = item.fluid_usage_per_tick * (tier - source.min + 2)
|
|
|
|
elseif (source.ref_name == 'se-space-solar-panel') then
|
|
item.production = tostring(tonumber(string.match(item.production, '[%d%.]+')) * (4 ^ (tier - source.min + 2))) .. string.match(item.production, '%a+')
|
|
end
|
|
|
|
if item.energy_per_shield then
|
|
item.energy_per_shield = tostring(math.floor(tonumber(string.match(item.energy_per_shield, '[%d%.]+')) * ((32 - (tier - source.min + 1)) / 32))) .. string.match(item.energy_per_shield, '%a+')
|
|
end
|
|
|
|
** DATA FINAL FIXES
|
|
data.raw['utility-constants'].default.train_inactivity_wait_condition_default = 60
|
|
|
|
for _,name in pairs({'furnace', 'lab', 'beacon'}) do
|
|
local entities = {}
|
|
|
|
for _, entity in pairs(data.raw[name]) do
|
|
table.insert(entities, entity.name)
|
|
end
|
|
|
|
for _, entity in pairs(data.raw[name]) do
|
|
entity.additional_pastable_entities = entities
|
|
end
|
|
end
|
|
|
|
for _, t in pairs(data.raw['tree']) do
|
|
t.collision_box = {{-0.05, -0.05}, {0.05, 0.05}}
|
|
end
|
|
|
|
** SETTING
|
|
localised_description = {'phi-cl.combine', {'phi-cl.default'}, {'mod-setting-description.PHI-MB-ENERGY-SOLAR-TIER'}},
|
|
|
|
{type = 'laser', decrease = 20, percent = 50},
|
|
{type = 'electric', decrease = 20, percent = 50},
|
|
{type = 'impact', decrease = 20, percent = 50},
|
|
{type = 'poison', decrease = 20, percent = 50}
|
|
"? Krastorio2 >= 1.3.0",
|
|
"(?) angelsrefining >= 0.12.0"
|
|
]]
|