Support npc and object definitions in plugin tests

This commit is contained in:
Major
2018-08-21 00:47:23 +01:00
committed by Major-
parent 71158b3b5e
commit 86fba62ab9
10 changed files with 182 additions and 72 deletions
+5 -1
View File
@@ -22,7 +22,11 @@ object Definitions {
}
fun npc(id: Int): NpcDefinition? {
return NpcDefinition.lookup(id)
try {
return NpcDefinition.lookup(id)
} catch (e: NullPointerException) {
throw RuntimeException("Failed to find npc $id: count=${NpcDefinition.count()}")
}
}
fun npc(name: String): NpcDefinition? {