mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-11 19:14:05 +09:00
setting up the inventory using builder (during init) requires ingame.player to be nullable, lateinit won't work
This commit is contained in:
@@ -34,11 +34,11 @@ class UIPieMenu : UICanvas {
|
||||
var selection: Int = -1
|
||||
|
||||
override fun update(gc: GameContainer, delta: Int) {
|
||||
if (selection >= 0)
|
||||
Terrarum.ingame!!.player.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] =
|
||||
selection % slotCount
|
||||
|
||||
|
||||
if (Terrarum.ingame!!.player != null) {
|
||||
if (selection >= 0)
|
||||
Terrarum.ingame!!.player!!.actorValue[AVKey.__PLAYER_QUICKSLOTSEL] =
|
||||
selection % slotCount
|
||||
}
|
||||
}
|
||||
|
||||
override fun render(gc: GameContainer, g: Graphics) {
|
||||
|
||||
Reference in New Issue
Block a user