Alright, so far,
When mining, you got 2 choices, asteroids or gas giants, the script is checking for asteroids only:
List asteroids = system.getAsteroids();
Once the fleet is near a asteroid it should everyday generate x numbers of a CargoType, in this particular case, its Supplies (this ofc, after checking if your fleet has a ship capable of mining AND how many ships and how effective each ship can mine):
System.out.println(MathUtils.getDistanceSquared(playerFleet.getLocation(), asteroidLocation));
playerFleet.getCargo().addSupplies(50*miningPower) ;
Global.getSector().addMessage("Mined " + 50*miningPower + " supplies", Color.green);
System.out.println("Mined " + 50*miningPower + " supplies");
The easy way would be to change that addSupplies to addItem and get your custom items, maybe with a x chance of getting certain resources, but there are 2 problems with this:
1st Everytime you add a new resource you have to add more code here, this would be fine with 5 or 6 max, if it grows to 10+ it can become a problem
2nd The asteroids, they are all the same, it matters little to what u picked to be mined, the results are always based on the ships used.
So how do we spice up?
By creating a class for asteroids, each time you get close to one, it creates a new asteroid class, this class add properties to it like, size, type, amount of minerals, chances of x mineral. This list (for now) is filled automatically, this also means it wont be saved sadly. In 0.6a you can create JSON/CSV files to fill these automaticly or even add to the save file so it actually have the same list with no changes.