z_mirror/PipeVisualizer

git clone https://git.raiguard.me/z_mirror/PipeVisualizer

Caleb HeuerDecide box colors by fluid prototype orderf1a6ae7

main
343 B17 linesraw
1local function get_fluid_ordering()
2  --- @type table<string, integer>
3  local order = {}
4  local i = 0
5  for name in pairs(game.fluid_prototypes) do
6    i = i + 1
7    order[name] = i
8  end
9  global.fluid_order = order
10end
11
12local order = {}
13
14order.on_init = get_fluid_ordering
15order.on_configuration_changed = get_fluid_ordering
16
17return order