Fix kotlin code style issues

This commit is contained in:
Gary Tierney
2018-09-04 04:43:34 +01:00
parent b6086d57b8
commit 475c7ac741
89 changed files with 338 additions and 435 deletions
@@ -27,5 +27,4 @@ enum class Fish(val id: Int, val level: Int, val experience: Double, catchSuffix
val catchMessage by lazy { "You catch ${catchSuffix ?: "a $catchName."}" }
private val catchName by lazy { Definitions.item(id).name.toLowerCase().removePrefix("raw ") }
}
@@ -1,10 +1,10 @@
package org.apollo.game.plugin.skills.fishing
import java.util.Objects
import org.apollo.game.action.ActionBlock
import org.apollo.game.action.AsyncDistancedAction
import org.apollo.game.model.entity.Player
import org.apollo.game.plugin.api.fishing
import java.util.Objects
class FishingAction(
player: Player,
@@ -82,7 +82,5 @@ class FishingAction(
internal fun hasTool(player: Player, tool: FishingTool): Boolean {
return tool.id in player.equipment || tool.id in player.inventory
}
}
}
@@ -106,9 +106,7 @@ enum class FishingSpot(val npc: Int, private val first: Option, private val seco
else -> Pair(tool, secondary, primary)
}
}
}
}
companion object {
@@ -119,5 +117,4 @@ enum class FishingSpot(val npc: Int, private val first: Option, private val seco
*/
fun lookup(id: Int): FishingSpot? = FISHING_SPOTS[id]
}
}
@@ -35,5 +35,4 @@ data class FishingTarget(val position: Position, val option: FishingSpot.Option)
return false
}
}
@@ -29,5 +29,4 @@ enum class FishingTool(
* The name of this tool, formatted so it can be inserted into a message.
*/
val formattedName by lazy { Definitions.item(id).name.toLowerCase() }
}
@@ -89,5 +89,4 @@ class FishingActionTests {
private val spots = FishingSpot.values()
.map { NpcDefinition(it.npc).apply { name = "<fishing_spot>" } }
}
}