mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-29 05:52:30 +09:00
.
This commit is contained in:
+3
-8
@@ -1,7 +1,7 @@
|
|||||||
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 editor = require('control/editor')
|
local editor = require('control/editor')
|
||||||
local infinity_container = require('control/infinity-container')
|
local infinity = require('control/infinity')
|
||||||
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')
|
||||||
@@ -10,7 +10,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)
|
infinity.build(event)
|
||||||
rail_support.build(event)
|
rail_support.build(event)
|
||||||
trash.build(event)
|
trash.build(event)
|
||||||
end
|
end
|
||||||
@@ -19,11 +19,6 @@ local function entity_destroy(event)
|
|||||||
rail_support.destroy(event)
|
rail_support.destroy(event)
|
||||||
end
|
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
|
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)
|
script.on_event({defines.events.on_player_cheat_mode_enabled, defines.events.on_player_cheat_mode_disabled}, pump.recipe_hidden)
|
||||||
end
|
end
|
||||||
@@ -123,6 +118,6 @@ if settings.startup['PHI-MI'].value or (settings.startup['PHI-GM'].value and set
|
|||||||
end
|
end
|
||||||
|
|
||||||
if settings.startup['PHI-CT'].value then
|
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)
|
script.on_event(defines.events.on_player_toggled_map_editor, editor.toggle_editor)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -24,17 +24,21 @@ do
|
|||||||
end
|
end
|
||||||
|
|
||||||
function main.build(event)
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if event.entity.name ~= 'super-infinity-chest' then
|
if event.entity.name == 'super-infinity-chest' then
|
||||||
return
|
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
|
end
|
||||||
|
|
||||||
event.entity.remove_unfiltered_items = true
|
if event.entity.name == 'super-infinity-cargo-wagon' then
|
||||||
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
event.entity.remove_unfiltered_items = true
|
||||||
event.entity.get_inventory(defines.inventory.chest).set_bar()
|
event.entity.infinity_container_filters = chest_filter[event.entity.quality.name]
|
||||||
|
event.entity.get_inventory(defines.inventory.cargo_wagon).set_bar()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return main
|
return main
|
||||||
@@ -168,6 +168,54 @@ if data.raw['infinity-container'] and data.raw['infinity-container']['infinity-c
|
|||||||
}})
|
}})
|
||||||
end
|
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
|
-- CT A 1 BASE SHORTCUT
|
||||||
if data.raw['blueprint-book'] and data.raw['blueprint-book']['blueprint-book'] then
|
if data.raw['blueprint-book'] and data.raw['blueprint-book']['blueprint-book'] then
|
||||||
data:extend({{
|
data:extend({{
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ function main_entity(source, tier)
|
|||||||
elseif (source.name == 'recycler') then
|
elseif (source.name == 'recycler') then
|
||||||
if item['graphics_set'] and item['graphics_set']['animation'] then
|
if item['graphics_set'] and item['graphics_set']['animation'] then
|
||||||
for _, d in pairs({'north', 'east', 'south', 'west'}) do
|
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
|
for _, l in pairs(item['graphics_set']['animation'][d].layers) do
|
||||||
if not l.draw_as_shadow then
|
if not l.draw_as_shadow then
|
||||||
l.tint = mod_tint[tier]
|
l.tint = mod_tint[tier]
|
||||||
@@ -173,7 +173,7 @@ function main_entity(source, tier)
|
|||||||
elseif (source.name == 'pumpjack') then
|
elseif (source.name == 'pumpjack') then
|
||||||
if item['graphics_set'] and item['graphics_set']['animation'] then
|
if item['graphics_set'] and item['graphics_set']['animation'] then
|
||||||
for _, d in pairs({'north', 'east', 'south', 'west'}) do
|
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
|
for _, l in pairs(item['graphics_set']['animation'][d].layers) do
|
||||||
if not l.draw_as_shadow then
|
if not l.draw_as_shadow then
|
||||||
l.apply_runtime_tint = true
|
l.apply_runtime_tint = true
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
local items = require('ct-c')
|
local items = require('ct-c')
|
||||||
|
|
||||||
if data.raw['infinity-container']['super-infinity-chest'] and items['hide'] then
|
if items['hide'] then
|
||||||
local sc = 1
|
local sc = 1
|
||||||
|
|
||||||
for c, _ in pairs(defines.prototypes.item) do
|
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
|
||||||
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
|
end
|
||||||
|
|
||||||
-- MIG C 11 BASE ENTITY
|
-- MIG C 11 BASE ENTITY
|
||||||
|
|||||||
+1
-1
@@ -164,7 +164,7 @@ data:extend({
|
|||||||
setting_type = 'startup',
|
setting_type = 'startup',
|
||||||
default_value = false,
|
default_value = false,
|
||||||
localised_name = {'phi-cl.setting-category-color', 'CT', {'phi-cl.enable'}, {'mod-setting-name.PHI-CT'}},
|
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'
|
order = 'E00'
|
||||||
}, {
|
}, {
|
||||||
type = 'bool-setting',
|
type = 'bool-setting',
|
||||||
|
|||||||
Reference in New Issue
Block a user