Files
Terrarum/src/net/torvald/terrarum/gameitem/TileAsItem.kt
Song Minjae d8b70887a9 new item type, "Dynamic Item"; working text terminal
Former-commit-id: 81e6d836f5f1e6490027d38146a32d404cf9ce3e
Former-commit-id: af6557340f9cd0ea0b67eb7a8825aeffe75f9d82
2016-09-10 16:45:04 +09:00

54 lines
1.6 KiB
Kotlin

package net.torvald.terrarum.gameitem
import net.torvald.terrarum.tileproperties.TilePropCodex
import org.newdawn.slick.GameContainer
/**
* Created by minjaesong on 16-03-15.
*/
class TileAsItem(tileNum: Int) : InventoryItem {
override var itemID: Int = 0
override var mass: Double = 0.0
override var scale: Double = 1.0
init {
itemID = tileNum
mass = TilePropCodex.getProp(tileNum).density / 1000.0
}
override fun effectWhileInPocket(gc: GameContainer, delta_t: Int) {
throw UnsupportedOperationException()
}
override fun effectWhenPickedUp(gc: GameContainer, delta_t: Int) {
throw UnsupportedOperationException()
}
override fun primaryUse(gc: GameContainer, delta_t: Int) {
throw UnsupportedOperationException()
}
override fun secondaryUse(gc: GameContainer, delta_t: Int) {
throw UnsupportedOperationException()
}
override fun effectWhenThrown(gc: GameContainer, delta_t: Int) {
throw UnsupportedOperationException()
}
/**
* Effects applied (continuously or not) while thrown to the world
*/
override fun effectWhenTakenOut(gc: GameContainer, delta: Int) {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
/**
* Effects applied (continuously or not) while thrown to the world,
* called by the proxy Actor
*/
override fun worldActorEffect(gc: GameContainer, delta: Int) {
throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates.
}
}