aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/GameRules/LevelRuleset.h
blob: bbb17c437e45cece925766a10ec3c7f820a2b018 (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
#pragma once

#include "CompoundGameRuleDefinition.h"

class NamedAreaRuleDefinition;

class LevelRuleset : public CompoundGameRuleDefinition
{
private:
	vector<NamedAreaRuleDefinition *> m_areas;
	StringTable *m_stringTable;
public:
	LevelRuleset();
	~LevelRuleset();

	virtual void getChildren(vector<GameRuleDefinition *> *children);
	virtual GameRuleDefinition *addChild(ConsoleGameRules::EGameRuleType ruleType);

	virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_LevelRules; }

	void loadStringTable(StringTable *table);
	LPCWSTR getString(const wstring &key);

	AABB *getNamedArea(const wstring &areaName);

	StringTable *getStringTable() { return m_stringTable; }
};