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

Exploration: calculate estimated celestial body value #2

Merged
merged 3 commits into from
May 14, 2024
Merged

Exploration: calculate estimated celestial body value #2

merged 3 commits into from
May 14, 2024

Conversation

Somfic
Copy link
Contributor

@Somfic Somfic commented May 14, 2024

Hi!

I'm adopting the "rewrite everything in Rust" mindset, so I wanted to contribute to this project :)

I've added an exploration module with a calculate_estimated_worth function, which calculates the estimated scan worth of a celestial body by giving it a ScanEvent. It takes into consideration the body type, whether the body is terraformable, whether this is a First Discovery, and whether this is the first time the body has been mapped. It does this according to the algorithm used in EDDiscovery.

Looking forward to seeing progress on this repo!

This function can be used to calculate the estimated worth given a `ScanEvent`.  The algorithms are derived from the formulas used in [**EDDiscovery**](https://github.com/EDDiscovery/EliteDangerousCore/blob/master/EliteDangerous/EliteDangerous/EstimatedValues.cs).
@Somfic
Copy link
Contributor Author

Somfic commented May 14, 2024

Compilation currently fails because of an unrelated syntax error.

error: expected `,` following `match` arm
   --> ed-journals\src\modules\shared\exploration\species.rs:342:66
    |
342 |                 Species::CrystallineShards => "Crystaline Shards"
    |                                                                  ^ help: missing a comma here to end this `match` arm: `,`

@rster2002
Copy link
Owner

Hi thanks for the PR; already looking good! Tests on master are failing anyway so this is probably just a result of that 😅

@rster2002 rster2002 merged commit a1895eb into rster2002:master May 14, 2024
1 of 3 checks passed
@rster2002
Copy link
Owner

Thanks again for the PR. Just merged!

@Somfic
Copy link
Contributor Author

Somfic commented May 14, 2024

no probs :) I'll keep my eye out for open issues in this repo, would love to contribute more

@rster2002
Copy link
Owner

rster2002 commented May 14, 2024

Currently not yet really creating issues as the codebase is still a bit of a mess and shifting around a lot, but if you happen to see anything or have ideas feel free to just create an issue/PR

nvm added some issues, but also just feel free to work on anything else if you see something that you would want to work on.

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.

2 participants