Gregtech++ [GT++] [GTplusplus]

Gregtech++ [GT++] [GTplusplus]

94.1k Downloads

Some Materials in Multiblock recipes need dynamic costs of EU and time.

Dream-Master opened this issue ยท 3 comments

commented

Gotta change

if (M.mBlastFurnaceRequired) {
CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 500);							
}
else {
CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, duration, 240);	
}

to utilize the code below.

//Sets the materials 'tier'. Will probably replace this logic.
vTier = MaterialUtils.getTierOfMaterial((int) MathUtils.celsiusToKelvin(meltingPoint));
vVoltageMultiplier = this.getMeltingPointK() >= 2800 ? 64 : 16;
CORE.RA.addBlastSmelterRecipe(components, M.getMolten(fluidAmount), 100, (int) Math.max(material.getMass() * 2L * 1, 1), // Time (From memory)
4 * material.vVoltageMultiplier) // EU Cost);

And make the 2800 boolean more flexible.

commented
int duration = 0;
if (M.mBlastFurnaceTemp > 150){
duration = (int) Math.max(M.getMass() / 50L, 1L) * M.mBlastFurnaceTemp;
}
else {
duration = (int) Math.max(M.getMass() / 50L, 1L) * 150;	
}

Note to self, don't change duration handler.

commented
int x = this.getMeltingPointK();
vVoltageMultiplier = (x <= 800 ? 4 : (x <= 1600 ? 16 : (x <= 2800 ? 32 : (x <= 3600 ? 64 : (x <= 4200 ? 128 : (x <= 5400 ? 256 : (x <= 7200 ? 512 : 1024)))))));

That should be voltage multiplier.