mirror of https://github.com/kami-blue/client
[fix] Setting names in CoordsLog to be more clear
This commit is contained in:
parent
40f0c444db
commit
d1ecb21675
|
@ -17,9 +17,9 @@ object CoordsLog : Module(
|
|||
description = "Automatically logs your coords, based on actions",
|
||||
category = Category.MISC
|
||||
) {
|
||||
private val saveOnDeath = setting("SaveOnDeath", true)
|
||||
private val autoLog = setting("AutoLog", false)
|
||||
private val delay = setting("Delay", 15, 1..60, 1)
|
||||
private val saveOnDeath by setting("SaveOnDeath", true)
|
||||
private val logEveryX by setting("LogEveryX", false)
|
||||
private val delay by setting("DelayMinutes", 15, 1..60, 1)
|
||||
|
||||
private var previousCoord: String? = null
|
||||
private var savedDeath = false
|
||||
|
@ -27,16 +27,16 @@ object CoordsLog : Module(
|
|||
|
||||
init {
|
||||
safeListener<TickEvent.ClientTickEvent> {
|
||||
if (autoLog.value && timer.tick(delay.value.toLong())) {
|
||||
if (logEveryX && timer.tick(delay.toLong())) {
|
||||
val currentCoord = player.positionVector.toBlockPos().asString()
|
||||
|
||||
if (currentCoord != previousCoord) {
|
||||
WaypointManager.add("autoLogger")
|
||||
WaypointManager.add("CoordsLog")
|
||||
previousCoord = currentCoord
|
||||
}
|
||||
}
|
||||
|
||||
if (saveOnDeath.value) {
|
||||
if (saveOnDeath) {
|
||||
savedDeath = if (player.isDead || player.health <= 0.0f) {
|
||||
if (!savedDeath) {
|
||||
val deathPoint = WaypointManager.add("Death - " + InfoCalculator.getServerType()).pos
|
||||
|
@ -50,4 +50,4 @@ object CoordsLog : Module(
|
|||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue