mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
particles when actors collide the world
This commit is contained in:
@@ -95,7 +95,7 @@ class EntryPoint : ModuleEntryPoint() {
|
||||
private fun makeNewItemObj(tile: BlockProp, isWall: Boolean) = object : GameItem(
|
||||
if (isWall) "wall@"+tile.id else tile.id
|
||||
) {
|
||||
override var baseMass: Double = tile.density / 1000.0
|
||||
override var baseMass: Double = tile.density / 100.0
|
||||
override var baseToolSize: Double? = null
|
||||
override var inventoryCategory = if (isWall) Category.WALL else Category.BLOCK
|
||||
override var isDynamic = false
|
||||
|
||||
@@ -58,7 +58,7 @@ open class DroppedItem : ActorWithBody {
|
||||
|
||||
isVisible = true
|
||||
|
||||
avBaseMass = (ItemCodex[itemID]?.mass ?: 2.0).coerceAtMost(2.0)
|
||||
avBaseMass = ((ItemCodex[itemID]?.mass) ?: 2.0).coerceAtLeast(2.0)
|
||||
|
||||
actorValue[AVKey.SCALE] = ItemCodex[itemID]?.scale ?: 1.0
|
||||
|
||||
@@ -84,9 +84,18 @@ open class DroppedItem : ActorWithBody {
|
||||
externalV.set(spawnVelo)
|
||||
}
|
||||
|
||||
actorValue.set(AVKey.FALLDAMPENMULT, 0.1)
|
||||
|
||||
printdbg(this, "DroppedItem with itemID '${itemID}'")
|
||||
}
|
||||
|
||||
|
||||
override fun reload() {
|
||||
super.reload()
|
||||
actorValue.set(AVKey.FALLDAMPENMULT, 0.1)
|
||||
}
|
||||
|
||||
|
||||
override fun drawBody(batch: SpriteBatch) {
|
||||
// deserialiser won't call setter of the fields
|
||||
if (visualItemID == "") {
|
||||
|
||||
Reference in New Issue
Block a user