mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-17 00:56:07 +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:
@@ -19,7 +19,7 @@ import javax.swing.*
|
||||
*/
|
||||
class ActorValueTracker constructor() : JFrame() {
|
||||
|
||||
constructor(actor: Actor) : this() {
|
||||
constructor(actor: Actor?) : this() {
|
||||
setTrackingActor(actor)
|
||||
}
|
||||
|
||||
@@ -146,8 +146,8 @@ class ActorValueTracker constructor() : JFrame() {
|
||||
this.isVisible = true
|
||||
}
|
||||
|
||||
fun setTrackingActor(actor: Actor) {
|
||||
this.actorValue = actor.actorValue
|
||||
fun setTrackingActor(actor: Actor?) {
|
||||
this.actorValue = actor?.actorValue
|
||||
|
||||
this.title = "AVTracker — $actor"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user