Returns true if the input can be cooked into output and the item counts allow for another cooking operation
| 406 | |
| 407 | /// Returns true if the input can be cooked into output and the item counts allow for another cooking operation |
| 408 | bool cFurnaceEntity::CanCookInputToOutput(void) const |
| 409 | { |
| 410 | if (m_CurrentRecipe == NULL) |
| 411 | { |
| 412 | // This input cannot be cooked |
| 413 | return false; |
| 414 | } |
| 415 | |
| 416 | if (m_Contents.GetSlot(fsOutput).IsEmpty()) |
| 417 | { |
| 418 | // The output is empty, can cook |
| 419 | return true; |
| 420 | } |
| 421 | |
| 422 | if (!m_Contents.GetSlot(fsOutput).IsEqual(*m_CurrentRecipe->Out)) |
| 423 | { |
| 424 | // The output slot is blocked with something that cannot be stacked with the recipe's output |
| 425 | return false; |
| 426 | } |
| 427 | |
| 428 | if (m_Contents.GetSlot(fsOutput).IsFullStack()) |
| 429 | { |
| 430 | // Cannot add any more items to the output slot |
| 431 | return false; |
| 432 | } |
| 433 | |
| 434 | return true; |
| 435 | } |
| 436 | |
| 437 | |
| 438 |
nothing calls this directly
no test coverage detected