mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -1,7 +1,17 @@
|
|||||||
|
---------------------------------------------------------------------------------------------------
|
||||||
|
Version: 3.0.38
|
||||||
|
Date: 2024-11-26
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
- [MI] Added some check to the code.
|
||||||
|
|
||||||
---------------------------------------------------------------------------------------------------
|
---------------------------------------------------------------------------------------------------
|
||||||
Version: 3.0.37
|
Version: 3.0.37
|
||||||
Date: 2024-11-26
|
Date: 2024-11-26
|
||||||
|
|
||||||
|
Features:
|
||||||
|
- [CT] Reintroduced the somewhat electric train.
|
||||||
|
|
||||||
Changes:
|
Changes:
|
||||||
- [CL] Some general cleanup of details.
|
- [CL] Some general cleanup of details.
|
||||||
|
|
||||||
|
|||||||
@@ -216,19 +216,83 @@ if settings.startup['PHI-MI'].value then
|
|||||||
v.speed = v.speed * s
|
v.speed = v.speed * s
|
||||||
|
|
||||||
if settings.startup['PHI-MI-ROBOT-ENERGY'].value then
|
if settings.startup['PHI-MI-ROBOT-ENERGY'].value then
|
||||||
v.energy_per_tick = '0J'
|
if v.energy_per_tick then
|
||||||
v.energy_per_move = '0J'
|
v.energy_per_tick = '0J'
|
||||||
v.speed_multiplier_when_out_of_energy = 1
|
end
|
||||||
|
|
||||||
|
if v.energy_per_move then
|
||||||
|
v.energy_per_move = '0J'
|
||||||
|
end
|
||||||
|
|
||||||
|
if v.speed_multiplier_when_out_of_energy then
|
||||||
|
v.speed_multiplier_when_out_of_energy = 1
|
||||||
|
end
|
||||||
|
|
||||||
else
|
else
|
||||||
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
if v.energy_per_tick then
|
||||||
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
v.energy_per_tick = tostring(tonumber(string.match(v.energy_per_tick, '[%d%.]+')) * sn) .. string.match(v.energy_per_tick, '%a+')
|
||||||
|
end
|
||||||
|
|
||||||
|
if v.energy_per_move then
|
||||||
|
v.energy_per_move = tostring(tonumber(string.match(v.energy_per_move, '[%d%.]+')) * sn) .. string.match(v.energy_per_move, '%a+')
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if settings.startup['PHI-MI-TRAIN'].value then
|
if settings.startup['PHI-MI-TRAIN'].value 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 = true,
|
||||||
|
ingredients = {{type='item', name='battery', amount=50}},
|
||||||
|
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',
|
||||||
|
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'}
|
||||||
|
}})
|
||||||
|
|
||||||
local s = (7 + settings.startup['PHI-MI-TRAIN'].value) / 8
|
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 _, t in pairs({data.raw['locomotive'], data.raw['cargo-wagon'], data.raw['fluid-wagon'], data.raw['artillery-wagon']}) do
|
||||||
@@ -240,6 +304,10 @@ if settings.startup['PHI-MI'].value then
|
|||||||
if v.max_power then
|
if v.max_power then
|
||||||
v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+')
|
v.max_power = tostring(tonumber(string.match(v.max_power, '[%d%.]+')) * s) .. string.match(v.max_power, '%a+')
|
||||||
v.reversing_power_modifier = 1
|
v.reversing_power_modifier = 1
|
||||||
|
|
||||||
|
if v.energy_source then
|
||||||
|
v.energy_source.burnt_inventory_size = 1
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "PHI-CL",
|
"name": "PHI-CL",
|
||||||
"version": "3.0.37",
|
"version": "3.0.38",
|
||||||
"factorio_version": "2.0",
|
"factorio_version": "2.0",
|
||||||
"date": "2024-11-26",
|
"date": "2024-11-26",
|
||||||
"title": "Phidias Collection",
|
"title": "Phidias Collection",
|
||||||
|
|||||||
@@ -614,62 +614,6 @@
|
|||||||
if item.energy_per_shield then
|
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+')
|
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
|
end
|
||||||
|
|
||||||
** DATA
|
|
||||||
if settings.startup['PHI-CT'].value and settings.startup['PHI-CT-TRAIN'].value then
|
|
||||||
local item = table.deepcopy(data.raw['item']['used-up-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 = true,
|
|
||||||
ingredients = {{type='item', name='battery', amount=50}},
|
|
||||||
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',
|
|
||||||
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'}
|
|
||||||
}})
|
|
||||||
|
|
||||||
data.raw['locomotive']['locomotive'].burner.burnt_inventory_size = 1
|
|
||||||
end
|
|
||||||
|
|
||||||
** DATA UPDATE
|
** DATA UPDATE
|
||||||
if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.startup['PHI-MB-MINING-TIER'].value > 1 then
|
if settings.startup['PHI-MB'].value and mods['space-exploration'] and settings.startup['PHI-MB-MINING-TIER'].value > 1 then
|
||||||
|
|||||||
Reference in New Issue
Block a user