Skip to content
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

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Aug 1, 2023

Adds some medi compensation for cold levels. The calculation is a bit arbitrary but it results in a fair allocation imo.
Resolves #511.

@lahm86 lahm86 added enhancement New feature or request TR3 labels Aug 1, 2023
@lahm86 lahm86 added this to the 1.8.0 milestone Aug 1, 2023
@lahm86 lahm86 self-assigned this Aug 1, 2023
if (!level.Data.Entities.Any(e => e.TypeID == (short)TR3Entities.UPV))
{
return;
}
Copy link

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.

Copy link
Collaborator Author

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;
Copy link
Collaborator

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?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Collaborator Author

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.

@lahm86 lahm86 merged commit 9b8f537 into LostArtefacts:master Aug 2, 2023
2 checks passed
@lahm86 lahm86 deleted the issue-511-cold-medis branch August 2, 2023 20:29
@lahm86 lahm86 modified the milestones: 1.8.0, 1.7.4 Sep 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request TR3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add medis to cold levels
4 participants