timetracking: Support Prifddinas patches

This commit is contained in:
Max Weber
2019-07-26 06:48:07 -06:00
parent 029fd5e372
commit f005e18295
3 changed files with 39 additions and 3 deletions

View File

@@ -244,6 +244,13 @@ class FarmingWorld
new FarmingPatch("", Varbits.FARMING_7907, PatchImplementation.REDWOOD)
));
add(new FarmingRegion("Prifddinas", 13151,
new FarmingPatch("North", Varbits.FARMING_4771, PatchImplementation.ALLOTMENT),
new FarmingPatch("South", Varbits.FARMING_4772, PatchImplementation.ALLOTMENT),
new FarmingPatch("", Varbits.FARMING_4773, PatchImplementation.FLOWER),
new FarmingPatch("", Varbits.FARMING_4775, PatchImplementation.CRYSTAL_TREE)
));
// Finalize
this.regions = Collections.unmodifiableMap(regions);
Map<Tab, Set<FarmingPatch>> umtabs = new TreeMap<>();

View File

@@ -224,7 +224,7 @@ public enum PatchImplementation
}
if (value >= 63 && value <= 69)
{
// snape grass seedling,Snape grass plant[Inspect,Guide] 33674,33675,33676,33677,33678,33679,33680
// Snape grass seedling,Snape grass plant[Inspect,Guide] 33674,33675,33676,33677,33678,33679,33680
return new PatchState(Produce.SNAPE_GRASS, CropState.GROWING, value - 63);
}
if (value >= 70 && value <= 73)
@@ -2391,7 +2391,7 @@ public enum PatchImplementation
}
if (value >= 46 && value <= 51)
{
// Diseased Poato cactus[Cure,Inspect,Guide] 33749,33750,33751,33752,33753,33754
// Diseased Potato cactus[Cure,Inspect,Guide] 33749,33750,33751,33752,33753,33754
return new PatchState(Produce.POTATO_CACTUS, CropState.DISEASED, value - 45);
}
if (value >= 52 && value <= 57)
@@ -2575,6 +2575,34 @@ public enum PatchImplementation
}
return null;
}
},
CRYSTAL_TREE(Tab.FRUIT_TREE, "Crystal Tree")
{
@Override
PatchState forVarbitValue(int value)
{
if (value >= 0 && value <= 3)
{
// Crystal tree patch[Rake,Inspect,Guide] 34910,34909,34908,34907
return new PatchState(Produce.WEEDS, CropState.GROWING, 3 - value);
}
if (value >= 8 && value <= 13)
{
// Crystal tree[Inspect,Guide] 34911,34912,34913,34914,34915,34916
return new PatchState(Produce.CRYSTAL_TREE, CropState.GROWING, value - 8);
}
if (value == 14)
{
// Crystal tree[Check-health,Inspect,Guide] 34917
return new PatchState(Produce.CRYSTAL_TREE, CropState.GROWING, Produce.CRYSTAL_TREE.getStages() - 1);
}
if (value == 15)
{
// Crystal tree[Chop-down,Inspect,Guide] 34918
return new PatchState(Produce.CRYSTAL_TREE, CropState.HARVESTABLE, 0);
}
return null;
}
};
@Nullable

View File

@@ -129,7 +129,8 @@ public enum Produce
SPIRIT_TREE("Spirit tree", ItemID.SPIRIT_TREE, 320, 13),
CELASTRUS("Celastrus", ItemID.BATTLESTAFF, 160, 6, 0, 4),
REDWOOD("Redwood", ItemID.REDWOOD_LOGS, 640, 11),
HESPORI("Hespori", NullItemID.NULL_23044, 640, 4, 0, 2);
HESPORI("Hespori", NullItemID.NULL_23044, 640, 4, 0, 2),
CRYSTAL_TREE("Crystal tree", ItemID.CRYSTAL_SHARDS, 80, 7);
/**
* User-visible name