diff options
author | Appability <appable@icloud.com> | 2022-10-13 18:58:00 -0700 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-10-13 18:58:00 -0700 |
commit | d0cbc11018c8126575117aaeb2b861957386fa9a (patch) | |
tree | c5419fb1f00b147604bded231c1388d6b391d27e /src/main/kotlin/com/ambientaddons/utils/dungeon | |
parent | c599ee0d78ed8bc17488636f2d9b9b1d5b6dd4a8 (diff) | |
download | AmbientAddons-d0cbc11018c8126575117aaeb2b861957386fa9a.tar.gz AmbientAddons-d0cbc11018c8126575117aaeb2b861957386fa9a.tar.bz2 AmbientAddons-d0cbc11018c8126575117aaeb2b861957386fa9a.zip |
steal a bunch of code from sbc! +melodyhelper, kuudra ready, wither shield overlay
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/utils/dungeon')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/utils/dungeon/DungeonPlayers.kt | 2 | ||||
-rw-r--r-- | src/main/kotlin/com/ambientaddons/utils/dungeon/TextStyle.kt | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/src/main/kotlin/com/ambientaddons/utils/dungeon/DungeonPlayers.kt b/src/main/kotlin/com/ambientaddons/utils/dungeon/DungeonPlayers.kt index ba21a04..e57443d 100644 --- a/src/main/kotlin/com/ambientaddons/utils/dungeon/DungeonPlayers.kt +++ b/src/main/kotlin/com/ambientaddons/utils/dungeon/DungeonPlayers.kt @@ -21,7 +21,7 @@ object DungeonPlayers { val rawPlayers = TabListUtils.fetchTabEntries().let { tabEntries -> playerSlots.map { tabEntries[it].text.stripControlCodes() } } - playerCount = rawPlayers.size + playerCount = rawPlayers.filter { it.isNotBlank() }.size } ticks++ } diff --git a/src/main/kotlin/com/ambientaddons/utils/dungeon/TextStyle.kt b/src/main/kotlin/com/ambientaddons/utils/dungeon/TextStyle.kt new file mode 100644 index 0000000..b1a5dce --- /dev/null +++ b/src/main/kotlin/com/ambientaddons/utils/dungeon/TextStyle.kt @@ -0,0 +1,14 @@ +package com.ambientaddons.utils.dungeon + +enum class TextStyle { + Default, Shadow, Outline; + + companion object { + fun fromInt(number: Int): TextStyle? = when (number) { + 0 -> Default + 1 -> Shadow + 2 -> Outline + else -> null + } + } +}
\ No newline at end of file |