Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
When the alarm went off, this got spammed until the max messages limit. Also my lights no longer turn red.
Hugslib (There's probably a lot of random issues here) https://gist.github.com/bcf24527ae11e9003feba6c5683cf154
Also, I was unable to reproduce the issue a second time around...
https://gist.github.com/624d516370ead335160a578e39de96bf
Error logs are riddled due to some other mods being funky, but I hope the root of the dilemma is in there.
Delightful mod and I hope it's an easily-solvable situation.
It's a bug in the code. On red alert, you're taking the existing colors and store those into a collection. Are you 100% sure that part can't get called twice, overwriting everything with red the second time?
What I can tell you however is that I only used wall lights in my base so it could also be possible that wall lights specifically have an issue.
A possible problem I found after looking at your code:
MapComponent_RedAlert.MapComponentTick() only resets wall lights if (ColorInt)Core.GetGlowColorWallLights.Invoke(thingComp3, null) == Core.threatColor is true but from what I can see inside the WallLight.dll CompOffsetGlow.GlowColor might not always return the correct color. In fact, the private property _glowColor could be null in which case it returns the glow color from the corresponding CompProperties_GlowOffset and that might be a different color than Core.threatColor. When that happens, your code would not invoke Core.SetGlowColorWallLights but the savedColorsPerLamps list would still be cleared and delete any hope of recovery. Even if the wall lights are coded correctly, you can never be sure that yet another mod messed with it beforehand.
Suggestion: Do the same thing you're already doing with lampsToEnable. Create a second list and add all lights to it that have actually been reset. Then remove those entries from savedColorsPerLamps. Log an error if savedColorsPerLamps is not empty before clearing it (with additional info if possible). While that will not fix the issue, you would at least see something in peoples logs.