Remove other trophies
authorTheSaminator <TheSaminator@users.noreply.github.com>
Mon, 11 Apr 2022 15:30:44 +0000 (11:30 -0400)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Mon, 11 Apr 2022 15:30:44 +0000 (11:30 -0400)
src/jvmMain/kotlin/starshipfights/data/auth/user_sessions.kt
src/jvmMain/kotlin/starshipfights/data/auth/user_trophies.kt

index aec6b464ae8f9fd0e2fe1ab1f01954546ba0680b..7a21fc0e59d118e44031d6cb376d056e4262d722 100644 (file)
@@ -31,8 +31,6 @@ data class User(
        val logIpAddresses: Boolean,
        
        val status: UserStatus = UserStatus.AVAILABLE,
-       
-       val amountDonatedInUsCents: Int = 0,
 ) : DataDocument<User> {
        val discordAvatarUrl: String
                get() = discordAvatar?.takeIf { showDiscordName }?.let {
index 9a845bd25068f413f61066f6691adbef5f1728fa..0c8a446c03eca95a982272056b86872f6692a33f 100644 (file)
@@ -31,61 +31,9 @@ object SiteOwnerTrophy : UserTrophy() {
                get() = 0
 }
 
-@Serializable
-object SiteDeveloperTrophy : UserTrophy() {
-       override fun TagConsumer<*>.render() {
-               p {
-                       style = "text-align:center;border:2px solid #62a;padding:3px;background-color:#93f;color:#315;font-variant:small-caps;font-family:'JetBrains Mono',monospace"
-                       title = "This person helps with coding the game"
-                       +"Site Developer"
-               }
-       }
-       
-       override val rank: Int
-               get() = 1
-}
-
-@Serializable
-data class SiteJanitorTrophy(val isSenior: Boolean) : UserTrophy() {
-       override fun TagConsumer<*>.render() {
-               p {
-                       style = "text-align:center;border:2px solid #840;padding:3px;background-color:#c60;color:#420;font-variant:small-caps;font-family:'JetBrains Mono',monospace"
-                       title = "This person helps with cleaning the poo out of the site"
-                       +if (isSenior) "Senior Janitor" else "Janitor"
-               }
-       }
-       
-       override val rank: Int
-               get() = 2
-}
-
-@Serializable
-data class SiteSupporterTrophy(val amountInUsCents: Int) : UserTrophy() {
-       override fun TagConsumer<*>.render() {
-               p {
-                       style = "text-align:center;border:2px solid #694;padding:3px;background-color:#af7;color:#231;font-variant:small-caps;font-family:'JetBrains Mono',monospace"
-                       title = "\"I spent money on an online game and all I got was this lousy trophy!\""
-                       +"Site Supporter:"
-                       br
-                       +when {
-                               amountInUsCents < 100 -> "Rear Admiral"
-                               amountInUsCents < 500 -> "Vice Admiral"
-                               amountInUsCents < 1000 -> "Admiral"
-                               amountInUsCents < 2000 -> "High Admiral"
-                               else -> "Lord Admiral"
-                       }
-               }
-       }
-       
-       override val rank: Int
-               get() = 3
-}
-
 fun User.getTrophiesUnsorted(): Set<UserTrophy> =
        (if (discordId == CurrentConfiguration.discordClient?.ownerId)
                setOf(SiteOwnerTrophy)
-       else emptySet()) + (if (amountDonatedInUsCents > 0)
-               setOf(SiteSupporterTrophy(amountDonatedInUsCents))
        else emptySet())
 
 fun User.getTrophies(): List<UserTrophy> = getTrophiesUnsorted().sorted()