diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-23 22:34:07 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-23 22:34:07 +0200 |
commit | ef58e92c169ac94370c8a6dd48146587571cf8d2 (patch) | |
tree | 2573525c9c49f21194621a5b86ea3cb00f1fcf55 /src/main/java/at/hannibal2/skyhanni/data | |
parent | d1ee14065e1eafd1e0679bf4290087947d9564bd (diff) | |
download | skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.tar.gz skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.tar.bz2 skyhanni-ef58e92c169ac94370c8a6dd48146587571cf8d2.zip |
added rng meter coloring methods
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/ItemRenderBackground.kt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/ItemRenderBackground.kt b/src/main/java/at/hannibal2/skyhanni/data/ItemRenderBackground.kt index ad815ad23..9b25933ea 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/ItemRenderBackground.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/ItemRenderBackground.kt @@ -12,16 +12,16 @@ class ItemRenderBackground { companion object { - val map = mutableMapOf<ItemStack, Int>() - val mapTime = mutableMapOf<ItemStack, Long>() + private val mapColor = mutableMapOf<ItemStack, Int>() + private val mapTime = mutableMapOf<ItemStack, Long>() var ItemStack.background: Int get() { if (System.currentTimeMillis() > mapTime.getOrDefault(this, 0) + 200) return -1 - return map.getOrDefault(this, -1) + return mapColor.getOrDefault(this, -1) } set(value) { - map[this] = value + mapColor[this] = value mapTime[this] = System.currentTimeMillis() } } |