mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-05-12 21:08:43 +09:00
.
This commit is contained in:
+11
-3
@@ -1,4 +1,12 @@
|
||||
local param = require 'config'
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
-- CT U 3 BASE ITEM
|
||||
-- CT A 3 BASE RECIPE
|
||||
@@ -49,7 +57,7 @@ if data.raw['radar']['radar'] then
|
||||
item.name = 'super-radar'
|
||||
item.place_result = item.name
|
||||
item.order = 'd[radar]-b[radar]'
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/radar.png', tint = param['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/radar.png', tint = mod_tint[8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
@@ -61,7 +69,7 @@ if data.raw['radar']['radar'] then
|
||||
entity.minable.result = item.name
|
||||
entity.max_distance_of_sector_revealed = 35
|
||||
entity.max_distance_of_nearby_sector_revealed = 35
|
||||
entity.pictures.layers[1].tint = param['tint'][8]
|
||||
entity.pictures.layers[1].tint = mod_tint[8]
|
||||
entity.localised_name = {'', {'name.super-entity'}, {'entity-name.radar'}}
|
||||
data:extend({entity})
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
-- GM-SAP C 1 SPACE_AGE RESOURCE
|
||||
if data.raw.resource['lithium-brine'] then
|
||||
data.raw.resource['lithium-brine'].infinite = true
|
||||
|
||||
@@ -0,0 +1,336 @@
|
||||
local items = {
|
||||
['space-age'] = {
|
||||
['PHI-VP'] = {
|
||||
['technology_reform'] = {
|
||||
['stack-inserter'] = {
|
||||
['prerequisites'] = {'bulk-inserter', 'chemical-science-pack', 'processing-unit'},
|
||||
['unit'] = {count = 800, time = 45, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}}}
|
||||
},
|
||||
['transport-belt-capacity-1'] = {
|
||||
['prerequisites'] = {'stack-inserter', 'logistics-3', 'production-science-pack', 'utility-science-pack'},
|
||||
['unit'] = {count = 1600, time = 45, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}}
|
||||
},
|
||||
['transport-belt-capacity-2'] = {
|
||||
['prerequisites'] = {'transport-belt-capacity-1', 'space-science-pack'},
|
||||
['unit'] = {count = 2400, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}, {'space-science-pack', 1}}}
|
||||
},
|
||||
['turbo-transport-belt'] = {
|
||||
['prerequisites'] = {'logistics-3', 'production-science-pack', 'utility-science-pack'},
|
||||
['unit'] = {count = 800, time = 45, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}}
|
||||
},
|
||||
['electromagnetic-plant'] = {
|
||||
['prerequisites'] = {'automation-3', 'processing-unit', 'utility-science-pack'},
|
||||
['unit'] = {count = 1000, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}},
|
||||
['effects'] = {{type = 'unlock-recipe', recipe = 'electromagnetic-plant'}}
|
||||
},
|
||||
['foundry'] = {
|
||||
['prerequisites'] = {'automation-3', 'advanced-material-processing-2', 'processing-unit', 'utility-science-pack'},
|
||||
['unit'] = {count = 1000, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}},
|
||||
['effects'] = {{type = 'unlock-recipe', recipe = 'foundry'}}
|
||||
},
|
||||
['cryogenic-plant'] = {
|
||||
['prerequisites'] = {'automation-3', 'coal-liquefaction', 'processing-unit', 'utility-science-pack'},
|
||||
['unit'] = {count = 1000, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}},
|
||||
['effects'] = {{type = 'unlock-recipe', recipe = 'cryogenic-plant'}}
|
||||
},
|
||||
['biolab'] = {
|
||||
['prerequisites'] = {'automation-3', 'processing-unit', 'utility-science-pack'},
|
||||
['unit'] = {count = 1000, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}, {'utility-science-pack', 1}}}
|
||||
},
|
||||
['speed-module-2'] = {
|
||||
['prerequisites'] = {'speed-module', 'processing-unit'},
|
||||
['unit'] = {count = 75, time = 30, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}}}
|
||||
},
|
||||
['speed-module-3'] = {
|
||||
['prerequisites'] = {'speed-module-2', 'production-science-pack'},
|
||||
['unit'] = {count = 300, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}}}
|
||||
},
|
||||
['productivity-module-2'] = {
|
||||
['prerequisites'] = {'productivity-module', 'processing-unit'},
|
||||
['unit'] = {count = 75, time = 30, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}}}
|
||||
},
|
||||
['productivity-module-3'] = {
|
||||
['prerequisites'] = {'productivity-module-2', 'production-science-pack'},
|
||||
['unit'] = {count = 300, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}}}
|
||||
},
|
||||
['efficiency-module-2'] = {
|
||||
['prerequisites'] = {'efficiency-module', 'processing-unit'},
|
||||
['unit'] = {count = 75, time = 30, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}}}
|
||||
},
|
||||
['efficiency-module-3'] = {
|
||||
['prerequisites'] = {'efficiency-module-2', 'production-science-pack'},
|
||||
['unit'] = {count = 300, time = 60, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}}}
|
||||
},
|
||||
['logistic-system'] = {
|
||||
['prerequisites'] = {'logistic-robotics', 'utility-science-pack'},
|
||||
['unit'] = {count = 500, time = 30, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'utility-science-pack', 1}}}
|
||||
},
|
||||
['effect-transmission'] = {
|
||||
['prerequisites'] = {'production-science-pack'},
|
||||
['unit'] = {count = 75, time = 30, ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}, {'chemical-science-pack', 1}, {'production-science-pack', 1}}}
|
||||
}
|
||||
},
|
||||
['technology'] = {
|
||||
['planet-discovery-vulcanus'] = true,
|
||||
['planet-discovery-gleba'] = true,
|
||||
['planet-discovery-fulgora'] = true,
|
||||
['planet-discovery-aquilo'] = true,
|
||||
['recycling'] = true,
|
||||
['lightning-collector'] = true,
|
||||
['tungsten-carbide'] = true,
|
||||
['tungsten-steel'] = true,
|
||||
['metallurgic-science-pack'] = true,
|
||||
['yumako'] = true,
|
||||
['jellynut'] = true,
|
||||
['bioflux'] = true,
|
||||
['artificial-soil'] = true,
|
||||
['overgrowth-soil'] = true,
|
||||
['bacteria-cultivation'] = true,
|
||||
['bioflux-processing'] = true,
|
||||
['agricultural-science-pack'] = true,
|
||||
['captivity'] = true,
|
||||
['biter-egg-handling'] = true,
|
||||
['carbon-fiber'] = true,
|
||||
['fish-breeding'] = true,
|
||||
['holmium-processing'] = true,
|
||||
['electromagnetic-science-pack'] = true,
|
||||
['rail-support-foundations'] = true,
|
||||
['lithium-processing'] = true,
|
||||
['quantum-processor'] = true,
|
||||
['cryogenic-science-pack'] = true,
|
||||
['captive-biter-spawner'] = true,
|
||||
['promethium-science-pack'] = true,
|
||||
['foundation'] = true,
|
||||
['scrap-recycling-productivity'] = true,
|
||||
['biochamber'] = true
|
||||
},
|
||||
['recipe'] = {
|
||||
['recycler'] = true,
|
||||
['lightning-collector'] = true,
|
||||
['lightning-rod'] = true,
|
||||
['agricultural-science-pack'] = true,
|
||||
['cryogenic-science-pack'] = true,
|
||||
['electromagnetic-science-pack'] = true,
|
||||
['metallurgic-science-pack'] = true,
|
||||
['promethium-science-pack'] = true,
|
||||
['space-science-pack'] = true,
|
||||
['burnt-spoilage'] = true,
|
||||
['fish-breeding'] = true,
|
||||
['nutrients-from-fish'] = true,
|
||||
['nutrients-from-biter-egg'] = true,
|
||||
['yumako-processing'] = true,
|
||||
['jellynut-processing'] = true,
|
||||
['copper-bacteria'] = true,
|
||||
['copper-bacteria-cultivation'] = true,
|
||||
['iron-bacteria'] = true,
|
||||
['iron-bacteria-cultivation'] = true,
|
||||
['nutrients-from-spoilage'] = true,
|
||||
['nutrients-from-yumako-mash'] = true,
|
||||
['nutrients-from-bioflux'] = true,
|
||||
['pentapod-egg'] = true,
|
||||
['rocket-fuel-from-jelly'] = true,
|
||||
['bioflux'] = true,
|
||||
['bioplastic'] = true,
|
||||
['biosulfur'] = true,
|
||||
['biolubricant'] = true,
|
||||
['carbon-fiber'] = true,
|
||||
['artificial-yumako-soil'] = true,
|
||||
['overgrowth-yumako-soil'] = true,
|
||||
['artificial-jellynut-soil'] = true,
|
||||
['overgrowth-jellynut-soil'] = true,
|
||||
['biochamber'] = true,
|
||||
['captive-biter-spawner'] = true,
|
||||
['capture-robot-rocket'] = true,
|
||||
['biter-egg'] = true,
|
||||
['spoilage-from-nutrients'] = true,
|
||||
['tungsten-carbide'] = true,
|
||||
['tungsten-plate'] = true,
|
||||
['coal-synthesis'] = true,
|
||||
['spoilage-recycling'] = true,
|
||||
['asteroid-collector'] = true,
|
||||
['ammoniacal-solution-separation'] = true,
|
||||
['lithium'] = true,
|
||||
['lithium-plate'] = true,
|
||||
['ice-platform'] = true,
|
||||
['solid-fuel-from-ammonia'] = true,
|
||||
['ammonia-rocket-fuel'] = true,
|
||||
['quantum-processor'] = true,
|
||||
['holmium-solution'] = true,
|
||||
['holmium-plate'] = true,
|
||||
['electrolyte'] = true,
|
||||
['supercapacitor'] = true,
|
||||
['superconductor'] = true,
|
||||
['molten-iron-from-lava'] = true,
|
||||
['molten-copper-from-lava'] = true,
|
||||
['molten-iron'] = true,
|
||||
['molten-copper'] = true,
|
||||
['casting-iron'] = true,
|
||||
['casting-steel'] = true,
|
||||
['casting-copper'] = true,
|
||||
['casting-iron-gear-wheel'] = true,
|
||||
['casting-iron-stick'] = true,
|
||||
['casting-pipe'] = true,
|
||||
['casting-pipe-to-ground'] = true,
|
||||
['casting-low-density-structure'] = true,
|
||||
['concrete-from-molten-iron'] = true,
|
||||
['casting-copper-cable'] = true,
|
||||
['acid-neutralisation'] = true,
|
||||
['simple-coal-liquefaction'] = true,
|
||||
['scrap-recycling'] = true,
|
||||
['foundation'] = true,
|
||||
['steam-condensation'] = true,
|
||||
},
|
||||
['item'] = {
|
||||
['artificial-yumako-soil'] = true,
|
||||
['overgrowth-yumako-soil'] = true,
|
||||
['artificial-jellynut-soil'] = true,
|
||||
['overgrowth-jellynut-soil'] = true,
|
||||
['recycler'] = true,
|
||||
['ice-platform'] = true,
|
||||
['foundation'] = true,
|
||||
['biochamber'] = true,
|
||||
['captive-biter-spawner'] = true,
|
||||
['tungsten-ore'] = true,
|
||||
['tungsten-carbide'] = true,
|
||||
['tungsten-plate'] = true,
|
||||
['scrap'] = true,
|
||||
['holmium-ore'] = true,
|
||||
['holmium-plate'] = true,
|
||||
['superconductor'] = true,
|
||||
['supercapacitor'] = true,
|
||||
['yumako-seed'] = true,
|
||||
['jellynut-seed'] = true,
|
||||
['iron-bacteria'] = true,
|
||||
['copper-bacteria'] = true,
|
||||
['spoilage'] = true,
|
||||
['nutrients'] = true,
|
||||
['carbon-fiber'] = true,
|
||||
['biter-egg'] = true,
|
||||
['pentapod-egg'] = true,
|
||||
['lithium'] = true,
|
||||
['lithium-plate'] = true,
|
||||
['quantum-processor'] = true,
|
||||
},
|
||||
['surface_conditions'] = {
|
||||
['captive-biter-spawner'] = 'assembling-machine',
|
||||
['agricultural-tower'] = 'agricultural-tower',
|
||||
['asteroid-collector'] = 'asteroid-collector',
|
||||
['rocket-silo'] = 'rocket-silo',
|
||||
['cargo-landing-pad'] = 'cargo-landing-pad',
|
||||
['heating-tower'] = 'reactor',
|
||||
['recycler'] = 'furnace',
|
||||
['fusion-reactor'] = 'fusion-reactor',
|
||||
['fusion-generator'] = 'fusion-generator',
|
||||
['thruster'] = 'thruster',
|
||||
['biochamber'] = 'assembling-machine',
|
||||
['crusher'] = 'assembling-machine',
|
||||
['cryogenic-plant'] = 'assembling-machine',
|
||||
['electromagnetic-plant'] = 'assembling-machine',
|
||||
['foundry'] = 'assembling-machine',
|
||||
['biolab'] = 'lab',
|
||||
['flamethrower-turret'] = 'fluid-turret',
|
||||
['stone-furnace'] = 'furnace',
|
||||
['steel-furnace'] = 'furnace',
|
||||
['burner-mining-drill'] = 'mining-drill',
|
||||
['burner-inserter'] = 'inserter',
|
||||
['boiler'] = 'boiler',
|
||||
['roboport'] = 'roboport',
|
||||
['car'] = 'car',
|
||||
['tank'] = 'car',
|
||||
['spidertron'] = 'spider-vehicle',
|
||||
['locomotive'] = 'locomotive',
|
||||
['cargo-wagon'] = 'cargo-wagon',
|
||||
['fluid-wagon'] = 'fluid-wagon',
|
||||
['artillery-wagon'] = 'artillery-wagon',
|
||||
['train-stop'] = 'train-stop',
|
||||
['rail-signal'] = 'rail-signal',
|
||||
['rail-chain-signal'] = 'rail-chain-signal',
|
||||
['legacy-curved-rail'] = 'legacy-curved-rail',
|
||||
['legacy-straight-rail'] = 'legacy-straight-rail',
|
||||
['curved-rail-a'] = 'curved-rail-a',
|
||||
['curved-rail-b'] = 'curved-rail-b',
|
||||
['half-diagonal-rail'] = 'half-diagonal-rail',
|
||||
['straight-rail'] = 'straight-rail',
|
||||
['rail-ramp'] = 'rail-ramp',
|
||||
['elevated-straight-rail'] = 'elevated-straight-rail',
|
||||
['elevated-half-diagonal-rail'] = 'elevated-half-diagonal-rail',
|
||||
['elevated-curved-rail-a'] = 'elevated-curved-rail-a',
|
||||
['elevated-curved-rail-b'] = 'elevated-curved-rail-b',
|
||||
['rail-support'] = 'rail-support',
|
||||
['wooden-chest'] = 'container',
|
||||
['iron-chest'] = 'container',
|
||||
['steel-chest'] = 'container',
|
||||
['passive-provider-chest'] = 'logistic-container',
|
||||
['active-provider-chest'] = 'logistic-container',
|
||||
['storage-chest'] = 'logistic-container',
|
||||
['buffer-chest'] = 'logistic-container',
|
||||
['requester-chest'] = 'logistic-container'
|
||||
},
|
||||
['hidden_data'] = {
|
||||
['biochamber'] = 'assembling-machine',
|
||||
['captive-biter-spawner'] = 'assembling-machine',
|
||||
['lightning-rod']= 'lightning-attractor',
|
||||
['lightning-collector'] = 'lightning-attractor',
|
||||
['fulgoran-ruin-attractor'] = 'lightning-attractor',
|
||||
['recycler'] = 'furnace',
|
||||
['yumako-tree'] = 'plant',
|
||||
['jellystem'] = 'plant',
|
||||
['lightning'] = 'lightning',
|
||||
['agricultural-science-pack'] = 'tool',
|
||||
['cryogenic-science-pack'] = 'tool',
|
||||
['electromagnetic-science-pack'] = 'tool',
|
||||
['metallurgic-science-pack'] = 'tool'
|
||||
},
|
||||
['technology_vp'] = {
|
||||
['space-platform-thruster'] = true,
|
||||
['space-platform'] = true,
|
||||
['asteroid-reprocessing'] = true,
|
||||
['advanced-asteroid-processing'] = true,
|
||||
['asteroid-productivity'] = true,
|
||||
['calcite-processing'] = true,
|
||||
},
|
||||
['recipe_vp'] = {
|
||||
['thruster'] = true,
|
||||
['thruster-fuel'] = true,
|
||||
['thruster-oxidizer'] = true,
|
||||
['advanced-thruster-fuel'] = true,
|
||||
['advanced-thruster-oxidizer'] = true,
|
||||
['metallic-asteroid-crushing'] = true,
|
||||
['carbonic-asteroid-crushing'] = true,
|
||||
['oxide-asteroid-crushing'] = true,
|
||||
['advanced-metallic-asteroid-crushing'] = true,
|
||||
['advanced-carbonic-asteroid-crushing'] = true,
|
||||
['advanced-oxide-asteroid-crushing'] = true,
|
||||
['metallic-asteroid-reprocessing'] = true,
|
||||
['carbonic-asteroid-reprocessing'] = true,
|
||||
['oxide-asteroid-reprocessing'] = true,
|
||||
['space-platform-foundation'] = true,
|
||||
['space-platform-starter-pack'] = true,
|
||||
['space-science-pack'] = true,
|
||||
['carbon'] = true,
|
||||
['ice-melting'] = true,
|
||||
['crusher'] = true,
|
||||
},
|
||||
['item_vp'] = {
|
||||
['ice'] = true,
|
||||
['carbon'] = true,
|
||||
['calcite'] = true,
|
||||
['space-platform-foundation'] = true,
|
||||
['asteroid-collector'] = true,
|
||||
['crusher'] = true,
|
||||
['thruster'] = true,
|
||||
['space-platform-hub'] = true,
|
||||
},
|
||||
['hidden_data_vp'] = {
|
||||
['thruster'] = 'thruster',
|
||||
['crusher'] = 'assembling-machine',
|
||||
['asteroid-collector'] = 'asteroid-collector',
|
||||
['space-platform-hub'] = 'space-platform-hub',
|
||||
['space-platform-starter-pack'] = 'space-platform-starter-pack',
|
||||
['space-platform'] = 'surface',
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return items
|
||||
+12
-3
@@ -1,4 +1,13 @@
|
||||
local items = require 'config'
|
||||
local items = require 'gm-vp-c'
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
if not mods['space-age'] then
|
||||
return
|
||||
@@ -507,7 +516,7 @@ local item = table.deepcopy(data.raw['item']['steel-chest'])
|
||||
item.name = 'proxy-cargo-landing-chest'
|
||||
item.place_result = item.name
|
||||
item.order = 'c[cargo-landing-pad]-2'
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/cargo-landing-pad.png', tint = items['tint'][5], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/cargo-landing-pad.png', tint = mod_tint[5], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
@@ -519,7 +528,7 @@ local entity = table.deepcopy(data.raw['container']['steel-chest'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.type = 'proxy-container'
|
||||
entity.picture.layers[1].tint = items['tint'][5]
|
||||
entity.picture.layers[1].tint = mod_tint[5]
|
||||
entity.flags = {'placeable-player', 'player-creation', 'no-automated-item-insertion', 'hide-alt-info'}
|
||||
entity.localised_name = {'phi-cl.combine', {'entity-name.cargo-landing-pad'}, ' (II)'}
|
||||
entity.localised_description = {'entity-description.cargo-landing-pad'}
|
||||
|
||||
+15
-5
@@ -1,4 +1,14 @@
|
||||
local items = require 'config'
|
||||
|
||||
local mod_graphic_location = '__PHI-CL__/graphics/'
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
-- GM C 1 SPACE_AGE ENTITY
|
||||
if data.raw['cargo-bay'] and data.raw['cargo-bay']['cargo-bay'] then
|
||||
@@ -143,7 +153,7 @@ end
|
||||
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.icon = mod_graphic_location .. 'battery.png'
|
||||
item.order = 'qa'
|
||||
item.stack_size = 100
|
||||
item.localised_name = {'name.empty-train-battery'}
|
||||
@@ -155,7 +165,7 @@ if data.raw.item['depleted-uranium-fuel-cell'] and data.raw.item['nuclear-fuel']
|
||||
name = 'empty-train-battery',
|
||||
energy_required = 30,
|
||||
enabled = true,
|
||||
icon = items['general']['graphics_location'] .. 'battery.png',
|
||||
icon = mod_graphic_location .. 'battery.png',
|
||||
icon_size = 64,
|
||||
subgroup = 'intermediate-product',
|
||||
order = 'zc',
|
||||
@@ -171,7 +181,7 @@ if data.raw.item['depleted-uranium-fuel-cell'] and 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.icon = mod_graphic_location .. 'battery.png'
|
||||
item.stack_size = 10
|
||||
item.localised_name = {'name.charged-train-battery'}
|
||||
item.localised_description = {'description.charged-train-battery'}
|
||||
@@ -182,7 +192,7 @@ if data.raw.item['depleted-uranium-fuel-cell'] and data.raw.item['nuclear-fuel']
|
||||
name = 'charged-train-battery',
|
||||
energy_required = 60,
|
||||
enabled = true,
|
||||
icon = items['general']['graphics_location'] .. 'battery.png',
|
||||
icon = mod_graphic_location .. 'battery.png',
|
||||
icon_size = 64,
|
||||
subgroup = 'intermediate-product',
|
||||
order = 'zd',
|
||||
|
||||
@@ -0,0 +1,436 @@
|
||||
local research_modifier = {
|
||||
['ammo-turret'] = {
|
||||
'physical-projectile-damage-1',
|
||||
'physical-projectile-damage-2',
|
||||
'physical-projectile-damage-3',
|
||||
'physical-projectile-damage-4',
|
||||
'physical-projectile-damage-5',
|
||||
'physical-projectile-damage-6',
|
||||
'physical-projectile-damage-7'
|
||||
},
|
||||
['fluid-turret'] = {
|
||||
'refined-flammables-1',
|
||||
'refined-flammables-2',
|
||||
'refined-flammables-3',
|
||||
'refined-flammables-4',
|
||||
'refined-flammables-5',
|
||||
'refined-flammables-6',
|
||||
'refined-flammables-7'
|
||||
}
|
||||
}
|
||||
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
local main = {}
|
||||
|
||||
local function tint_handle(item, tier, tl)
|
||||
for _, ve in pairs(tl) do
|
||||
if item[ve] then
|
||||
for _, tc in pairs({'layers', 'sheets', 'structure', 'frames'}) do
|
||||
if item[ve][tc] and type(item[ve][tc]) == 'table' then
|
||||
for _, v2 in pairs(item[ve][tc]) do
|
||||
v2.tint = mod_tint[tier]
|
||||
|
||||
if v2.frames then
|
||||
for _, v3 in pairs(v2.frames) do
|
||||
v3.tint = mod_tint[tier]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
item[ve].tint = mod_tint[tier]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- entity
|
||||
function main.EEE(source, tier)
|
||||
local item = table.deepcopy(data.raw[source.type][source.ref_name])
|
||||
item.name = source.name .. '-' .. tier
|
||||
item.minable.result = item.name
|
||||
item.max_health = item.max_health * (tier - source.min + 2)
|
||||
item.next_upgrade = ((tier < source.max) and source.name .. '-' .. (tier + 1)) or nil
|
||||
item.production = item.production and (((source.tech == 'compound-energy' and source.type == 'solar-panel') and (tonumber(string.match(item.production, '[%d%.]+')) * (settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value ^ (tier - source.min + 1)) .. (string.match(item.production, '%a+') or ''))) or (tonumber(string.match(item.production, '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. (string.match(item.production, '%a+') or ''))) or nil
|
||||
|
||||
for _, v in pairs({'researching_speed', 'mining_speed', 'crafting_speed'}) do
|
||||
if item[v] then
|
||||
item[v] = tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs({'energy_usage', 'heating_energy', 'crane_energy_usage', 'energy_per_shot'}) do
|
||||
if not (source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and item[v] then
|
||||
item[v] = (tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. (string.match(item[v], '%a+') or '')
|
||||
end
|
||||
end
|
||||
|
||||
if item.energy_source then
|
||||
for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do
|
||||
if not (source.tech == 'compound-energy' and (source.type == 'solar-panel' or source.type == 'accumulator')) and item[v] then
|
||||
item.energy_source[v] = tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+')
|
||||
end
|
||||
end
|
||||
|
||||
if item.energy_source.emissions_per_minute then
|
||||
local m = ((source.tech == 'compound-energy' and ((source.type == 'boiler') or (source.name == 'kr-gas-power-station'))) and (tier - source.min + 2)) or (2 ^ (tier - source.min + 1))
|
||||
|
||||
for k, _ in pairs(item.energy_source.emissions_per_minute) do
|
||||
item.energy_source.emissions_per_minute[k] = item.energy_source.emissions_per_minute[k] * (tier - source.min + 2)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (source.type == 'electric-turret') or (source.type == 'ammo-turret') or (source.type == 'fluid-turret') then
|
||||
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))
|
||||
item.attack_parameters.cooldown = (item.attack_parameters.cooldown and (item.attack_parameters.cooldown * ((24 - tier + source.min) / 25))) or nil
|
||||
end
|
||||
|
||||
item.call_for_help_radius = (item.call_for_help_radius and (item.call_for_help_radius + (2 * (tier - source.min + 1)))) or nil
|
||||
|
||||
if source.type == 'electric-turret' then
|
||||
item.glow_light_intensity = 1
|
||||
|
||||
if item.attack_parameters then
|
||||
item.attack_parameters.damage_modifier = (item.attack_parameters.damage_modifier and (item.attack_parameters.damage_modifier * 2)) or nil
|
||||
|
||||
if item.attack_parameters.ammo_type then
|
||||
item.attack_parameters.ammo_type.action.action_delivery.max_length = ((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) and (item.attack_parameters.ammo_type.action.action_delivery.max_length + (2 * (tier - source.min + 1)))) or nil
|
||||
item.attack_parameters.ammo_type.energy_consumption = (item.attack_parameters.ammo_type.energy_consumption and (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+'))) or nil
|
||||
end
|
||||
end
|
||||
|
||||
elseif source.type == 'fluid-turret' then
|
||||
item.prepare_range = item.prepare_range + (2 * (tier - source.min + 1))
|
||||
end
|
||||
end
|
||||
|
||||
if source.tech == 'compound-energy' then
|
||||
if mods['space-age'] and (not (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value == 'VP')) then
|
||||
if not item.surface_conditions then
|
||||
item.surface_conditions = {}
|
||||
end
|
||||
|
||||
table.insert(item.surface_conditions, {property = 'gravity', min = 0.01})
|
||||
end
|
||||
|
||||
if (source.type == 'accumulator') and item['chargable_graphics'] then
|
||||
if item['chargable_graphics']['picture'].layers and item['chargable_graphics']['picture'].layers[1] then
|
||||
item['chargable_graphics']['picture'].layers[1].tint = mod_tint[tier]
|
||||
end
|
||||
|
||||
for _, v in pairs({item['chargable_graphics']['charge_animation'], item['chargable_graphics']['discharge_animation']}) do
|
||||
if v.layers and v.layers[1] and v.layers[1].layers and v.layers[1].layers[1] then
|
||||
v.layers[1].layers[1].tint = mod_tint[tier]
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do
|
||||
item.energy_source[v] = (item.energy_source[v] and (tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value ^ (tier - source.min + 1)) .. string.match(item.energy_source[v], '%a+'))) or nil
|
||||
end
|
||||
|
||||
elseif (source.type == 'boiler') then
|
||||
item.energy_consumption = tostring(tonumber(string.match(item.energy_consumption, '[%d%.]+')) * tier) .. string.match(item.energy_consumption, '%a+')
|
||||
item.target_temperature = 15 + ((item.target_temperature - 15) * tier)
|
||||
|
||||
if (source.name == 'heat-exchanger') then
|
||||
item.energy_source.min_working_temperature = 15 + ((item.energy_source.min_working_temperature - 15) * tier)
|
||||
item.energy_source.max_temperature = item.energy_source.max_temperature * tier
|
||||
item.energy_source.max_transfer = tostring(tonumber(string.match(item.energy_source.max_transfer, '[%d%.]+')) * tier) .. string.match(item.energy_source.max_transfer, '%a+')
|
||||
end
|
||||
|
||||
elseif (source.type == 'generator') then
|
||||
item.max_power_output = (item.max_power_output and (tonumber(string.match(item.max_power_output, '[%d%.]+')) * (tier - source.min + 2)) .. string.match(item.max_power_output, '%a+')) or nil
|
||||
item.maximum_temperature = (item.maximum_temperature and 15 + ((item.maximum_temperature - 15) * tier)) or nil
|
||||
|
||||
elseif (source.type == 'reactor') then
|
||||
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+')
|
||||
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * tier
|
||||
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * tier) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
||||
tint_handle(item, tier, {'connection_patches_connected', 'connection_patches_disconnected', 'heat_connection_patches_connected', 'heat_connection_patches_disconnected', 'lower_layer_picture'})
|
||||
|
||||
elseif (source.type == 'fusion-reactor') then
|
||||
item.power_input = tostring(tonumber(string.match(item.power_input, '[%d%.]+')) * tier) .. string.match(item.power_input, '%a+')
|
||||
item.max_fluid_usage = item.max_fluid_usage * tier
|
||||
|
||||
elseif (source.type == 'fusion-generator') then
|
||||
item.energy_source.output_flow_limit = tostring(tonumber(string.match(item.energy_source.output_flow_limit, '[%d%.]+')) * tier) .. string.match(item.energy_source.output_flow_limit, '%a+')
|
||||
item.max_fluid_usage = item.max_fluid_usage * tier
|
||||
|
||||
elseif (source.type == 'heat-pipe') then
|
||||
item.heat_buffer.max_temperature = item.heat_buffer.max_temperature * tier
|
||||
item.heat_buffer.max_transfer = tostring(tonumber(string.match(item.heat_buffer.max_transfer, '[%d%.]+')) * tier) .. string.match(item.heat_buffer.max_transfer, '%a+')
|
||||
tint_handle(item, tier, {'connection_sprites', 'heat_glow_sprites'})
|
||||
end
|
||||
end
|
||||
|
||||
if (source.type == 'lab') then
|
||||
for _, v in pairs({{['a'] = 'on_animation', ['n'] = 3}, {['a'] = 'off_animation', ['n'] = 2}}) do
|
||||
if item[v['a']] and item[v['a']].layers then
|
||||
for i=1, v['n'], 1 do
|
||||
if item[v['a']].layers[i] then
|
||||
item[v['a']].layers[i].tint = mod_tint[tier]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif (source.type == 'mining-drill') then
|
||||
for _, e in pairs({'graphics_set', 'wet_mining_graphics_set'}) do
|
||||
if item[e] and item[e].animation then
|
||||
for _, d in pairs(item[e].animation) do
|
||||
if d.layers then
|
||||
d.layers[1].tint = mod_tint[tier]
|
||||
d.layers[2].tint = mod_tint[tier]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
elseif source.type == 'radar' then
|
||||
item.max_distance_of_sector_revealed = item.max_distance_of_sector_revealed + (2 * (tier - source.min + 1))
|
||||
item.max_distance_of_nearby_sector_revealed = item.max_distance_of_nearby_sector_revealed + (2 * (tier - source.min + 1))
|
||||
|
||||
elseif source.type == 'thruster' then
|
||||
for _, v in pairs({'min_performance', 'max_performance'}) do
|
||||
item[v].fluid_usage = (item[v].fluid_usage and item[v].fluid_usage * (2 ^ (tier - source.min + 1))) or nil
|
||||
end
|
||||
|
||||
elseif source.type == 'reactor' and source.name == 'heating-tower' then
|
||||
item.consumption = tostring(tonumber(string.match(item.consumption, '[%d%.]+')) * tier) .. string.match(item.consumption, '%a+')
|
||||
|
||||
elseif source.type == 'agricultural-tower' then
|
||||
item.radius = item.radius + (1 * (tier - source.min + 1))
|
||||
end
|
||||
|
||||
tint_handle(item, tier, {'picture', 'pictures', 'animation', 'structure', 'integration_patch', 'horizontal_animation', 'vertical_animation'})
|
||||
|
||||
for _, v in pairs({'graphics_set', 'graphics_set_flipped'}) do
|
||||
if item[v] then
|
||||
tint_handle(item[v], tier, {'animation', 'idle_animation', 'frozen_patch'})
|
||||
|
||||
if item[v].working_visualisations then
|
||||
tint_handle(item[v].working_visualisations, tier, {'north_animation', 'east_animation', 'south_animation', 'west_animation', 'animation'})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if item.idle_animation and item.idle_animation.layers then
|
||||
local i = 1
|
||||
|
||||
while i < #item.idle_animation.layers do
|
||||
if item.idle_animation.layers[i] then
|
||||
item.idle_animation.layers[i].tint = mod_tint[tier]
|
||||
end
|
||||
|
||||
i = i + 2
|
||||
|
||||
if not item.idle_animation.layers[i] then
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if item.base_picture and item.base_picture.sheets then
|
||||
item.base_picture.sheets[1].tint = mod_tint[tier]
|
||||
end
|
||||
|
||||
item.localised_name = (tier > 1 and {'phi-cl.combine', {'?', {'entity-name.' .. source.ref_name}, {'name.' .. source.ref_name}}, tostring(tier)}) or {'?', {'entity-name.' .. source.ref_name}, {'name.' .. source.ref_name}}
|
||||
item.localised_description = {'?', {'entity-description.' .. source.ref_name}, {'description.' .. source.ref_name}}
|
||||
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
-- equipment
|
||||
function main.EEQ(source, tier)
|
||||
local item = table.deepcopy(data.raw[source.type][source.ref_name])
|
||||
item.name = source.name .. '-mk' .. tier .. '-equipment'
|
||||
item.take_result = item.name
|
||||
|
||||
for _, v in pairs({'power', 'energy_consumption', 'energy_input', 'charging_energy'}) do
|
||||
item[v] = (item[v] and tostring(tonumber(string.match(item[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item[v], '%a+')) or nil
|
||||
end
|
||||
|
||||
if item.energy_source then
|
||||
for _, v in pairs({'buffer_capacity', 'input_flow_limit', 'output_flow_limit'}) do
|
||||
item.energy_source[v] = (item.energy_source[v] and tostring(tonumber(string.match(item.energy_source[v], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.energy_source[v], '%a+')) or nil
|
||||
end
|
||||
end
|
||||
|
||||
for _, v in pairs({'max_shield_value', 'movement_bonus', 'inventory_size_bonus'}) do
|
||||
item[v] = (item[v] and item[v] * (2 ^ (tier - source.min + 1))) or nil
|
||||
end
|
||||
|
||||
if item.darkness_to_turn_on and item.color_lookup then
|
||||
item.darkness_to_turn_on = 0
|
||||
item.color_lookup = {{0, '__core__/graphics/color_luts/lut-sunset.png'}}
|
||||
end
|
||||
|
||||
if item.attack_parameters then
|
||||
item.attack_parameters.cooldown = (item.attack_parameters.cooldown and item.attack_parameters.cooldown * ((24 - tier + source.min) / 25)) or nil
|
||||
item.attack_parameters.damage_modifier = (item.attack_parameters.damage_modifier and item.attack_parameters.damage_modifier * (2 ^ (tier - source.min + 1))) or nil
|
||||
item.attack_parameters.range = (item.attack_parameters.range and item.attack_parameters.range + (tier - source.min + 1)) or nil
|
||||
|
||||
if item.attack_parameters.ammo_type then
|
||||
item.attack_parameters.ammo_type.energy_consumption = (item.attack_parameters.ammo_type.energy_consumption and tostring(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+')) or nil
|
||||
|
||||
if item.attack_parameters.ammo_type.action_delivery then
|
||||
item.attack_parameters.ammo_type.action_delivery.max_length = item.attack_parameters.ammo_type.action_delivery.max_length + (tier - source.min + 1)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if item.sprite then
|
||||
item.sprite.tint = mod_tint[tier]
|
||||
end
|
||||
|
||||
item.localised_name = (tier > 1 and {'phi-cl.combine', {'?', {'equipment-name.' .. source.ref_name}, {'name.' .. source.ref_name}}, tostring(tier)}) or {'?', {'equipment-name.' .. source.ref_name}, {'name.' .. source.ref_name}}
|
||||
item.localised_description = {'?', {'equipment-description.' .. source.ref_name}, {'description.' .. source.ref_name}}
|
||||
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
-- item
|
||||
function main.EI(source, tier)
|
||||
local item = table.deepcopy(data.raw.item[source.ref_name])
|
||||
item.name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. ((tier > 1 and '-' .. tier) or ''))
|
||||
item[(source.category == 'equipment' and 'place_as_equipment_result') or 'place_result'] = item.name
|
||||
|
||||
if item.icons and item.icons[1] then
|
||||
item.icons[1].tint = mod_tint[tier]
|
||||
|
||||
elseif item.icon then
|
||||
item.icons = {{icon = item.icon, tint = mod_tint[tier]}}
|
||||
item.icon = nil
|
||||
|
||||
if item.icon_size then
|
||||
item.icons[1].icon_size = item.icon_size
|
||||
item.icon_size = nil
|
||||
end
|
||||
end
|
||||
|
||||
item.order = item.order .. tier
|
||||
item.localised_name = (tier > 1 and {'phi-cl.combine', {'?', {'entity-name.' .. source.ref_name}, {'equipment-name.' .. source.ref_name}, {'item-name.' .. source.ref_name}, {'name.' .. source.ref_name}}, tostring(tier)}) or {'?', {'entity-name.' .. source.ref_name}, {'equipment-name.' .. source.ref_name}, {'item-name.' .. source.ref_name}, {'name.' .. source.ref_name}}
|
||||
item.localised_description = {'?', {'entity-description.' .. source.ref_name}, {'equipment-description.' .. source.ref_name}, {'item-description.' .. source.ref_name}, {'description.' .. source.ref_name}}
|
||||
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
-- recipe
|
||||
function main.ER(source, tier)
|
||||
local icons = {{icon = data.raw.item[source.ref_name].icon, tint = mod_tint[tier]}}
|
||||
local result_name = source.name .. ((source.category == 'equipment' and ('-mk' .. tier .. '-equipment')) or ('-' .. tier))
|
||||
local ingredients = {}
|
||||
local ingredient_name
|
||||
|
||||
if source.category == 'equipment' then
|
||||
ingredient_name = (tier == source.min and source.ref_name) or (source.name .. '-mk' .. (tier - 1) .. '-equipment')
|
||||
|
||||
else
|
||||
ingredient_name = (tier > source.min and (source.name .. '-' .. (tier - 1))) or source.ref_name
|
||||
end
|
||||
|
||||
if source.tech == 'compound-energy' then
|
||||
if source.type == 'solar-panel' or source.type == 'accumulator' then
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = tonumber(settings.startup['PHI-MB-ENERGY-SOLAR-RATIO'].value) or 4})
|
||||
|
||||
else
|
||||
if tier > source.min then
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = 1})
|
||||
table.insert(ingredients, {type = 'item', name = source.ref_name, amount = 1})
|
||||
|
||||
|
||||
else
|
||||
table.insert(ingredients, {type = 'item', name = source.ref_name, amount = 2})
|
||||
end
|
||||
end
|
||||
|
||||
else
|
||||
table.insert(ingredients, {type = 'item', name = ingredient_name, amount = 2})
|
||||
end
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = result_name,
|
||||
icons = icons,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = ingredients,
|
||||
results = {{type = 'item', name = result_name, amount = 1}},
|
||||
main_product = result_name,
|
||||
localised_name = {'?', data.raw[source.type][result_name].localised_name, ''},
|
||||
localised_description = {'?', data.raw[source.type][result_name].localised_description, ''}
|
||||
}})
|
||||
end
|
||||
|
||||
-- technology
|
||||
function main.ET(source, tier)
|
||||
if (source.tech == 'compound-energy') then
|
||||
table.insert(data.raw.technology['compound-energy-' .. (tier - 1)].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier})
|
||||
|
||||
elseif data.raw.technology[source.tech] then
|
||||
local recipe_name = (source.category == 'equipment' and (source.name .. '-mk' .. tier .. '-equipment')) or (source.name .. '-' .. tier)
|
||||
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=recipe_name})
|
||||
|
||||
if source.type == 'ammo-turret' or source.type == 'fluid-turret' then
|
||||
for i=1, #research_modifier[source.type], 1 do
|
||||
for j=1, #data.raw.technology[research_modifier[source.type][i]].effects, 1 do
|
||||
if (data.raw.technology[research_modifier[source.type][i]].effects[j].type == 'turret-attack') then
|
||||
if (data.raw.technology[research_modifier[source.type][i]].effects[j].turret_id == source.ref_name) then
|
||||
table.insert(data.raw.technology[research_modifier[source.type][i]].effects, {type='turret-attack', turret_id=source.name .. '-' .. tier, modifier=data.raw.technology[research_modifier[source.type][i]].effects[j].modifier})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- fast replace group
|
||||
function main.EL(source)
|
||||
if not data.raw[source.type][source.ref_name].fast_replaceable_group then
|
||||
data.raw[source.type][source.ref_name].fast_replaceable_group = source.ref_name
|
||||
end
|
||||
|
||||
if source.max > 2 then
|
||||
data.raw[source.type][source.name .. '-' .. 2].fast_replaceable_group = data.raw[source.type][source.ref_name].fast_replaceable_group
|
||||
end
|
||||
|
||||
if source.max > source.min then
|
||||
for j=source.min + 1, source.max do
|
||||
data.raw[source.type][source.name .. '-' .. j].fast_replaceable_group = data.raw[source.type][source.name .. '-' .. (j - 1)].fast_replaceable_group
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- entity category
|
||||
function main.EEEC(source, tier)
|
||||
local item_name = source.name .. '-' .. tier
|
||||
|
||||
if not (data.raw[source.type][source.ref_name] and data.raw[source.type][item_name]) then
|
||||
return
|
||||
end
|
||||
|
||||
if data.raw[source.type][source.ref_name].crafting_categories and data.raw[source.type][item_name].crafting_categories then
|
||||
data.raw[source.type][item_name].crafting_categories = {table.unpack(data.raw[source.type][source.ref_name].crafting_categories)}
|
||||
end
|
||||
|
||||
if data.raw[source.type][source.ref_name].resource_categories and data.raw[source.type][item_name].resource_categories then
|
||||
data.raw[source.type][item_name].resource_categories = {table.unpack(data.raw[source.type][source.ref_name].resource_categories)}
|
||||
end
|
||||
|
||||
data.raw[source.type][item_name].fuel_categories = (data.raw[source.type][source.ref_name].fuel_categories and table.deepcopy(data.raw[source.type][source.ref_name].fuel_categories)) or nil
|
||||
data.raw[source.type][item_name].allowed_effects = (data.raw[source.type][source.ref_name].allowed_effects and table.deepcopy(data.raw[source.type][source.ref_name].allowed_effects)) or nil
|
||||
end
|
||||
|
||||
return main
|
||||
+11
-2
@@ -1,7 +1,16 @@
|
||||
local param = require 'config'
|
||||
local main = require 'main'
|
||||
local items = require 'mbe-c'
|
||||
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
-- MBE C 1 BASE FLUID
|
||||
data.raw['fluid']['steam'].max_temperature = ((settings.startup['PHI-MB-ENERGY-POWER-TIER'].value > 1) and 5000) or data.raw['fluid']['steam'].max_temperature
|
||||
|
||||
@@ -15,7 +24,7 @@ for i = 1, 7 do
|
||||
effects = {},
|
||||
upgrade = true,
|
||||
unit = {count = math.floor(125 * (i ^ 2)), ingredients = {{'automation-science-pack', 1}, {'logistic-science-pack', 1}}, time = 30},
|
||||
icons = {{icon = '__base__/graphics/technology/solar-energy.png', icon_size = 256, tint = param['tint'][i]}},
|
||||
icons = {{icon = '__base__/graphics/technology/solar-energy.png', icon_size = 256, tint = mod_tint[i]}},
|
||||
order = 'a-h-' .. i,
|
||||
localised_name = {'phi-cl.combine', {'technology-name.compound-energy'}, tostring(i)},
|
||||
localised_description = {'technology-description.compound-energy'}
|
||||
|
||||
+11
-3
@@ -1,6 +1,14 @@
|
||||
local param = require 'config'
|
||||
local main = require 'main'
|
||||
local items = require 'mbq-c'
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
|
||||
-- MBQ A 1 ARMOR_GRID
|
||||
@@ -13,7 +21,7 @@ if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
|
||||
-- MBQ A 1 ARMOR
|
||||
local armor = table.deepcopy(data.raw['armor']['power-armor-mk2'])
|
||||
armor.name = 'power-armor-mk3'
|
||||
armor.icons = {{icon = armor.icon, tint = param['tint'][2], icon_size = armor.icon_size}}
|
||||
armor.icons = {{icon = armor.icon, tint = mod_tint[2], icon_size = armor.icon_size}}
|
||||
armor.icon = nil
|
||||
armor.icon_size = nil
|
||||
|
||||
@@ -54,7 +62,7 @@ if settings.startup['PHI-MB-EQUIPMENT-ARMOR'].value then
|
||||
-- MBQ A 1 ARMOR
|
||||
armor = table.deepcopy(data.raw['armor']['mech-armor'])
|
||||
armor.name = 'mech-armor-mk2'
|
||||
armor.icons = {{icon = armor.icon, tint = param['tint'][2], icon_size = armor.icon_size}}
|
||||
armor.icons = {{icon = armor.icon, tint = mod_tint[2], icon_size = armor.icon_size}}
|
||||
armor.icon = nil
|
||||
armor.icon_size = nil
|
||||
|
||||
|
||||
+22
-13
@@ -1,4 +1,13 @@
|
||||
local items = require 'config'
|
||||
local mod_graphic_location = '__PHI-CL__/graphics/'
|
||||
local mod_tint = {
|
||||
[2] = {r=140, g=142, b=200},
|
||||
[3] = {r=242, g=161, b=26},
|
||||
[4] = {r=255, g=254, b=42},
|
||||
[5] = {r=54, g=228, b=255},
|
||||
[6] = {r=253, g=0, b=97},
|
||||
[7] = {r=0, g=209, b=102},
|
||||
[8] = {r=233, g=63, b=233}
|
||||
}
|
||||
|
||||
-- MIG C 1 BASE ARMOR_EQUIPMENT
|
||||
data.raw['active-defense-equipment']['discharge-defense-equipment'].automatic = true
|
||||
@@ -72,7 +81,7 @@ if data.raw['offshore-pump']['offshore-pump'] then
|
||||
item.name = 'super-pump'
|
||||
item.place_result = item.name
|
||||
item.order = 'b[fluids]-a[super-pump]-o'
|
||||
item.icons = {{icon = '__base__/graphics/icons/offshore-pump.png', tint = items['tint'][2], icon_size = 64, icon_mipmaps = 4}}
|
||||
item.icons = {{icon = '__base__/graphics/icons/offshore-pump.png', tint = mod_tint[2], icon_size = 64, icon_mipmaps = 4}}
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
@@ -132,8 +141,8 @@ end
|
||||
|
||||
-- MIG C 3 BASE MODULE
|
||||
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'].effect.consumption)
|
||||
data.raw['module']['efficiency-module-3'].effect.consumption = math.min(-0.9, 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)
|
||||
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
|
||||
data.raw.recipe['landfill'].ingredients[1].amount = math.min(20, data.raw.recipe['landfill'].ingredients[1].amount)
|
||||
@@ -154,12 +163,12 @@ for _, v in pairs(data.raw.fluid) do
|
||||
enabled = false,
|
||||
hidden = true,
|
||||
ingredients = {},
|
||||
results = {{type = 'fluid', name = v.name, amount = 12000, temperature = v.default_temperature}},
|
||||
results = {{type = 'fluid', name = v.name, amount = 12000, temperature = v.default_temperature or 15}},
|
||||
main_product = v.name,
|
||||
hide_from_player_crafting = true,
|
||||
hidden_in_factoriopedia = true,
|
||||
allow_productivity = false,
|
||||
crafting_machine_tint = {primary = v.flow_color},
|
||||
crafting_machine_tint = {primary = v.flow_color or {r = 255,g = 255,b = 255}},
|
||||
localised_name = {'fluid-name.' .. v.name}
|
||||
}})
|
||||
end
|
||||
@@ -192,7 +201,7 @@ for i = 1, #vir_sig do
|
||||
table.insert(s, {
|
||||
type = 'virtual-signal',
|
||||
name = 'signal-' .. char .. 'A',
|
||||
icon = items['general']['graphics_location'] .. 'signal/signal_' .. char .. '.png',
|
||||
icon = mod_graphic_location .. 'signal/signal_' .. char .. '.png',
|
||||
subgroup = (i < 11 and 'virtual-signal-number') or 'virtual-signal-letter',
|
||||
order = ((i < 11 and 'b[numbers]2-[') or 'c[letters]2-[') .. char .. ']',
|
||||
localised_name = {'phi-cl.combine', {'virtual-signal-name.signal-' .. char}, '(II)'}
|
||||
@@ -251,7 +260,7 @@ if data.raw['container']['steel-chest'] then
|
||||
item.place_result = item.name
|
||||
item.subgroup = 'storage'
|
||||
item.order = 'b[storage]-h[trash-chest]'
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/steel-chest.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/steel-chest.png', tint = mod_tint[8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
@@ -273,7 +282,7 @@ if data.raw['container']['steel-chest'] then
|
||||
entity.logistic_mode = nil
|
||||
entity.next_upgrade = nil
|
||||
entity.surface_conditions = nil
|
||||
entity.picture.layers[1].tint = items['tint'][8]
|
||||
entity.picture.layers[1].tint = mod_tint[8]
|
||||
entity.localised_name = {'', {'name.trash-entity'}, {'entity-name.steel-chest'}}
|
||||
data:extend({entity})
|
||||
|
||||
@@ -300,7 +309,7 @@ if data.raw['pipe']['pipe'] then
|
||||
item.place_result = item.name
|
||||
item.subgroup = 'energy-pipe-distribution'
|
||||
item.order = 'a[pipe]-c[trash-pipe]'
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/pipe.png', tint = items['tint'][8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/pipe.png', tint = mod_tint[8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||
item.icon = nil
|
||||
item.icon_size = nil
|
||||
item.icon_mipmaps = nil
|
||||
@@ -316,10 +325,10 @@ if data.raw['pipe']['pipe'] then
|
||||
entity.next_upgrade = nil
|
||||
|
||||
for _, v in pairs(entity.pictures) do
|
||||
v.tint = items['tint'][8]
|
||||
v.tint = mod_tint[8]
|
||||
|
||||
if v.hr_version then
|
||||
v.hr_version.tint = items['tint'][8]
|
||||
v.hr_version.tint = mod_tint[8]
|
||||
end
|
||||
end
|
||||
|
||||
@@ -448,7 +457,7 @@ for _, vn in pairs(data.raw['underground-belt']) do
|
||||
entity.localised_description = {'entity-description.' .. v}
|
||||
|
||||
for _, st in pairs({'direction_in', 'direction_out', 'direction_in_side_loading', 'direction_out_side_loading'}) do
|
||||
entity.structure[st].sheet.filename = items['general']['graphics_location'] .. v .. '.png'
|
||||
entity.structure[st].sheet.filename = mod_graphic_location .. v .. '.png'
|
||||
entity.structure[st].sheet.width = 106
|
||||
entity.structure[st].sheet.height = 85
|
||||
entity.structure[st].sheetshift = {0.15625, 0.0703125}
|
||||
|
||||
Reference in New Issue
Block a user