mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-27 11:05:22 +09:00
.
This commit is contained in:
@@ -273,33 +273,18 @@ end
|
|||||||
-- equipment
|
-- equipment
|
||||||
function main.EEQ(source, tier)
|
function main.EEQ(source, tier)
|
||||||
local item = table.deepcopy(data.raw[source.type][source.ref_name])
|
local item = table.deepcopy(data.raw[source.type][source.ref_name])
|
||||||
-- local item = {}
|
|
||||||
|
|
||||||
item['name'] = source.name .. '-mk' .. tier .. '-equipment'
|
item.name = source.name .. '-mk' .. tier .. '-equipment'
|
||||||
item['type'] = source.type
|
|
||||||
item['categories'] = {'armor'}
|
|
||||||
|
|
||||||
-- local w = 1
|
if (source.type == 'solar-equipment') or (source.type == 'fusion-equipment') then
|
||||||
-- local h = 1
|
|
||||||
|
|
||||||
if (source.name == 'solar-panel') then
|
|
||||||
item.power = tostring(tonumber(string.match(item.power, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.power, '%a+')
|
item.power = tostring(tonumber(string.match(item.power, '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item.power, '%a+')
|
||||||
-- item['energy_source'] = {type = 'electric', usage_priority = 'primary-output'}
|
|
||||||
|
elseif (source.type == 'battery-equipment') then
|
||||||
|
item['energy_source']['buffer_capacity'] = tostring(tonumber(string.match(item['energy_source']['buffer_capacity'], '[%d%.]+')) * (2 ^ (tier - source.min + 1))) .. string.match(item['energy_source']['buffer_capacity'], '%a+')
|
||||||
end
|
end
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
elseif (source.name == 'battery') then
|
|
||||||
h = 2
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'tertiary', buffer_capacity= (source.base * (2 ^ (tier - source.min + 1))) .. 'MJ'}
|
|
||||||
|
|
||||||
elseif (source.name == 'fusion-reactor') then
|
|
||||||
w = 4
|
|
||||||
h = 4
|
|
||||||
item['power'] = (source.base * (2 ^ (tier - source.min + 1))) .. 'kW'
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'primary-output'}
|
|
||||||
|
|
||||||
elseif (source.name == 'personal-laser-defense') then
|
elseif (source.name == 'personal-laser-defense') then
|
||||||
w = 2
|
|
||||||
h = 2
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = (250 * (2 ^ (tier - source.min + 1))) .. 'kJ'}
|
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = (250 * (2 ^ (tier - source.min + 1))) .. 'kJ'}
|
||||||
-- item['source_direction_count'] = 64
|
-- item['source_direction_count'] = 64
|
||||||
-- item['source_offset'] = {0, -3.423489 / 4}
|
-- item['source_offset'] = {0, -3.423489 / 4}
|
||||||
@@ -307,15 +292,11 @@ function main.EEQ(source, tier)
|
|||||||
item['automatic'] = true
|
item['automatic'] = true
|
||||||
|
|
||||||
elseif (source.name == 'energy-shield') then
|
elseif (source.name == 'energy-shield') then
|
||||||
w = 2
|
|
||||||
h = 2
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'primary-input', input_flow_limit = (source.base * 4 * (2 ^ (tier - source.min + 1))) .. 'kW', buffer_capacity = (source.base * 2 * (2 ^ (tier - 1))) .. 'kJ'}
|
item['energy_source'] = {type = 'electric', usage_priority = 'primary-input', input_flow_limit = (source.base * 4 * (2 ^ (tier - source.min + 1))) .. 'kW', buffer_capacity = (source.base * 2 * (2 ^ (tier - 1))) .. 'kJ'}
|
||||||
item['max_shield_value'] = (source.base * (2 ^ (tier - 2)))
|
item['max_shield_value'] = (source.base * (2 ^ (tier - 2)))
|
||||||
item['energy_per_shield'] = '80kJ'
|
item['energy_per_shield'] = '80kJ'
|
||||||
|
|
||||||
elseif (source.name == 'personal-roboport') then
|
elseif (source.name == 'personal-roboport') then
|
||||||
w = 2
|
|
||||||
h = 2
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = (source.base * 32 * (2 ^ (tier - source.min + 1))) .. 'MJ'}
|
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = (source.base * 32 * (2 ^ (tier - source.min + 1))) .. 'MJ'}
|
||||||
item['robot_limit'] = 50
|
item['robot_limit'] = 50
|
||||||
item['construction_radius'] = 32
|
item['construction_radius'] = 32
|
||||||
@@ -333,8 +314,6 @@ function main.EEQ(source, tier)
|
|||||||
item['charging_threshold_distance'] = 5
|
item['charging_threshold_distance'] = 5
|
||||||
|
|
||||||
elseif (source.name == 'night-vision') then
|
elseif (source.name == 'night-vision') then
|
||||||
w = 2
|
|
||||||
h = 2
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'primary-input', buffer_capacity = '240kJ'}
|
item['energy_source'] = {type = 'electric', usage_priority = 'primary-input', buffer_capacity = '240kJ'}
|
||||||
item['energy_input'] = '20kW'
|
item['energy_input'] = '20kW'
|
||||||
item['activate_sound'] = {filename = '__base__/sound/nightvision-on.ogg', volume = 0.5}
|
item['activate_sound'] = {filename = '__base__/sound/nightvision-on.ogg', volume = 0.5}
|
||||||
@@ -343,8 +322,6 @@ function main.EEQ(source, tier)
|
|||||||
item['color_lookup'] = {{0, '__core__/graphics/color_luts/lut-sunset.png'}}
|
item['color_lookup'] = {{0, '__core__/graphics/color_luts/lut-sunset.png'}}
|
||||||
|
|
||||||
elseif (source.name == 'exoskeleton') then
|
elseif (source.name == 'exoskeleton') then
|
||||||
w = 2
|
|
||||||
h = 4
|
|
||||||
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = '10MJ'}
|
item['energy_source'] = {type = 'electric', usage_priority = 'secondary-input', buffer_capacity = '10MJ'}
|
||||||
item['energy_consumption'] = '400kW'
|
item['energy_consumption'] = '400kW'
|
||||||
item['movement_bonus'] = source.base
|
item['movement_bonus'] = source.base
|
||||||
|
|||||||
Reference in New Issue
Block a user