BloxGaming Forums

Our Servers => BloxGaming SB3 => Development => Topic started by: kevinminion on September 19, 2016, 12:52:53 am

Title: Mining E2 Functions
Post by: kevinminion on September 19, 2016, 12:52:53 am
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...


Title: Re: Mining E2 Functions
Post by: kevinminion on September 25, 2016, 11:08:20 pm
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
Title: Re: Mining E2 Functions
Post by: bloxgate on September 26, 2016, 07:56:50 am
I think you have it right. I can check when I get home today.
Title: Re: Mining E2 Functions
Post by: kevinminion on October 02, 2016, 11:15:19 pm
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)
Title: Re: Mining E2 Functions
Post by: kevinminion on October 02, 2016, 11:43:14 pm
A satellite that mines precious resources, still a work in progress.
Title: Re: Mining E2 Functions
Post by: bloxgate on October 02, 2016, 11:45:33 pm
Uh... what's Ob supposed to be on that periodic table?
Title: Re: Mining E2 Functions
Post by: Shifty on October 03, 2016, 09:03:26 am
@bloxgate Obsidian, maybe?  I can't remember if obsidian is a resource or not.
Title: Re: Mining E2 Functions
Post by: kevinminion on October 03, 2016, 04:06:51 pm
It is Obsidian... not a real element, so I made up a symbol for it
Title: Re: Mining E2 Functions
Post by: kevinminion on October 04, 2016, 08:32:13 pm
New or updated functions:

   entity:HasResource(string) - Returns true if the specified resource exists in an asteroid (Iron, Gold, Silver, etc.)
   entity:HasResourceGroup(string) - Returns true if the specified resource group exists in an asteroid (Common, Precious, Rare, etc.)

Title: Re: Mining E2 Functions
Post by: kevinminion on October 04, 2016, 11:51:26 pm
My latest E2, it marks the location of each asteroid using the entity:hasResourceGroup(string) function to classify them
Title: Space Build Mining Addon e2 Functions
Post by: kevinminion on October 14, 2016, 11:36:04 pm
Sending Revision 2016-10-15 to @bloxgate tonight!

Code: [Select]
//======================================\\
|| Space Build Mining Addon e2 Functions ||
||           by Kevin Minion             ||
||---------------------------------------||
||  sbmaIsAsteroid()                     ||
||  sbmaMaxCapacity()                    ||
||  sbmaTotalResources()                 ||
||  sbmaHasResource(string)              ||
||  sbmaGetAllResources()                ||
||  sbmaGetResource(string)              ||
||  sbmaResourceDifficulty(string)       ||
||  sbmaHasResourceGroup(string)         ||
\\======================================//

Usage:

number = entity:sbmaIsAsteroid() - Returns 1 if entity is an asteroid
number = entity:sbmaMaxCapacity() - Returns how many total units (resource + rock) are in the asteroid
number = entity:sbmaTotalResources() - Returns how many units of the asteroid are resources (not rock)
number = entity:sbmaHasResource(string) - Returns 1 if the specified resource exists in an asteroid
table = entity:sbmaGetAllResources() - Returns a table of resource names and amounts
number = entity:sbmaGetResource(string) - Returns the amount of specified resource in an asteroid
number = entity:sbmaResourceDifficulty(string) - Returns the difficulty (rating?) of a specified resource
number = entity:sbmaHasResourceGroup(string) - Returns 1 if the specified resource group exists in an asteroid