mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
bunch of codes:
- Test InputStream() on VirtualComputer (blocking/unblocking using simple semaphore) -- no more dirty lua impl of io.read - Typealias Kotlin 1.1 - Primitive box drawing on VideoCard - Removing unnecessary fonts Former-commit-id: cece88af3a3430678e685856eec78b4a9d598b4f Former-commit-id: 22eed3a7beb9b4cb34636cbab2ff0e94989bdb31
This commit is contained in:
@@ -4,16 +4,15 @@ import com.google.gson.JsonPrimitive
|
||||
import java.util.*
|
||||
import java.util.function.Consumer
|
||||
|
||||
typealias ActorValue = KVHashMap
|
||||
typealias GameConfig = KVHashMap
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 15-12-30.
|
||||
*/
|
||||
open class KVHashMap {
|
||||
class KVHashMap {
|
||||
|
||||
private val hashMap: HashMap<String, Any>
|
||||
|
||||
init {
|
||||
hashMap = HashMap<String, Any>()
|
||||
}
|
||||
private val hashMap = HashMap<String, Any>()
|
||||
|
||||
/**
|
||||
* Add key-value pair to the configuration table.
|
||||
@@ -104,7 +103,8 @@ open class KVHashMap {
|
||||
get() = hashMap.keys
|
||||
|
||||
fun remove(key: String) {
|
||||
hashMap.remove(key, hashMap[key])
|
||||
if (hashMap[key] != null)
|
||||
hashMap.remove(key, hashMap[key]!!)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user