- Files in Res/rules are now loaded dynamically. This allows people to add their own mods fairly easily
- also has a basic support for unlocks (does not yet allow people to create their own unlock rules, though...) - Some things are still hardcoded and should progressively move to these rules files (such as Game Type, how random decks are created, etc...) - Test suite doesn't foolishly ask you to choose a game mode (momir, etc...) anymore - UPDATE YOUR Res/rules/ folder !!!
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include "DeckManager.h"
|
||||
#include "Translate.h"
|
||||
#include "WFilter.h"
|
||||
#include "Rules.h"
|
||||
|
||||
#define DEFAULT_DURATION .25
|
||||
|
||||
@@ -247,6 +248,9 @@ void GameApp::Create()
|
||||
mCurrentState = NULL;
|
||||
mNextState = mGameStates[GAME_STATE_MENU];
|
||||
|
||||
LOG("--Load Game rules");
|
||||
Rules::loadAllRules();
|
||||
|
||||
//Set Audio volume
|
||||
JSoundSystem::GetInstance()->SetSfxVolume(options[Options::SFXVOLUME].number);
|
||||
JSoundSystem::GetInstance()->SetMusicVolume(options[Options::MUSICVOLUME].number);
|
||||
@@ -298,6 +302,8 @@ void GameApp::Destroy()
|
||||
DeckEditorMenu::destroy();
|
||||
|
||||
options.theGame = NULL;
|
||||
|
||||
Rules::unloadAllRules();
|
||||
LOG("==Destroying GameApp Successful==");
|
||||
|
||||
#ifdef TRACK_FILE_USAGE_STATS
|
||||
|
||||
Reference in New Issue
Block a user