mirror of
https://github.com/Patoke/LCERenewed.git
synced 2026-11-16 01:40:17 +00:00
feat: init
This commit is contained in:
commit
25809b8455
18807 files changed
+3944357
No files matched your search
@@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include "Behavior.h"
|
||||
|
||||
class ItemInstance;
|
||||
class BlockSource;
|
||||
|
||||
class DispenseItemBehavior : public Behavior
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* The 'do nothing' behavior.
|
||||
*/
|
||||
static DispenseItemBehavior *NOOP;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param source The source of this call (the dispenser that calls it)
|
||||
* @param dispensed The ItemInstance which is being dispensed
|
||||
* @return The ItemInstance that should is 'left over'
|
||||
*/
|
||||
virtual shared_ptr<ItemInstance> dispense(BlockSource *source, shared_ptr<ItemInstance> dispensed) = 0;
|
||||
};
|
||||
|
||||
class NoOpDispenseItemBehavior : public DispenseItemBehavior
|
||||
{
|
||||
public:
|
||||
shared_ptr<ItemInstance> dispense(BlockSource *source, shared_ptr<ItemInstance> dispensed);
|
||||
};
|
||||
Reference in new issue
Block a user