mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-06-19 10:19:59 +09:00
.
This commit is contained in:
+67
-27
@@ -9,30 +9,39 @@ local mod_tint = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- MIG C 1 BASE ARMOR_EQUIPMENT
|
-- MIG C 1 BASE ARMOR_EQUIPMENT
|
||||||
|
if data.raw['active-defense-equipment'] and data.raw['active-defense-equipment']['discharge-defense-equipment'] then
|
||||||
data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true
|
data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true
|
||||||
|
|
||||||
-- MIG C 2 BASE ENTITY
|
|
||||||
data.raw['programmable-speaker']['programmable-speaker'].energy_source.usage_priority = 'primary-input'
|
|
||||||
table.insert(data.raw['fluid-turret']['flamethrower-turret'].attack_parameters.fluids, {type = 'sulfuric-acid', damage_modifier = 1.2})
|
|
||||||
|
|
||||||
-- MIG C 3 BASE ENTITY
|
|
||||||
for _, v in pairs(data.raw['container']) do
|
|
||||||
v.inventory_type = 'with_filters_and_bar'
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MIG C 5 BASE ENTITY
|
-- MIG C 2 BASE ENTITY
|
||||||
for _, v in pairs(data.raw['logistic-container']) do
|
if data.raw['programmable-speaker'] and data.raw['programmable-speaker']['programmable-speaker'] then
|
||||||
|
data.raw['programmable-speaker']['programmable-speaker'].energy_source.usage_priority = 'primary-input'
|
||||||
|
end
|
||||||
|
|
||||||
|
if data.raw['fluid-turret'] and data.raw['fluid-turret']['flamethrower-turret'] then
|
||||||
|
table.insert(data.raw['fluid-turret']['flamethrower-turret'].attack_parameters.fluids, {type = 'sulfuric-acid', damage_modifier = 1.2})
|
||||||
|
end
|
||||||
|
|
||||||
|
-- MIG C 8 BASE ENTITY
|
||||||
|
for _, t in pairs({'container', 'logistic-container'}) do
|
||||||
|
if data.raw[t] then
|
||||||
|
for _, v in pairs(data.raw[t]) do
|
||||||
v.inventory_type = 'with_filters_and_bar'
|
v.inventory_type = 'with_filters_and_bar'
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MI C 4 BASE ENTITY
|
-- MI C 4 BASE ENTITY
|
||||||
for _, t in pairs({data.raw['cargo-wagon'], data.raw['fluid-wagon']}) do
|
for _, t in pairs({'cargo-wagon', 'fluid-wagon'}) do
|
||||||
for _, v in pairs(t) do
|
if data.raw[t] then
|
||||||
|
for _, v in pairs(data.raw[t]) do
|
||||||
v.quality_affects_inventory_size = true
|
v.quality_affects_inventory_size = true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MI C 1 BASE ENTITY
|
-- MI C 1 BASE ENTITY
|
||||||
|
if data.raw['lamp'] then
|
||||||
for _, v in pairs(data.raw['lamp']) do
|
for _, v in pairs(data.raw['lamp']) do
|
||||||
if v.light and v.light.color then
|
if v.light and v.light.color then
|
||||||
v.light.color = {1, 1, 1}
|
v.light.color = {1, 1, 1}
|
||||||
@@ -42,8 +51,10 @@ for _, v in pairs(data.raw['lamp']) do
|
|||||||
v.light_when_colored.color = {1, 1, 1}
|
v.light_when_colored.color = {1, 1, 1}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MI C 1 BASE ENTITY
|
-- MI C 1 BASE ENTITY
|
||||||
|
if data.raw['land-mine'] then
|
||||||
for _, v in pairs(data.raw['land-mine']) do
|
for _, v in pairs(data.raw['land-mine']) do
|
||||||
if v.flags then
|
if v.flags then
|
||||||
for fk, fv in ipairs(v.flags) do
|
for fk, fv in ipairs(v.flags) do
|
||||||
@@ -54,23 +65,30 @@ for _, v in pairs(data.raw['land-mine']) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MI C 1 BASE ENTITY
|
-- MI C 1 BASE ENTITY
|
||||||
|
if data.raw['locomotive'] then
|
||||||
for _, v in pairs(data.raw['locomotive']) do
|
for _, v in pairs(data.raw['locomotive']) do
|
||||||
v.reversing_power_modifier = 1
|
v.reversing_power_modifier = 1
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MIG C 1 BASE ENTITY
|
-- MIG C 1 BASE ENTITY
|
||||||
|
if data.raw['reactor'] then
|
||||||
for _, v in pairs(data.raw['reactor']) do
|
for _, v in pairs(data.raw['reactor']) do
|
||||||
v.scale_energy_usage = (v.fast_replaceable_group and v.fast_replaceable_group == 'reactor')
|
v.scale_energy_usage = (v.fast_replaceable_group and v.fast_replaceable_group == 'reactor')
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MIG C 5 BASE ENTITY
|
-- MIG C 5 BASE ENTITY
|
||||||
for _, t in pairs({data.raw['offshore-pump'], data.raw['pump'], data.raw['pipe'], data.raw['pipe-to-ground'], data.raw['infinity-pipe']}) do
|
for _, t in pairs({'offshore-pump', 'pump', 'pipe', 'pipe-to-ground', 'infinity-pipe'}) do
|
||||||
for _, v in pairs(t) do
|
if data.raw[t] then
|
||||||
|
for _, v in pairs(data.raw[t]) do
|
||||||
v.heating_energy = nil
|
v.heating_energy = nil
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MIG C 3 BASE ENTITY,ITEM
|
-- MIG C 3 BASE ENTITY,ITEM
|
||||||
-- MIG A 1 BASE RECIPE
|
-- MIG A 1 BASE RECIPE
|
||||||
@@ -100,7 +118,7 @@ if data.raw['valve'] then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MIG A 1 BASE ENTITY,ITEM,RECIPE
|
-- MIG A 1 BASE ENTITY,ITEM,RECIPE
|
||||||
if data.raw['offshore-pump']['offshore-pump'] then
|
if data.raw['offshore-pump'] and data.raw['offshore-pump']['offshore-pump'] then
|
||||||
local item = table.deepcopy(data.raw['item']['offshore-pump'])
|
local item = table.deepcopy(data.raw['item']['offshore-pump'])
|
||||||
item.name = 'super-pump'
|
item.name = 'super-pump'
|
||||||
item.place_result = item.name
|
item.place_result = item.name
|
||||||
@@ -155,22 +173,42 @@ end
|
|||||||
|
|
||||||
-- MIG C 1 BASE ENTITY
|
-- MIG C 1 BASE ENTITY
|
||||||
-- MIG C 1 SPACE_AGE ENTITY
|
-- MIG C 1 SPACE_AGE ENTITY
|
||||||
|
if data.raw['mining-drill'] then
|
||||||
for _, v in pairs(data.raw['mining-drill']) do
|
for _, v in pairs(data.raw['mining-drill']) do
|
||||||
v.filter_count = 5
|
v.filter_count = 5
|
||||||
|
v.drops_full_belt_stacks = (mods['space-age'] and true) or nil
|
||||||
if mods['space-age'] then
|
|
||||||
v.drops_full_belt_stacks = true
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MIG C 3 BASE MODULE
|
-- MIG C 3 BASE MODULE
|
||||||
|
if data.raw['module'] then
|
||||||
|
if data.raw['module']['efficiency-module'] then
|
||||||
data.raw['module']['efficiency-module'].effect.consumption = math.min(-0.3, data.raw['module']['efficiency-module'].effect.consumption)
|
data.raw['module']['efficiency-module'].effect.consumption = math.min(-0.3, data.raw['module']['efficiency-module'].effect.consumption)
|
||||||
data.raw['module']['efficiency-module-2'].effect.consumption = math.min(-0.6, data.raw['module']['efficiency-module-2'].effect.consumption)
|
end
|
||||||
data.raw['module']['efficiency-module-3'].effect.consumption = math.min(-0.9, data.raw['module']['efficiency-module-3'].effect.consumption)
|
|
||||||
|
|
||||||
-- MIG C 2 BASE RECIPE
|
if data.raw['module']['efficiency-module-2'] then
|
||||||
data.raw.recipe['landfill'].ingredients[1].amount = math.min(20, data.raw.recipe['landfill'].ingredients[1].amount)
|
data.raw['module']['efficiency-module-2'].effect.consumption = math.min(-0.6, data.raw['module']['efficiency-module-2'].effect.consumption)
|
||||||
|
end
|
||||||
|
|
||||||
|
if data.raw['module']['efficiency-module-3'] then
|
||||||
|
data.raw['module']['efficiency-module-3'].effect.consumption = math.min(-0.9, data.raw['module']['efficiency-module-3'].effect.consumption)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- MIG C 1 BASE RECIPE
|
||||||
|
if data.raw.recipe['landfill'] then
|
||||||
|
for _, v in pairs(data.raw.recipe['landfill'].ingredients) do
|
||||||
|
if v.type == 'item' and v.name == 'stone' then
|
||||||
|
v.amount = math.min(20, v.amount)
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- MIG C 1 BASE RECIPE
|
||||||
|
if data.raw.recipe['selector-combinator'] then
|
||||||
data.raw.recipe['selector-combinator'].ingredients = {{type = 'item', name = 'advanced-circuit', amount = 5}, {type = 'item', name = 'decider-combinator', amount = 2}}
|
data.raw.recipe['selector-combinator'].ingredients = {{type = 'item', name = 'advanced-circuit', amount = 5}, {type = 'item', name = 'decider-combinator', amount = 2}}
|
||||||
|
end
|
||||||
|
|
||||||
-- MIG A 1 BASE RECIPE_CATEGORY
|
-- MIG A 1 BASE RECIPE_CATEGORY
|
||||||
data:extend({{type='recipe-category', name='super-pump-fluid'}})
|
data:extend({{type='recipe-category', name='super-pump-fluid'}})
|
||||||
@@ -203,6 +241,7 @@ end
|
|||||||
|
|
||||||
-- MIG C 5 BASE ENTITY
|
-- MIG C 5 BASE ENTITY
|
||||||
-- MIG C 1 SPACE_AGE ENTITY
|
-- MIG C 1 SPACE_AGE ENTITY
|
||||||
|
if data.raw['inserter'] then
|
||||||
for _, v in pairs(data.raw['inserter']) do
|
for _, v in pairs(data.raw['inserter']) do
|
||||||
if v.energy_source and v.energy_source.type and (v.energy_source.type == 'electric' or v.energy_source.type == 'void' or v.energy_source.type == 'burner') then
|
if v.energy_source and v.energy_source.type and (v.energy_source.type == 'electric' or v.energy_source.type == 'void' or v.energy_source.type == 'burner') then
|
||||||
v.allow_custom_vectors = true
|
v.allow_custom_vectors = true
|
||||||
@@ -213,6 +252,7 @@ for _, v in pairs(data.raw['inserter']) do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MIG A 36 BASE VIRTUAL_SIGNAL
|
-- MIG A 36 BASE VIRTUAL_SIGNAL
|
||||||
local vir_sig = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
local vir_sig = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'
|
||||||
@@ -233,7 +273,7 @@ end
|
|||||||
data:extend(s)
|
data:extend(s)
|
||||||
|
|
||||||
-- MIG A 1 ELEVATED_RAILS ENTITY
|
-- MIG A 1 ELEVATED_RAILS ENTITY
|
||||||
if mods['elevated-rails'] and data.raw['electric-pole']['big-electric-pole'] then
|
if mods['elevated-rails'] and data.raw['electric-pole'] and data.raw['electric-pole']['big-electric-pole'] then
|
||||||
local entity = table.deepcopy(data.raw['electric-pole']['big-electric-pole'])
|
local entity = table.deepcopy(data.raw['electric-pole']['big-electric-pole'])
|
||||||
entity.name = 'rail-support-pole-electric'
|
entity.name = 'rail-support-pole-electric'
|
||||||
entity.hidden = true
|
entity.hidden = true
|
||||||
@@ -255,7 +295,7 @@ if mods['elevated-rails'] and data.raw['electric-pole']['big-electric-pole'] the
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MIG A 1 SPACE_AGE ENTITY
|
-- MIG A 1 SPACE_AGE ENTITY
|
||||||
if mods['space-age'] and data.raw['lightning-attractor']['lightning-rod'] then
|
if mods['space-age'] and data.raw['lightning-attractor'] and data.raw['lightning-attractor']['lightning-rod'] then
|
||||||
local entity = table.deepcopy(data.raw['lightning-attractor']['lightning-rod'])
|
local entity = table.deepcopy(data.raw['lightning-attractor']['lightning-rod'])
|
||||||
entity.name = 'rail-support-pole-lightning'
|
entity.name = 'rail-support-pole-lightning'
|
||||||
entity.enabled = false
|
entity.enabled = false
|
||||||
@@ -276,7 +316,7 @@ if mods['space-age'] and data.raw['lightning-attractor']['lightning-rod'] then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MIG A 1 BASE ENTITY,ITEM,RECIPE,RESEARCH_EFFECT
|
-- MIG A 1 BASE ENTITY,ITEM,RECIPE,RESEARCH_EFFECT
|
||||||
if data.raw['container']['steel-chest'] then
|
if data.raw['container'] and data.raw['container']['steel-chest'] then
|
||||||
local item = table.deepcopy(data.raw['item']['steel-chest'])
|
local item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||||
item.name = 'trash-chest'
|
item.name = 'trash-chest'
|
||||||
item.place_result = item.name
|
item.place_result = item.name
|
||||||
@@ -325,7 +365,7 @@ if data.raw['container']['steel-chest'] then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MIG A 1 BASE ENTITY,ITEM,RECIPE,RESEARCH_EFFECT
|
-- MIG A 1 BASE ENTITY,ITEM,RECIPE,RESEARCH_EFFECT
|
||||||
if data.raw['pipe']['pipe'] then
|
if data.raw['pipe'] and data.raw['pipe']['pipe'] then
|
||||||
local item = table.deepcopy(data.raw['item']['pipe'])
|
local item = table.deepcopy(data.raw['item']['pipe'])
|
||||||
item.name = 'trash-pipe'
|
item.name = 'trash-pipe'
|
||||||
item.place_result = item.name
|
item.place_result = item.name
|
||||||
@@ -374,7 +414,7 @@ if data.raw['pipe']['pipe'] then
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- MIG A 1 BASE ENTITY,ITEM,RECIPE
|
-- MIG A 1 BASE ENTITY,ITEM,RECIPE
|
||||||
if data.raw['boiler']['boiler'] then
|
if data.raw['boiler'] and data.raw['boiler']['boiler'] then
|
||||||
local item = table.deepcopy(data.raw['item']['boiler'])
|
local item = table.deepcopy(data.raw['item']['boiler'])
|
||||||
item.name = 'electric-boiler'
|
item.name = 'electric-boiler'
|
||||||
item.place_result = item.name
|
item.place_result = item.name
|
||||||
|
|||||||
Reference in New Issue
Block a user