fix FGR rooms not being grouped together - #144
Conversation
viddie
left a comment
There was a problem hiding this comment.
other than a small thing, looks good.
| if (rInfo.GroupedRooms != null && rInfo.GroupedRooms.Contains(roomName)) { | ||
| if (rInfo.GroupedRooms == null || !rInfo.GroupedRooms.Contains(splitRoomName.Item2)) continue; | ||
| if (splitRoomName.Item1 == "Not FGR") return rInfo.DebugRoomName; | ||
| Tuple<string, string> splitDebugRoomName = SplitFgrRoomName(rInfo.DebugRoomName); |
There was a problem hiding this comment.
this variable name is a bit odd, since it sounds very similar to splitRoomName. it should indicate its temporary/iterative nature somehow.
| } | ||
|
|
||
| public static Tuple<string, string> SplitFgrRoomName(string roomName) { | ||
| if (!roomName.Contains(":")) return Tuple.Create("Not FGR", roomName); |
There was a problem hiding this comment.
just a question: this means if a chapter uid ever becomes Not FGR it could be a problem?
i'm not 100% sure thats impossible to happen, but feel free to dismiss this if you are sure its fine.
There was a problem hiding this comment.
If it somehow did manage to become Not FGR, then it could become an issue, however due to how the roomName is gotten (it should always append the sidename on room transition, so that even if the base chapter uid was "Not FGR", it'd just become "Not FGR/Normal") it shouldn't be an issue imo.
|
Hopefully that variable name is better now, couldn't think of anything better at like 6am. If necessary I can think of different ones later. |
This commit fixes grouped rooms not working in full game runs by using the names present in the debug map itself instead of using the full name (uid:roomName) to search for grouped rooms. It also takes the possibility of a room being named the same in multiple maps (f.e. Vanilla Celeste with numbers) into consideration by comparing the uids of the chapters themself.