Merge pull request #4399 from Abextm/map-clue-description

cluescrolls: Add description to map clues
This commit is contained in:
Adam
2018-07-21 20:50:04 -04:00
committed by GitHub

View File

@@ -82,16 +82,17 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
new MapClue(CLUE_SCROLL_HARD_7239, new WorldPoint(3021, 3912, 0)),
new MapClue(CLUE_SCROLL_HARD_7241, new WorldPoint(2722, 3338, 0)),
new MapClue(CLUE_SCROLL_ELITE_12130, new WorldPoint(2449, 3130, 0)),
new MapClue(CLUE_SCROLL_ELITE_19782, new WorldPoint(2953, 9523, 1)),
new MapClue(CLUE_SCROLL_ELITE_19782, new WorldPoint(2953, 9523, 1), "In the Mogre Camp, near Port Khazard. You require a Diving Apparatus and a Fishbowl Helmet"),
new MapClue(CLUE_SCROLL_ELITE_19783, new WorldPoint(2202, 3062, 0)),
new MapClue(CLUE_SCROLL_ELITE_19784, new WorldPoint(1815, 3852, 0)),
new MapClue(CLUE_SCROLL_ELITE_19785, new WorldPoint(3538, 3208, 0)),
new MapClue(CLUE_SCROLL_ELITE_19786, new WorldPoint(2703, 2716, 0), CRATE_6616)
);
private int itemId;
private WorldPoint location;
private int objectId;
private final int itemId;
private final WorldPoint location;
private final int objectId;
private final String description;
private MapClue(int itemId, WorldPoint location)
{
@@ -99,10 +100,21 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
}
private MapClue(int itemId, WorldPoint location, int objectId)
{
this(itemId, location, objectId, null);
}
private MapClue(int itemId, WorldPoint location, String description)
{
this(itemId, location, -1, description);
}
private MapClue(int itemId, WorldPoint location, int objectId, String description)
{
this.itemId = itemId;
this.location = location;
this.objectId = objectId;
this.description = description;
}
@Override
@@ -135,6 +147,14 @@ public class MapClue extends ClueScroll implements ObjectClueScroll
.left("Travel to the destination and dig on the marked tile.")
.build());
}
if (description != null)
{
panelComponent.getChildren().add(LineComponent.builder().build());
panelComponent.getChildren().add(LineComponent.builder()
.left(description)
.build());
}
}
@Override