hestia-rsps / hestia

An open-source Kotlin game server.
BSD 3-Clause "New" or "Revised" License
16 stars 4 forks source link

Script DSL #101

Closed GregHib closed 4 years ago

GregHib commented 4 years ago

A Task version of then. Somehow pass information to the task context? E.g. FloorItemOption, MobOption, etc.. all have a targetId: Int which should be passed on.

Consider revisiting EntityContext.

Idea:

interface EntityTask {
    val entity: Int
    val world: World
}
interface TargetTask : EntityTask {
    val target: Int
}

That way extensions only apply when there is a target involved. And the event's can extend these so the data can be passed between the two.

GregHib commented 4 years ago

For legability; infix > extensions