public override void DoWindowContents(Rect inRect) { DrawPageTitle(inRect); var mainRect = GetMainRect(inRect, 0f, false); Dialogs.DoWindowContentsInternal(ref ZombieSettings.Values, mainRect, false); MultiVersionMethods.DoBottomButtons(this, inRect, null, null, null, true, inRect, null, null, null, true, true); }
public static bool TryExecute(Map map, int incidentSize, IntVec3 spot, bool ignoreLimit = false) { var cellValidator = Tools.ZombieSpawnLocator(map, true); var spotValidator = SpotValidator(map, cellValidator); for (var counter = 1; counter <= 10; counter++) { if (spot.IsValid) { break; } if (ZombieSettings.Values.spawnHowType == SpawnHowType.AllOverTheMap) { var tickManager = map.GetComponent <TickManager>(); if (tickManager == null) { return(false); } var center = tickManager != null ? tickManager.centerOfInterest : IntVec3.Invalid; if (center.IsValid == false) { center = Tools.CenterOfInterest(map); } RCellFinder.TryFindRandomSpotJustOutsideColony(center, map, null, out spot, spotValidator); } else { var success = MultiVersionMethods.TryFindRandomPawnEntryCell(out spot, map, 0.5f, spotValidator, out spot, map, 0.5f, true, spotValidator); if (success == false) { spot = IntVec3.Invalid; } } } if (spot.IsValid == false) { return(false); } Find.CameraDriver.StartCoroutine(SpawnEventProcess(map, incidentSize, spot, cellValidator, ignoreLimit)); return(true); }