Implement Authentic Interaction Subsystem

Implemented authentic script/interaction queues
This does now mean we have a total of 3 interaction systems, but this additional system is necessary to fix certain categories of bug and implement some authentic features
Converted mining to new system
Converted fishing to new system
Converted woodcutting to new system
Provided an example of soft-queued scripts with GrandTreePodListener
Implemented tick-eating (it is now possible to eat a shark, drink a potion, and eat a karambwan all on the same tick)
Can now eat and drop items while stunned
This commit is contained in:
Ceikry
2023-02-28 23:41:14 +00:00
committed by Ryan
parent 5206c99151
commit 124eeab893
61 changed files with 1466 additions and 293 deletions
@@ -1,5 +1,6 @@
package content.global.skill.thieving
import core.api.stun
import core.game.node.entity.combat.ImpactHandler
import core.game.node.entity.impl.Animator
import core.game.node.entity.player.Player
@@ -59,8 +60,7 @@ class ThievingListeners : InteractionListener {
val hitSoundId = 518 + RandomFunction.random(4) // choose 1 of 4 possible hit noises
player.audioManager.send(hitSoundId, 1, 20) // OSRS defines a delay of 20
player.stateManager.set(EntityState.STUNNED, secondsToTicks(pickpocketData.stunTime))
player.lock(secondsToTicks(pickpocketData.stunTime))
stun(player, pickpocketData.stunTime)
player.impactHandler.manualHit(node.asNpc(),RandomFunction.random(pickpocketData.stunDamageMin,pickpocketData.stunDamageMax),ImpactHandler.HitsplatType.NORMAL)