fix: tests.yml

This commit is contained in:
2026-03-26 16:03:52 +03:00
parent 3b543e9b63
commit 281af49d27
2 changed files with 41 additions and 1 deletions
+2 -1
View File
@@ -69,7 +69,8 @@ jobs:
- name: Test code generation
run: |
go run ./cmd/arpack -in testdata/sample.go -out-go /tmp/gen-go -out-ts /tmp/gen-ts -out-lua /tmp/gen-lua
go run ./cmd/arpack -in testdata/sample.go -out-go /tmp/gen-go -out-ts /tmp/gen-ts
go run ./cmd/arpack -in testdata/lua/sample.go -out-lua /tmp/gen-lua
test -f /tmp/gen-go/sample_gen.go
test -f /tmp/gen-ts/Sample.gen.ts
test -f /tmp/gen-lua/sample_gen.lua
+39
View File
@@ -0,0 +1,39 @@
package lua
type Vector3 struct {
X float32 `pack:"min=-500,max=500,bits=16"`
Y float32 `pack:"min=-500,max=500,bits=16"`
Z float32 `pack:"min=-500,max=500,bits=16"`
}
type Opcode uint16
const (
OpcodeUnknown Opcode = iota
OpcodeAuthorize
OpcodeJoinRoom
)
type MoveMessage struct {
Position Vector3
Velocity [3]float32
Waypoints []Vector3
PlayerID uint32
Active bool
Visible bool
Ghost bool
Name string
}
type SpawnMessage struct {
EntityID uint32
Position Vector3
Health int16
Tags []string
Data []uint8
}
type EnvelopeMessage struct {
Code Opcode
Counter uint8
}