dump (another useless message)

This commit is contained in:
minjaesong
2018-08-05 21:57:18 +09:00
parent 0d05a40f8f
commit 6ed012f0c1
130 changed files with 1350 additions and 563 deletions

View File

@@ -5,7 +5,7 @@ import net.torvald.terrarum.console.ConsoleCommand
import net.torvald.terrarum.console.Echo
import net.torvald.terrarum.console.EchoError
import net.torvald.terrarum.modulebasegame.Ingame
import net.torvald.terrarum.modulebasegame.gameactors.ActorWithPhysics
import net.torvald.terrarum.gameactors.ActorWBMovable
/**
* Created by minjaesong on 2017-01-20.
@@ -14,13 +14,13 @@ internal object SetScale : ConsoleCommand {
override fun execute(args: Array<String>) {
if (args.size == 2 || args.size == 3) {
try {
val targetID = if (args.size == 3) args[1].toInt() else (Terrarum.ingame!! as Ingame).player.referenceID
val targetID = if (args.size == 3) args[1].toInt() else (Terrarum.ingame!! as Ingame).playableActor.referenceID
val scale = args[if (args.size == 3) 2 else 1].toDouble()
val target = Terrarum.ingame!!.getActorByID(targetID!!)
if (target !is ActorWithPhysics) {
EchoError("Target is not ActorWithPhysics")
if (target !is ActorWBMovable) {
EchoError("Target is not ActorWBMovable")
}
else {
target.scale = scale