mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-04-24 13:33:36 +00:00
37 lines
926 B
C++
37 lines
926 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "CompoundGameRuleDefinition.h"
|
|
#include "app/common/GameRules/ConsoleGameRulesConstants.h"
|
|
|
|
class NamedAreaRuleDefinition;
|
|
class AABB;
|
|
class StringTable;
|
|
|
|
class LevelRuleset : public CompoundGameRuleDefinition {
|
|
private:
|
|
std::vector<NamedAreaRuleDefinition*> m_areas;
|
|
StringTable* m_stringTable;
|
|
|
|
public:
|
|
LevelRuleset();
|
|
~LevelRuleset();
|
|
|
|
virtual void getChildren(std::vector<GameRuleDefinition*>* children);
|
|
virtual GameRuleDefinition* addChild(
|
|
ConsoleGameRules::EGameRuleType ruleType);
|
|
|
|
virtual ConsoleGameRules::EGameRuleType getActionType() {
|
|
return ConsoleGameRules::eGameRuleType_LevelRules;
|
|
}
|
|
|
|
void loadStringTable(StringTable* table);
|
|
const char* getString(const std::string& key);
|
|
|
|
AABB* getNamedArea(const std::string& areaName);
|
|
|
|
StringTable* getStringTable() { return m_stringTable; }
|
|
};
|