- Moved "game mode" types of awards outside of a code, and inside of a configuration file (rules/awards.dat). No code is required anymore to create such an award (momir, hermit basic, etc...)
- fixed compilation errors in GameObserver (windows)
This commit is contained in:
@@ -13,6 +13,22 @@ class DeckStats;
|
||||
|
||||
using namespace std;
|
||||
|
||||
class Unlockable
|
||||
{
|
||||
private:
|
||||
map <string, string>mValues;
|
||||
public:
|
||||
Unlockable();
|
||||
void setValue(string, string);
|
||||
string getValue(string);
|
||||
bool isUnlocked();
|
||||
bool tryToUnlock(GameObserver * game);
|
||||
static void load();
|
||||
static map <string, Unlockable *> unlockables;
|
||||
static void Unlockable::Destroy();
|
||||
};
|
||||
|
||||
|
||||
class CreditBonus
|
||||
{
|
||||
public:
|
||||
@@ -27,9 +43,6 @@ class Credits
|
||||
private:
|
||||
time_t gameLength;
|
||||
int isDifficultyUnlocked(DeckStats * stats);
|
||||
int isMomirUnlocked();
|
||||
int isStoneHewerUnlocked();
|
||||
int isHermitUnlocked();
|
||||
int isEvilTwinUnlocked();
|
||||
int isRandomDeckUnlocked();
|
||||
int IsMoreAIDecksUnlocked(DeckStats * stats);
|
||||
|
||||
@@ -81,9 +81,6 @@ public:
|
||||
INTERRUPT_AFTEREND,
|
||||
BEGIN_AWARDS, //Options after this use the GameOptionAward struct, which includes a timestamp.
|
||||
DIFFICULTY_MODE_UNLOCKED = BEGIN_AWARDS,
|
||||
MOMIR_MODE_UNLOCKED,
|
||||
STONEHEWER_MODE_UNLOCKED,
|
||||
HERMIT_MODE_UNLOCKED,
|
||||
EVILTWIN_MODE_UNLOCKED,
|
||||
RANDOMDECK_MODE_UNLOCKED,
|
||||
AWARD_COLLECTOR,
|
||||
@@ -361,6 +358,7 @@ public:
|
||||
private:
|
||||
vector<GameOption*> values;
|
||||
map<string,GameOption*> unknownMap;
|
||||
GameOption * factorNewGameOption(string optionName, string value = "");
|
||||
};
|
||||
|
||||
class GameSettings
|
||||
|
||||
@@ -61,6 +61,7 @@ public:
|
||||
bool hidden;
|
||||
string displayName;
|
||||
int unlockOption;
|
||||
string mUnlockOptionString;
|
||||
static vector<Rules *> RulesList;
|
||||
|
||||
Rules(string bg = "");
|
||||
|
||||
@@ -595,6 +595,7 @@ class WGuiAward: public WGuiItem
|
||||
{
|
||||
public:
|
||||
WGuiAward(int _id, string name, string _text, string _details = "");
|
||||
WGuiAward(string _id, string name, string _text, string _details = "");
|
||||
virtual ~WGuiAward();
|
||||
virtual void Render();
|
||||
virtual bool Selectable()
|
||||
@@ -614,6 +615,7 @@ public:
|
||||
protected:
|
||||
string details;
|
||||
int id;
|
||||
string textId;
|
||||
string text;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user