mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
Former-commit-id: 81e6d836f5f1e6490027d38146a32d404cf9ce3e Former-commit-id: af6557340f9cd0ea0b67eb7a8825aeffe75f9d82
54 lines
1.6 KiB
Kotlin
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.
|
|
}
|
|
} |