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:
@@ -2,6 +2,8 @@ package content
|
||||
|
||||
import TestUtils
|
||||
import core.api.asItem
|
||||
import core.api.setAttribute
|
||||
import core.game.global.action.DropListener
|
||||
import core.game.node.entity.player.info.Rights
|
||||
import core.game.node.entity.player.link.IronmanMode
|
||||
import core.game.world.map.Location
|
||||
@@ -301,7 +303,8 @@ class DeathTests {
|
||||
Assertions.assertNotNull(g)
|
||||
Assertions.assertEquals(p.location, g?.location)
|
||||
|
||||
val canDrop = core.game.global.action.DropItemHandler.drop(p, p.inventory[0])
|
||||
setAttribute(p, "interact:option", "drop")
|
||||
val canDrop = DropListener.drop(p, p.inventory[0])
|
||||
Assertions.assertEquals(false, canDrop)
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package core
|
||||
|
||||
import TestUtils
|
||||
import content.global.skill.gather.GatheringSkillOptionListeners
|
||||
import content.global.skill.gather.woodcutting.WoodcuttingListener
|
||||
import core.game.node.scenery.Scenery
|
||||
import core.game.world.map.Location
|
||||
import core.game.world.map.RegionManager
|
||||
@@ -11,7 +12,7 @@ import core.game.interaction.IntType
|
||||
import core.game.interaction.InteractionListeners
|
||||
|
||||
class PathfinderTests {
|
||||
companion object {init {TestUtils.preTestSetup(); GatheringSkillOptionListeners().defineListeners() }}
|
||||
companion object {init {TestUtils.preTestSetup(); GatheringSkillOptionListeners().defineListeners(); WoodcuttingListener().defineListeners() }}
|
||||
|
||||
@Test fun getOccupiedTilesShouldReturnCorrectSetOfTilesThatAnObjectOccupiesAtAllRotations() {
|
||||
//clay fireplace - 13609 - sizex: 1, sizey: 2
|
||||
|
||||
Reference in New Issue
Block a user