Max traincars connected

A plugin that limits in a config file to X amount of traincars that can be connected to the locomotive and the workcart.  Easy?

This should be pretty easy. I'll see if I can squeeze this in during the week.

Merged post

Can you test if this works? Save the contents below as LimitTrainLength.cs. You can change the length by editing the 10 number.

namespace Oxide.Plugins
{
    [Info("Limit Train Length", "WhiteThunder", "0.1.0")]
    [Description("Limits the max length of trains.")]
    internal class LimitTrainLength : CovalencePlugin
    {
        private const int TrainLengthLimit = 10;
        private readonly object False = false;

        private object CanTrainCarCouple(TrainCar trainCar, TrainCar otherTrainCar)
        {
            if (trainCar.completeTrain.NumTrainCars + otherTrainCar.completeTrain.NumTrainCars <= TrainLengthLimit)
                return null;

            return False;
        }
    }
}

Oh sweet thank you I will test!