mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-13 12:04:06 +09:00
big enough actors can dig ground by punching it
This commit is contained in:
@@ -16,8 +16,8 @@ object Calculate {
|
||||
*
|
||||
* TODO Newtons as unit?
|
||||
*/
|
||||
@JvmStatic fun pickaxePower(actor: ActorWithBody, material: Material): Float {
|
||||
return (4.0 * material.forceMod.toDouble().sqrt() * (actor.avStrength / 1000.0)).toFloat()
|
||||
@JvmStatic fun pickaxePower(actor: ActorWithBody, material: Material?): Float {
|
||||
return (4.0 * (material?.forceMod?.toDouble() ?: 1.0).sqrt() * (actor.avStrength / 1000.0)).toFloat()
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user