Implemented a brand new cutscene system

Converted Lost Tribe's cutscene to the new system
This commit is contained in:
Ceikry
2022-03-27 05:14:16 +00:00
committed by Ryan
parent 776931c7a4
commit 7709c3bb04
10 changed files with 488 additions and 225 deletions
+9
View File
@@ -1,5 +1,6 @@
package api
import Cutscene
import core.cache.def.impl.ItemDefinition
import core.cache.def.impl.SceneryDefinition
import core.game.component.Component
@@ -1438,4 +1439,12 @@ fun dumpContainer(player: Player, container: core.game.container.Container) {
fun hasHouse(player: Player): Boolean {
return player.houseManager.hasHouse()
}
fun Player.getCutscene(): Cutscene? {
return getAttribute<Cutscene?>(this, Cutscene.ATTRIBUTE_CUTSCENE, null)
}
fun Player.getCutsceneStage(): Int {
return getAttribute(this, Cutscene.ATTRIBUTE_CUTSCENE_STAGE, 0)
}
+3 -1
View File
@@ -1,6 +1,7 @@
package api.events
import core.game.node.Node
import core.game.node.entity.Entity
import core.game.node.entity.npc.NPC
import core.game.node.entity.player.link.TeleportManager.TeleportType
@@ -10,4 +11,5 @@ data class TeleportEvent(val type: TeleportType, val source: Int = -1) : Event
data class LitFireEvent(val logId: Int) : Event
data class InteractionEvent(val target: Node, val option: String) : Event
data class ButtonClickedEvent(val iface: Int, val buttonId: Int) : Event
data class UsedWithEvent(val used: Int, val with: Int) : Event
data class UsedWithEvent(val used: Int, val with: Int) : Event
data class SelfDeath(val killer: Entity) : Event