diff options
| author | Thunderblade73 <85900443+Thunderblade73@users.noreply.github.com> | 2024-06-09 11:48:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-09 11:48:56 +0200 |
| commit | 7f593e59c872daffd64f91ac70f7f8689a590c27 (patch) | |
| tree | 87dc7aaf7c7c5e3277bee932f0da0fd49f1a2a18 /src/main/java/at/hannibal2/skyhanni/config | |
| parent | ffcfa1f6ed831817be918d3bbb42d87088f0bf5d (diff) | |
| download | skyhanni-7f593e59c872daffd64f91ac70f7f8689a590c27.tar.gz skyhanni-7f593e59c872daffd64f91ac70f7f8689a590c27.tar.bz2 skyhanni-7f593e59c872daffd64f91ac70f7f8689a590c27.zip | |
Backend: Storage SimpleTimeMark (#2038)
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/config')
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java | 4 | ||||
| -rw-r--r-- | src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java | 33 |
2 files changed, 24 insertions, 13 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java index a03928745..171cb82b1 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/PlayerSpecificStorage.java @@ -2,7 +2,9 @@ package at.hannibal2.skyhanni.config.storage; import at.hannibal2.skyhanni.features.bingo.card.goals.BingoGoal; import at.hannibal2.skyhanni.features.fame.UpgradeReminder; +import at.hannibal2.skyhanni.utils.GenericWrapper; import at.hannibal2.skyhanni.utils.NEUInternalName; +import at.hannibal2.skyhanni.utils.SimpleTimeMark; import com.google.gson.annotations.Expose; import java.util.ArrayList; @@ -24,7 +26,7 @@ public class PlayerSpecificStorage { public Integer gardenCommunityUpgrade = -1; @Expose - public long nextCityProjectParticipationTime = 0L; + public SimpleTimeMark nextCityProjectParticipationTime = GenericWrapper.getSimpleTimeMark(SimpleTimeMark.farPast()).getIt(); @Expose public UpgradeReminder.CommunityShopUpgrade communityShopAccountUpgrade = null; diff --git a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java index bc25da446..9d0ca44f9 100644 --- a/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java +++ b/src/main/java/at/hannibal2/skyhanni/config/storage/ProfileSpecificStorage.java @@ -35,6 +35,7 @@ import at.hannibal2.skyhanni.features.rift.area.westvillage.VerminTracker; import at.hannibal2.skyhanni.features.rift.area.westvillage.kloon.KloonTerminal; import at.hannibal2.skyhanni.features.skillprogress.SkillType; import at.hannibal2.skyhanni.features.slayer.SlayerProfitTracker; +import at.hannibal2.skyhanni.utils.GenericWrapper; import at.hannibal2.skyhanni.utils.LorenzVec; import at.hannibal2.skyhanni.utils.NEUInternalName; import at.hannibal2.skyhanni.utils.SimpleTimeMark; @@ -50,6 +51,10 @@ import java.util.Set; public class ProfileSpecificStorage { + private static SimpleTimeMark SimpleTimeMarkFarPast() { + return GenericWrapper.getSimpleTimeMark(SimpleTimeMark.farPast()).getIt(); + } + @Expose public String currentPet = ""; @@ -85,10 +90,10 @@ public class ProfileSpecificStorage { public int timeTowerLevel = 0; @Expose - public long currentTimeTowerEnds = 0; + public SimpleTimeMark currentTimeTowerEnds = SimpleTimeMarkFarPast(); @Expose - public long nextTimeTower = 0; + public SimpleTimeMark nextTimeTower = SimpleTimeMarkFarPast(); @Expose public int currentTimeTowerUses = -1; @@ -103,20 +108,21 @@ public class ProfileSpecificStorage { public boolean hasMuRabbit = false; @Expose - public long bestUpgradeAvailableAt = 0; + public SimpleTimeMark bestUpgradeAvailableAt = SimpleTimeMarkFarPast(); @Expose public long bestUpgradeCost = 0; @Expose - public long lastDataSave = 0; + public SimpleTimeMark lastDataSave = SimpleTimeMarkFarPast(); @Expose public PositionChange positionChange = new PositionChange(); public static class PositionChange { @Expose - public Long lastTime = null; + @Nullable + public SimpleTimeMark lastTime = null; @Expose public int lastPosition = -1; @@ -183,7 +189,8 @@ public class ProfileSpecificStorage { public int bitsAvailable = -1; @Expose - public Long boosterCookieExpiryTime = null; + @Nullable + public SimpleTimeMark boosterCookieExpiryTime = null; } @Expose @@ -194,6 +201,7 @@ public class ProfileSpecificStorage { @Expose public String displayName = ""; + // TODO use SimpleTimeMark @Expose public long lastClicked = -1; @@ -212,7 +220,8 @@ public class ProfileSpecificStorage { public static class BeaconPowerStorage { @Expose - public Long beaconPowerExpiryTime = null; + @Nullable + public SimpleTimeMark beaconPowerExpiryTime = null; @Expose public String boostedStat = null; @@ -267,16 +276,16 @@ public class ProfileSpecificStorage { public DicerRngDropTracker.Data dicerDropTracker = new DicerRngDropTracker.Data(); @Expose - public long informedAboutLowMatter = 0; + public SimpleTimeMark informedAboutLowMatter = SimpleTimeMarkFarPast(); @Expose - public long informedAboutLowFuel = 0; + public SimpleTimeMark informedAboutLowFuel = SimpleTimeMarkFarPast(); @Expose public long visitorInterval = 15 * 60_000L; @Expose - public long nextSixthVisitorArrival = 0; + public SimpleTimeMark nextSixthVisitorArrival = SimpleTimeMarkFarPast(); @Expose public ArmorDropTracker.Data armorDropTracker = new ArmorDropTracker.Data(); @@ -388,10 +397,10 @@ public class ProfileSpecificStorage { } @Expose - public long composterEmptyTime = 0; + public SimpleTimeMark composterEmptyTime = SimpleTimeMarkFarPast(); @Expose - public long lastComposterEmptyWarningTime = 0; + public SimpleTimeMark lastComposterEmptyWarningTime = SimpleTimeMarkFarPast(); @Expose public GardenStorage.FarmingWeightConfig farmingWeight = new GardenStorage.FarmingWeightConfig(); |
