AtomicTorch Studio Forums

CryoFall => Help section => Topic started by: midnightxrush on May 18, 2019, 01:21:01 AM

Title: Adding Damage to tree's on range weapon
Post by: midnightxrush on May 18, 2019, 01:21:01 AM
Like title states how would one add damage to tree's to make a range weapon with ammo act like a tool axe? iv tried to add. using AtomicTorch.CBND.CoreMod.Items.Tools.Axes; to top and then add.
public override double DamageToNonTree => 20;
public override double DamageToTree => 70;

but in the end it cant find it to call to it. for some reason.
Title: Re: Adding Damage to tree's on range weapon
Post by: ai_enabled on May 18, 2019, 02:23:41 PM
Hello!

You need to inherit your range weapon not only from a range weapon base class but also from IProtoItemToolWoodcutting interface. Then it will require adding property DamageToTree which need to be implemented this way (without override):
public double DamageToTree => 70;

If it doesn't work and you stuck, please post your item class here and I'll help.

Regards!