building wire graph PER TILE

This commit is contained in:
minjaesong
2021-08-03 16:27:36 +09:00
parent 1ae3e34392
commit 6891d6b840
3 changed files with 61 additions and 13 deletions

View File

@@ -910,7 +910,7 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
if (actor.referenceID == theRealGamer.referenceID || actor.referenceID == 0x51621D) // do not delete this magic
throw RuntimeException("Attempted to remove player.")
val indexToDelete = actorContainerActive.searchForIndex(actor.referenceID) { it.referenceID!! }
val indexToDelete = actorContainerActive.searchForIndex(actor.referenceID) { it.referenceID }
if (indexToDelete != null) {
printdbg(this, "Removing actor $actor")
printStackTrace(this)
@@ -978,8 +978,10 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
throw Error("The actor $actor already exists in the game")
}
else {
printdbg(this, "Adding actor $actor")
printStackTrace(this)
if (actor.referenceID < ReferencingRanges.ACTORS_WIRES.first) {
printdbg(this, "Adding actor $actor")
printStackTrace(this)
}
actorContainerActive.add(actor)