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

Search and Rescue: fix refueling mission #5383

Merged
merged 1 commit into from
Jul 8, 2022

Conversation

cwyss
Copy link
Contributor

@cwyss cwyss commented Jun 12, 2022

Small changes to the search and rescue mission code which fixes two bugs in the refueling mission.

Description

If the mission requires the player to deliver more hydrogen to the stranded ship than the player has in his cargo hold (e.g. if the players cargo hold is too small to load all needed hydrogen), the player is now able to deliver the hydrogen in multiple passes, i.e., deliver hydrogen, fly back to a space port to get more hydrogen, deliver the additional hydrogen, get more hydrogen if needed, and so on, until finished.

Before the fix, the stranded ship would only accept 1t of additional hydrogen in the second and every subsequent pass, even though more hydrogen was available. Now all hydrogen in the cargo space is used in every pass.

This fixes #5238.

The second bug was that, if the player had hydrogen left in his cargo hold after completing the refueling, this unused hydrogen would be deleted upon returning to the star port. This is now also fixed, unused hydrogen is not touched.

Remarks

  • Both bugs are simple copy-and-paste errors that seem to have been present ever since the search-and-rescue mission was added to pioneer.

  • Tested with own saved game and with the savefile from Search and Rescue Fueling mission breaks after first trip. #5238.

  • It seems that in the search and rescue code it was also intended that the player could deliver replacement crew to a stranded ship in multiple passes. However, this is not possible in the current pioneer version, since when accepting the rescue mission it is checked that the player has at least as many (free) passenger cabins as there are replacement crew members. If the player would be able to accept the mission with fewer cabins (one free cabin minimum), then in principle a multi pass crew transfer would be possible. But I have not checked that this actually works.

- After a partial refueling, continue refueling normally when
  player comes back with more hydrogen. Resolves pioneerspacesim#5238.
- Do not delete unused hydrogen from player's cargo hold after
  mission has been completed.
@impaktor
Copy link
Member

Good work!

@impaktor impaktor force-pushed the master branch 3 times, most recently from 876b6fc to b5bc47c Compare July 6, 2022 13:11
@Web-eWorks Web-eWorks merged commit 24d7731 into pioneerspacesim:master Jul 8, 2022
@cwyss cwyss deleted the sar-fix branch October 29, 2023 12:22
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.

Search and Rescue Fueling mission breaks after first trip.
3 participants