mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-07 16:49:12 +00:00
Fix kotlin code style issues
This commit is contained in:
@@ -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
-3
@@ -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() }
|
||||
|
||||
}
|
||||
-1
@@ -89,5 +89,4 @@ class FishingActionTests {
|
||||
private val spots = FishingSpot.values()
|
||||
.map { NpcDefinition(it.npc).apply { name = "<fishing_spot>" } }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user