mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-05-13 05:08:44 +09:00
168 lines
9.6 KiB
Lua
168 lines
9.6 KiB
Lua
local items = require 'config'
|
|
|
|
-- GM C 1 SPACE_AGE ENTITY
|
|
if data.raw['cargo-bay'] and data.raw['cargo-bay']['cargo-bay'] then
|
|
data.raw['cargo-bay']['cargo-bay'].inventory_size_bonus = math.max(40, data.raw['cargo-bay']['cargo-bay'].inventory_size_bonus)
|
|
end
|
|
|
|
-- GM C 1 BASE ENTITY
|
|
if data.raw['rocket-silo'] and data.raw['rocket-silo']['rocket-silo'] then
|
|
data.raw['rocket-silo']['rocket-silo'].to_be_inserted_to_rocket_inventory_size = math.max(60, data.raw['rocket-silo']['rocket-silo'].to_be_inserted_to_rocket_inventory_size)
|
|
end
|
|
|
|
-- GM C 1 BASE ENTITY
|
|
if data.raw['rocket-silo-rocket'] and data.raw['rocket-silo-rocket']['rocket-silo-rocket'] then
|
|
data.raw['rocket-silo-rocket']['rocket-silo-rocket'].inventory_size = math.max(60, data.raw['rocket-silo-rocket']['rocket-silo-rocket'].inventory_size)
|
|
end
|
|
|
|
-- GM C 1 BASE ENTITY
|
|
if data.raw['cargo-wagon'] and data.raw['cargo-wagon']['cargo-wagon'] then
|
|
data.raw['cargo-wagon']['cargo-wagon'].inventory_size = math.max(80, data.raw['cargo-wagon']['cargo-wagon'].inventory_size)
|
|
end
|
|
|
|
data.raw.technology['foundation'].prerequisites = {'rail-support-foundations'}
|
|
data.raw.technology['foundation'].unit.count = 1000
|
|
data.raw.technology['foundation'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
|
|
data.raw.technology['rail-support-foundations'].prerequisites = {'elevated-rail', 'planet-discovery-fulgora'}
|
|
data.raw.technology['rail-support-foundations'].unit.count = 600
|
|
data.raw.technology['rail-support-foundations'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}
|
|
data.raw.technology['elevated-rail'].prerequisites = {'concrete', 'railway'}
|
|
data.raw.technology['elevated-rail'].unit.count = 400
|
|
data.raw.technology['elevated-rail'].unit.ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}
|
|
|
|
data.raw.recipe['foundation'].ingredients = {{type = 'item', name = 'landfill', amount = 1}, {type = 'item', name = 'refined-concrete', amount = 10}, {type = 'item', name = 'steel-plate', amount = 10}}
|
|
data.raw.recipe['foundation'].results = {{type = 'item', name = 'foundation', amount = 1}}
|
|
data.raw.recipe['atomic-bomb'].ingredients[3] = {type = 'item', name = 'uranium-235', amount = 30}
|
|
data.raw.recipe['cliff-explosives'].ingredients = {{type = 'item', name = 'explosives', amount = 10}, {type = 'item', name = 'grenade', amount = 1}, {type = 'item', name = 'barrel', amount = 1}}
|
|
data.raw.recipe['artillery-turret'].ingredients = {{type = 'item', name = 'steel-plate', amount = 60}, {type = 'item', name = 'concrete', amount = 60}, {type = 'item', name = 'iron-gear-wheel', amount = 40}, {type = 'item', name = 'advanced-circuit', amount = 20}}
|
|
data.raw.recipe['artillery-shell'].ingredients = {{type = 'item', name = 'explosive-cannon-shell', amount = 4}, {type = 'item', name = 'radar', amount = 1}, {type = 'item', name = 'explosives', amount = 8}}
|
|
data.raw.recipe['artillery-wagon'].ingredients = {{type = 'item', name = 'engine-unit', amount = 64}, {type = 'item', name = 'iron-gear-wheel', amount = 10}, {type = 'item', name = 'steel-plate', amount = 40}, {type = 'item', name = 'pipe', amount = 16}, {type = 'item', name = 'advanced-circuit', amount = 20}}
|
|
|
|
-- GM C 1 BASE ENTITY
|
|
if data.raw['roboport'] and data.raw['roboport']['roboport'] then
|
|
data.raw['roboport']['roboport'].energy_source.input_flow_limit = nil
|
|
data.raw['roboport']['roboport'].charging_energy = tostring(tonumber(string.match(data.raw['roboport']['roboport'].charging_energy, '[%d%.]+')) * 2) .. string.match(data.raw['roboport']['roboport'].charging_energy, '%a+')
|
|
data.raw['roboport']['roboport'].robot_slots_count = 10
|
|
data.raw['roboport']['roboport'].material_slots_count = 2
|
|
data.raw['roboport']['roboport'].charging_station_count = 8
|
|
end
|
|
|
|
-- GM C 1 BASE ITEM
|
|
if data.raw.ammo['artillery-shell'] then
|
|
data.raw.ammo['artillery-shell'].stack_size = data.raw['inserter']['stack-inserter'].max_belt_stack_size
|
|
end
|
|
|
|
-- GM C 1 BASE RESEARCH
|
|
if data.raw.technology['cliff-explosives'] then
|
|
if data.raw.technology['explosives'] and data.raw.technology['military-2'] then
|
|
data.raw.technology['cliff-explosives'].prerequisites = {'explosives', 'military-2'}
|
|
end
|
|
|
|
data.raw.technology['cliff-explosives'].unit = {count = 200, time = 15, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}}
|
|
data.raw.technology['cliff-explosives'].effects = {{type = 'unlock-recipe', recipe = 'cliff-explosives'}, {type = 'cliff-deconstruction-enabled', modifier = true}}
|
|
end
|
|
|
|
-- GM A 9 BASE RESEARCH_EFFECT
|
|
for i=5, 7 do
|
|
local tn = 'laser-weapons-damage-' .. i
|
|
|
|
if data.raw.technology[tn] then
|
|
table.insert(data.raw.technology[tn].effects, {type = 'ammo-damage', ammo_category = 'tesla', modifier = 0.7})
|
|
table.insert(data.raw.technology[tn].effects, {type = 'ammo-damage', ammo_category = 'electric', modifier = 0.7})
|
|
table.insert(data.raw.technology[tn].effects, {type = 'ammo-damage', ammo_category = 'beam', modifier = 0.6})
|
|
end
|
|
end
|
|
|
|
-- GM A 13 BASE RESEARCH_EFFECT
|
|
for _, v in pairs({{'stronger-explosives-4', 'ammo-damage', 'artillery-shell', 0.1}, {'stronger-explosives-5', 'ammo-damage', 'artillery-shell', 0.1}, {'stronger-explosives-6', 'ammo-damage', 'artillery-shell', 0.2}, {'stronger-explosives-7', 'ammo-damage', 'artillery-shell', 0.2}, {'laser-weapons-damage-3', 'ammo-damage', 'beam', 0.3}, {'laser-weapons-damage-4', 'ammo-damage', 'beam', 0.4}, {'laser-shooting-speed-5', 'gun-speed', 'electric', 0.2}, {'laser-shooting-speed-6', 'gun-speed', 'electric', 0.3}, {'laser-shooting-speed-7', 'gun-speed', 'electric', 0.5}, {'physical-projectile-damage-6', 'ammo-damage', 'railgun', 0.2}, {'physical-projectile-damage-7', 'ammo-damage', 'railgun', 0.4}, {'weapon-shooting-speed-6', 'gun-speed', 'railgun', 0.2}, {'artillery-shell-speed-1', 'gun-speed', 'railgun', 0.2}}) do
|
|
if data.raw.technology[v[1]] then
|
|
table.insert(data.raw.technology[v[1]].effects, {type = v[2], ammo_category = v[3], modifier = v[4]})
|
|
end
|
|
end
|
|
|
|
-- GM H 8 SPACE_AGE RESEARCH
|
|
for _, v in pairs({'artillery-shell-damage-1', 'railgun-damage-1', 'railgun-shooting-speed-1', 'electric-weapons-damage-1', 'electric-weapons-damage-2', 'electric-weapons-damage-3', 'electric-weapons-damage-4', 'promethium-science-pack'}) do
|
|
if data.raw.technology[v] then
|
|
data.raw.technology[v].hidden = true
|
|
data.raw.technology[v].hidden_in_factoriopedia = true
|
|
data.raw.technology[v].effects = nil
|
|
end
|
|
end
|
|
|
|
-- GM H 1 SPACE_AGE TOOL
|
|
data.raw.tool['promethium-science-pack'].hidden = true
|
|
data.raw.tool['promethium-science-pack'].hidden_in_factoriopedia = true
|
|
|
|
-- GM C 5 BASE RESOURCE
|
|
-- GM C 3 SPACE_AGE RESOURCE
|
|
for _, v in pairs(data.raw['resource']) do
|
|
local vn = v.name
|
|
|
|
if data.raw.item[vn] and data.raw.item[vn].stack_size then
|
|
data.raw.item[vn].stack_size = math.max(data.raw.item[vn].stack_size, 100)
|
|
end
|
|
end
|
|
|
|
-- GM A 2 BASE ITEM,RECIPE
|
|
-- GM C 1 BASE ENTITY
|
|
if data.raw.item['depleted-uranium-fuel-cell'] and data.raw.item['nuclear-fuel'] then
|
|
local item = table.deepcopy(data.raw.item['depleted-uranium-fuel-cell'])
|
|
item.name = 'empty-train-battery'
|
|
item.icon = items['general']['graphics_location'] .. 'battery.png'
|
|
item.order = 'qa'
|
|
item.stack_size = 100
|
|
item.localised_name = {'name.empty-train-battery'}
|
|
item.localised_description = {'description.empty-train-battery'}
|
|
data:extend({item})
|
|
|
|
data:extend({{
|
|
type = 'recipe',
|
|
name = 'empty-train-battery',
|
|
energy_required = 30,
|
|
enabled = true,
|
|
icon = items['general']['graphics_location'] .. 'battery.png',
|
|
icon_size = 64,
|
|
subgroup = 'intermediate-product',
|
|
order = 'zc',
|
|
allow_productivity = false,
|
|
ingredients = {{type = 'item', name = 'battery', amount = 100}},
|
|
results = {{type = 'item', name = 'empty-train-battery', amount = 1}},
|
|
main_product = 'empty-train-battery',
|
|
localised_name = {'name.empty-train-battery'},
|
|
localised_description = {'description.empty-train-battery'}
|
|
}})
|
|
|
|
item = table.deepcopy(data.raw.item['nuclear-fuel'])
|
|
item.name = 'charged-train-battery'
|
|
item.burnt_result = 'empty-train-battery'
|
|
item.fuel_value = '1GJ'
|
|
item.icon = items['general']['graphics_location'] .. 'battery.png'
|
|
item.stack_size = 10
|
|
item.localised_name = {'name.charged-train-battery'}
|
|
item.localised_description = {'description.charged-train-battery'}
|
|
data:extend({item})
|
|
|
|
data:extend({{
|
|
type = 'recipe',
|
|
name = 'charged-train-battery',
|
|
energy_required = 60,
|
|
enabled = true,
|
|
icon = items['general']['graphics_location'] .. 'battery.png',
|
|
icon_size = 64,
|
|
subgroup = 'intermediate-product',
|
|
order = 'zd',
|
|
allow_productivity = false,
|
|
ingredients = {{type = 'item', name = 'empty-train-battery', amount = 1}},
|
|
results = {{type = 'item', name = 'charged-train-battery', probability = 0.995, amount = 1}, {type = 'item', name = 'battery', probability = 0.005, amount = 5}},
|
|
main_product = 'charged-train-battery',
|
|
localised_name = {'name.charged-train-battery'},
|
|
localised_description = {'description.charged-train-battery'}
|
|
}})
|
|
|
|
for _, v in pairs(data.raw['locomotive']) do
|
|
if v.energy_source then
|
|
v.energy_source.burnt_inventory_size = (v.energy_source.burnt_inventory_size and math.max(v.energy_source.burnt_inventory_size, 1)) or 1
|
|
end
|
|
end
|
|
end
|