public IdleDestinationStorage(Type locationType, ResumeTimeCallback onInterruptCallback, SimpleDescriptor locationCallback, GameDateTime timeToBoogie) { this.locationType = locationType ?? throw new ArgumentNullException(nameof(locationType)); this.locationCallback = locationCallback; this.onInterruptCallback = onInterruptCallback ?? throw new ArgumentNullException(nameof(onInterruptCallback)); travelTime = timeToBoogie ?? throw new ArgumentNullException(nameof(timeToBoogie)); }
private void RunEngine() { if (!running && totalHours > 0) { startTime = engineTime; hitLazies = false; currentContentPage = pageMaker(); InitializeNewHour(); } else if (running) { QueryPageStatus(); } else { areaEngine.RunArea(); } }
private void ReturnExectution() { bool newPage = !currentContentPage.hasNoText; //i'm placing the final destination text on the current content page. However, if the only thing on the current context page is just this text, //it shouldn't get its own page, so that will appear on the same page as the destination context. string text; if (!string.IsNullOrEmpty(newHourHeader)) { text = newHourHeader; } else { text = finalDestination?.GetFinalText(); //trudge toward your final destination. } if (!string.IsNullOrWhiteSpace(text)) { currentContentPage.OutputText(text); //hasAnyOutput = true; imo this would be annoying if this was the only thing that forced it to a new page. } startTime = null; newHourHeader = null; hitLazies = false; if (!newPage) { areaEngine.RunArea(); } else { currentContentPage.DoNext(areaEngine.RunArea); SetCurrentPage(currentContentPage); } currentContentPage = null; }