moving things around between packages

This commit is contained in:
minjaesong
2021-07-28 10:11:18 +09:00
parent c67a10c9a8
commit 8cb3fc2d33
16 changed files with 25 additions and 25 deletions

View File

@@ -1,50 +0,0 @@
package net.torvald.terrarum.modulebasegame.console
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.console.ConsoleCommand
import net.torvald.terrarum.console.Echo
import net.torvald.terrarum.console.EchoError
import net.torvald.terrarum.modulebasegame.TerrarumIngame
import net.torvald.terrarum.modulebasegame.debuggerapp.ActorValueTracker
import java.util.*
/**
* Created by minjaesong on 2016-12-29.
*/
internal object AVTracker : ConsoleCommand {
private val jPanelInstances = ArrayList<ActorValueTracker>()
override fun execute(args: Array<String>) {
if (args.size < 2) {
jPanelInstances.add(ActorValueTracker((Terrarum.ingame!! as TerrarumIngame).actorNowPlaying))
}
else {
try {
val actorID = args[1].toInt()
if (Terrarum.ingame!!.theGameHasActor(actorID)) {
jPanelInstances.add(ActorValueTracker(Terrarum.ingame!!.getActorByID(actorID)))
}
else {
throw IllegalArgumentException()
}
}
catch (e: NumberFormatException) {
EchoError("Illegal actor ID input")
return
}
catch (e1: IllegalArgumentException) {
EchoError("No such actor with specified ID")
return
}
}
}
override fun printUsage() {
Echo("Pops up new window that provides real-time information about the actor's actor value")
}
fun update() {
jPanelInstances.forEach { it.update() }
}
}

View File

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