mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-29 05:52:30 +09:00
.
This commit is contained in:
+19
-11
@@ -1,6 +1,6 @@
|
|||||||
local items = require('mi-c')
|
local items = require('mi-c')
|
||||||
|
|
||||||
function main_entity_number_position(entity)
|
function status_number_position(entity)
|
||||||
local box = entity.selection_box or entity.collision_box
|
local box = entity.selection_box or entity.collision_box
|
||||||
|
|
||||||
if not box then
|
if not box then
|
||||||
@@ -33,7 +33,7 @@ function main_entity_number_position(entity)
|
|||||||
return positions
|
return positions
|
||||||
end
|
end
|
||||||
|
|
||||||
function main_entity_apply(entity_graphic, positions)
|
function status_apply(entity_graphic, positions)
|
||||||
entity_graphic.status_colors = items['status']
|
entity_graphic.status_colors = items['status']
|
||||||
|
|
||||||
if not entity_graphic.working_visualisations then
|
if not entity_graphic.working_visualisations then
|
||||||
@@ -65,20 +65,28 @@ function main_entity_apply(entity_graphic, positions)
|
|||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function status(entity)
|
||||||
|
if entity.bottleneck_ignore or items['status_ignore'][entity.name] then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = status_number_position(entity)
|
||||||
|
|
||||||
|
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
||||||
|
if entity[a] then
|
||||||
|
status_apply(entity[a], pos)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- MI C 11 BASE ENTITY
|
-- MI C 11 BASE ENTITY
|
||||||
-- MI C 1 RECYCLER ENTITY
|
-- MI C 1 RECYCLER ENTITY
|
||||||
-- MI C 7 SPACE_AGE ENTITY
|
-- MI C 7 SPACE_AGE ENTITY
|
||||||
if settings.startup['PHI-MI-STATUS'].value and items['status'] and items['status_ignore'] then
|
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 _, c in pairs({'assembling-machine', 'furnace', 'mining-drill'}) do
|
||||||
for _, v in pairs(data.raw[c]) do
|
if data.raw[c] then
|
||||||
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
for _, v in pairs(data.raw[c]) do
|
||||||
local pos = main_entity_number_position(v)
|
status(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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user