mirror of
https://github.com/PHIDIAS0303/factorio-mod-PHI.git
synced 2026-07-28 21:42:30 +09:00
.
This commit is contained in:
+32
-34
@@ -33,40 +33,8 @@ function main_entity_number_position(entity)
|
|||||||
return positions
|
return positions
|
||||||
end
|
end
|
||||||
|
|
||||||
function main_entity_apply(entity, graphic)
|
function main_entity_apply(entity_graphic, positions)
|
||||||
if not entity[graphic] then
|
|
||||||
return
|
|
||||||
end
|
|
||||||
|
|
||||||
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
|
|
||||||
entity[graphic].working_visualisations[#entity[graphic].working_visualisations + 1] = {
|
|
||||||
always_draw = true,
|
|
||||||
apply_tint = 'status',
|
|
||||||
render_layer = 'light-effect',
|
|
||||||
animation = {
|
|
||||||
filename = '__base__/graphics/icons/signal/signal_white.png',
|
|
||||||
flags = {'icon'},
|
|
||||||
size = 64,
|
|
||||||
scale = 0.15,
|
|
||||||
line_length = 1,
|
|
||||||
frame_count = 1,
|
|
||||||
animation_speed = 1,
|
|
||||||
draw_as_glow = true
|
|
||||||
},
|
|
||||||
north_position = positions[1],
|
|
||||||
east_position = positions[2],
|
|
||||||
south_position = positions[1],
|
|
||||||
west_position = positions[2],
|
|
||||||
}
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- MI C 11 BASE ENTITY
|
-- MI C 11 BASE ENTITY
|
||||||
@@ -76,8 +44,38 @@ if settings.startup['PHI-MI-STATUS'].value and items['status'] and items['status
|
|||||||
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
|
for _, v in pairs(data.raw[c]) do
|
||||||
if not v.bottleneck_ignore and not items['status_ignore'][v.name] then
|
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
|
for _, a in pairs({'graphics_set', 'wet_mining_graphics_set', 'graphics_set_flipped'}) do
|
||||||
main_entity_apply(v, a)
|
if v[a] then
|
||||||
|
v[a].status_colors = items['status']
|
||||||
|
|
||||||
|
if not v[a].working_visualisations then
|
||||||
|
v[a].working_visualisations = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
if pos then
|
||||||
|
v[a].working_visualisations[#v[a].working_visualisations + 1] = {
|
||||||
|
always_draw = true,
|
||||||
|
apply_tint = 'status',
|
||||||
|
render_layer = 'light-effect',
|
||||||
|
animation = {
|
||||||
|
filename = '__base__/graphics/icons/signal/signal_white.png',
|
||||||
|
flags = {'icon'},
|
||||||
|
size = 64,
|
||||||
|
scale = 0.15,
|
||||||
|
line_length = 1,
|
||||||
|
frame_count = 1,
|
||||||
|
animation_speed = 1,
|
||||||
|
draw_as_glow = true
|
||||||
|
},
|
||||||
|
north_position = pos[1],
|
||||||
|
east_position = pos[2],
|
||||||
|
south_position = pos[1],
|
||||||
|
west_position = pos[2],
|
||||||
|
}
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user