aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


server/scene_cache_test.go (229B)


      1 package main
      2 
      3 func sceneResourcesForTest[T any](values map[uint32]T) *sceneCache[T] {
      4 	cache := &sceneCache[T]{}
      5 	for identity, value := range values {
      6 		cache.values.Store(identity, func() T { return value })
      7 	}
      8 	return cache
      9 }