mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 03:54:06 +09:00
actors with chunk anchoring wip
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -101,6 +101,7 @@ class FixtureJukebox : Electric, PlaysMusic {
|
||||
get() = discInventory.isEmpty()
|
||||
|
||||
override fun updateImpl(delta: Float) {
|
||||
inOperation = musicIsPlaying
|
||||
super.updateImpl(delta)
|
||||
}
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ class FixtureMusicalTurntable : Electric, PlaysMusic {
|
||||
}
|
||||
|
||||
override fun updateImpl(delta: Float) {
|
||||
inOperation = musicIsPlaying
|
||||
super.updateImpl(delta)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user