initial refactor-servers commit

This commit is contained in:
wish
2023-12-04 00:00:40 +11:00
parent b6e7f019de
commit 4f889b1bf1
7 changed files with 122 additions and 101 deletions

View File

@@ -419,3 +419,7 @@ func (s *Server) Season() uint8 {
sid := int64(((s.ID & 0xFF00) - 4096) / 256)
return uint8(((TimeAdjusted().Unix() / 86400) + sid) % 3)
}
func (s *Server) Players() uint16 {
return uint16(len(s.sessions))
}