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:
@@ -2,7 +2,6 @@ package org.apollo.game.plugin.skill.runecrafting
|
||||
|
||||
import org.apollo.game.plugin.skill.runecrafting.Altar.*
|
||||
|
||||
|
||||
interface Rune {
|
||||
/**
|
||||
* The item id of the rune.
|
||||
@@ -29,7 +28,7 @@ interface Rune {
|
||||
*
|
||||
* [playerLevel] - The players current runecrafting level.
|
||||
*/
|
||||
fun getBonusMultiplier(playerLevel: Int) : Double
|
||||
fun getBonusMultiplier(playerLevel: Int): Double
|
||||
}
|
||||
|
||||
enum class DefaultRune(
|
||||
|
||||
@@ -8,11 +8,10 @@ private val changeAltarObjectConfigId = 491
|
||||
|
||||
internal val RUNES = mutableListOf<Rune>()
|
||||
|
||||
fun List<Rune>.findById(id: Int) : Rune? {
|
||||
fun List<Rune>.findById(id: Int): Rune? {
|
||||
return find { rune -> rune.id == id }
|
||||
}
|
||||
|
||||
|
||||
start {
|
||||
RUNES.addAll(DefaultRune.values())
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ class RunecraftingAction(val player: Player, val rune: Rune, altar: Altar) : Asy
|
||||
|
||||
wait(1)
|
||||
|
||||
val name = Definitions.item(rune.id).name;
|
||||
val name = Definitions.item(rune.id).name
|
||||
val nameArticle = LanguageUtil.getIndefiniteArticle(name)
|
||||
val essenceAmount = player.inventory.removeAll(runeEssenceId)
|
||||
val runeAmount = essenceAmount * rune.getBonusMultiplier(player.runecraft.current)
|
||||
|
||||
@@ -27,7 +27,6 @@ class RunecraftingActionTests {
|
||||
fun setupPlayer() {
|
||||
player.position = TEST_ALTAR.center
|
||||
player.inventory.add(runeEssenceId, 25)
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user