Closed HebaruSan closed 2 years ago
Hi! It took me a hell of a time, but I'm finally looking into it.
The pull request will be merged, but the changes from static readonly
to const
will be revered due the following reasons:
static readonly
on everythingstatic readonly string var = "blah";
will be replaced (eventually) to static readonly string var = GetLocalizationString("SOME_MEANINGFUL_ID");
const
and static readonly
on the same code is generally a bad idea, and most of the code relies on static readonly
being ir private
, protected
or public
.Thanks for you time on it!
Hi @Lisias,
A user posted this on the forum, and I saw some opportunities to improve it:
Once I took a look at the TweakScale repo, I found several other similar messages there and in the KSPe repo. Attached are my attempts to make them easier to understand.
Visible:
Technical:
const string
is preferable to astatic readonly string
for a private valuenet-lisias-ksp/TweakScale#265 is making some additional related changes.
Cheers!
Side fixes
While setting up to work on this, I noticed that cloning this repo fails on Windows because some of the filenames contain pipes, so I've also replaced those pipes with dashes.
Note that only the
local/TweakScale
branch is updated, because it's the most relevant to the screenshot above. I'll make another pull request for the main branch after this.