fixed a bug where the player would immediately pick back up the fixture they've just placed one frame ago

This commit is contained in:
minjaesong
2022-07-19 00:25:13 +09:00
parent 23c2d86c27
commit 5fbbf34c10
14 changed files with 260 additions and 23 deletions

View File

@@ -269,7 +269,7 @@ open class GameWorld() : Disposable {
layerWall.unsafeSetTile(x, y, tilenum)
wallDamages.remove(LandUtil.getBlockAddr(this, x, y))
if (!bypassEvent) {
if (!bypassEvent && oldWall != itemID) {
Terrarum.ingame?.queueWallChangedEvent(oldWall, itemID, x, y)
Terrarum.ingame?.modified(LandUtil.LAYER_WALL, x, y)
}
@@ -301,7 +301,7 @@ open class GameWorld() : Disposable {
}
// fluid tiles-item should be modified so that they will also place fluid onto their respective map
if (!bypassEvent) {
if (!bypassEvent && oldTerrain != itemID) {
Terrarum.ingame?.queueTerrainChangedEvent(oldTerrain, itemID, x, y)
Terrarum.ingame?.modified(LandUtil.LAYER_TERR, x, y)
}

View File

@@ -241,7 +241,7 @@ object WorldSimulator {
val currentTile = world.getTileFromTerrain(x, y)
val prop = BlockCodex[currentTile]
// don't let the falling sand destroy the precious storage chest
val isAir = !prop.isSolid && !prop.nameKey.contains("ACTORBLOCK")
val isAir = !prop.isSolid && !prop.isActorBlock
val support = prop.maxSupport
val isFallable = support != -1