mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-20 07:24:06 +09:00
moved Codices out of the singleton so they can be serialised
This commit is contained in:
@@ -20,7 +20,7 @@ import java.util.*
|
||||
*
|
||||
* Created by minjaesong on 2016-03-15.
|
||||
*/
|
||||
object ItemCodex {
|
||||
class ItemCodex {
|
||||
|
||||
/**
|
||||
* <ItemID or RefID for Actor, TheItem>
|
||||
@@ -30,7 +30,9 @@ object ItemCodex {
|
||||
val dynamicItemDescription = HashMap<ItemID, GameItem>()
|
||||
val dynamicToStaticTable = HashMap<ItemID, ItemID>()
|
||||
|
||||
val ACTORID_MIN = ReferencingRanges.ACTORS.first
|
||||
@Transient val ACTORID_MIN = ReferencingRanges.ACTORS.first
|
||||
|
||||
internal constructor()
|
||||
|
||||
fun clear() {
|
||||
itemCodex.clear()
|
||||
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user