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:
@@ -0,0 +1,4 @@
|
||||
-- laser turret
|
||||
data.raw['electric-turret']['laser-turret'].fast_replaceable_group = 'laser-turret'
|
||||
data.raw['electric-turret']['laser-turret-2'].fast_replaceable_group = data.raw['electric-turret']['laser-turret'].fast_replaceable_group
|
||||
data.raw['electric-turret']['laser-turret-3'].fast_replaceable_group = data.raw['electric-turret']['laser-turret-2'].fast_replaceable_group
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
local items = {
|
||||
['laser-turret'] = {
|
||||
enabled = true,
|
||||
type = 'electric-turret',
|
||||
name = 'laser-turret',
|
||||
ref_name = 'laser-turret',
|
||||
tech = 'laser-turret',
|
||||
min = 2,
|
||||
max = 3
|
||||
}
|
||||
}
|
||||
|
||||
-- entity
|
||||
local function EE(source, tier)
|
||||
local item = table.deepcopy(data.raw[source.type][source.ref_name])
|
||||
|
||||
item.name = source.name .. '-' .. tier
|
||||
item.minable.result = source.name .. '-' .. tier
|
||||
item.max_health = item.max_health * tier
|
||||
item.attack_parameters.damage_modifier = 2 * (2 ^ (tier - source.min + 1))
|
||||
|
||||
if source.type == 'electric-turret' then
|
||||
item.energy_source.input_flow_limit = tonumber(string.match(item.energy_source.input_flow_limit, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kW'
|
||||
item.energy_source.buffer_capacity = tonumber(string.match(item.energy_source.buffer_capacity, '%d+')) * (2 ^ (tier - source.min + 1)) .. 'kW'
|
||||
item.glow_light_intensity = 1
|
||||
end
|
||||
|
||||
-- item.animation.layers[1].filename = graphics_location .. source .. '-e.png'
|
||||
-- item.animation.layers[1].hr_version.filename = graphics_location .. source ..'-eh.png'
|
||||
-- item.icon = graphics_location .. source .. '-i.png'
|
||||
-- item.icon_size = 64
|
||||
-- item.icon_mipmaps = 4
|
||||
|
||||
if (tier <= source.max - 1) then
|
||||
item.next_upgrade = source.name .. '-' .. (tier + 1)
|
||||
end
|
||||
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
-- item
|
||||
local function EI(source, tier)
|
||||
local item = table.deepcopy(data.raw.item[source.ref_name])
|
||||
|
||||
item.name = source.name .. '-' .. tier
|
||||
item.place_result = source.name .. '-' .. tier
|
||||
-- item.icons = {{icon = graphics_location .. source .. '-i.png', icon_mipmaps = 4, icon_size = 64}}
|
||||
item.order = item.order .. tier
|
||||
data:extend({item})
|
||||
end
|
||||
|
||||
-- recipe
|
||||
local function ER(source, tier)
|
||||
local na = source.name
|
||||
|
||||
if tier > 2 then
|
||||
na = na .. '-' .. (tier - 1)
|
||||
end
|
||||
|
||||
data:extend({{
|
||||
type = 'recipe',
|
||||
name = source.name .. '-' .. tier,
|
||||
energy_required = 2,
|
||||
enabled = false,
|
||||
ingredients = {{na, 2}},
|
||||
result = source.name .. '-' .. tier,
|
||||
}})
|
||||
end
|
||||
|
||||
-- tech
|
||||
local function ET(source, tier)
|
||||
table.insert(data.raw.technology[source.tech].effects, {type='unlock-recipe', recipe=source.name .. '-' .. tier})
|
||||
end
|
||||
|
||||
for _, v in pairs(items) do
|
||||
if v.enabled then
|
||||
for j=v.min, v.max, 1 do
|
||||
EE(v, j)
|
||||
EI(v, j)
|
||||
ER(v, j)
|
||||
ET(v, j)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "PHI-WE",
|
||||
"version": "1.0.0",
|
||||
"factorio_version": "1.1",
|
||||
"date": "2023-03-17",
|
||||
"date": "2023-04-21",
|
||||
"title": "Phidias Warfare Equipment",
|
||||
"author": "PHIDIAS0303",
|
||||
"contributers": "",
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[item-name]
|
||||
laser-turret-2=Laser turret 2
|
||||
laser-turret-3=Laser turret 3
|
||||
|
||||
[entity-name]
|
||||
laser-turret-2=Laser turret 2
|
||||
laser-turret-3=Laser turret 3
|
||||
|
||||
[entity-description]
|
||||
laser-turret-2=Advanced defensive buildings that only require electricity.
|
||||
laser-turret-3=Advanced defensive buildings that only require electricity.
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[item-name]
|
||||
laser-turret-2=レーザータレット 2
|
||||
laser-turret-3=レーザータレット 3
|
||||
|
||||
[entity-name]
|
||||
laser-turret-2=レーザータレット 2
|
||||
laser-turret-3=レーザータレット 3
|
||||
|
||||
[entity-description]
|
||||
laser-turret-2=電気のみで稼動する高度な防衛施設。
|
||||
laser-turret-3=電気のみで稼動する高度な防衛施設。
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[item-name]
|
||||
laser-turret-2=雷射炮塔 2
|
||||
laser-turret-3=雷射炮塔 3
|
||||
|
||||
[entity-name]
|
||||
laser-turret-2=雷射炮塔 2
|
||||
laser-turret-3=雷射炮塔 3
|
||||
|
||||
[entity-description]
|
||||
laser-turret-2=僅需電力即可運轉的先進防禦工事。
|
||||
laser-turret-3=僅需電力即可運轉的先進防禦工事。
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
[item-name]
|
||||
laser-turret-2=雷射炮塔 2
|
||||
laser-turret-3=雷射炮塔 3
|
||||
|
||||
[entity-name]
|
||||
laser-turret-2=雷射炮塔 2
|
||||
laser-turret-3=雷射炮塔 3
|
||||
|
||||
[entity-description]
|
||||
laser-turret-2=僅需電力即可運轉的先進防禦工事。
|
||||
laser-turret-3=僅需電力即可運轉的先進防禦工事。
|
||||
|
||||
Reference in New Issue
Block a user