mirror of
https://gitlab.com/2009scape/2009scape.git
synced 2025-12-21 09:02:07 -07:00
Added full seedling + sapling functionality
This commit is contained in:
parent
05ffc93515
commit
8b347fc826
2 changed files with 3 additions and 1 deletions
|
|
@ -806,6 +806,7 @@ public class Container {
|
|||
|
||||
public Item get(Item item){
|
||||
for(Item i : items){
|
||||
if(i == null) continue;
|
||||
if(item.getId() == i.getId()) return i;
|
||||
}
|
||||
return null;
|
||||
|
|
|
|||
|
|
@ -67,7 +67,8 @@ class SeedlingState(player: Player? = null) : State(player) {
|
|||
val inBank = player.bank.get(Item(seed.id))
|
||||
if(inBank == null) removeList.add(seed)
|
||||
else {
|
||||
player.bank.replace(Item(seed.sapling), inBank.slot)
|
||||
player.bank.remove(Item(inBank.id,1))
|
||||
player.bank.add(Item(seed.sapling))
|
||||
removeList.add(seed)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue