-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add cold level medipacks #513
Conversation
Resolves LostArtefacts#511.
if (!level.Data.Entities.Any(e => e.TypeID == (short)TR3Entities.UPV)) | ||
{ | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the sanity check? If I read things right, this will never be true given the current logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's for Lud's Gate mainly. We don't define extra UPV locations for it as they're already in the level, so ImportUPV
doesn't do anything, yet we still want to add medis when it's cold here. I initially had the medi code at the end of ImportUPV
but then realised this still left Lud's without, as it exits early.
{ | ||
if (!level.Data.Entities.Any(e => e.TypeID == (short)TR3Entities.UPV)) | ||
{ | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come you only get medis if you have a UPV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TR-Rando/TRRandomizerCore/Processors/TR3/TR3SequenceProcessor.cs
Lines 92 to 98 in 4573c37
if (!level.Is(TR3LevelNames.ANTARC) && !level.Is(TR3LevelNames.RXTECH)) | |
{ | |
// The UPV keeps Lara warm underwater so make this available for | |
// those levels that have long underwater sections. | |
ImportUPV(level); | |
AddColdLevelMedis(level); | |
} |
This is for levels that have freezing water but aren't antarctica or rx tech mines. These levels get both UPV and extra meds. At least that's how I read it; I'm not sure but it sounds like it should be the other way around.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't add UPVs in all cases - Caves of Kaliya, Puna etc. So we don't want to add medis in these cases as they're intended mainly for getting off the UPV to pull a lever for instance. We could by all means, but it'd be free medis for no reason.
We don't do anything special in Antarctica or RX-Tech as they're cold OG, so we don't need to fiddle with the design really.
I suppose we could do a water room check instead of whether or not it's been decided previously to add a UPV, but this way it leaves it more loose - if we decide to add to other levels, it's just a case of defining vehicle locations here.
Adds some medi compensation for cold levels. The calculation is a bit arbitrary but it results in a fair allocation imo.
Resolves #511.