Remove unused property
authorTheSaminator <TheSaminator@users.noreply.github.com>
Wed, 8 Jun 2022 18:39:35 +0000 (14:39 -0400)
committerTheSaminator <TheSaminator@users.noreply.github.com>
Wed, 8 Jun 2022 18:39:35 +0000 (14:39 -0400)
src/commonMain/kotlin/net/starshipfights/game/game_subplots.kt

index ec6ac2229eb6b9eaac5bd3e9afc3fd683603bd3a..cc662dd96ac9bbd38eea4c6fd1755566164a6067 100644 (file)
@@ -25,7 +25,6 @@ val Subplot.key: SubplotKey
 @Serializable
 sealed class Subplot {
        abstract val type: SubplotType
-       abstract val displayName: String
        abstract val forPlayer: GlobalSide
        
        override fun equals(other: Any?): Boolean {
@@ -49,9 +48,6 @@ sealed class Subplot {
                override val type: SubplotType
                        get() = SubplotType.EXTENDED_DUTY
                
-               override val displayName: String
-                       get() = "Extended Duty"
-               
                override fun displayObjective(gameState: GameState) = GameObjective("Win the battle with your fleet worn out from extended duty", null)
                
                private fun ShipInstance.preBattleDamage(): ShipInstance = when ((0..4).random()) {
@@ -93,9 +89,6 @@ sealed class Subplot {
                override val type: SubplotType
                        get() = SubplotType.NO_QUARTER
                
-               override val displayName: String
-                       get() = "Leave No Quarter!"
-               
                override fun displayObjective(gameState: GameState): GameObjective {
                        val enemyShips = gameState.ships.values.filter { it.owner == forPlayer.other }
                        val enemyWrecks = gameState.destroyedShips.values.filter { it.owner == forPlayer.other }
@@ -140,9 +133,6 @@ sealed class Subplot {
                override val type: SubplotType
                        get() = SubplotType.VENDETTA
                
-               override val displayName: String
-                       get() = "Vendetta!"
-               
                override fun displayObjective(gameState: GameState): GameObjective? {
                        val shipName = gameState.getShipInfoOrNull(againstShip ?: return null)?.fullName ?: return null
                        return GameObjective("Destroy the $shipName", outcome.toSuccess)
@@ -182,9 +172,6 @@ sealed class Subplot {
                override val type: SubplotType
                        get() = SubplotType.PLAUSIBLE_DENIABILITY
                
-               override val displayName: String
-                       get() = "Plausible Deniability"
-               
                override fun displayObjective(gameState: GameState): GameObjective? {
                        val shipName = gameState.getShipInfoOrNull(againstShip ?: return null)?.fullName ?: return null
                        return GameObjective("Ensure that the $shipName is destroyed", outcome.toSuccess)
@@ -224,9 +211,6 @@ sealed class Subplot {
                override val type: SubplotType
                        get() = SubplotType.RECOVER_INFORMANT
                
-               override val displayName: String
-                       get() = "Recover Informant"
-               
                override fun displayObjective(gameState: GameState): GameObjective? {
                        val shipName = gameState.getShipInfoOrNull(onBoardShip ?: return null)?.fullName ?: return null
                        return GameObjective("Board the $shipName and recover your informant", outcome.toSuccess)