mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
new block: scaffolding (does not fall yet)
This commit is contained in:
BIN
assets/mods/basegame/blocks/272.tga
LFS
Normal file
BIN
assets/mods/basegame/blocks/272.tga
LFS
Normal file
Binary file not shown.
@@ -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"
|
"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"
|
"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"
|
"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"
|
"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"
|
"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"
|
"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"
|
||||||
|
|||||||
|
@@ -1365,25 +1365,17 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
|
|||||||
if (KeyToggler.isOn(Input.Keys.F9)) {
|
if (KeyToggler.isOn(Input.Keys.F9)) {
|
||||||
val blockMark = AppLoader.resourcePool.getAsTextureRegionPack("blockmarkings_common").get(0, 0)
|
val blockMark = AppLoader.resourcePool.getAsTextureRegionPack("blockmarkings_common").get(0, 0)
|
||||||
|
|
||||||
batch.color = Color.MAGENTA
|
batch.color = HITBOX_COLOURS[0]
|
||||||
for (y in 0 until intTilewiseHitbox.height.toInt()) {
|
for (y in 0..intTilewiseHitbox.height.toInt()) {
|
||||||
for (x in 0 until intTilewiseHitbox.width.toInt()) {
|
for (x in 0..intTilewiseHitbox.width.toInt()) {
|
||||||
batch.draw(blockMark,
|
batch.draw(blockMark,
|
||||||
(intTilewiseHitbox.startX.toFloat() + x) * TILE_SIZEF,
|
(intTilewiseHitbox.startX.toFloat() + x) * TILE_SIZEF,
|
||||||
(intTilewiseHitbox.startY.toFloat() * y) * TILE_SIZEF
|
(intTilewiseHitbox.startY.toFloat() + y) * TILE_SIZEF
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
batch.color = Color.YELLOW
|
//println(intTilewiseHitbox)
|
||||||
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
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1653,6 +1645,8 @@ open class ActorWBMovable(renderOrder: RenderOrder, val immobileBody: Boolean =
|
|||||||
private fun clampCeil(x: Double, ceil: Double): Double {
|
private fun clampCeil(x: Double, ceil: Double): Double {
|
||||||
return if (Math.abs(x) > ceil) ceil else x
|
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
|
// gameplay-related actorvalue macros
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ object BlockBase {
|
|||||||
// check for collision with actors (BLOCK only)
|
// 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 properly fix the collision detection: it OVERRIDES the tiki-torches which should not happen AT ALL
|
||||||
// FIXME (h)IntTilewiseHitbox is badly defined
|
// 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) {
|
if (gameItem.inventoryCategory == GameItem.Category.BLOCK) {
|
||||||
var ret1 = true
|
var ret1 = true
|
||||||
ingame.actorContainerActive.forEach {
|
ingame.actorContainerActive.forEach {
|
||||||
|
|||||||
Reference in New Issue
Block a user