mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-14 04:24:05 +09:00
fix: imported avatars trigger NPE on UILoadManage
This commit is contained in:
@@ -941,8 +941,8 @@ open class TerrarumIngame(batch: FlippingSpriteBatch) : IngameInstance(batch) {
|
|||||||
|
|
||||||
uiContainer.forEach {
|
uiContainer.forEach {
|
||||||
when (it) {
|
when (it) {
|
||||||
is UICanvas -> it.update(Gdx.graphics.deltaTime)
|
|
||||||
is Id_UICanvasNullable -> it.get()?.update(Gdx.graphics.deltaTime)
|
is Id_UICanvasNullable -> it.get()?.update(Gdx.graphics.deltaTime)
|
||||||
|
is UICanvas -> it.update(Gdx.graphics.deltaTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//uiFixture?.update(Gdx.graphics.deltaTime)
|
//uiFixture?.update(Gdx.graphics.deltaTime)
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ class ItemLogicSignalEmitter(originalID: ItemID) : FixtureItemBase(originalID, "
|
|||||||
|
|
||||||
override var baseToolSize: Double? = baseMass
|
override var baseToolSize: Double? = baseMass
|
||||||
override var originalName = "ITEM_LOGIC_SIGNAL_EMITTER"
|
override var originalName = "ITEM_LOGIC_SIGNAL_EMITTER"
|
||||||
|
override var inventoryCategory = Category.MISC
|
||||||
|
|
||||||
override fun effectWhileEquipped(actor: ActorWithBody, delta: Float) {
|
override fun effectWhileEquipped(actor: ActorWithBody, delta: Float) {
|
||||||
super.effectWhileEquipped(actor, delta)
|
super.effectWhileEquipped(actor, delta)
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ class UILoadManage(val full: UILoadSavegame) : UICanvas() {
|
|||||||
it.mapIndexed { index, s -> "${(index+1).toString().padStart(it.size.fastLen())}. $s" }
|
it.mapIndexed { index, s -> "${(index+1).toString().padStart(it.size.fastLen())}. $s" }
|
||||||
} ?: listOf("$EMDASH")
|
} ?: listOf("$EMDASH")
|
||||||
loadOrderWorld =
|
loadOrderWorld =
|
||||||
App.savegameWorlds[full.playerButtonSelected!!.worldUUID]!!.files[selectedRevision].getFile(
|
App.savegameWorlds[full.playerButtonSelected!!.worldUUID]?.files?.get(selectedRevision)?.getFile( // it's null for freshly-imported avatars
|
||||||
VDFileID.LOADORDER
|
VDFileID.LOADORDER
|
||||||
)?.getContent()?.toByteArray()?.toString(Common.CHARSET)?.split('\n')?.let {
|
)?.getContent()?.toByteArray()?.toString(Common.CHARSET)?.split('\n')?.let {
|
||||||
it.mapIndexed { index, s -> "${(index+1).toString().padStart(it.size.fastLen())}. $s" }
|
it.mapIndexed { index, s -> "${(index+1).toString().padStart(it.size.fastLen())}. $s" }
|
||||||
|
|||||||
Reference in New Issue
Block a user