mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 11:04:05 +09:00
fix: panning dynamic source sending nan values
This commit is contained in:
@@ -339,7 +339,7 @@ class TerrarumMusicGovernor : MusicGovernor() {
|
||||
fun stopMusic(callStopMusicHook: Boolean = true, pauseLen: Float = Float.POSITIVE_INFINITY) {
|
||||
stopMusic(AudioMixer.musicTrack.currentTrack, callStopMusicHook)
|
||||
intermissionLength = pauseLen
|
||||
printdbg(this, "StopMusic Intermission2: $intermissionLength seconds")
|
||||
// printdbg(this, "StopMusic Intermission2: $intermissionLength seconds")
|
||||
}
|
||||
|
||||
fun startMusic() {
|
||||
|
||||
@@ -138,7 +138,7 @@ open class Electric : FixtureBase {
|
||||
open class FixtureBase : ActorWithBody, CuedByTerrainChange {
|
||||
|
||||
@Transient open val spawnNeedsWall: Boolean = false
|
||||
@Transient open val spawnNeedsFloor: Boolean = false
|
||||
@Transient open val spawnNeedsFloor: Boolean = true
|
||||
|
||||
/** Real time, in nanoseconds */
|
||||
@Transient var spawnRequestedTime: Long = 0L
|
||||
|
||||
@@ -19,7 +19,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
class FixtureFurnaceAndAnvil : FixtureBase, CraftingStation {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
@Transient override val tags = listOf("metalworking")
|
||||
|
||||
constructor() : super(
|
||||
|
||||
@@ -9,6 +9,8 @@ import org.dyn4j.geometry.Vector2
|
||||
|
||||
class FixtureLogicSignalEmitter : Electric {
|
||||
|
||||
@Transient override val spawnNeedsFloor = false
|
||||
|
||||
constructor() : super(
|
||||
BlockBox(BlockBox.NO_COLLISION, 1, 1),
|
||||
nameFun = { Lang["ITEM_LOGIC_SIGNAL_EMITTER"] }
|
||||
|
||||
@@ -22,7 +22,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
class FixtureSmelterBasic : FixtureBase, CraftingStation {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
@Transient override val tags = listOf("basicsmelter")
|
||||
|
||||
constructor() : super(
|
||||
|
||||
@@ -13,7 +13,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
internal class FixtureStorageChest : FixtureBase {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
|
||||
constructor() : super(
|
||||
BlockBox(BlockBox.ALLOW_MOVE_DOWN, 1, 1),
|
||||
|
||||
@@ -44,6 +44,8 @@ open class FixtureSwingingDoorBase : FixtureBase {
|
||||
private var tilewiseDistToAxis = tw - twClosed
|
||||
|
||||
@Transient override val spawnNeedsWall = true
|
||||
@Transient override val spawnNeedsFloor = false
|
||||
|
||||
@Transient override var lightBoxList = arrayListOf(Lightbox(Hitbox(TILE_SIZED * tilewiseDistToAxis, 0.0, TILE_SIZED * twClosed, TILE_SIZED * th), Cvec(0)))
|
||||
// the Cvec will be calculated dynamically on Update
|
||||
@Transient override var shadeBoxList = arrayListOf(Lightbox(Hitbox(TILE_SIZED * tilewiseDistToAxis, 0.0, TILE_SIZED * twClosed, TILE_SIZED * th), Cvec(0)))
|
||||
|
||||
@@ -7,7 +7,6 @@ import net.torvald.terrarum.blockproperties.Block
|
||||
* Created by minjaesong on 2022-07-28.
|
||||
*/
|
||||
class FixtureSwingingDoorOak : FixtureSwingingDoorBase {
|
||||
@Transient override val spawnNeedsWall = true
|
||||
constructor() : super() {
|
||||
_construct(
|
||||
2,
|
||||
@@ -25,7 +24,6 @@ class FixtureSwingingDoorOak : FixtureSwingingDoorBase {
|
||||
}
|
||||
|
||||
class FixtureSwingingDoorEbony : FixtureSwingingDoorBase {
|
||||
@Transient override val spawnNeedsWall = true
|
||||
constructor() : super() {
|
||||
_construct(
|
||||
2,
|
||||
@@ -43,7 +41,6 @@ class FixtureSwingingDoorEbony : FixtureSwingingDoorBase {
|
||||
}
|
||||
|
||||
class FixtureSwingingDoorBirch : FixtureSwingingDoorBase {
|
||||
@Transient override val spawnNeedsWall = true
|
||||
constructor() : super() {
|
||||
_construct(
|
||||
2,
|
||||
@@ -61,7 +58,6 @@ class FixtureSwingingDoorBirch : FixtureSwingingDoorBase {
|
||||
}
|
||||
|
||||
class FixtureSwingingDoorRosewood : FixtureSwingingDoorBase {
|
||||
@Transient override val spawnNeedsWall = true
|
||||
constructor() : super() {
|
||||
_construct(
|
||||
2,
|
||||
|
||||
@@ -19,6 +19,7 @@ import kotlin.properties.Delegates
|
||||
internal class FixtureTapestry : FixtureBase {
|
||||
|
||||
@Transient override val spawnNeedsWall = true
|
||||
@Transient override val spawnNeedsFloor = false
|
||||
|
||||
var artName = ""; private set
|
||||
var artAuthor = ""; private set
|
||||
|
||||
@@ -20,7 +20,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
internal class FixtureTikiTorch : FixtureBase {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
|
||||
private val rndHash1 = (Math.random() * 256).toInt()
|
||||
private val rndHash2 = (Math.random() * 256).toInt()
|
||||
|
||||
@@ -10,7 +10,6 @@ import kotlin.math.roundToInt
|
||||
*/
|
||||
class FixtureTypewriter : FixtureBase {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
var typewriterKeymapName = "us_qwerty" // used to control the keyboard input behaviour
|
||||
private set
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
class FixtureWallCalendar : FixtureBase {
|
||||
|
||||
@Transient override val spawnNeedsWall = true
|
||||
@Transient override val spawnNeedsFloor = false
|
||||
|
||||
constructor() : super(
|
||||
BlockBox(BlockBox.NO_COLLISION, 1, 1),
|
||||
|
||||
@@ -17,7 +17,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
class FixtureWorkbench : FixtureBase, CraftingStation {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
@Transient override val tags = listOf("basiccrafting")
|
||||
|
||||
constructor() : super(
|
||||
|
||||
@@ -19,8 +19,6 @@ import net.torvald.terrarumsansbitmap.gdx.TextureRegionPack
|
||||
*/
|
||||
class FixtureWorldPortal : Electric {
|
||||
|
||||
@Transient override val spawnNeedsFloor = true
|
||||
|
||||
constructor() : super(
|
||||
BlockBox(BlockBox.NO_COLLISION, 5, 2),
|
||||
nameFun = { Lang["ITEM_WORLD_PORTAL"] },
|
||||
|
||||
Reference in New Issue
Block a user