mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -217,6 +217,23 @@ if settings.startup['PHI-MI'].value then
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI-TRAIN'].value then
|
||||
local s = (7 + settings.startup['PHI-MI-TRAIN'].value) / 8
|
||||
|
||||
for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.max_health = v.max_health * s
|
||||
v.max_speed = v.max_speed * s
|
||||
v.braking_force = v.braking_force * s
|
||||
|
||||
if v.max_power then
|
||||
v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+')
|
||||
v.reversing_power_modifier = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value then
|
||||
@@ -619,12 +636,22 @@ if settings.startup['PHI-CT'].value then
|
||||
data.raw.recipe['fast-loader'].hidden = false
|
||||
data.raw.recipe['express-loader'].hidden = false
|
||||
|
||||
data.raw['loader']['loader'].filter_count = 2
|
||||
data.raw['loader']['fast-loader'].filter_count = 2
|
||||
data.raw['loader']['express-loader'].filter_count = 2
|
||||
|
||||
data.raw['loader']['loader'].per_lane_filters = true
|
||||
data.raw['loader']['fast-loader'].per_lane_filters = true
|
||||
data.raw['loader']['express-loader'].per_lane_filters = true
|
||||
|
||||
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
|
||||
data.raw['loader']['turbo-loader'].filter_count = 2
|
||||
data.raw['loader']['turbo-loader'].per_lane_filters = true
|
||||
table.insert(data.raw.technology['turbo-transport-belt'].effects, {type='unlock-recipe', recipe='turbo-loader'})
|
||||
|
||||
local s = data.raw['inserter']['stack-inserter'].max_belt_stack_size
|
||||
@@ -672,6 +699,13 @@ if settings.startup['PHI-CT'].value then
|
||||
|
||||
if settings.startup['PHI-CT-SA'].value then
|
||||
if mods['space-age'] then
|
||||
data.raw.technology['cliff-explosives'].prerequisites = {'explosives', 'military-2'}
|
||||
data.raw.technology['cliff-explosives'].unit.count = 200
|
||||
data.raw.technology['cliff-explosives'].unit.ingredients = {
|
||||
{'automation-science-pack', 1},
|
||||
{'logistic-science-pack', 1}
|
||||
}
|
||||
|
||||
local recipe = table.deepcopy(data.raw['recipe']['cliff-explosives'])
|
||||
recipe.name = 'cliff-explosives-o'
|
||||
recipe.ingredients = {
|
||||
@@ -686,11 +720,12 @@ if settings.startup['PHI-CT'].value then
|
||||
end
|
||||
|
||||
if mods['elevated-rails'] then
|
||||
data.raw.technology['elevated-rail'].prerequisites = {'concrete'}
|
||||
data.raw.technology['elevated-rail'].unit.count = 200
|
||||
data.raw.technology['elevated-rail'].unit.ingredients = {
|
||||
{'automation-science-pack', 1},
|
||||
{'logistic-science-pack', 1}
|
||||
}
|
||||
data.raw.technology['elevated-rail'].unit.count = 200
|
||||
end
|
||||
|
||||
if mods['quality'] then
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "PHI-CL",
|
||||
"version": "3.0.10",
|
||||
"version": "3.0.14",
|
||||
"factorio_version": "2.0",
|
||||
"date": "2024-11-02",
|
||||
"date": "2024-11-03",
|
||||
"title": "Phidias Collection",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
@@ -77,18 +77,37 @@ function main.EEE(source, tier)
|
||||
end
|
||||
|
||||
if (source.type == 'electric-turret') or (source.type == 'ammo-turret') or (source.type == 'fluid-turret') then
|
||||
item.attack_parameters.damage_modifier = 2 ^ (tier - source.min + 1)
|
||||
item.attack_parameters.range = item.attack_parameters.range + (2 * (tier - source.min + 1))
|
||||
item.call_for_help_radius = item.call_for_help_radius + (2 * (tier - source.min + 1))
|
||||
if item.attack_parameters then
|
||||
item.attack_parameters.damage_modifier = 2 ^ (tier - source.min + 1)
|
||||
item.attack_parameters.range = item.attack_parameters.range + (2 * (tier - source.min + 1))
|
||||
|
||||
if item.attack_parameters.cooldown then
|
||||
item.attack_parameters.cooldown = item.attack_parameters.cooldown * ((24 - tier + source.min) / 25)
|
||||
end
|
||||
end
|
||||
|
||||
if item.call_for_help_radius then
|
||||
item.call_for_help_radius = item.call_for_help_radius + (2 * (tier - source.min + 1))
|
||||
end
|
||||
|
||||
if source.type == 'electric-turret' then
|
||||
if source.name == 'laser-turret' then
|
||||
item.attack_parameters.damage_modifier = item.attack_parameters.damage_modifier * 2
|
||||
end
|
||||
|
||||
item.glow_light_intensity = 1
|
||||
item.attack_parameters.ammo_type.action.action_delivery.max_length = item.attack_parameters.ammo_type.action.action_delivery.max_length + (2 * (tier - source.min + 1))
|
||||
item.attack_parameters.ammo_type.energy_consumption = tonumber(string.match(item.attack_parameters.ammo_type.energy_consumption, '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.attack_parameters.ammo_type.energy_consumption, '%a+')
|
||||
|
||||
if item.attack_parameters then
|
||||
if item.attack_parameters.damage_modifier and source.name == 'laser-turret' then
|
||||
item.attack_parameters.damage_modifier = item.attack_parameters.damage_modifier * 2
|
||||
end
|
||||
|
||||
if item.attack_parameters.ammo_type then
|
||||
if item.attack_parameters.ammo_type.action and item.attack_parameters.ammo_type.action.action_delivery and item.attack_parameters.ammo_type.action.action_delivery.max_length then
|
||||
item.attack_parameters.ammo_type.action.action_delivery.max_length = item.attack_parameters.ammo_type.action.action_delivery.max_length + (2 * (tier - source.min + 1))
|
||||
end
|
||||
|
||||
if item.attack_parameters.ammo_type.energy_consumption then
|
||||
item.attack_parameters.ammo_type.energy_consumption = tonumber(string.match(item.attack_parameters.ammo_type.energy_consumption, '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.attack_parameters.ammo_type.energy_consumption, '%a+')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif source.type == 'fluid-turret' then
|
||||
item.prepare_range = item.prepare_range + (2 * (tier - source.min + 1))
|
||||
@@ -275,7 +294,7 @@ function main.EEQ(source, tier)
|
||||
|
||||
if item.attack_parameters then
|
||||
if item.attack_parameters.cooldown then
|
||||
item.attack_parameters.cooldown = math.floor(item.attack_parameters.cooldown * ((32 - (tier - source.min + 1)) / 32))
|
||||
item.attack_parameters.cooldown = item.attack_parameters.cooldown * ((24 - tier + source.min) / 25)
|
||||
end
|
||||
|
||||
if item.attack_parameters.damage_modifier then
|
||||
|
||||
@@ -740,23 +740,6 @@ if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.s
|
||||
end
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value and settings.startup['PHI-MI-TRAIN'].value then
|
||||
local s = (7 + settings.startup['PHI-MI-TRAIN'].value) / 8
|
||||
|
||||
for _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do
|
||||
for _, v in pairs(t) do
|
||||
v.max_health = v.max_health * s
|
||||
v.max_speed = v.max_speed * s
|
||||
v.braking_force = v.braking_force * s
|
||||
|
||||
if v.max_power then
|
||||
v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+')
|
||||
v.reversing_power_modifier = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
** DATA FINAL FIXES
|
||||
data.raw['utility-constants'].default.train_inactivity_wait_condition_default = 60
|
||||
|
||||
|
||||
Reference in New Issue
Block a user