CraftingTransaction: Don't hardcode crafting grid sizes

This commit is contained in:
Dylan K. Taylor
2017-11-28 17:13:23 +00:00
parent 98ac6fc7be
commit 878f1bffb9
3 changed files with 8 additions and 4 deletions

View File

@ -31,8 +31,12 @@ class CraftingGrid extends BaseInventory{
parent::__construct($holder);
}
public function getGridWidth() : int{
return 2;
}
public function getDefaultSize() : int{
return 4;
return $this->getGridWidth() ** 2;
}
public function setSize(int $size){