mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
new debugging tool ActorsList
Former-commit-id: 51109b6766a1ebd92613055064e3fa8bd69c37fc Former-commit-id: d5fc3d52b208d3cbbdcec47758cd73aef3240dc8
This commit is contained in:
@@ -41,8 +41,6 @@ object AVTracker : ConsoleCommand {
|
||||
}
|
||||
|
||||
fun update() {
|
||||
jPanelInstances.forEach {
|
||||
it.setInfoLabel()
|
||||
}
|
||||
jPanelInstances.forEach { it.setInfoLabel() }
|
||||
}
|
||||
}
|
||||
27
src/net/torvald/terrarum/console/ActorsList.kt
Normal file
27
src/net/torvald/terrarum/console/ActorsList.kt
Normal 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() }
|
||||
}
|
||||
}
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user