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. fileciteturn20file1
Serialized Atoms & UI
- FloatVariable
notorietyIncreasePerLab,notorietyIncreasePerRoute,notorietyGainMult,notorietyProgress - IntVariable
labCount,routeCount - VoidEvent
yearPassed - BoolVariable
paused; VoidEventenableTimeControls,disableTimeControls - GameObject
toastGobj; TextMeshProUGUIinfoText; SlidertimeSlider - float
displayTime(default 5s) — used by the optional auto‑hide. fileciteturn20file1
Flow
- Start() — registers
DisplayNotorietyReporttoyearPassed. - DisplayNotorietyReport()
- Computes contributions:
labContribution = labCount * notorietyIncreasePerLab * notorietyGainMultrouteContribution = routeCount * notorietyIncreasePerRoute * notorietyGainMult
- Builds a multi‑line
infoTextshowing per‑source percentages, total %, the multiplier line (x{notorietyGainMult}%), and the final Total Gain. - Activates the toast, raises
disableTimeControls, and setspaused = true. - (Auto‑hide via
HideReportAfterDelay(displayTime)is present but commented out.) fileciteturn20file1
- Computes contributions:
- OnDismissButtonPressed()
- Stops coroutines (if any), hides the toast, sets
paused = false, and raisesenableTimeControls. - If
notorietyProgress > 1f, disables this component to stop future reports. fileciteturn20file1
- Stops coroutines (if any), hides the toast, sets
- OnDestroy() — stops coroutines and unregisters the handler. fileciteturn20file1
Optional Auto‑Hide (currently disabled)
HideReportAfterDelay() drives a countdown slider from 1 → 0 over displayTime, then hides the toast. fileciteturn20file1