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
Unrelated...
One thing I've been curious about when looking at the code, is there a reason you opt to make your own glower comp instead of inheriting from CompGlower and just overriding the pieces you need? Seems like you could get rid of the extra work of recreating ShouldBeLitNow/ReceiveCompSignal/UpdateLit/etc... Then you'd get any vanilla changes for free whenever they update and not need to try and keep parity with it manually. Doing that I imagine you would have gotten the color changing update without making any changes.
A cursory glance says that the biggest road block to that would be that the vanilla glower spawns at the location of its parent, which is currently in the wall, but that seems like a solvable problem by making the def 2x1 with the base position being the cell the glower should spawn in, then the graphic spawning in the cell next to it. I haven't tinkered with buildings, though, so maybe it's not as easy as it seems to pull that off. But if you could then it seems like you can stop maintaining your own glower, which would probably be convenient and more compatibility-friendly for other mods.
Not sure that it would have made things easier in my mod (except for the position thing, as-is if a wall light is attached to a wall that divides two rooms, it's a crapshoot which room it "belongs" to when you call GetRoom on it).
Not that any of that is necessary, your mod works perfectly fine how it's set up today and it might not be worth a refactor at this point, if it's even a workable solution.
My glower comp is not actually a glower at all. My fake glower spawns a Thing that has the real CompGlower on it, precisely so I don't have to copy a lot of vanilla glower code. The color changing stuff is all vanilla code but I had to come up with a solution to access it from something that isn't a CompGlower. My first version of it was really ♥♥♥♥♥♥ because I was panicking trying to get it to work on short notice, and involved making a duplicate CompGlower that was overriden to do absolutely nothing other than provide access to the recoloring, and then pass that along to the real CompGlower on a separate spawned object. I assume this is what caused you some problems. I've made that a lot better now, but still have a few kinks to work out.
There's a lot of hoops to jump through in order to put something on a damn wall. Nobody has come up with a good solution for it. I was the first person to do it this way, and now the Vanilla Expanded people do it in a similar way. Albeit a lot more professional, but the core concept of spawning another Thing so that the glower is in the proper position is the same. I think the only way there's ever going to be a good solution to the problem is if Ludeon adds a real wall attachment system so everyone can stop with these hacky methods.
Believe it or not, the thing that broke compatibility this last time was that my definition of a custom glower required the word “glower” to be in the name; you used to call it CompGlowerOffset, now you call it CompOffsetGlow, so it no longer had “glower” in the name and just never got patched. Easy fix once I looked at it.
Spawning a new Thing as the glower totally screwed with me for a bit; I think my mod initially picked it up as it’s own light, since there’s no convenient way to identify a damn light in the game. I literally match to substrings in the def name and have keywords for things that could be lights (notably your mod’s def prefix reasonably has the word light in it, so like… they all kinda qualify by default). It’s a dinky and fragile system. Don’t even get me started with other mods misusing benches lol
Err.. "Invalidated" as in made obsolete, not broken everything again, lol
Wall sun lights now have the Keep On option, and it errors when clicked.
When a light that is off because nobody is in the room has its color changed, it turns itself back on but still uses no power.
https://github.com/Mmuurrmmuurr/RimWorld/raw/master/WallLightExp2.zip these should be the final major changes. Finally have compatibility with Performance Optimizer working.
It works pretty similar to the Vanilla Expanded Wall Lights, whatever you did for those might work for these now.
EDIT: The light turning itself on when the color is changed is a problem on my end.
EDIT AGAIN: Actually both problems were a "me" problem, you can completely disregard this entire post.
https://gist.github.com/4ecde24051485ec0bc1ea3ff467907d5
It seems to suggest it's coming from CompOffsetGlow, but the last gizmo I see is the one that comes from my KeepOnComp so it's suspicious.
Edit: I'm not able to reproduce that issue currently, not sure what's up there.
Edit 2:
Looks like it's related to the compatibility issue below if I had to guess, but I'm unfortunately out of time this morning to investigate.
Steps to reproduce:
1. Restart the game (it's not enough to reload a save or go to the main menu)
2. Load up whatever map, dev quicktest works for me
3. Build a wall light in an empty room
4. Click on that wall light before any pawn enters the room
5. Kaboom
In fact most of the gizmos are missing from it in that case... is that a me thing or a you thing?
https://imgur.com/a/hC3skSW
I’ve slowly been working on a feature to do delayed-off for lights to stop them from flashing in high-traffic areas, so if the correct, non-janky, solution is for my mod to let it light up before turning off then that’s something manageable on my end. I don’t want you to have to carve out special cases for my mod, especially if it ends up being a problem for the VE wall lights as well.