forked from 2009Scape/Server
Firemaking now repeats until all the matching logs in your inventory are used
This commit is contained in:
parent
b35159b5b7
commit
0fddd2134b
1 changed files with 11 additions and 1 deletions
|
|
@ -19,6 +19,8 @@ import org.rs09.consts.Items;
|
|||
import static core.api.ContentAPIKt.inInventory;
|
||||
import static core.api.ContentAPIKt.replaceSlot;
|
||||
|
||||
import static core.api.ContentAPIKt.removeItem;
|
||||
|
||||
/**
|
||||
* Represents the pulse used to light a log.
|
||||
* @author 'Vexia
|
||||
|
|
@ -102,10 +104,12 @@ public final class FireMakingPulse extends SkillPulse<Item> {
|
|||
|
||||
@Override
|
||||
public boolean reward() {
|
||||
/* Snowscape: this section allows making a new fire without an animation if you're fast enough, but since we auto-repeat we don't need that
|
||||
if (getLastFire() >= GameWorld.getTicks()) {
|
||||
createFire();
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
if (ticks == 0) {
|
||||
player.animate(ANIMATION);
|
||||
}
|
||||
|
|
@ -119,7 +123,13 @@ public final class FireMakingPulse extends SkillPulse<Item> {
|
|||
return false;
|
||||
}
|
||||
createFire();
|
||||
return true;
|
||||
// Snowscape: attempt to remove another log. If successful, the pulse continues and the player makes another fire
|
||||
if (removeItem(player, new Item(node.getId(), 1), Container.INVENTORY)) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue