summaryrefslogtreecommitdiffstats
path: root/src/Generating/PieceModifier.h
blob: 88fba50708eb24bff4fd5c2b102a89484c79dd77 (plain) (blame)
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
37
38
39
40
41
42
43
44
45

// PieceModifier.h

// Declares the public interface for cPiece's cPieceModifier implementations





#pragma once

#include "PiecePool.h"





bool CreatePieceModifierFromString(const AString & a_Definition, std::shared_ptr<cPiece::cPieceModifiers> & a_Modifiers, bool a_LogWarnings);





/** Used to store block type, meta, weight and some more params */
class cRandomizedBlock
{
public:
	BLOCKTYPE m_Type;

	int m_Weight;

	/** Minimum meta to randomize */
	int m_MinMeta = 0;

	/** Maximum meta to randomize */
	int m_MaxMeta = -1;

	/** Maximum meta in noise range */
	int m_MaxNoiseMeta = 0;

	/** Minimum meta in noise range */
	int m_MinNoiseMeta = 0;
};

typedef std::vector<cRandomizedBlock> cRandomizedBlocks;