12345678910111213141516171819202122232425262728293031323334353637383940 |
- #pragma once
- #include <Array.h>
- #include <JSON.h>
- #include "ItemFilter.h"
- #include "CraftingStorage.h"
- class Recipie : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::RCArray<ItemFilter> filters;
- Framework::Array<int> inputAmount;
- Framework::RCArray<Item> outputs;
- Framework::Array<int> outputAmount;
- public:
- Recipie();
- void addIngredient( ItemFilter* filter, int amount );
- void addOutput( Item* item, int amount );
- bool testApplicability( CraftingStorage* zStorage );
- void apply( CraftingStorage* zStorage );
- };
- class ShapedRecipie : public virtual Framework::ReferenceCounter
- {
- private:
- Framework::RCArray<ItemFilter> filters;
- int width;
- int height;
- Item* output;
- int outputAmount;
- public:
- ShapedRecipie( int width, int height );
- ~ShapedRecipie();
- void setIngredient( int x, int y, ItemFilter* filter );
- void setOutput( Item* item, int amount );
- bool testApplicability( ShapedCraftingStorage* zStorage );
- void apply( ShapedCraftingStorage* zStorage );
- };
|