new block: scaffolding (does not fall yet)

This commit is contained in:
minjaesong
2019-06-10 01:40:10 +09:00
parent 6e0fe95e76
commit fd9d36c7ac
4 changed files with 15 additions and 13 deletions

Binary file not shown.

View File

@@ -98,6 +98,10 @@
"256";"256";"BLOCK_LANTERN_IRON_REGULAR";"0.0312";"0.0312";"0.0312";"0.0312";"1";"N/A";"FXTR";"0";"0";"0";"0";"0";"0";"16";"1.0000";"0.6372";"0.0000";"0.0000";"N/A";"N/A"
"257";"257";"BLOCK_SUNSTONE";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"ROCK";"1";"0";"0";"0";"2";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"258";"258";"BLOCK_DAYLIGHT_CAPACITOR";"0.1252";"0.1252";"0.1252";"0.1252";"1";"N/A";"GLAS";"1";"0";"0";"0";"3";"0";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A"
"272";"272";"BLOCK_SCAFFOLDING_NORMAL";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"1";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
"273";"273";"BLOCK_SCAFFOLDING_EBONY";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"1";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
"274";"274";"BLOCK_SCAFFOLDING_BIRCH";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"1";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
"275";"275";"BLOCK_SCAFFOLDING_BLOODROSE";"0.0";"0.0";"0.0";"0.0";"1";"N/A";"WOOD";"0";"1";"0";"1";"0";"0";"16";"0.0";"0.0";"0.0";"0.0";"N/A";""
"4091";"0";"ACTORBLOCK_NO_COLLISION";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"0";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
"4092";"0";"ACTORBLOCK_FULL_COLLISION";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"0";"0";"0";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
"4093";"0";"ACTORBLOCK_ALLOW_MOVE_DOWN";"0.0";"0.0";"0.0";"0.0";"1";"1";"NULL";"0";"1";"0";"0";"0";"0";"0";"0.0";"0.0";"0.0";"0.0";"N/A";"N/A"
1 id drop name shdr shdg shdb shduv str dsty mate solid plat wall fall dlfn fv fr lumr lumg lumb lumuv colour vscs
98 256 256 BLOCK_LANTERN_IRON_REGULAR 0.0312 0.0312 0.0312 0.0312 1 N/A FXTR 0 0 0 0 0 0 16 1.0000 0.6372 0.0000 0.0000 N/A N/A
99 257 257 BLOCK_SUNSTONE 0.1252 0.1252 0.1252 0.1252 1 N/A ROCK 1 0 0 0 2 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
100 258 258 BLOCK_DAYLIGHT_CAPACITOR 0.1252 0.1252 0.1252 0.1252 1 N/A GLAS 1 0 0 0 3 0 16 0.0000 0.0000 0.0000 0.0000 N/A N/A
101 272 272 BLOCK_SCAFFOLDING_NORMAL 0.0 0.0 0.0 0.0 1 N/A WOOD 0 1 0 1 0 0 16 0.0 0.0 0.0 0.0 N/A N/A
102 273 273 BLOCK_SCAFFOLDING_EBONY 0.0 0.0 0.0 0.0 1 N/A WOOD 0 1 0 1 0 0 16 0.0 0.0 0.0 0.0 N/A
103 274 274 BLOCK_SCAFFOLDING_BIRCH 0.0 0.0 0.0 0.0 1 N/A WOOD 0 1 0 1 0 0 16 0.0 0.0 0.0 0.0 N/A
104 275 275 BLOCK_SCAFFOLDING_BLOODROSE 0.0 0.0 0.0 0.0 1 N/A WOOD 0 1 0 1 0 0 16 0.0 0.0 0.0 0.0 N/A
105 4091 0 ACTORBLOCK_NO_COLLISION 0.0 0.0 0.0 0.0 1 1 NULL 0 0 0 0 0 0 0 0.0 0.0 0.0 0.0 N/A N/A
106 4092 0 ACTORBLOCK_FULL_COLLISION 0.0 0.0 0.0 0.0 1 1 NULL 0 0 0 0 0 0 0 0.0 0.0 0.0 0.0 N/A N/A
107 4093 0 ACTORBLOCK_ALLOW_MOVE_DOWN 0.0 0.0 0.0 0.0 1 1 NULL 0 1 0 0 0 0 0 0.0 0.0 0.0 0.0 N/A N/A

View File

@@ -1365,25 +1365,17 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
if (KeyToggler.isOn(Input.Keys.F9)) {
val blockMark = AppLoader.resourcePool.getAsTextureRegionPack("blockmarkings_common").get(0, 0)
batch.color = Color.MAGENTA
for (y in 0 until intTilewiseHitbox.height.toInt()) {
for (x in 0 until intTilewiseHitbox.width.toInt()) {
batch.color = HITBOX_COLOURS[0]
for (y in 0..intTilewiseHitbox.height.toInt()) {
for (x in 0..intTilewiseHitbox.width.toInt()) {
batch.draw(blockMark,
(intTilewiseHitbox.startX.toFloat() + x) * TILE_SIZEF,
(intTilewiseHitbox.startY.toFloat() * y) * TILE_SIZEF
(intTilewiseHitbox.startY.toFloat() + y) * TILE_SIZEF
)
}
}
batch.color = Color.YELLOW
for (y in 0 until hIntTilewiseHitbox.height.toInt()) {
for (x in 0 until hIntTilewiseHitbox.width.toInt()) {
batch.draw(blockMark,
(hIntTilewiseHitbox.startX.toFloat() + x) * TILE_SIZEF,
(hIntTilewiseHitbox.startY.toFloat() * y) * TILE_SIZEF
)
}
}
//println(intTilewiseHitbox)
}
}
@@ -1653,6 +1645,8 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
private fun clampCeil(x: Double, ceil: Double): Double {
return if (Math.abs(x) > ceil) ceil else x
}
@Transient private val HITBOX_COLOURS = arrayOf(Color(0xFF00FF88.toInt()), Color(0xFFFF0088.toInt()))
}
// gameplay-related actorvalue macros

View File

@@ -28,6 +28,7 @@ object BlockBase {
// check for collision with actors (BLOCK only)
// FIXME properly fix the collision detection: it OVERRIDES the tiki-torches which should not happen AT ALL
// FIXME (h)IntTilewiseHitbox is badly defined
// FIXME actually it's this code: not recognising hitbox's starting point correctly. Use F9 for visualisation
if (gameItem.inventoryCategory == GameItem.Category.BLOCK) {
var ret1 = true
ingame.actorContainerActive.forEach {