This commit is contained in:
2026-07-01 22:39:50 +09:00
parent 2b185a2263
commit 46ac36d016
2 changed files with 34 additions and 28 deletions
+1 -1
View File
@@ -3,5 +3,5 @@ if settings.startup['PHI-CT'].value then
end end
if settings.startup['PHI-MI'].value then if settings.startup['PHI-MI'].value then
require('data.f.ct') require('data.f.mi')
end end
+26 -20
View File
@@ -33,25 +33,18 @@ function main_entity_number_position(entity)
return positions return positions
end end
-- MI C 11 BASE ENTITY function main_entity_apply(entity_graphic, positions)
-- MI C 1 RECYCLER ENTITY entity_graphic.status_colors = items['status']
-- 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
local pos = main_entity_number_position(v)
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do if not entity_graphic.working_visualisations then
if v[a] then entity_graphic.working_visualisations = {}
v[a].status_colors = items['status']
if not v[a].working_visualisations then
v[a].working_visualisations = {}
end end
if pos then if not positions then
v[a].working_visualisations[#v[a].working_visualisations + 1] = { return
end
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',
@@ -65,12 +58,25 @@ if settings.startup['PHI-MI-STATUS'].value and items['status'] and items['status
animation_speed = 1, animation_speed = 1,
draw_as_glow = true draw_as_glow = true
}, },
north_position = pos[1], north_position = positions[1],
east_position = pos[2], east_position = positions[2],
south_position = pos[1], south_position = positions[1],
west_position = pos[2], west_position = positions[2],
} }
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
local pos = main_entity_number_position(v)
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
if v[a] then
main_entity_apply(v[a], pos)
end end
end end
end end