Beispiel #1
0
        private int CountFluidBoxes(LuaTable list, bool input)
        {
            var count = 0;

            foreach (var fluidBox in list.ArrayElements <LuaTable>())
            {
                if (fluidBox.Get("production_type", out string prodType) && (prodType == "input-output" || input && prodType == "input" || !input && prodType == "output"))
                {
                    ++count;
                }
            }
            return(count);
        }