This commit is contained in:
2024-09-28 23:54:47 +09:00
parent 133369fd35
commit 65bfb8bb8f
3 changed files with 49 additions and 44 deletions

View File

@@ -483,6 +483,51 @@ if settings.startup['PHI-XW-WATER'].value > 0 then
end end
end end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value then
local item = table.deepcopy(data.raw['item']['offshore-pump'])
item.name = 'oil-pump'
item.place_result = 'oil-pump'
item.order = 'b[fluids]-a[offshore-pump]-o'
item.icons = {
{
icon = '__base__/graphics/icons/offshore-pump.png',
tint = items['tint'][2],
icon_size = 64,
icon_mipmaps = 4
}
}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'name.oil-pump'}
item.localised_description = {'description.oil-pump'}
data:extend({item})
local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump'])
entity.name = 'oil-pump'
entity.minable.result = 'oil-pump'
entity.fluid = 'crude-oil'
entity.fluid_box.filter = 'crude-oil'
entity.se_allow_in_space = true
entity.localised_name = {'name.oil-pump'}
entity.localised_description = {'description.oil-pump'}
data:extend({entity})
data:extend({{
type = 'recipe',
name = 'oil-pump',
energy_required = 2,
enabled = true,
ingredients = {{'electronic-circuit', 2}, {'pipe', 1}, {'iron-gear-wheel', 1}},
result = 'oil-pump',
localised_name = {'name.oil-pump'},
localised_description = {'description.oil-pump'}
}})
end
for _, v in pairs(items['item']) do for _, v in pairs(items['item']) do
if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then
v.category = 'item' v.category = 'item'

View File

@@ -50,50 +50,6 @@ if settings.startup['PHI-EN'].value and settings.startup['PHI-EN-SOLAR-TIER'].va
end end
end end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-OIL'].value then
local item = table.deepcopy(data.raw['item']['offshore-pump'])
item.name = 'oil-pump'
item.place_result = 'oil-pump'
item.order = 'b[fluids]-a[offshore-pump]-o'
item.icons = {
{
icon = '__base__/graphics/icons/offshore-pump.png',
tint = items['tint'][2],
icon_size = 64,
icon_mipmaps = 4
}
}
item.icon = nil
item.icon_size = nil
item.icon_mipmaps = nil
item.localised_name = {'name.oil-pump'}
item.localised_description = {'description.oil-pump'}
data:extend({item})
local entity = table.deepcopy(data.raw['offshore-pump']['offshore-pump'])
entity.name = 'oil-pump'
entity.minable.result = 'oil-pump'
entity.fluid = 'crude-oil'
entity.fluid_box.filter = 'crude-oil'
entity.se_allow_in_space = true
entity.localised_name = {'name.oil-pump'}
entity.localised_description = {'description.oil-pump'}
data:extend({entity})
data:extend({{
type = 'recipe',
name = 'oil-pump',
energy_required = 2,
enabled = true,
ingredients = {{'electronic-circuit', 2}, {'pipe', 1}, {'iron-gear-wheel', 1}},
result = 'oil-pump',
localised_name = {'name.oil-pump'},
localised_description = {'description.oil-pump'}
}})
end
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-RADAR'].value then if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-RADAR'].value then
local item = table.deepcopy(data.raw['item']['radar']) local item = table.deepcopy(data.raw['item']['radar'])
item.name = 'super-radar' item.name = 'super-radar'

View File

@@ -48,6 +48,10 @@ end
function main.EEE(source, tier) function main.EEE(source, tier)
local item = table.deepcopy(data.raw[source.type][source.ref_name]) local item = table.deepcopy(data.raw[source.type][source.ref_name])
if not (item or item.name) then
assert('ERROR - trying to load ' .. source.type .. ' / ' .. source.ref_name)
end
item.name = source.name .. '-' .. tier item.name = source.name .. '-' .. tier
item.minable.result = item.name item.minable.result = item.name
item.max_health = item.max_health * (tier - source.min + 2) item.max_health = item.max_health * (tier - source.min + 2)