NotorietyReportToastUI

Overview

Shows a modal toast once per year detailing how much notoriety was gained from Labs and Routes. Pauses gameplay and disables time controls while visible. The auto‑hide coroutine exists but is currently commented out, so dismissal is manual. fileciteturn20file1

Serialized Atoms & UI

  • FloatVariable notorietyIncreasePerLab, notorietyIncreasePerRoute, notorietyGainMult, notorietyProgress
  • IntVariable labCount, routeCount
  • VoidEvent yearPassed
  • BoolVariable paused; VoidEvent enableTimeControls, disableTimeControls
  • GameObject toastGobj; TextMeshProUGUI infoText; Slider timeSlider
  • float displayTime (default 5s) — used by the optional auto‑hide. fileciteturn20file1

Flow

  • Start() — registers DisplayNotorietyReport to yearPassed.
  • DisplayNotorietyReport()
    • Computes contributions:
      • labContribution = labCount * notorietyIncreasePerLab * notorietyGainMult
      • routeContribution = routeCount * notorietyIncreasePerRoute * notorietyGainMult
    • Builds a multi‑line infoText showing per‑source percentages, total %, the multiplier line (x{notorietyGainMult}%), and the final Total Gain.
    • Activates the toast, raises disableTimeControls, and sets paused = true.
    • (Auto‑hide via HideReportAfterDelay(displayTime) is present but commented out.) fileciteturn20file1
  • OnDismissButtonPressed()
    • Stops coroutines (if any), hides the toast, sets paused = false, and raises enableTimeControls.
    • If notorietyProgress > 1f, disables this component to stop future reports. fileciteturn20file1
  • OnDestroy() — stops coroutines and unregisters the handler. fileciteturn20file1

Optional Auto‑Hide (currently disabled)

HideReportAfterDelay() drives a countdown slider from 1 → 0 over displayTime, then hides the toast. fileciteturn20file1