moved Codices out of the singleton so they can be serialised

This commit is contained in:
minjaesong
2021-09-04 17:55:37 +09:00
parent 57e4b83649
commit 6bea9c9f07
42 changed files with 180 additions and 98 deletions

View File

@@ -28,12 +28,14 @@ class Material {
var identifier: String = "Name not set"
}
object MaterialCodex {
class MaterialCodex {
val materialProps = HashMap<String, Material>()
private val nullMaterial = Material()
@Transient private val nullMaterial = Material()
operator fun invoke(module: String, path: String) {
private constructor()
internal constructor(module: String, path: String) : this() {
register(CSVFetcher.readFromModule(module, path))
}