mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
First version that works:
- Covered RMG with exceptions - Fixes for object randomization & placement
This commit is contained in:
@@ -29,6 +29,24 @@ typedef std::vector<JsonNode> JsonVector;
|
||||
|
||||
class CMapGenerator;
|
||||
|
||||
class rmgException : std::exception
|
||||
{
|
||||
std::string msg;
|
||||
public:
|
||||
explicit rmgException(const std::string& _Message) : msg(_Message)
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~rmgException() throw ()
|
||||
{
|
||||
};
|
||||
|
||||
const char *what() const throw () override
|
||||
{
|
||||
return msg.c_str();
|
||||
}
|
||||
};
|
||||
|
||||
/// The map generator creates a map randomly.
|
||||
class DLL_LINKAGE CMapGenerator
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user