public static bool CanGenerate(CommandEntry entry) { if (entry.checkId == 127) { if (CreateWorldData.HasGenerated(116) && CreateWorldData.HasGenerated(113)) { return(true); } Console.WriteLine("Cannot generate {0}. You need to generate Decorations and Spawners first.", entry.Name); return(false); } return(true); }
public static bool CanGenerate(CommandEntry entry, ref string error) { if (CreateWorldData.CreateTable.ContainsKey(entry.CheckID) && CreateWorldData.CreateTable[entry.CheckID]) { string er = String.Format("<br>- {0} have been generated already.", entry.Name); Console.WriteLine(er); error += er; return(false); } if (entry.CheckID == 127) { if (CreateWorldData.HasGenerated(116) && CreateWorldData.HasGenerated(113)) { return(true); } string er = String.Format("<br>- Cannot generate {0}. You need to generate Decorations and Spawners first.", entry.Name); Console.WriteLine(er); error += er; return(false); } if (entry.Category == Category.RevampedDungeon) { if (CreateWorldData.HasGenerated(116)) { return(true); } else { string er = String.Format("<br>- Cannot generate {0}. You need to generate Spawners first.", entry.Name); Console.WriteLine(er); error += er; return(false); } } return(true); }