Skip to content

Commit 155fee5

Browse files
committed
make indicator optional
1 parent f38e8c9 commit 155fee5

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

Diff for: control.lua

+13-10
Original file line numberDiff line numberDiff line change
@@ -304,18 +304,21 @@ local function onTick(event)
304304
end
305305

306306
local function create_indicator(entity)
307-
local indicator_variant = ""
308-
if entity.type == "splitter" then
309-
if (entity.direction%4)==0 then
310-
indicator_variant = "-wide"
311-
else
312-
indicator_variant = "-tall"
307+
if draw_terminal_indicator then
308+
local indicator_variant = ""
309+
if entity.type == "splitter" then
310+
if (entity.direction%4)==0 then
311+
indicator_variant = "-wide"
312+
else
313+
indicator_variant = "-tall"
314+
end
313315
end
316+
return entity.surface.create_entity{
317+
name = "belt-overflow-indicator" .. indicator_variant,
318+
position = entity.position
319+
}
314320
end
315-
return entity.surface.create_entity{
316-
name = "belt-overflow-indicator" .. indicator_variant,
317-
position = entity.position
318-
}
321+
return nil
319322
end
320323

321324
local function check_and_update_entity(args)

0 commit comments

Comments
 (0)