mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -2,6 +2,16 @@ local items = {
|
||||
['general'] = {
|
||||
['graphics_location'] = '__PHI-CL__/graphics/'
|
||||
},
|
||||
['handle'] = {
|
||||
[2] = {
|
||||
['item'] = false,
|
||||
['equipment'] = false,
|
||||
},
|
||||
[3] = {
|
||||
['item'] = false,
|
||||
['equipment'] = false,
|
||||
}
|
||||
},
|
||||
['research_modifier'] = {
|
||||
--[[
|
||||
['electric-turret'] = {
|
||||
|
||||
@@ -2,69 +2,7 @@ local items = require 'config'
|
||||
local main = require 'main'
|
||||
local file_stage = 2
|
||||
|
||||
if mods['space-age'] then
|
||||
if settings.startup['PHI-CT'].value then
|
||||
if settings.startup['PHI-CT-HIDDEN'].value then
|
||||
data.raw.recipe['turbo-loader'].hidden = false
|
||||
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
|
||||
end
|
||||
|
||||
if not settings.startup['PHI-CT-SPOIL'].value then
|
||||
local function spoil_handle(i)
|
||||
i.spoil_ticks = nil
|
||||
i.spoil_result = nil
|
||||
i.spoil_to_trigger_result = nil
|
||||
end
|
||||
|
||||
-- spoil_handle(data.raw['item']['iron-bacteria'])
|
||||
-- spoil_handle(data.raw['item']['copper-bacteria'])
|
||||
spoil_handle(data.raw['item']['nutrients'])
|
||||
spoil_handle(data.raw['item']['captive-biter-spawner'])
|
||||
spoil_handle(data.raw['item']['biter-egg'])
|
||||
spoil_handle(data.raw['item']['pentapod-egg'])
|
||||
spoil_handle(data.raw['capsule']['raw-fish'])
|
||||
spoil_handle(data.raw['capsule']['yumako-mash'])
|
||||
spoil_handle(data.raw['capsule']['yumako'])
|
||||
spoil_handle(data.raw['capsule']['jelly'])
|
||||
spoil_handle(data.raw['capsule']['jellynut'])
|
||||
spoil_handle(data.raw['capsule']['bioflux'])
|
||||
spoil_handle(data.raw['tool']['agricultural-science-pack'])
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'spoilage-from-nutrients',
|
||||
energy_required = 1,
|
||||
enabled = false,
|
||||
ingredients = {{type='item', name='nutrients', amount=1}},
|
||||
results = {{type='item', name='spoilage', amount=10}},
|
||||
main_product = 'spoilage',
|
||||
localised_name = {'phi-cl.combine', data.raw['item']['spoilage'].localised_name, ''}
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['agriculture'].effects, {type='unlock-recipe', recipe='spoilage-from-nutrients'})
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT-SA'].value then
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'cliff-explosives-o',
|
||||
energy_required = 1,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{type='item', name='explosives', amount=10},
|
||||
{type='item', name='grenade', amount=1},
|
||||
{type='item', name='barrel', amount=1}
|
||||
},
|
||||
results = {{type='item', name='cliff-explosives', amount=1}},
|
||||
main_product = 'cliff-explosives',
|
||||
localised_name = data.raw['recipe']['cliff-explosives'].localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['cliff-explosives'].effects, {type='unlock-recipe', recipe='cliff-explosives-o'})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if items['handle'][file_stage]['item'] then
|
||||
for _, v in pairs(items['item']) do
|
||||
if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then
|
||||
v.category = 'item'
|
||||
@@ -79,7 +17,9 @@ for _, v in pairs(items['item']) do
|
||||
main.EL(v)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if items['handle'][file_stage]['equipment'] then
|
||||
for _, v in pairs(items['equipment']) do
|
||||
if (v.stage == file_stage) and v.enabled and (v.max >= v.min) then
|
||||
v.category = 'equipment'
|
||||
@@ -92,3 +32,4 @@ for _, v in pairs(items['equipment']) do
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -626,6 +626,74 @@ if settings.startup['PHI-CT'].value then
|
||||
table.insert(data.raw.technology['logistics'].effects, {type='unlock-recipe', recipe='loader'})
|
||||
table.insert(data.raw.technology['logistics-2'].effects, {type='unlock-recipe', recipe='fast-loader'})
|
||||
table.insert(data.raw.technology['logistics-3'].effects, {type='unlock-recipe', recipe='express-loader'})
|
||||
|
||||
if mods['space-age'] then
|
||||
data.raw.recipe['turbo-loader'].hidden = false
|
||||
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
|
||||
end
|
||||
end
|
||||
|
||||
if not settings.startup['PHI-CT-SPOIL'].value then
|
||||
local function spoil_handle(i)
|
||||
i.spoil_ticks = nil
|
||||
i.spoil_result = nil
|
||||
i.spoil_to_trigger_result = nil
|
||||
end
|
||||
|
||||
-- spoil_handle(data.raw['item']['iron-bacteria'])
|
||||
-- spoil_handle(data.raw['item']['copper-bacteria'])
|
||||
spoil_handle(data.raw['item']['nutrients'])
|
||||
spoil_handle(data.raw['item']['captive-biter-spawner'])
|
||||
spoil_handle(data.raw['item']['biter-egg'])
|
||||
spoil_handle(data.raw['item']['pentapod-egg'])
|
||||
spoil_handle(data.raw['capsule']['raw-fish'])
|
||||
spoil_handle(data.raw['capsule']['yumako-mash'])
|
||||
spoil_handle(data.raw['capsule']['yumako'])
|
||||
spoil_handle(data.raw['capsule']['jelly'])
|
||||
spoil_handle(data.raw['capsule']['jellynut'])
|
||||
spoil_handle(data.raw['capsule']['bioflux'])
|
||||
spoil_handle(data.raw['tool']['agricultural-science-pack'])
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'spoilage-from-nutrients',
|
||||
energy_required = 1,
|
||||
enabled = false,
|
||||
ingredients = {{type='item', name='nutrients', amount=1}},
|
||||
results = {{type='item', name='spoilage', amount=10}},
|
||||
main_product = 'spoilage',
|
||||
localised_name = {'phi-cl.combine', '', ''}
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['agriculture'].effects, {type='unlock-recipe', recipe='spoilage-from-nutrients'})
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT-SA'].value then
|
||||
if mods['space-age'] then
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = 'cliff-explosives-o',
|
||||
energy_required = 1,
|
||||
enabled = false,
|
||||
ingredients = {
|
||||
{type='item', name='explosives', amount=10},
|
||||
{type='item', name='grenade', amount=1},
|
||||
{type='item', name='barrel', amount=1}
|
||||
},
|
||||
results = {{type='item', name='cliff-explosives', amount=1}},
|
||||
main_product = 'cliff-explosives',
|
||||
localised_name = data.raw['recipe']['cliff-explosives'].localised_name
|
||||
}})
|
||||
|
||||
table.insert(data.raw.technology['cliff-explosives'].effects, {type='unlock-recipe', recipe='cliff-explosives-o'})
|
||||
end
|
||||
|
||||
if mods['elevated-rails'] then
|
||||
data.raw.technology['elevated-rail'].unit.ingredients = {
|
||||
{'automation-science-pack', 1},
|
||||
{'logistic-science-pack', 1}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
data.raw['utility-constants'].default.rocket_lift_weight = settings.startup['PHI-CT-ROCKET-CAPACITY'].value * 100000
|
||||
@@ -655,6 +723,9 @@ for _, v in pairs(items['item']) do
|
||||
end
|
||||
|
||||
main.EL(v)
|
||||
|
||||
else
|
||||
items['handle'][v.stage]['item'] = true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -668,5 +739,8 @@ for _, v in pairs(items['equipment']) do
|
||||
main.ER(v, j)
|
||||
main.ET(v, j)
|
||||
end
|
||||
|
||||
else
|
||||
items['handle'][v.stage]['equipment'] = true
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user