mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
wire branching traversal itself works, but fetches wrong signal status
This commit is contained in:
@@ -589,6 +589,8 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
|
||||
if (!paused) {
|
||||
|
||||
//hypothetical_input_capturing_function_if_you_finally_decided_to_forgo_gdx_input_processor_and_implement_your_own_to_synchronise_everything()
|
||||
|
||||
WorldSimulator.resetForThisFrame()
|
||||
|
||||
///////////////////////////
|
||||
@@ -635,13 +637,12 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
// world click events (e.g. opening the UI that a fixture has) must go here
|
||||
ingameController.update(delta)
|
||||
|
||||
if (!paused) {
|
||||
printdbg(this, "Clear tile change queues")
|
||||
/*if (!paused) {
|
||||
// completely consume block change queues because why not
|
||||
terrainChangeQueue.clear()
|
||||
wallChangeQueue.clear()
|
||||
wireChangeQueue.clear()
|
||||
}
|
||||
}*/
|
||||
|
||||
|
||||
////////////////////////
|
||||
@@ -876,13 +877,13 @@ open class TerrarumIngame(batch: SpriteBatch) : IngameInstance(batch) {
|
||||
}
|
||||
}
|
||||
|
||||
if (it is CuedByTerrainChange) {
|
||||
/*if (it is CuedByTerrainChange) {
|
||||
printdbg(this, "actor is CuedByTerrainChange: ${terrainChangeQueue}")
|
||||
terrainChangeQueue.forEach { cue ->
|
||||
printdbg(this, "Ingame actors terrainChangeCue: ${cue}")
|
||||
it.updateForWorldChange(cue)
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
actorNowPlaying?.update(delta)
|
||||
|
||||
@@ -145,18 +145,8 @@ open class FixtureBase(
|
||||
this.isVisible = false
|
||||
}
|
||||
|
||||
/**
|
||||
* Fired by world's BlockChanged event (fired when blocks are placed/removed).
|
||||
* The flooding check must run on every frame. use updateSelf() for that.
|
||||
*
|
||||
* E.g. if a fixture block that is inside of BlockBox is missing, destroy and drop self.
|
||||
*/
|
||||
override fun updateForWorldChange(cue: IngameInstance.BlockChangeQueueItem) {
|
||||
printdbg(this, "updateForWorldChange ${nameFun()}")
|
||||
// check for marker blocks.
|
||||
// if at least one of them is missing, destroy all the markers and drop self as an item
|
||||
|
||||
// you need to implement Dropped Item first to satisfyingly implement this function
|
||||
override fun update(delta: Float) {
|
||||
super.update(delta)
|
||||
|
||||
val posX = worldBlockPos!!.x
|
||||
val posY = worldBlockPos!!.y
|
||||
@@ -182,9 +172,10 @@ open class FixtureBase(
|
||||
}
|
||||
|
||||
// TODO drop self as an item (instance of DroppedItem)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
interface CuedByTerrainChange {
|
||||
@@ -194,7 +185,7 @@ interface CuedByTerrainChange {
|
||||
*
|
||||
* E.g. if a fixture block that is inside of BlockBox is missing, destroy and drop self.
|
||||
*/
|
||||
fun updateForWorldChange(cue: IngameInstance.BlockChangeQueueItem)
|
||||
//fun updateForWorldChange(cue: IngameInstance.BlockChangeQueueItem)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user