BloxGaming Forums
Our Servers => BloxGaming SB3 => Development => Topic started 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...
-
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
-
I think you have it right. I can check when I get home today.
-
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)
-
A satellite that mines precious resources, still a work in progress.
-
Uh... what's Ob supposed to be on that periodic table?
-
@bloxgate Obsidian, maybe? I can't remember if obsidian is a resource or not.
-
It is Obsidian... not a real element, so I made up a symbol for it
-
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.)
-
My latest E2, it marks the location of each asteroid using the entity:hasResourceGroup(string) function to classify them
-
Sending Revision 2016-10-15 to @bloxgate tonight!
//======================================\\
|| 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