protected static string customName(TankStats tank, int maxWidth, string fallBackName) { // 3 custom name // if custom name doesnt exist, create it and set it to prevuisly name, od ID string name = CustomNames.findName(tank, fallBackName); if (name == null) { return(""); } // if custom name is too long, show warning if (isTextToLong(name, maxWidth)) { Console.WriteLine("Custom name is too long: " + name); name = ""; } return(name); }
protected static string forceCustomName(TankStats tank) { return(CustomNames.findName(tank)); }