This commit is contained in:
2026-07-01 22:16:10 +09:00
parent 328e147dde
commit 46fc20e7f9
2 changed files with 75 additions and 66 deletions
+4
View File
@@ -1,3 +1,7 @@
if settings.startup['PHI-CT'].value then if settings.startup['PHI-CT'].value then
require('data.f.ct') require('data.f.ct')
end end
if settings.startup['PHI-MI'].value then
require('data.f.ct')
end
+21 -16
View File
@@ -1,10 +1,5 @@
local items = require('mi-c') 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 local box = entity.selection_box or entity.collision_box
@@ -38,21 +33,21 @@ if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status
return positions return positions
end end
for _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do function main_entity_apply(entity, graphic)
for _, v in pairs(data.raw[c]) do if not entity[graphic] then
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then return
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
if v[a] then
v[a].status_colors = items['status']
if not v[a].working_visualisations then
v[a].working_visualisations = {}
end end
local positions = main_entity_number_position(v) entity[graphic].status_colors = items['status']
if not entity[graphic].working_visualisations then
entity[graphic].working_visualisations = {}
end
local positions = main_entity_number_position(entity)
if positions then if positions then
v[a].working_visualisations[#v[a].working_visualisations + 1] = { entity[graphic].working_visualisations[#entity[graphic].working_visualisations + 1] = {
always_draw = true, always_draw = true,
apply_tint = 'status', apply_tint = 'status',
render_layer = 'light-effect', render_layer = 'light-effect',
@@ -73,6 +68,16 @@ if settings.startup['PHI-CT-STATUS'].value and items['status'] and items['status
} }
end 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 end
end end