Open klyte45 opened 3 years ago
Extra: seems the arrow doesn't get back to its default if you remove all links from a lane.
you should use lane arrow tool -> select the node -> and press delete
what will happen if you force a node update (eg select the node using NC)
also it would be interesting to see if this has anything to do with Loading Order (I doubt it because I think you are patching NetLane.RenderInstance()
and not RoadBaseAI.UpdateLanes()
Yep, prop switcher goes directly on NetLane. The issue there is that the rules are cached and only recalculated while in CalculateGroupData method in NetLane.
PS: in older versions of Prop Switcher, this problem didn't exist because the rules were calculated every frame, on RenderInstance()
@kianzarrin does the Notifier API facilitate anything here? Eg. Could prop switcher be notified when lane arrows/connectors change?
Yes TMPE notifier can be use when lane arrows change. I used this to update render data in my Adaptive Networks mod. But Notifier is only in TMPE 11.6
Wait notifier is useful to notify prop switcher not the other way around
You should trigger update lanes
Sorry ignore my last comment. didn't read the issue properly.
So should I integrate Prop Switcher with TMPE to solve this issue from my side? Is there some kind of facade in TMPE to I connect my mod without issues if the code changes?
TMPE notifier is part of TMPE API and must not change. for not it is only supported in TMPE test so you can start working on it but you should only publish your work to WS when TMPE stable has been released (unless if you have a beta version).
Well, I'll check this out later
About the release, I just need to know in which mod version it will be available to I set to fallback if the current version isn't the one supported. Then it will be ready to be released at workshop anytime, since it only will get the TMPE implementation if the version constraint is true. TMPE dlls have a release versioning in the own file, right?
I hope there won't be problems with regards to missing symbols.
In any case TMPE test is V11.6 so check for that.
I have a pattern I use in my mods based in Klyte Commons. I revisited it recently to fix issues related to missing symbols - that was causing some immediate crashes in game.
I was already using a separated class that refers the other dll, and with this recent change I deleted all hard references from the code and made a indirect object creation after getting sure the mod with that version is installed. So, no risks involved for releasing it before TMPE getting updated, plus it would work if the user is subscribed to beta channel workshop item (presuming that it have the same DLL name from the official mod)
presuming that it have the same DLL name from the official mod
Yup, .dll file names are always same for past few years.
Describe the problem
In Prop Switcher there's a feature that allows global or per network switching props, what also support decals switching. Well, the problem seems that the TMPE ignores the rule - at least since last version that usually caches the value.
Steps to reproduce
Extra: seems the arrow doesn't get back to its default if you remove all links from a lane.
Log files
N/A
Screenshots?
Notes or questions?
I believe it can be easily solved if right after changing the lane rules, then call to
RenderManager.instance.UpdateGroups(i);
, beingi
the current editing quadrant. The lack of this call can cause this kind of error if the switched prop have a associated effect, like lights: (the pole is gone, but the light still there)Feel free to talk with me if need more information.