mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
no more context fuckups on apploader
This commit is contained in:
@@ -4,7 +4,7 @@ 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.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.modulebasegame.debuggerapp.ActorValueTracker
|
||||
import java.util.*
|
||||
|
||||
@@ -16,7 +16,7 @@ internal object AVTracker : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size < 2) {
|
||||
jPanelInstances.add(ActorValueTracker((Terrarum.ingame!! as Ingame).actorNowPlaying))
|
||||
jPanelInstances.add(ActorValueTracker((Terrarum.ingame!! as TerrarumIngame).actorNowPlaying))
|
||||
}
|
||||
else {
|
||||
try {
|
||||
|
||||
@@ -4,7 +4,7 @@ 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.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
@@ -15,8 +15,8 @@ internal object ActorsList : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
jPanelInstances.add(ActorsLister(
|
||||
(Terrarum.ingame!! as Ingame).actorContainerActive,
|
||||
(Terrarum.ingame!! as Ingame).actorContainerInactive)
|
||||
(Terrarum.ingame!! as TerrarumIngame).actorContainerActive,
|
||||
(Terrarum.ingame!! as TerrarumIngame).actorContainerInactive)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,12 +2,12 @@ package net.torvald.terrarum.modulebasegame.console
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
object CheatWarnTest : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
(Terrarum.ingame as? Ingame)?.uiCheatMotherfuckerNootNoot?.setAsOpen()
|
||||
(Terrarum.ingame as? TerrarumIngame)?.uiCheatMotherfuckerNootNoot?.setAsOpen()
|
||||
}
|
||||
|
||||
override fun printUsage() {
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.torvald.terrarum.utils.JsonWriter
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
import java.io.IOException
|
||||
|
||||
@@ -16,7 +16,7 @@ internal object ExportAV : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2) {
|
||||
try {
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) return
|
||||
|
||||
JsonWriter.writeToFile(
|
||||
|
||||
@@ -5,7 +5,7 @@ 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.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-19.
|
||||
@@ -14,8 +14,8 @@ internal object GetAV : ConsoleCommand {
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
try {
|
||||
val ingame = Terrarum.ingame!! as Ingame
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val ingame = Terrarum.ingame!! as TerrarumIngame
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) return
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import net.torvald.terrarum.AppLoader
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.utils.JsonWriter
|
||||
import java.io.BufferedWriter
|
||||
import java.io.FileWriter
|
||||
@@ -20,7 +20,7 @@ internal object GsonTest : ConsoleCommand {
|
||||
val jsonBuilder = JsonWriter.getJsonBuilder()
|
||||
|
||||
|
||||
val jsonString = jsonBuilder.toJson((Terrarum.ingame!! as Ingame).actorNowPlaying)
|
||||
val jsonString = jsonBuilder.toJson((Terrarum.ingame!! as TerrarumIngame).actorNowPlaying)
|
||||
|
||||
//val avelem = Gson().toJson((Terrarum.ingame!! as Ingame).actorNowPlaying)
|
||||
//val jsonString = avelem.toString()
|
||||
|
||||
@@ -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.itemproperties.ItemCodex
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
|
||||
/**
|
||||
@@ -13,7 +13,7 @@ import net.torvald.terrarum.modulebasegame.gameactors.Pocketed
|
||||
*/
|
||||
internal object Inventory : ConsoleCommand {
|
||||
|
||||
private var target: Pocketed? = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
private var target: Pocketed? = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 1) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-06-16.
|
||||
|
||||
@@ -5,7 +5,7 @@ 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.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-15.
|
||||
@@ -63,7 +63,7 @@ internal object SetAV : ConsoleCommand {
|
||||
return
|
||||
}
|
||||
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) {
|
||||
EchoError("Player does not exist")
|
||||
println("[SetAV] Player does not exist")
|
||||
|
||||
@@ -2,7 +2,7 @@ package net.torvald.terrarum.modulebasegame.console
|
||||
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-23.
|
||||
@@ -11,7 +11,7 @@ internal object SetBulletin : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
//send(Lang["ERROR_SAVE_CORRUPTED"], Lang["MENU_LABEL_CONTINUE_QUESTION"])
|
||||
|
||||
(Terrarum.ingame!! as Ingame).sendNotification(args.sliceArray(1..args.lastIndex))
|
||||
(Terrarum.ingame!! as TerrarumIngame).sendNotification(args.sliceArray(1..args.lastIndex))
|
||||
println("sent notifinator")
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ 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.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.gameactors.ActorWBMovable
|
||||
|
||||
/**
|
||||
@@ -14,7 +14,7 @@ internal object SetScale : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
if (args.size == 2 || args.size == 3) {
|
||||
try {
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) return
|
||||
|
||||
|
||||
|
||||
@@ -4,14 +4,14 @@ import net.torvald.terrarum.modulebasegame.gameworld.WorldTime
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-03-20.
|
||||
*/
|
||||
internal object SetTime : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val world = (Terrarum.ingame!! as Ingame).gameworld
|
||||
val world = (Terrarum.ingame!! as TerrarumIngame).gameworld
|
||||
|
||||
|
||||
if (args.size == 2) {
|
||||
|
||||
@@ -3,7 +3,7 @@ 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.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-03-20.
|
||||
@@ -13,7 +13,7 @@ internal object SetTimeDelta : ConsoleCommand {
|
||||
val HARD_LIMIT = 60
|
||||
|
||||
override fun execute(args: Array<String>) {
|
||||
val world = (Terrarum.ingame!! as Ingame).gameworld
|
||||
val world = (Terrarum.ingame!! as TerrarumIngame).gameworld
|
||||
|
||||
|
||||
if (args.size == 2) {
|
||||
|
||||
@@ -4,7 +4,6 @@ import net.torvald.terrarum.modulebasegame.gameactors.PhysTestBall
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.console.ConsoleCommand
|
||||
import net.torvald.terrarum.console.Echo
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import org.dyn4j.geometry.Vector2
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ 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.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.PhysTestLuarLander
|
||||
|
||||
/**
|
||||
|
||||
@@ -3,7 +3,6 @@ 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.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.gameactors.FixtureTikiTorch
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.gameactors.ActorWBMovable
|
||||
import net.torvald.terrarum.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
import net.torvald.terrarum.worlddrawer.CreateTileAtlas
|
||||
|
||||
/**
|
||||
@@ -27,7 +27,7 @@ internal object Teleport : ConsoleCommand {
|
||||
return
|
||||
}
|
||||
|
||||
(Terrarum.ingame!! as Ingame).actorNowPlaying?.setPosition(x.toDouble(), y.toDouble())
|
||||
(Terrarum.ingame!! as TerrarumIngame).actorNowPlaying?.setPosition(x.toDouble(), y.toDouble())
|
||||
}
|
||||
else if (args.size == 4) {
|
||||
if (args[2].toLowerCase() != "to") {
|
||||
@@ -39,7 +39,7 @@ internal object Teleport : ConsoleCommand {
|
||||
try {
|
||||
val fromActorID = args[1].toInt()
|
||||
val targetActorID = if (args[3].toLowerCase() == "player") {
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) {
|
||||
EchoError("Player does not exist")
|
||||
return
|
||||
|
||||
@@ -3,14 +3,14 @@ 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.modulebasegame.Ingame
|
||||
import net.torvald.terrarum.modulebasegame.TerrarumIngame
|
||||
|
||||
/**
|
||||
* Created by minjaesong on 2016-01-19.
|
||||
*/
|
||||
internal object ToggleNoClip : ConsoleCommand {
|
||||
override fun execute(args: Array<String>) {
|
||||
val player = (Terrarum.ingame!! as Ingame).actorNowPlaying
|
||||
val player = (Terrarum.ingame!! as TerrarumIngame).actorNowPlaying
|
||||
if (player == null) return
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user