radar reading rcs from materials

This commit is contained in:
minjaesong
2023-11-02 00:15:08 +09:00
parent 1aa00d564d
commit 47a7e55910
5 changed files with 39 additions and 41 deletions

View File

@@ -29,6 +29,8 @@ class Material {
var toolReach: Int = 6
var rcs: Int = 10
/**
* Mainly intended to be used by third-party modules
*/
@@ -70,6 +72,7 @@ class MaterialCodex {
prop.thermalConductivity = it.floatVal("tcond")
prop.identifier = it.get("idst").toUpperCase()
prop.toolReach = it.intVal("reach")
prop.rcs = it.intVal("rcs")
materialProps[prop.identifier] = prop
@@ -86,6 +89,6 @@ class MaterialCodex {
throw NullPointerException("Material with id $identifier does not exist.")
}
fun getOrDefault(identifier: String) = materialProps[identifier.toUpperCase()] ?: nullMaterial
fun getOrDefault(identifier: String?) = materialProps[identifier?.toUpperCase()] ?: nullMaterial
}