Skip to content

fix: ReflectionManager.TryLooseGetType now doesnt matches part for full name - #7073

Open
CREAsTIVE wants to merge 2 commits into
space-wizards:masterfrom
CREAsTIVE:reflection-fix-try-loose
Open

CREAsTIVE wants to merge 2 commits into
space-wizards:masterfrom
CREAsTIVE:reflection-fix-try-loose

Conversation

@CREAsTIVE

@CREAsTIVE CREAsTIVE commented Sep 7, 2026

Copy link
Copy Markdown

Before ReflectionManager.TryLooseGetType matched part of name, i. e. type ShuttleConsoleBoundUserInterface may be matched as TradeShuttleConsoleBoundUserInterface effectively replacing existing one without any warnings or something.

Initially i matched with .Split('.').TakeLast(...).SequenceEqual(...), but that allocates too much so i just went with checking for existence of . or + (for nested types, i. e. A.B.C+D) I just use already written method for enums

Related issues: #5648

i. e.: B.C still matches for A.B.C, but not for A.BB.C
@CREAsTIVE
CREAsTIVE marked this pull request as draft September 7, 2026 22:40
@CREAsTIVE

CREAsTIVE commented Sep 8, 2026

Copy link
Copy Markdown
Author

Requires merge of space-wizards/space-station-14#45913 first (to pass tests). All tests pass on my machine and game works perfectly fine with that fix

@CREAsTIVE
CREAsTIVE marked this pull request as ready for review September 8, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant