[DiscordArchive] Just out of curiosity, why haven't these been updated for the modules (on your own git) together wit
[DiscordArchive] Just out of curiosity, why haven't these been updated for the modules (on your own git) together wit
Archived author: Takenbacon • Posted: 2025-02-24T17:55:29.338000+00:00
Original source
directly calling ConfigMgr for run time config values is not ideal - it's slower (as it needs to do several map lookups and type conversions) and mistake prone as you can have the same config defined in multiple places with different default values. this is why the worldserver caches these values in an index but modules don't have such an ability currently. A better suited name would be more like ConfigFileLoader or something and should just remove the singleton access - but like I mentioned I really don't feel like breaking every module that has a config so imo I think I just leave it as-is for now and as things get updated we can rename it
Archived author: nl-saw • Posted: 2025-02-24T17:57:20.964000+00:00
Original source
Ah alright, good to know.
Archived author: Takenbacon • Posted: 2025-02-24T18:00:38.500000+00:00
Original source
most of them will convert to something like: SetConfigValue<bool>(CONFIG_DURABILITY_LOSS_IN_PVP, "DurabilityLoss.InPvP", false);
Archived author: Takenbacon • Posted: 2025-02-24T18:02:35.750000+00:00
Original source
also lets us have a few safety checks in case someone does something silly (out of bounds checking, type checks, config defined but not loaded check, config overwritten check, etc)
Archived author: Nyeriah • Posted: 2025-02-24T18:07:04.866000+00:00
Original source
We have talked about this recently after that one rename pr that broke every existing module. It feels like we’ve agreed on having *some* form of backwards compatibility so we don’t have to update tens of modules over night when things like that happen.
I think we could have an arrangement where we deprecate the function and gradually remove it from important modules over time; and at a later point just remove support for it completely
Archived author: Nyeriah • Posted: 2025-02-24T18:07:57.892000+00:00
Original source
If something like that could be possible, I see no issue with big changes like that at all
Archived author: Takenbacon • Posted: 2025-02-24T18:08:40.231000+00:00
Original source
yeah no issues with that
Archived author: Takenbacon • Posted: 2025-02-24T18:09:05.867000+00:00
Original source
I think there's even a compiler way to throw an annoying message when using depricated functions
Archived author: Nyeriah • Posted: 2025-02-24T18:09:26.971000+00:00
Original source
Yep there is, we use it on some old stuff, or used to
Archived author: nl-saw • Posted: 2025-02-24T18:12:19.785000+00:00
Original source
Cool! Sounds like a plan.