Commit 8b113db9 authored by CortexPE's avatar CortexPE Committed by GitHub
Browse files

Merge pull request #803 from TheAz928/patch-2

Add Transaction::getSourceItem()

(This is used for GUIs btw 😉)
parents 4b44cc30 364eeb53
Pipeline #11600850 failed with stage
in 54 seconds
......@@ -86,6 +86,13 @@ class BaseTransaction implements Transaction {
return clone $this->targetItem;
}
/**
* @return Item
*/
public function getSourceItem(){
return clone $this->inventory->getItem($this->slot);
}
/**
* @param Item $item
*/
......
......@@ -45,6 +45,11 @@ interface Transaction {
*/
public function getTargetItem();
/**
* @return Item
*/
public function getSourceItem();
/**
* @return float
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment