feat(game): basic script implementations (#65)
* feat(game): open the wired dialog line when a player interacts with an npc or sign * feat(game): run npc and sign interactions through a generated script layer * chore(style): spotlessApply * fix(codegen): generate dialog enums without a rom so ci can compile * docs: add a guide for writing overworld scripts --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
6695daabd8
commit
300bc52531
691 files changed
+56022
-44
No files matched your search
@@ -113,7 +113,7 @@ object GameProtocol : Protocol() {
|
||||
|
||||
bidi<DialogOptionPacket>(0x26u, DialogOptionPacketCodec)
|
||||
|
||||
c2s<PlayerStopMovingPacket>(0x27u, PlayerStopMovingPacketCodec)
|
||||
c2s<TileInteractPacket>(0x27u, TileInteractPacketCodec)
|
||||
s2c<PcTogglePacket>(0x27u, PcTogglePacketCodec)
|
||||
|
||||
c2s<TypedBinaryDataPacket>(0x28u, TypedBinaryDataPacketCodec)
|
||||
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
package de.fiereu.openmmo.net.game.packets
|
||||
|
||||
import de.fiereu.bytecodec.CodecScope
|
||||
import de.fiereu.bytecodec.PacketCodec
|
||||
|
||||
class PlayerStopMovingPacket
|
||||
|
||||
object PlayerStopMovingPacketCodec : PacketCodec<PlayerStopMovingPacket>() {
|
||||
override fun CodecScope<PlayerStopMovingPacket>.body(): PlayerStopMovingPacket {
|
||||
return PlayerStopMovingPacket()
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package de.fiereu.openmmo.net.game.packets
|
||||
|
||||
import de.fiereu.bytecodec.CodecScope
|
||||
import de.fiereu.bytecodec.PacketCodec
|
||||
|
||||
/**
|
||||
* Sent when the player presses the action button on the tile they face. It has no fields, the
|
||||
* server uses the player position and facing. Signs and furniture come through here, npcs use an
|
||||
* entity interaction instead.
|
||||
*/
|
||||
class TileInteractPacket
|
||||
|
||||
object TileInteractPacketCodec : PacketCodec<TileInteractPacket>() {
|
||||
override fun CodecScope<TileInteractPacket>.body(): TileInteractPacket {
|
||||
return TileInteractPacket()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user