mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2025-12-30 20:01:40 +09:00
Update main.lua
This commit is contained in:
@@ -21,6 +21,10 @@ local item_max = {
|
|||||||
['lab'] = 3
|
['lab'] = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local ups_chests = {
|
||||||
|
'steel-chest'
|
||||||
|
}
|
||||||
|
|
||||||
-- entity
|
-- entity
|
||||||
local function EE(source, tier)
|
local function EE(source, tier)
|
||||||
local item
|
local item
|
||||||
@@ -192,5 +196,35 @@ data:extend({{
|
|||||||
energy_required = 2,
|
energy_required = 2,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
ingredients = {{'boiler', 1}, {'electronic-circuit', 1}},
|
ingredients = {{'boiler', 1}, {'electronic-circuit', 1}},
|
||||||
result = source .. '-' .. tier,
|
result = 'electric-boiler',
|
||||||
}}, {boiler_item}, {boiler_entity})
|
}}, {boiler_item}, {boiler_entity})
|
||||||
|
|
||||||
|
for i=1, #ups_chests, 1 do
|
||||||
|
local chest_item
|
||||||
|
local chest_entity
|
||||||
|
|
||||||
|
if ups_chests[i] == 'steel-chest' then
|
||||||
|
chest_item = table.deepcopy(data.raw['item'][ups_chests[i]])
|
||||||
|
chest_entity = table.deepcopy(data.raw['container'][ups_chests[i]])
|
||||||
|
else
|
||||||
|
chest_item = table.deepcopy(data.raw['item'][ups_chests[i]])
|
||||||
|
chest_entity = table.deepcopy(data.raw['logistic-container'][ups_chests[i]])
|
||||||
|
end
|
||||||
|
|
||||||
|
chest_item.name = 'ups-' .. ups_chests[i]
|
||||||
|
chest_item.place_result = 'ups-' .. ups_chests[i]
|
||||||
|
|
||||||
|
chest_item.order = 'b[steam-power]-b[electric-boiler]'
|
||||||
|
|
||||||
|
chest_entity.inventory_size = 1
|
||||||
|
chest_entity.name = 'ups-' .. ups_chests[i]
|
||||||
|
|
||||||
|
data:extend({{
|
||||||
|
type = 'recipe',
|
||||||
|
name = 'electric-boiler',
|
||||||
|
energy_required = 2,
|
||||||
|
enabled = true,
|
||||||
|
ingredients = {{'steel-plate', 8}},
|
||||||
|
result = 'ups-' .. ups_chests[i],
|
||||||
|
}}, {chest_item}, {chest_entity})
|
||||||
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user