rster2002 / ed-journals

Work in progress journal parsing and utilities for Elite Dangerous written in Rust.
https://crates.io/crates/ed-journals
MIT License
2 stars 2 forks source link

Exploration: calculate estimated celestial body value #2

Closed Somfic closed 2 months ago

Somfic commented 2 months ago

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!

Somfic commented 2 months ago

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 commented 2 months ago

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

rster2002 commented 2 months ago

Thanks again for the PR. Just merged!

Somfic commented 2 months ago

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

rster2002 commented 2 months ago

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.