Akuukis / sepraisal

Analyse and compare Space Engineers blueprints - either uploaded or browse 100k+ steam workshop items.
https://spaceengineerspraisal.net
GNU General Public License v3.0
2 stars 4 forks source link

calculate the approximate "cost" in SC #36

Open Akuukis opened 4 years ago

Akuukis commented 4 years ago

Is your feature request related to a problem? Please describe.

Calculate the approximate "cost" in SC.

Describe the solution you'd like

I was wondering if you think it might one day be possible to check the components list vs the average cost of components from the trade stations, and calculate the approximate "cost" in SC of a given blueprint. Just a suggestion, i'd love to see it!

Additional context

Copied from DM.

Akuukis commented 4 years ago

Seems straightforward to do. Some thoughts on how to implement that

1. Get prices

  1. make a JSON datafile with prices somewhere in praisal/vendor folder. Structure may be a object where keys are component subtypes and values are the prices. Make an interface for it.
  2. The most tricky part of this - make some methodology to get the numbers and write it down in README or elsewhere, so that later we can follow it to update the prices. . Bonus points for automated bash script that does the whole thing.
  3. Get the numbers.

2. Make SEPraisal to know the price of each component

  1. look where PraisalManager.addComponentsSbc is used and pass the content of databse that just like the sbc file is. And change the params of it to take such an object with such an interface.
  2. add componentPrice to IParseComponentSbc and parseComponentSbc
  3. add componentPrice to IComponentDTO and Component

3. Make SEPraisal to report the price of the whole blueprint

  1. add componentPrice to IBlueprint.IMaterialGroupFull next to componentMass and others. IBlueprint.ISbc extends that.
  2. add componentPrice to Praisal similar to componentMass.
  3. add componentPrice to Praisal.toBlueprintSbc function.