This should fix the mining bug...

This commit is contained in:
CodeForFame 2012-01-07 16:09:36 -06:00
parent ad023434c1
commit 4fcac6e6d4

View File

@ -114,6 +114,7 @@ public class Mining implements ObjectListener {
return; return;
} }
owner.setBusy(true); owner.setBusy(true);
owner.isMining(true);
owner.getActionSender().sendSound("mine"); owner.getActionSender().sendSound("mine");
Bubble bubble = new Bubble(owner, axeId); Bubble bubble = new Bubble(owner, axeId);
@ -127,6 +128,10 @@ public class Mining implements ObjectListener {
"You swing your pick at the rock..."); "You swing your pick at the rock...");
Instance.getDelayedEventHandler().add(new ShortEvent(owner) { Instance.getDelayedEventHandler().add(new ShortEvent(owner) {
public void action() { public void action() {
if(!owner.isMining()) {
owner.setBusy(false);
return;
}
if (Formulae.getOre(def, owner.getCurStat(14), axeID)) { if (Formulae.getOre(def, owner.getCurStat(14), axeID)) {
if (DataConversions.random(0, 200) == 0) { if (DataConversions.random(0, 200) == 0) {
InvItem gem = new InvItem(Formulae.getGem(), 1); InvItem gem = new InvItem(Formulae.getGem(), 1);