mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-08 00:39:10 +00:00
Fix kotlin code style issues
This commit is contained in:
+1
-3
@@ -1,4 +1,5 @@
|
||||
|
||||
import java.util.concurrent.TimeUnit
|
||||
import org.apollo.game.GameConstants
|
||||
import org.apollo.game.action.ActionBlock
|
||||
import org.apollo.game.action.AsyncDistancedAction
|
||||
@@ -10,7 +11,6 @@ import org.apollo.game.model.entity.obj.GameObject
|
||||
import org.apollo.game.plugin.api.*
|
||||
import org.apollo.game.plugin.skills.woodcutting.Axe
|
||||
import org.apollo.game.plugin.skills.woodcutting.Tree
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
// TODO Accurate chopping rates, e.g. https://twitter.com/JagexKieren/status/713403124464107520
|
||||
|
||||
@@ -33,7 +33,6 @@ class WoodcuttingTarget(private val objectId: Int, val position: Position, val t
|
||||
* Returns whether or not the tree was cut down.
|
||||
*/
|
||||
fun isCutDown(): Boolean = rand(100) <= tree.chance * 100
|
||||
|
||||
}
|
||||
|
||||
class WoodcuttingAction(
|
||||
@@ -102,5 +101,4 @@ class WoodcuttingAction(
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,7 +11,7 @@ import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.EnumSource
|
||||
|
||||
@ExtendWith(ApolloTestingExtension::class)
|
||||
class AxeTests {
|
||||
class AxeTests {
|
||||
|
||||
@TestMock
|
||||
lateinit var player: Player
|
||||
@@ -70,5 +70,4 @@ class AxeTests {
|
||||
ItemDefinition(it.id).apply { isStackable = false }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import java.util.stream.Stream
|
||||
import org.apollo.game.plugin.skills.woodcutting.Tree
|
||||
import org.junit.jupiter.api.extension.ExtensionContext
|
||||
import org.junit.jupiter.params.provider.Arguments
|
||||
import org.junit.jupiter.params.provider.ArgumentsProvider
|
||||
import java.util.stream.Stream
|
||||
|
||||
data class WoodcuttingTestData(val treeId: Int, val stumpId: Int, val tree: Tree)
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
import io.mockk.every
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import java.util.Random
|
||||
import org.apollo.cache.def.ItemDefinition
|
||||
import org.apollo.game.model.entity.Player
|
||||
import org.apollo.game.model.entity.Skill
|
||||
@@ -20,7 +21,6 @@ import org.junit.jupiter.api.Disabled
|
||||
import org.junit.jupiter.api.extension.ExtendWith
|
||||
import org.junit.jupiter.params.ParameterizedTest
|
||||
import org.junit.jupiter.params.provider.ArgumentsSource
|
||||
import java.util.Random
|
||||
|
||||
@ExtendWith(ApolloTestingExtension::class)
|
||||
class WoodcuttingTests {
|
||||
|
||||
Reference in New Issue
Block a user