This commit is contained in:
2023-05-09 02:51:14 +09:00
parent 2852f68d0b
commit 654ea4e408
19 changed files with 306 additions and 488 deletions

43
PHI-WE/config.lua Normal file
View 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

View File

@@ -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)

View File

@@ -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": "",

View 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