fixes, bits and pieces, changes in ID referencing, terrain and wall takes damage, working test pickaxe, and a new issue

This commit is contained in:
Song Minjae
2017-04-17 02:18:52 +09:00
parent 6087072d3d
commit f2ae2d9449
40 changed files with 502 additions and 249 deletions

View File

@@ -158,7 +158,7 @@ class UIInventory(
// filter items
inventory?.forEach {
if (it.item.category == filter || filter == "__all__")
if (it.item.inventoryCategory == filter || filter == "__all__")
inventorySortList.add(it)
}
@@ -295,27 +295,20 @@ class UIInventory(
}
override fun doOpening(gc: GameContainer, delta: Int) {
handler!!.posX = Movement.fastPullOut(
handler!!.openCloseCounter.toFloat() / openCloseTime,
-width.toFloat(),
0f
).roundInt()
UICanvas.doOpeningPopOut(handler, openCloseTime, UICanvas.Companion.Position.LEFT)
}
override fun doClosing(gc: GameContainer, delta: Int) {
handler!!.posX = Movement.fastPullOut(
handler!!.openCloseCounter.toFloat() / openCloseTime,
0f,
-width.toFloat()
).roundInt()
UICanvas.doClosingPopOut(handler, openCloseTime, UICanvas.Companion.Position.LEFT)
}
override fun endOpening(gc: GameContainer, delta: Int) {
handler!!.posX = 0
UICanvas.endOpeningPopOut(handler, UICanvas.Companion.Position.LEFT)
}
override fun endClosing(gc: GameContainer, delta: Int) {
handler!!.posX = -width
UICanvas.endClosingPopOut(handler, UICanvas.Companion.Position.LEFT)
}
override fun keyPressed(key: Int, c: Char) {