setting up the inventory using builder (during init) requires ingame.player to be nullable, lateinit won't work

This commit is contained in:
Song Minjae
2017-04-11 23:07:29 +09:00
parent 1301121aa9
commit 037e84d6e2
21 changed files with 132 additions and 103 deletions

View File

@@ -113,6 +113,8 @@ abstract class InventoryItem : Comparable<InventoryItem> {
* The item will NOT be consumed, so you will want to consume it yourself by inventory.consumeItem(item)
*
* @return true when used successfully, false otherwise
*
* note: DO NOT super(gc, g) this!
*/
open fun primaryUse(gc: GameContainer, delta: Int): Boolean = false
@@ -121,6 +123,8 @@ abstract class InventoryItem : Comparable<InventoryItem> {
* The item will NOT be consumed, so you will want to consume it yourself by inventory.consumeItem(item)
*
* @return true when used successfully, false otherwise
*
* note: DO NOT super(gc, g) this!
*/
open fun secondaryUse(gc: GameContainer, delta: Int): Boolean = false