aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Tutorial/ProcedureCompoundTask.h
blob: 0a5b7eee4cfd04bf784cc6645ab3f3571e3596db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#pragma once

#include "TutorialTask.h"

// A tutorial task that requires each of the task to be completed in order until the last one is complete.
// If an earlier task that was complete is now not complete then it's hint should be shown.
class ProcedureCompoundTask : public TutorialTask
{
public:
	ProcedureCompoundTask(Tutorial *tutorial )
		: TutorialTask(tutorial, -1, false, nullptr, false,  true, false )
	{}

	~ProcedureCompoundTask();

	void AddTask(TutorialTask *task);

	virtual int getDescriptionId();
	virtual int getPromptId();
	virtual bool isCompleted();
	virtual void onCrafted(shared_ptr<ItemInstance> item);
	virtual void handleUIInput(int iAction);
	virtual void setAsCurrentTask(bool active = true);
	virtual bool ShowMinimumTime();
	virtual bool hasBeenActivated();
	virtual void setShownForMinimumTime();
	virtual bool AllowFade();

	virtual void useItemOn(Level *level, shared_ptr<ItemInstance> item, int x, int y, int z, bool bTestUseOnly=false);
	virtual void useItem(shared_ptr<ItemInstance> item, bool bTestUseOnly=false);
	virtual void onTake(shared_ptr<ItemInstance> item, unsigned int invItemCountAnyAux, unsigned int invItemCountThisAux);
	virtual void onStateChange(eTutorial_State newState);

private:
	vector<TutorialTask *> m_taskSequence;
};