CraftingTransaction: make CraftingManager injectable

this becomes a bit easier to unit-test.
This commit is contained in:
Dylan K. Taylor
2020-07-01 13:29:58 +01:00
parent 96541763f1
commit 29612cded3
2 changed files with 11 additions and 2 deletions

View File

@ -236,7 +236,7 @@ class InGamePacketHandler extends PacketHandler{
//trying to execute it
if($this->craftingTransaction === null){
$this->craftingTransaction = new CraftingTransaction($this->player, $actions);
$this->craftingTransaction = new CraftingTransaction($this->player, $this->player->getServer()->getCraftingManager(), $actions);
}else{
foreach($actions as $action){
$this->craftingTransaction->addAction($action);