actors with chunk anchoring wip

This commit is contained in:
minjaesong
2024-09-07 16:06:15 +09:00
parent 68854d3573
commit e3b663b4aa
7 changed files with 26 additions and 1 deletions

View File

@@ -378,6 +378,8 @@ class FixtureAlloyingFurnace : FixtureBase {
}
}
inOperation = (temperature > 0.001f)
chunkAnchoring = inOperation // update immediately instead of waiting for the next update
}
@Transient private val filterIndex = 0

View File

@@ -47,6 +47,8 @@ open class FixtureBase : ActorWithBody, CuedByTerrainChange {
@Transient var mainUI: UICanvas? = null
var inventory: FixtureInventory? = null
@Transient var inOperation = false
// @Transient var mainUIopenFun: ((UICanvas) -> Unit)? = null
internal var actorThatInstalledThisFixture: UUID? = null
@@ -424,6 +426,7 @@ open class FixtureBase : ActorWithBody, CuedByTerrainChange {
*/
override fun updateImpl(delta: Float) {
super.updateImpl(delta)
chunkAnchoring = inOperation
}
/**

View File

@@ -101,6 +101,7 @@ class FixtureJukebox : Electric, PlaysMusic {
get() = discInventory.isEmpty()
override fun updateImpl(delta: Float) {
inOperation = musicIsPlaying
super.updateImpl(delta)
}

View File

@@ -90,6 +90,7 @@ class FixtureMusicalTurntable : Electric, PlaysMusic {
}
override fun updateImpl(delta: Float) {
inOperation = musicIsPlaying
super.updateImpl(delta)
}

View File

@@ -365,6 +365,8 @@ class FixtureSmelterBasic : FixtureBase {
}
}
inOperation = (temperature > 0.001f)
chunkAnchoring = inOperation // update immediately instead of waiting for the next update
}
@Transient private val filterIndex = 0