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

tr1/carrier: add support for TR2-style item drops #1719

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Oct 15, 2024

Resolves #1713.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

This allows item drops to be defined in the level data in the same fashion as TR2, so any pickup item that is in the same position as an enemy will be carried by that enemy. The gameflow approach is retained for OG levels, and the provided gameflow setting will default to this.

For OG, Pierre in Tihocan and the enemies in Natla's Mines should continue to drop as normal. If the gameflow setting is enabled in OG, then they will not drop anything (and indeed the ape in room 82 of Tihocan will drop shotgun shells).

Attached is a custom level with every enemy type and some drops allocated to each. Similarly, if the gameflow setting is disabled here, then the items will appear normally (albeit some will float as they're positioned with the enemy).
LEVEL1.zip

@lahm86 lahm86 added Enhancement Improvement of an existing feature TR1 labels Oct 15, 2024
@lahm86 lahm86 self-assigned this Oct 15, 2024
@lahm86 lahm86 requested review from a team as code owners October 15, 2024 19:15
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team October 15, 2024 19:15
This allows item drops to be defined in the level data in the same
fashion as TR2, so any pickup item that is in the same position as an
enemy will be carried by that enemy. The gameflow approach is retained
for OG levels, and the provided gameflow setting will default to this.

Resolves LostArtefacts#1713.
@lahm86 lahm86 force-pushed the issue-1713-improved-item-drops branch from c6867c6 to 3846e03 Compare October 15, 2024 19:22
Copy link
Collaborator

@aredfan aredfan left a comment

Choose a reason for hiding this comment

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

I found an issue when tr2 item drops are enabled. The Qualopec mummy doesn't drop the pickup when Lara bumps into it.

Apart from that, LGTM. 👍

This moves the enemy status check when testing item drops into a
separate function for clarity, and checks additionally for the
Qualopec mummy, whose hitpoints will still be greater than 0 when Lara
touches it, and this still qualifies as a kill.
@lahm86
Copy link
Collaborator Author

lahm86 commented Oct 16, 2024

I found an issue when tr2 item drops are enabled. The Qualopec mummy doesn't drop the pickup when Lara bumps into it.

Apart from that, LGTM. 👍

Thank you, good catch. That should be fixed now.

@aredfan aredfan self-requested a review October 16, 2024 10:38
@lahm86 lahm86 merged commit 9f4b6fa into LostArtefacts:develop Oct 16, 2024
5 checks passed
@lahm86 lahm86 deleted the issue-1713-improved-item-drops branch October 16, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Improvement of an existing feature TR1
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Improve item drop support in line with TR2
3 participants