feat(core): show battery level

This commit is contained in:
rhunk
2024-08-20 10:25:42 +02:00
parent a877c04461
commit e4c4af8a63
4 changed files with 22 additions and 2 deletions

View File

@@ -771,6 +771,10 @@
"spoof_headphones": {
"name": "Spoof Headphones",
"description": "Spoofs the status of listening to music on map"
},
"show_battery_level": {
"name": "Show Battery Level",
"description": "Shows the battery level of your friends on the map"
}
}
},

View File

@@ -27,6 +27,7 @@ class Global : ConfigContainer() {
val suspendLocationUpdates = boolean("suspend_location_updates")
val spoofBatteryLevel = string("spoof_battery_level") { requireRestart(); inputCheck = { it.isEmpty() || it.toIntOrNull() in 0..100 } }
val spoofHeadphones = boolean("spoof_headphones") { requireRestart() }
val showBatteryLevel = boolean("show_battery_level") { requireRestart() }
}
inner class MediaUploadQualityConfig : ConfigContainer() {

View File

@@ -201,6 +201,9 @@ class ProtoReader(private val buffer: ByteArray) {
return value
}
@JSFunction
fun getFixed32(vararg ids: Int) = followPath(*ids, excludeLast = true)?.getFixed32(ids.last())
private fun prettyPrint(tabSize: Int): String {
val tabLine = " ".repeat(tabSize)
val stringBuilder = StringBuilder()