new debugging tool ActorsList

Former-commit-id: 51109b6766a1ebd92613055064e3fa8bd69c37fc
Former-commit-id: d5fc3d52b208d3cbbdcec47758cd73aef3240dc8
This commit is contained in:
Song Minjae
2016-12-29 21:09:44 +09:00
parent eb43b016fe
commit 4c3203a863
5 changed files with 126 additions and 5 deletions

View File

@@ -41,8 +41,6 @@ object AVTracker : ConsoleCommand {
}
fun update() {
jPanelInstances.forEach {
it.setInfoLabel()
}
jPanelInstances.forEach { it.setInfoLabel() }
}
}

View File

@@ -0,0 +1,27 @@
package net.torvald.terrarum.console
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.debuggerapp.ActorsLister
import java.util.*
/**
* Created by SKYHi14 on 2016-12-29.
*/
object ActorsList : ConsoleCommand {
private val jPanelInstances = ArrayList<ActorsLister>()
override fun execute(args: Array<String>) {
jPanelInstances.add(ActorsLister(
Terrarum.ingame.actorContainer,
Terrarum.ingame.actorContainerInactive)
)
}
override fun printUsage() {
Echo("Pops up new window that displays the list of actors currently in the game")
}
fun update() {
jPanelInstances.forEach { it.setInfoLabel() }
}
}

View File

@@ -39,6 +39,8 @@ object CommandDict {
Pair("seed", Seed),
Pair("println", EchoConsole),
Pair("inventory", Inventory),
Pair("avtracker", AVTracker),
Pair("actorslist", ActorsList),
// Test codes
Pair("bulletintest", SetBulletin),