Our Servers > Development

Mining E2 Functions

(1/3) > >>

kevinminion:
I've been working on some E2 functions tonight for the SB mining add-on, so far I have:

  entity:IsAsteroid() - Is the entity an asteroid?
  entity:ResourceAmount() - How many units of the asteroid are resources (not rock)
  entity:TotalResourceAmount() - How many total units (resource + rock) are in the asteroid

I have not really played the mining addon all that much, so any requests for additional functions will be considered.

I'm also open to suggestions for the function names themselves...


kevinminion:
Question: There are groups for the asteroid resources for the mining storage.  Does anyone know the order by rarity?
                 Currently I have them ranked as Abundant, Common, Uncommon, Precious, Rare, Very Rare

New or updated functions:

   entity:Resources() - Returns a table of resource names and amounts
   entity:Resource(string) - returns the amount of specified resource in an asteroid
   entity:ResourceDifficulty(string) - Difficulty (rating?) of a specified resource

bloxgate:
I think you have it right. I can check when I get home today.

kevinminion:
I created an E2 to display a "periodic table" of the mining elements.

Not sure how I'm going to use this in-game, but it was a project I wanted to do.

Lehr suggested that I attach it to the storage and display the amount in each box.

Any other feedback is welcomed.

Edit: Due to poor penmanship, I erroneously put in Indium (In) when it should have been Iridium (Ir)

kevinminion:
A satellite that mines precious resources, still a work in progress.

Navigation

[0] Message Index

[#] Next page

Go to full version