mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-29 05:52:30 +09:00
.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
if settings.startup['PHI-CT'].value then
|
||||
require('data.f.ct')
|
||||
end
|
||||
|
||||
if settings.startup['PHI-MI'].value then
|
||||
require('data.f.ct')
|
||||
end
|
||||
|
||||
+22
-17
@@ -1,11 +1,6 @@
|
||||
local items = require('mi-c')
|
||||
|
||||
|
||||
-- MI C 11 BASE ENTITY
|
||||
-- MI C 1 RECYCLER ENTITY
|
||||
-- MI C 7 SPACE_AGE ENTITY
|
||||
if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status_ignore'] then
|
||||
function main_entity_number_position(entity)
|
||||
function main_entity_number_position(entity)
|
||||
local box = entity.selection_box or entity.collision_box
|
||||
|
||||
if not box then
|
||||
@@ -36,23 +31,23 @@ if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status
|
||||
}
|
||||
|
||||
return positions
|
||||
end
|
||||
|
||||
function main_entity_apply(entity, graphic)
|
||||
if not entity[graphic] then
|
||||
return
|
||||
end
|
||||
|
||||
for _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do
|
||||
for _, v in pairs(data.raw[c]) do
|
||||
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
||||
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
||||
if v[a] then
|
||||
v[a].status_colors = items['status']
|
||||
entity[graphic].status_colors = items['status']
|
||||
|
||||
if not v[a].working_visualisations then
|
||||
v[a].working_visualisations = {}
|
||||
if not entity[graphic].working_visualisations then
|
||||
entity[graphic].working_visualisations = {}
|
||||
end
|
||||
|
||||
local positions = main_entity_number_position(v)
|
||||
local positions = main_entity_number_position(entity)
|
||||
|
||||
if positions then
|
||||
v[a].working_visualisations[#v[a].working_visualisations + 1] = {
|
||||
entity[graphic].working_visualisations[#entity[graphic].working_visualisations + 1] = {
|
||||
always_draw = true,
|
||||
apply_tint = 'status',
|
||||
render_layer = 'light-effect',
|
||||
@@ -72,7 +67,17 @@ if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status
|
||||
west_position = positions[2],
|
||||
}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- MI C 11 BASE ENTITY
|
||||
-- MI C 1 RECYCLER ENTITY
|
||||
-- MI C 7 SPACE_AGE ENTITY
|
||||
if settings.startup['PHI-MI-STATUS'].value and items['status'] and items['status_ignore'] then
|
||||
for _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do
|
||||
for _, v in pairs(data.raw[c]) do
|
||||
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
||||
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
||||
main_entity_apply(v, a)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user