mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-26 21:16:23 +09:00
.
This commit is contained in:
+3
-8
@@ -1,7 +1,7 @@
|
||||
local cargo_landing = require('control/cargo-landing')
|
||||
local chest = require('control/chest')
|
||||
local editor = require('control/editor')
|
||||
local infinity_container = require('control/infinity-container')
|
||||
local infinity = require('control/infinity')
|
||||
local inserter = require('control/inserter')
|
||||
local pump = require('control/pump')
|
||||
local rail_support = require('control/rail-support')
|
||||
@@ -10,7 +10,7 @@ local trash = require('control/trash')
|
||||
local function entity_build(event)
|
||||
cargo_landing.build(event)
|
||||
chest.build(event)
|
||||
infinity_container.build(event)
|
||||
infinity.build(event)
|
||||
rail_support.build(event)
|
||||
trash.build(event)
|
||||
end
|
||||
@@ -19,11 +19,6 @@ local function entity_destroy(event)
|
||||
rail_support.destroy(event)
|
||||
end
|
||||
|
||||
local function shortcut_button_toggle(event)
|
||||
calculator.toggle(event)
|
||||
editor.toggle(event)
|
||||
end
|
||||
|
||||
if (settings.startup['PHI-MI'].value and settings.startup['PHI-MI-GENERIC'].value) or (settings.startup['PHI-GM'].value and settings.startup['PHI-GM'].value ~= '') then
|
||||
script.on_event({defines.events.on_player_cheat_mode_enabled, defines.events.on_player_cheat_mode_disabled}, pump.recipe_hidden)
|
||||
end
|
||||
@@ -123,6 +118,6 @@ if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and set
|
||||
end
|
||||
|
||||
if settings.startup['PHI-CT'].value then
|
||||
script.on_event(defines.events.on_lua_shortcut, shortcut_button_toggle)
|
||||
script.on_event(defines.events.on_lua_shortcut, editor.toggle)
|
||||
script.on_event(defines.events.on_player_toggled_map_editor, editor.toggle_editor)
|
||||
end
|
||||
|
||||
@@ -24,17 +24,21 @@ do
|
||||
end
|
||||
|
||||
function main.build(event)
|
||||
if event.entity.type ~= 'infinity-container' then
|
||||
if event.entity.type ~= 'infinity-container' and event.entity.type ~= 'infinity-cargo-wagon' then
|
||||
return
|
||||
end
|
||||
|
||||
if event.entity.name ~= 'super-infinity-chest' then
|
||||
return
|
||||
if event.entity.name == 'super-infinity-chest' then
|
||||
event.entity.remove_unfiltered_items = true
|
||||
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
||||
event.entity.get_inventory(defines.inventory.chest).set_bar()
|
||||
end
|
||||
|
||||
event.entity.remove_unfiltered_items = true
|
||||
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
||||
event.entity.get_inventory(defines.inventory.chest).set_bar()
|
||||
if event.entity.name == 'super-infinity-cargo-wagon' then
|
||||
event.entity.remove_unfiltered_items = true
|
||||
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
||||
event.entity.get_inventory(defines.inventory.cargo_wagon).set_bar()
|
||||
end
|
||||
end
|
||||
|
||||
return main
|
||||
@@ -168,6 +168,54 @@ if data.raw['infinity-container'] and data.raw['infinity-container']['infinity-c
|
||||
}})
|
||||
end
|
||||
|
||||
-- CT A 1 BASE ENTITY,ITEM,RECIPE
|
||||
if data.raw['infinity-cargo-wagon'] and data.raw['infinity-cargo-wagon']['infinity-cargo-wagon'] then
|
||||
local item = table.deepcopy(data.raw['item']['infinity-cargo-wagon'])
|
||||
item.name = 'super-infinity-cargo-wagon'
|
||||
item.place_result = item.name
|
||||
item.icons = {{icon = item.icon or '__base__/graphics/icons/cargo-wagon.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-cargo-wagon'}}
|
||||
data:extend({item})
|
||||
|
||||
local entity = table.deepcopy(data.raw['infinity-cargo-wagon']['infinity-cargo-wagon'])
|
||||
entity.name = item.name
|
||||
entity.minable.result = item.name
|
||||
entity.gui_mode = 'none'
|
||||
|
||||
if entity.pictures then
|
||||
for _, d in pairs({'rotated', 'sloped'}) do
|
||||
if entity.pictures[d] and entity.pictures[d].layers then
|
||||
for _, l in pairs(entity.pictures[d].layers) do
|
||||
if not l.draw_as_shadow then
|
||||
l.apply_runtime_tint = true
|
||||
l.tint = mod_tint[8]
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
entity.localised_name = {'', {'name.super-entity'}, {'entity-name.infinity-cargo-wagon'}}
|
||||
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 = 'cargo-wagon', amount = 1}},
|
||||
results = {{type = 'item', name = item.name, amount = 1}},
|
||||
main_product = item.name,
|
||||
localised_name = {'', {'name.super-entity'}, {'entity-name.infinity-cargo-wagon'}}
|
||||
}})
|
||||
end
|
||||
|
||||
-- CT A 1 BASE SHORTCUT
|
||||
if data.raw['blueprint-book'] and data.raw['blueprint-book']['blueprint-book'] then
|
||||
data:extend({{
|
||||
|
||||
@@ -123,7 +123,7 @@ function main_entity(source, tier)
|
||||
elseif (source.name == 'recycler') then
|
||||
if item['graphics_set'] and item['graphics_set']['animation'] then
|
||||
for _, d in pairs({'north', 'east', 'south', 'west'}) do
|
||||
if item['graphics_set']['animation'][d] then
|
||||
if item['graphics_set']['animation'][d] and item['graphics_set']['animation'][d].layers then
|
||||
for _, l in pairs(item['graphics_set']['animation'][d].layers) do
|
||||
if not l.draw_as_shadow then
|
||||
l.tint = mod_tint[tier]
|
||||
@@ -173,7 +173,7 @@ function main_entity(source, tier)
|
||||
elseif (source.name == 'pumpjack') then
|
||||
if item['graphics_set'] and item['graphics_set']['animation'] then
|
||||
for _, d in pairs({'north', 'east', 'south', 'west'}) do
|
||||
if item['graphics_set']['animation'][d] then
|
||||
if item['graphics_set']['animation'][d] and item['graphics_set']['animation'][d].layers then
|
||||
for _, l in pairs(item['graphics_set']['animation'][d].layers) do
|
||||
if not l.draw_as_shadow then
|
||||
l.apply_runtime_tint = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
local items = require('ct-c')
|
||||
|
||||
if data.raw['infinity-container']['super-infinity-chest'] and items['hide'] then
|
||||
if items['hide'] then
|
||||
local sc = 1
|
||||
|
||||
for c, _ in pairs(defines.prototypes.item) do
|
||||
@@ -13,7 +13,13 @@ if data.raw['infinity-container']['super-infinity-chest'] and items['hide'] then
|
||||
end
|
||||
end
|
||||
|
||||
data.raw['infinity-container']['super-infinity-chest'].inventory_size = sc
|
||||
if data.raw['infinity-container']['super-infinity-chest'] then
|
||||
data.raw['infinity-container']['super-infinity-chest'].inventory_size = sc
|
||||
end
|
||||
|
||||
if data.raw['infinity-cargo-wagon']['super-infinity-cargo-wagon'] then
|
||||
data.raw['infinity-cargo-wagon']['super-infinity-cargo-wagon'].inventory_size = sc
|
||||
end
|
||||
end
|
||||
|
||||
-- MIG C 11 BASE ENTITY
|
||||
|
||||
+1
-1
@@ -164,7 +164,7 @@ data:extend({
|
||||
setting_type = 'startup',
|
||||
default_value = false,
|
||||
localised_name = {'phi-cl.setting-category-color', 'CT', {'phi-cl.enable'}, {'mod-setting-name.PHI-CT'}},
|
||||
localised_description = {'', {'phi-cl.setting-change-color', '[20] A15 C2 U3'}},
|
||||
localised_description = {'', {'phi-cl.setting-change-color', '[24] A19 C2 U3'}},
|
||||
order = 'E00'
|
||||
}, {
|
||||
type = 'bool-setting',
|
||||
|
||||
Reference in New Issue
Block a user