Loading CHANGELOG.md +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org). ## [Unreleased] ### Added - Lua runtime tournament listings now return duration, end active, and end time fields. ### Changed - Rejoining a match the user is already part of will now return the match label. Loading server/runtime_lua_nakama.go +8 −1 Original line number Diff line number Diff line Loading @@ -4114,7 +4114,7 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tournaments := l.CreateTable(len(list.Tournaments), 0) for i, t := range list.Tournaments { tt := l.CreateTable(0, 13) tt := l.CreateTable(0, 16) tt.RawSetString("id", lua.LString(t.Id)) tt.RawSetString("title", lua.LString(t.Title)) Loading @@ -4128,6 +4128,8 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tt.RawSetString("size", lua.LNumber(t.Size)) tt.RawSetString("max_size", lua.LNumber(t.MaxSize)) tt.RawSetString("max_num_score", lua.LNumber(t.MaxNumScore)) tt.RawSetString("duration", lua.LNumber(t.Duration)) tt.RawSetString("end_active", lua.LNumber(t.EndActive)) tt.RawSetString("can_enter", lua.LBool(t.CanEnter)) tt.RawSetString("next_reset", lua.LNumber(t.NextReset)) metadataMap := make(map[string]interface{}) Loading @@ -4140,6 +4142,11 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tt.RawSetString("metadata", metadataTable) tt.RawSetString("create_time", lua.LNumber(t.CreateTime.Seconds)) tt.RawSetString("start_time", lua.LNumber(t.StartTime.Seconds)) if t.EndTime == nil { tt.RawSetString("end_time", lua.LNil) } else { tt.RawSetString("end_time", lua.LNumber(t.EndTime.Seconds)) } tournaments.RawSetInt(i+1, tt) } Loading Loading
CHANGELOG.md +3 −0 Original line number Diff line number Diff line Loading @@ -4,6 +4,9 @@ All notable changes to this project are documented below. The format is based on [keep a changelog](http://keepachangelog.com) and this project uses [semantic versioning](http://semver.org). ## [Unreleased] ### Added - Lua runtime tournament listings now return duration, end active, and end time fields. ### Changed - Rejoining a match the user is already part of will now return the match label. Loading
server/runtime_lua_nakama.go +8 −1 Original line number Diff line number Diff line Loading @@ -4114,7 +4114,7 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tournaments := l.CreateTable(len(list.Tournaments), 0) for i, t := range list.Tournaments { tt := l.CreateTable(0, 13) tt := l.CreateTable(0, 16) tt.RawSetString("id", lua.LString(t.Id)) tt.RawSetString("title", lua.LString(t.Title)) Loading @@ -4128,6 +4128,8 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tt.RawSetString("size", lua.LNumber(t.Size)) tt.RawSetString("max_size", lua.LNumber(t.MaxSize)) tt.RawSetString("max_num_score", lua.LNumber(t.MaxNumScore)) tt.RawSetString("duration", lua.LNumber(t.Duration)) tt.RawSetString("end_active", lua.LNumber(t.EndActive)) tt.RawSetString("can_enter", lua.LBool(t.CanEnter)) tt.RawSetString("next_reset", lua.LNumber(t.NextReset)) metadataMap := make(map[string]interface{}) Loading @@ -4140,6 +4142,11 @@ func (n *RuntimeLuaNakamaModule) tournamentList(l *lua.LState) int { tt.RawSetString("metadata", metadataTable) tt.RawSetString("create_time", lua.LNumber(t.CreateTime.Seconds)) tt.RawSetString("start_time", lua.LNumber(t.StartTime.Seconds)) if t.EndTime == nil { tt.RawSetString("end_time", lua.LNil) } else { tt.RawSetString("end_time", lua.LNumber(t.EndTime.Seconds)) } tournaments.RawSetInt(i+1, tt) } Loading