Fairy ring refactor

Reimplemented the travel log, fixes the issue where all the travel log interface text collapses in on itself
Travel log now displays the relevant code
Log sorting implemented
Fairy ring now remembers the last entered code and automatically re-enters it when opened
Fairy ring no longer skips letters
Direction clicks in quick succession now turn the wheel multiple times
This commit is contained in:
Ceikry
2024-10-06 10:21:58 +00:00
committed by Ryan
parent 8db9060a40
commit 6b0f942598
5 changed files with 129 additions and 104 deletions
+10 -1
View File
@@ -1253,10 +1253,19 @@ fun getVarbit (player: Player, varbitId: Int) : Int {
@JvmOverloads
fun setVarp (player: Player, varpIndex: Int, value: Int, save: Boolean = false) {
player.varpMap[varpIndex] = value
player.saveVarp[varpIndex] = save
if (player.saveVarp[varpIndex] != true && save)
player.saveVarp[varpIndex] = true //only set if we're choosing to save. Prevents accidental unsaving. if you REALLY want to unsave a varp, use unsaveVarp.
player.packetDispatch.sendVarp(varpIndex, value)
}
fun saveVarp (player: Player, varpIndex: Int) {
player.saveVarp[varpIndex] = true
}
fun unsaveVarp (player: Player, varpIndex: Int) {
player.saveVarp.remove(varpIndex)
}
@JvmOverloads
fun setVarbit (player: Player, def: VarbitDefinition, value: Int, save: Boolean = false) {
val mask = def.mask