Add highlighting of waterfall/lava pool when wrong temperature
This commit is contained in:
@@ -175,4 +175,33 @@ public class EasyGiantsFoundryState
|
|||||||
|
|
||||||
return Heat.NONE;
|
return Heat.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getHeatChangeNeeded()
|
||||||
|
{
|
||||||
|
Heat requiredHeat = getCurrentStage().getHeat();
|
||||||
|
int heat = getHeatAmount();
|
||||||
|
|
||||||
|
int[] range;
|
||||||
|
switch (requiredHeat)
|
||||||
|
{
|
||||||
|
case LOW:
|
||||||
|
range = getLowHeatRange();
|
||||||
|
break;
|
||||||
|
case MED:
|
||||||
|
range = getMedHeatRange();
|
||||||
|
break;
|
||||||
|
case HIGH:
|
||||||
|
range = getHighHeatRange();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (heat < range[0])
|
||||||
|
return range[0] - heat;
|
||||||
|
else if (heat > range[1])
|
||||||
|
return range[1] - heat;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,8 +105,11 @@ public class FoundryOverlay3D extends Overlay {
|
|||||||
Stage stage = state.getCurrentStage();
|
Stage stage = state.getCurrentStage();
|
||||||
|
|
||||||
GameObject stageObject = getStageObject(stage);
|
GameObject stageObject = getStageObject(stage);
|
||||||
if (stageObject != null)
|
if (stageObject == null)
|
||||||
{
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
Color color = getObjectColor(stage, heat);
|
Color color = getObjectColor(stage, heat);
|
||||||
Shape objectClickbox = stageObject.getClickbox();
|
Shape objectClickbox = stageObject.getClickbox();
|
||||||
if (objectClickbox != null)
|
if (objectClickbox != null)
|
||||||
@@ -124,11 +127,44 @@ public class FoundryOverlay3D extends Overlay {
|
|||||||
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
||||||
graphics.fill(objectClickbox);
|
graphics.fill(objectClickbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (color.equals(ColorScheme.PROGRESS_ERROR_COLOR))
|
||||||
|
{
|
||||||
|
drawHeatChangers(graphics);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void drawHeatChangers(Graphics2D graphics)
|
||||||
|
{
|
||||||
|
int change = state.getHeatChangeNeeded();
|
||||||
|
Shape shape = null;
|
||||||
|
if (change < 0)
|
||||||
|
{
|
||||||
|
shape = waterfall.getClickbox();
|
||||||
|
} else if (change > 0)
|
||||||
|
{
|
||||||
|
shape = lavaPool.getClickbox();
|
||||||
|
}
|
||||||
|
if (shape != null)
|
||||||
|
{
|
||||||
|
Point mousePosition = client.getMouseCanvasPosition();
|
||||||
|
Color color = ColorScheme.PROGRESS_COMPLETE_COLOR;
|
||||||
|
if (shape.contains(mousePosition.getX(), mousePosition.getY()))
|
||||||
|
{
|
||||||
|
graphics.setColor(color.darker());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
graphics.setColor(color);
|
||||||
|
}
|
||||||
|
graphics.draw(shape);
|
||||||
|
graphics.setColor(new Color(color.getRed(), color.getGreen(), color.getBlue(), 20));
|
||||||
|
graphics.fill(shape);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void drawCrucibleIfMouldSet(Graphics2D graphics)
|
private void drawCrucibleIfMouldSet(Graphics2D graphics)
|
||||||
{
|
{
|
||||||
if (client.getVarbitValue(MouldHelper.SWORD_TYPE_1_VARBIT) == 0)
|
if (client.getVarbitValue(MouldHelper.SWORD_TYPE_1_VARBIT) == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user