package org.pfaa.geologica.processing;

import org.pfaa.chemica.model.IndustrialMaterial;
import org.pfaa.chemica.model.Mixture;
import org.pfaa.chemica.model.SimpleMixture;

public class SimpleOre extends SimpleMixture implements Ore {

	private Mineral concentrate;

	public SimpleOre(Mineral concentrate) {
		super(concentrate);
		this.concentrate = concentrate;
	}
	
	private SimpleOre(Mineral concentrate, Mixture mixture) {
		super(mixture.getComponents());
		this.concentrate = concentrate;
	}

	@Override
	public Mineral getConcentrate() {
		return concentrate;
	}

	public Ore mix(IndustrialMaterial material, double weight) {
		Mixture mixture = super.mix(material, weight);
		return new SimpleOre(this.concentrate, mixture);
	}
	
	@Override
	public String name() {
		return concentrate.name() + " ore";
	}

	@Override
	public String getOreDictKey() {
		return concentrate.getOreDictKey();
	}
}

@@ -364,16 +364,85 @@
 e;%0A%09%7D%0A%09%0A
+%09public SimpleOre(Ore ore) %7B%0A%09%09this(ore.getConcentrate(), ore);%0A%09%7D%0A%09%0A
 %09private
@@ -559,24 +559,25 @@
 entrate;%0A%09%7D%0A
+%09
 %0A%09@Override%0A

add missing constructor used by vanilla ore mimic