mining: update duration to use GAME_TICKS instead of milliseconds
This commit is contained in:
@@ -44,8 +44,8 @@ import net.runelite.client.ui.overlay.components.ProgressPieComponent;
|
|||||||
class MiningOverlay extends Overlay
|
class MiningOverlay extends Overlay
|
||||||
{
|
{
|
||||||
// Range of Motherlode vein respawn time - not 100% confirmed but based on observation
|
// Range of Motherlode vein respawn time - not 100% confirmed but based on observation
|
||||||
static final int ORE_VEIN_MAX_RESPAWN_TIME = 166;
|
static final int ORE_VEIN_MAX_RESPAWN_TIME = 277; // Game ticks
|
||||||
private static final int ORE_VEIN_MIN_RESPAWN_TIME = 90;
|
private static final int ORE_VEIN_MIN_RESPAWN_TIME = 150; // Game ticks
|
||||||
private static final float ORE_VEIN_RANDOM_PERCENT_THRESHOLD = (float) ORE_VEIN_MIN_RESPAWN_TIME / ORE_VEIN_MAX_RESPAWN_TIME;
|
private static final float ORE_VEIN_RANDOM_PERCENT_THRESHOLD = (float) ORE_VEIN_MIN_RESPAWN_TIME / ORE_VEIN_MAX_RESPAWN_TIME;
|
||||||
private static final Color DARK_GREEN = new Color(0, 100, 0);
|
private static final Color DARK_GREEN = new Color(0, 100, 0);
|
||||||
private static final int MOTHERLODE_UPPER_FLOOR_HEIGHT = -500;
|
private static final int MOTHERLODE_UPPER_FLOOR_HEIGHT = -500;
|
||||||
|
|||||||
@@ -30,20 +30,21 @@ import java.util.Map;
|
|||||||
import lombok.AccessLevel;
|
import lombok.AccessLevel;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import static net.runelite.api.ObjectID.*;
|
import static net.runelite.api.ObjectID.*;
|
||||||
|
import static net.runelite.client.util.RSTimeUnit.*;
|
||||||
|
|
||||||
enum Rock
|
enum Rock
|
||||||
{
|
{
|
||||||
TIN(Duration.ofMillis(2400), 0, ROCKS_11360, ROCKS_11361),
|
TIN(Duration.of(4, GAME_TICKS), 0, ROCKS_11360, ROCKS_11361),
|
||||||
COPPER(Duration.ofMillis(2400), 0, ROCKS_10943, ROCKS_11161),
|
COPPER(Duration.of(4, GAME_TICKS), 0, ROCKS_10943, ROCKS_11161),
|
||||||
IRON(Duration.ofMillis(5400), 0, ROCKS_11364, ROCKS_11365, ROCKS_36203)
|
IRON(Duration.of(9, GAME_TICKS), 0, ROCKS_11364, ROCKS_11365, ROCKS_36203)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
Duration getRespawnTime(int region)
|
Duration getRespawnTime(int region)
|
||||||
{
|
{
|
||||||
return region == MINING_GUILD ? Duration.ofMillis(2400) : super.respawnTime;
|
return region == MINING_GUILD ? Duration.of(4, GAME_TICKS) : super.respawnTime;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
COAL(Duration.ofMillis(29400), 0, ROCKS_11366, ROCKS_11367, ROCKS_36204)
|
COAL(Duration.of(49, GAME_TICKS), 0, ROCKS_11366, ROCKS_11367, ROCKS_36204)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
Duration getRespawnTime(int region)
|
Duration getRespawnTime(int region)
|
||||||
@@ -51,46 +52,46 @@ enum Rock
|
|||||||
switch (region)
|
switch (region)
|
||||||
{
|
{
|
||||||
case MINING_GUILD:
|
case MINING_GUILD:
|
||||||
return Duration.ofMillis(14400);
|
return Duration.of(24, GAME_TICKS);
|
||||||
case MISCELLANIA:
|
case MISCELLANIA:
|
||||||
return Duration.ofMillis(6600);
|
return Duration.of(11, GAME_TICKS);
|
||||||
default:
|
default:
|
||||||
return super.respawnTime;
|
return super.respawnTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
SILVER(Duration.ofMinutes(1), 0, ROCKS_11368, ROCKS_11369, ROCKS_36205),
|
SILVER(Duration.of(100, GAME_TICKS), 0, ROCKS_11368, ROCKS_11369, ROCKS_36205),
|
||||||
SANDSTONE(Duration.ofMillis(5400), 0, ROCKS_11386),
|
SANDSTONE(Duration.of(9, GAME_TICKS), 0, ROCKS_11386),
|
||||||
GOLD(Duration.ofMinutes(1), 0, ROCKS_11370, ROCKS_11371, ROCKS_36206),
|
GOLD(Duration.of(100, GAME_TICKS), 0, ROCKS_11370, ROCKS_11371, ROCKS_36206),
|
||||||
GRANITE(Duration.ofMillis(5400), 0, ROCKS_11387),
|
GRANITE(Duration.of(9, GAME_TICKS), 0, ROCKS_11387),
|
||||||
MITHRIL(Duration.ofMinutes(2), 0, ROCKS_11372, ROCKS_11373, ROCKS_36207)
|
MITHRIL(Duration.of(200, GAME_TICKS), 0, ROCKS_11372, ROCKS_11373, ROCKS_36207)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
Duration getRespawnTime(int region)
|
Duration getRespawnTime(int region)
|
||||||
{
|
{
|
||||||
return region == MINING_GUILD ? Duration.ofMinutes(1) : super.respawnTime;
|
return region == MINING_GUILD ? Duration.of(100, GAME_TICKS) : super.respawnTime;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ADAMANTITE(Duration.ofMinutes(4), 0, ROCKS_11374, ROCKS_11375, ROCKS_36208)
|
ADAMANTITE(Duration.of(400, GAME_TICKS), 0, ROCKS_11374, ROCKS_11375, ROCKS_36208)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
Duration getRespawnTime(int region)
|
Duration getRespawnTime(int region)
|
||||||
{
|
{
|
||||||
return region == MINING_GUILD || region == WILDERNESS_RESOURCE_AREA ? Duration.ofMinutes(2) : super.respawnTime;
|
return region == MINING_GUILD || region == WILDERNESS_RESOURCE_AREA ? Duration.of(200, GAME_TICKS) : super.respawnTime;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
RUNITE(Duration.ofMinutes(12), 0, ROCKS_11376, ROCKS_11377, ROCKS_36209)
|
RUNITE(Duration.of(1200, GAME_TICKS), 0, ROCKS_11376, ROCKS_11377, ROCKS_36209)
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
Duration getRespawnTime(int region)
|
Duration getRespawnTime(int region)
|
||||||
{
|
{
|
||||||
return region == MINING_GUILD ? Duration.ofMinutes(6) : super.respawnTime;
|
return region == MINING_GUILD ? Duration.of(600, GAME_TICKS) : super.respawnTime;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
ORE_VEIN(Duration.ofSeconds(MiningOverlay.ORE_VEIN_MAX_RESPAWN_TIME), 150),
|
ORE_VEIN(Duration.of(MiningOverlay.ORE_VEIN_MAX_RESPAWN_TIME, GAME_TICKS), 150),
|
||||||
AMETHYST(Duration.ofSeconds(75), 120),
|
AMETHYST(Duration.of(125, GAME_TICKS), 120),
|
||||||
ASH_VEIN(Duration.ofSeconds(30), 0, ASH_PILE),
|
ASH_VEIN(Duration.of(50, GAME_TICKS), 0, ASH_PILE),
|
||||||
GEM_ROCK(Duration.ofMinutes(1), 0, ROCKS_11380, ROCKS_11381);
|
GEM_ROCK(Duration.of(100, GAME_TICKS), 0, ROCKS_11380, ROCKS_11381);
|
||||||
|
|
||||||
private static final int WILDERNESS_RESOURCE_AREA = 12605;
|
private static final int WILDERNESS_RESOURCE_AREA = 12605;
|
||||||
private static final int MISCELLANIA = 10044;
|
private static final int MISCELLANIA = 10044;
|
||||||
|
|||||||
Reference in New Issue
Block a user