mirror of
https://github.com/soarqin/DSP_Mods.git
synced 2026-05-09 13:47:11 +08:00
Object.Destroy(stationTip) where stationTip is a MonoBehaviour destroys only the component, leaving the cloned UI GameObject (icons, sliders, text) orphaned and potentially visible under _stationTipsRoot. When the recycle pool (128 slots) fills up during a planet with many stations, excess tips were disposed this way; those orphaned GameObjects would reappear as frozen 'ghost' tips on every subsequent planet. - Add ReleaseStationTip() helper: calls Object.Destroy(go) on the whole GameObject after SetActive(false), replacing the broken Destroy(component) - Simplify RecycleStationTips() and RecycleStationTip(int) to delegate to ReleaseStationTip() - Add HideAndRecycleStationTips() single cleanup entry point used by Enable(false), OnGameBegin(), and new OnGameEnd() - Add LocalPlanetWatcher (PatchImpl) hooking GameData.localPlanet setter: triggers HideAndRecycleStationTips() on any planet id change, covering frames where Update() is skipped by VFInput.inputing - Subscribe OnGameEnd to clear tips when exiting a save/returning to menu