Couldn't figure out dagger animation for drill. Instead settled for regular pickaxe animation which is odd looking but works.
This commit is contained in:
parent
d37606844b
commit
885436c2b2
|
@ -88,7 +88,7 @@ namespace Revitalize.Framework.Objects.Items.Tools
|
||||||
|
|
||||||
public override void endUsing(GameLocation location, Farmer who)
|
public override void endUsing(GameLocation location, Farmer who)
|
||||||
{
|
{
|
||||||
if (this.hadEnoughEnergy == false)
|
if (this.EnergyManager.hasEnoughEnergy(this.getEnergyConsumptionRate()) == false)
|
||||||
{
|
{
|
||||||
Game1.toolAnimationDone(who);
|
Game1.toolAnimationDone(who);
|
||||||
who.canReleaseTool = false;
|
who.canReleaseTool = false;
|
||||||
|
@ -162,6 +162,16 @@ namespace Revitalize.Framework.Objects.Items.Tools
|
||||||
//who.Stamina -= (float)(2 * (power + 1)) - (float)who.MiningLevel * 0.1f;
|
//who.Stamina -= (float)(2 * (power + 1)) - (float)who.MiningLevel * 0.1f;
|
||||||
//Drain energy here;
|
//Drain energy here;
|
||||||
this.EnergyManager.consumeEnergy(this.getEnergyConsumptionRate());
|
this.EnergyManager.consumeEnergy(this.getEnergyConsumptionRate());
|
||||||
|
//Double check to prevent animation from happening with even no power
|
||||||
|
if (this.EnergyManager.hasEnoughEnergy(this.getEnergyConsumptionRate()) == true)
|
||||||
|
{
|
||||||
|
this.hadEnoughEnergy = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.hadEnoughEnergy = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Utility.clampToTile(new Vector2((float)x, (float)y));
|
Utility.clampToTile(new Vector2((float)x, (float)y));
|
||||||
int num1 = x / 64;
|
int num1 = x / 64;
|
||||||
|
|
Loading…
Reference in New Issue