public static string UnusedDefaultFileName(string factionLabel) { int num = 1; string text; do { text = factionLabel + num.ToString(); num++; }while (SaveGameFilesUtility.SavedGameNamedExists(text)); return(text); }
public static string UnusedDefaultFileName(string factionLabel) { string empty = string.Empty; int num = 1; while (true) { empty = factionLabel + num.ToString(); num++; if (!SaveGameFilesUtility.SavedGameNamedExists(empty)) { break; } } return(empty); }
private static string NewPermadeathSaveNameWithAppendedNumberIfNecessary(string name, string acceptedNameEvenIfTaken = null) { int num = 0; string text; do { num++; text = name; if (num != 1) { text += num; } text = PermadeathModeUtility.AppendedPermadeathModeSuffix(text); }while (SaveGameFilesUtility.SavedGameNamedExists(text) && text != acceptedNameEvenIfTaken); return(text); }
public static string GeneratePermadeathSaveName() { string text = NameGenerator.GenerateName(Faction.OfPlayer.def.factionNameMakerPlayer, null, false, null); int num = 0; string text2; do { num++; text2 = text; if (num != 1) { text2 += num; } text2 = PermadeathModeUtility.AppendPermadeathModeSuffix(text2); }while (SaveGameFilesUtility.SavedGameNamedExists(text2)); return(text2); }
public static string GeneratePermadeathSaveName() { string text = NameGenerator.GenerateName(Faction.OfPlayer.def.factionNameMakerPlayer, (Predicate <string>)null, false, (string)null); int num = 0; string text2; while (true) { num++; text2 = text; if (num != 1) { text2 += num; } text2 = PermadeathModeUtility.AppendPermadeathModeSuffix(text2); if (!SaveGameFilesUtility.SavedGameNamedExists(text2)) { break; } } return(text2); }