Code cleanup

Reorganised imports
Removed redundant qualifiers
This commit is contained in:
bushtail
2023-08-19 15:07:23 +00:00
committed by Ryan
parent 0eca9521bc
commit 1b4e0aafaa
346 changed files with 2871 additions and 2886 deletions
@@ -1,11 +1,10 @@
package content.global.skill.farming
import core.api.*
import content.global.skill.farming.timers.Compost
import core.api.getOrStartTimer
import core.cache.def.impl.SceneryDefinition
import core.cache.def.impl.VarbitDefinition
import core.game.node.scenery.Scenery
import core.game.node.entity.player.Player
import content.global.skill.farming.timers.*
import core.game.node.scenery.Scenery
enum class CompostBins(val varbit: Int) {
FALADOR_COMPOST(740),
@@ -6,7 +6,7 @@ import core.game.interaction.OptionHandler
import core.game.node.Node
import content.global.skill.summoning.familiar.GiantEntNPC
import core.game.node.entity.player.Player
import core.game.node.entity.player.link.audio.Audio;
import core.game.node.entity.player.link.audio.Audio
import core.game.node.entity.skill.Skills
import core.game.node.item.Item
import core.game.system.task.Pulse
@@ -10,10 +10,10 @@ import core.game.world.update.flag.context.Animation
import core.plugin.Initializable
@Initializable
class DigUpPatchDialogue(player: Player? = null) : core.game.dialogue.DialoguePlugin(player) {
class DigUpPatchDialogue(player: Player? = null) : DialoguePlugin(player) {
var patch: Patch? = null
override fun newInstance(player: Player?): core.game.dialogue.DialoguePlugin {
override fun newInstance(player: Player?): DialoguePlugin {
return DigUpPatchDialogue(player)
}
@@ -299,7 +299,7 @@ class Patch(val player: Player, val patch: FarmingPatch, var plantable: Plantabl
if(patch.type == PatchType.TREE) {
// Willow branches
if(harvestAmt < 6) {
harvestAmt++;
harvestAmt++
}
}
@@ -21,7 +21,7 @@ class CropGrowth : PersistTimer (500, "farming:crops", isSoft = true) {
//Sync the 5 minute run cycles with :05 on realtime clocks - authentic
override fun getInitialRunDelay() : Int {
val now = LocalTime.now();
val now = LocalTime.now()
val minsUntil5MinSync = 5 - (now.getMinute() % 5)
val ticks = secondsToTicks (minsUntil5MinSync * 60)
player.debug("[CropGrowth] Scheduled first growth cycle for $ticks ticks from now.")