mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-28 21:42:30 +09:00
.
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
local cargo_landing = require('control/cargo-landing')
|
local cargo_landing = require('control/cargo-landing')
|
||||||
local chest = require('control/chest')
|
local chest = require('control/chest')
|
||||||
|
local infinity_container = require('control/infinity-infinity_containercontainer')
|
||||||
local inserter = require('control/inserter')
|
local inserter = require('control/inserter')
|
||||||
local pump = require('control/pump')
|
local pump = require('control/pump')
|
||||||
local rail_support = require('control/rail-support')
|
local rail_support = require('control/rail-support')
|
||||||
@@ -8,6 +9,7 @@ local trash = require('control/trash')
|
|||||||
local function entity_build(event)
|
local function entity_build(event)
|
||||||
cargo_landing.build(event)
|
cargo_landing.build(event)
|
||||||
chest.build(event)
|
chest.build(event)
|
||||||
|
infinity_container.build(event)
|
||||||
rail_support.build(event)
|
rail_support.build(event)
|
||||||
trash.build(event)
|
trash.build(event)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
local main = {}
|
||||||
|
|
||||||
|
local chest_filter = {}
|
||||||
|
|
||||||
|
do
|
||||||
|
for _, q in pairs(prototypes.quality) do
|
||||||
|
local q_name = q.name
|
||||||
|
local j = 0
|
||||||
|
chest_filter[q_name] = {}
|
||||||
|
|
||||||
|
for _, i in pairs(prototypes.item) do
|
||||||
|
if not i.hidden and not (i.subgroup and i.subgroup == 'parameters') then
|
||||||
|
j = j + 1
|
||||||
|
table.insert(chest_filter[q_name], {index = j, name = i.name, quality = q_name, mode = 'exactly', count = i.stack_size})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function main.build(event)
|
||||||
|
if event.entity.type ~= 'infinity-container' then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if event.entity.name ~= 'super-infinity-chest' then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
event.entity.remove_unfiltered_items = true
|
||||||
|
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
||||||
|
end
|
||||||
|
|
||||||
|
return main
|
||||||
@@ -133,6 +133,41 @@ if data.raw['electric-energy-interface'] and data.raw['electric-energy-interface
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- CT A 1 BASE ENTITY,ITEM,RECIPE
|
||||||
|
if data.raw['infinity-container'] and data.raw['infinity-container']['infinity-chest'] then
|
||||||
|
local item = table.deepcopy(data.raw['item']['infinity-chest'])
|
||||||
|
item.name = 'super-infinity-chest'
|
||||||
|
item.place_result = item.name
|
||||||
|
item.icons = {{icon = item.icon or '__base__/graphics/icons/infinity-chest.png', tint = mod_tint[8], icon_size = item.icon_size or 64, icon_mipmaps = item.icon_mipmaps or 4}}
|
||||||
|
item.icon = nil
|
||||||
|
item.icon_size = nil
|
||||||
|
item.icon_mipmaps = nil
|
||||||
|
item.localised_name = {'', {'name.super-entity'}, {'entity-name.infinity-chest'}}
|
||||||
|
data:extend({item})
|
||||||
|
|
||||||
|
local entity = table.deepcopy(data.raw['infinity-container']['infinity-chest'])
|
||||||
|
entity.name = item.name
|
||||||
|
entity.minable.result = item.name
|
||||||
|
entity.gui_mode = 'none'
|
||||||
|
entity.pictures.layers[1].tint = mod_tint[8]
|
||||||
|
entity.localised_name = {'', {'name.super-entity'}, {'entity-name.infinity-chest'}}
|
||||||
|
data:extend({entity})
|
||||||
|
|
||||||
|
data:extend({{
|
||||||
|
type = 'recipe',
|
||||||
|
name = item.name,
|
||||||
|
energy_required = 2,
|
||||||
|
enabled = true,
|
||||||
|
categories = {'crafting'},
|
||||||
|
hidden = true,
|
||||||
|
hidden_in_factoriopedia = true,
|
||||||
|
ingredients = {{type = 'item', name = 'steel-chest', amount = 1}},
|
||||||
|
results = {{type = 'item', name = item.name, amount = 1}},
|
||||||
|
main_product = item.name,
|
||||||
|
localised_name = {'', {'name.super-entity'}, {'entity-name.infinity-chest'}}
|
||||||
|
}})
|
||||||
|
end
|
||||||
|
|
||||||
-- CT A 1 BASE MAP_GEN_PRESET
|
-- CT A 1 BASE MAP_GEN_PRESET
|
||||||
if settings.startup['PHI-CT-TILE'].value then
|
if settings.startup['PHI-CT-TILE'].value then
|
||||||
data.raw['map-gen-presets']['default']['empty-world'] = {
|
data.raw['map-gen-presets']['default']['empty-world'] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user