mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
Update
This commit is contained in:
43
PHI-WE/config.lua
Normal file
43
PHI-WE/config.lua
Normal file
@@ -0,0 +1,43 @@
|
||||
local items = {
|
||||
['laser-turret'] = {
|
||||
enabled = true,
|
||||
type = 'electric-turret',
|
||||
name = 'laser-turret',
|
||||
ref_name = 'laser-turret',
|
||||
tech = 'laser-turret',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 24
|
||||
},
|
||||
['gun-turret'] = {
|
||||
enabled = true,
|
||||
type = 'ammo-turret',
|
||||
name = 'gun-turret',
|
||||
ref_name = 'gun-turret',
|
||||
tech = 'gun-turret',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 18
|
||||
},
|
||||
['flamethrower-turret'] = {
|
||||
enabled = true,
|
||||
type = 'fluid-turret',
|
||||
name = 'flamethrower-turret',
|
||||
ref_name = 'flamethrower-turret',
|
||||
tech = 'flamethrower',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 30
|
||||
},
|
||||
['radar'] = {
|
||||
enabled = true,
|
||||
type = 'radar',
|
||||
name = 'radar',
|
||||
ref_name = 'radar',
|
||||
tech = 'automation',
|
||||
min = 2,
|
||||
max = 3
|
||||
}
|
||||
}
|
||||
|
||||
return items
|
||||
@@ -1,44 +1,4 @@
|
||||
local items = {
|
||||
['laser-turret'] = {
|
||||
enabled = true,
|
||||
type = 'electric-turret',
|
||||
name = 'laser-turret',
|
||||
ref_name = 'laser-turret',
|
||||
tech = 'laser-turret',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 24
|
||||
},
|
||||
['gun-turret'] = {
|
||||
enabled = true,
|
||||
type = 'ammo-turret',
|
||||
name = 'gun-turret',
|
||||
ref_name = 'gun-turret',
|
||||
tech = 'gun-turret',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 18
|
||||
},
|
||||
['flamethrower-turret'] = {
|
||||
enabled = true,
|
||||
type = 'fluid-turret',
|
||||
name = 'flamethrower-turret',
|
||||
ref_name = 'flamethrower-turret',
|
||||
tech = 'flamethrower',
|
||||
min = 2,
|
||||
max = 3,
|
||||
range = 30
|
||||
},
|
||||
['radar'] = {
|
||||
enabled = true,
|
||||
type = 'radar',
|
||||
name = 'radar',
|
||||
ref_name = 'radar',
|
||||
tech = 'automation',
|
||||
min = 2,
|
||||
max = 3
|
||||
}
|
||||
}
|
||||
local items = require 'config'
|
||||
|
||||
-- entity
|
||||
local function EE(source, tier)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "PHI-WE",
|
||||
"version": "1.0.2",
|
||||
"version": "1.0.3",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2023-05-08",
|
||||
"date": "2023-05-09",
|
||||
"title": "Phidias Warfare",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
19
PHI-WE/migrations/migrations.lua
Normal file
19
PHI-WE/migrations/migrations.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
local items = require '__PHI-MB__/config'
|
||||
|
||||
for _, force in pairs(game.forces) do
|
||||
local technologies = force.technologies
|
||||
local recipes = force.recipes
|
||||
|
||||
for _, v in pairs(items) do
|
||||
if v.enabled then
|
||||
if technologies[v.tech] ~= nil then
|
||||
if technologies[v.tech].researched then
|
||||
for j=v.min, v.max, 1 do
|
||||
recipes[v.name .. '-' .. j].enabled = true
|
||||
recipes[v.name .. '-' .. j].reload()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user