Crossfire Server, Trunk
CREMapInformation.h
Go to the documentation of this file.
1 #ifndef CLASS_CRE_MAP_INFORMATION_H
2 #define CLASS_CRE_MAP_INFORMATION_H
3 
4 #include <QObject>
5 #include <QString>
6 #include <QStringList>
7 #include <QDateTime>
8 #include <QHash>
9 #include <QSet>
10 
11 #include "assets/AssetWrapper.h"
12 #include "CREPanel.h"
13 
14 class RandomMap;
15 
17 {
18  Q_OBJECT
19 
20  Q_PROPERTY(QString path READ path)
21  Q_PROPERTY(QString name READ name)
22  Q_PROPERTY(int difficulty READ difficulty)
24  Q_PROPERTY(qint64 experience READ experience)
25 
26  public:
28  CREMapInformation(const QString& path);
29  virtual ~CREMapInformation();
30 
31  virtual QString displayName() const override;
32 
33  virtual void displayFillPanel(QWidget *panel) override {
35  p->setItem(this);
36  }
37 
38  virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override;
39 
40  const QString& path() const;
41  void setPath(const QString& path);
42 
43  const QString& name() const;
44  void setName(const QString& name);
45 
46  const QString& backgroundMusic();
47  void setBackgroundMusic(const QString& music);
48 
49  QStringList archetypes() const;
50  void addArchetype(const QString& archetype);
51 
52  QStringList faces() const;
53  void addFace(const QString& face);
54 
55  QStringList animations() const;
56  void addAnimation(const QString& anim);
57 
58  const QDateTime& mapTime() const;
59  void setMapTime(const QDateTime& date);
60 
61  QStringList exitsTo() const;
62  void addExitTo(const QString& path);
63 
64  QStringList accessedFrom() const;
65  void addAccessedFrom(const QString& path);
66 
67  int difficulty() const;
68  void setDifficulty(int difficulty);
69 
70  int computedDifficulty() const;
71  void setComputedDifficulty(int computed);
72 
73  qint64 experience() const;
74  void setExperience(qint64 experience);
75 
76  const QString& region() const;
77  void setRegion(const QString& region);
78 
79  QStringList messages() const;
80  void addMessage(const QString& message);
81 
82  QStringList quests() const;
83  void addQuest(const QString& quest);
84 
85  QHash<QString, int>& shopItems();
86  const QHash<QString, int>& shopItems() const;
87 
88  double shopGreed() const;
89  void setShopGreed(double greed);
90  const QString& shopRace() const;
91  void setShopRace(const QString& race);
92  quint64 shopMin() const;
93  void setShopMin(quint64 min);
94  quint64 shopMax() const;
95  void setShopMax(quint64 max);
96 
97  QList<RandomMap*> randomMaps() const;
98  void addRandomMap(RandomMap* map);
99 
100  protected:
101  QString myPath;
102  QString myName;
103  QStringList myArchetypes;
104  QSet<QString> myFaces;
105  QSet<QString> myAnimations;
106  QDateTime myMapTime;
107  QStringList myExitsTo;
108  QStringList myAccessedFrom;
111  qint64 myExperience;
112  QString myRegion;
113  QStringList myMessages;
114  QStringList myQuests;
115  QHash<QString, int> myShopItems;
116  double myShopGreed;
117  QString myShopRace;
119  QList<RandomMap*> myRandomMaps;
121 };
122 
123 #endif // CLASS_CRE_MAP_INFORMATION_H
RandomMap
Definition: RandomMap.h:14
CREMapInformation::setShopGreed
void setShopGreed(double greed)
Definition: CREMapInformation.cpp:209
CRETPanel< CREMapInformation >
CREMapInformation::region
const QString & region() const
Definition: CREMapInformation.cpp:163
CREMapInformation::myFaces
QSet< QString > myFaces
Definition: CREMapInformation.h:104
CREMapInformation::myQuests
QStringList myQuests
Definition: CREMapInformation.h:114
CREMapInformation::displayName
virtual QString displayName() const override
Definition: CREMapInformation.cpp:33
CREMapInformation::setComputedDifficulty
void setComputedDifficulty(int computed)
Definition: CREMapInformation.cpp:148
AssetWrapper.h
CREMapInformation::myAnimations
QSet< QString > myAnimations
Definition: CREMapInformation.h:105
CREMapInformation::uses
virtual PossibleUse uses(const AssetWrapper *asset, std::string &) const override
Definition: CREMapInformation.cpp:254
CREMapInformation::myDifficulty
int myDifficulty
Definition: CREMapInformation.h:109
CREMapInformation::difficulty
int difficulty
Definition: CREMapInformation.h:22
CREMapInformation::myName
QString myName
Definition: CREMapInformation.h:102
send.date
date
Definition: send.py:29
CREMapInformation::exitsTo
QStringList exitsTo() const
Definition: CREMapInformation.cpp:111
CREMapInformation::setPath
void setPath(const QString &path)
Definition: CREMapInformation.cpp:45
CREMapInformation::shopItems
QHash< QString, int > & shopItems()
Definition: CREMapInformation.cpp:194
AssetWrapper::PossibleUse
PossibleUse
Definition: AssetWrapper.h:14
CREMapInformation::shopRace
const QString & shopRace() const
Definition: CREMapInformation.cpp:214
CREMapInformation::archetypes
QStringList archetypes() const
Definition: CREMapInformation.cpp:70
CREMapInformation::myMessages
QStringList myMessages
Definition: CREMapInformation.h:113
CREMapInformation::myShopMax
quint64 myShopMax
Definition: CREMapInformation.h:118
CREMapInformation::myShopItems
QHash< QString, int > myShopItems
Definition: CREMapInformation.h:115
CREMapInformation::myAccessedFrom
QStringList myAccessedFrom
Definition: CREMapInformation.h:108
CREMapInformation::setDifficulty
void setDifficulty(int difficulty)
Definition: CREMapInformation.cpp:138
CREMapInformation::myExitsTo
QStringList myExitsTo
Definition: CREMapInformation.h:107
CREMapInformation::addAnimation
void addAnimation(const QString &anim)
Definition: CREMapInformation.cpp:96
CREMapInformation::addMessage
void addMessage(const QString &message)
Definition: CREMapInformation.cpp:177
CREMapInformation::name
QString name
Definition: CREMapInformation.h:21
CREMapInformation::shopGreed
double shopGreed() const
Definition: CREMapInformation.cpp:204
archt
Definition: object.h:468
CREMapInformation::messages
QStringList messages() const
Definition: CREMapInformation.cpp:172
CREMapInformation::myShopRace
QString myShopRace
Definition: CREMapInformation.h:117
CREMapInformation::backgroundMusic
const QString & backgroundMusic()
Definition: CREMapInformation.cpp:60
quest
Definition: quest.py:1
CREMapInformation
Definition: CREMapInformation.h:16
CREMapInformation::setRegion
void setRegion(const QString &region)
Definition: CREMapInformation.cpp:167
CREMapInformation::mapTime
const QDateTime & mapTime() const
Definition: CREMapInformation.cpp:101
CREMapInformation::myArchetypes
QStringList myArchetypes
Definition: CREMapInformation.h:103
disinfect.map
map
Definition: disinfect.py:4
CREMapInformation::setShopMin
void setShopMin(quint64 min)
Definition: CREMapInformation.cpp:229
CREMapInformation::animations
QStringList animations() const
Definition: CREMapInformation.cpp:91
CREMapInformation::addQuest
void addQuest(const QString &quest)
Definition: CREMapInformation.cpp:188
AssetWrapper
Definition: AssetWrapper.h:11
CREMapInformation::setShopRace
void setShopRace(const QString &race)
Definition: CREMapInformation.cpp:219
CREMapInformation::shopMin
quint64 shopMin() const
Definition: CREMapInformation.cpp:224
CREMapInformation::displayFillPanel
virtual void displayFillPanel(QWidget *panel) override
Definition: CREMapInformation.h:33
CREMapInformation::accessedFrom
QStringList accessedFrom() const
Definition: CREMapInformation.cpp:122
CREMapInformation::addFace
void addFace(const QString &face)
Definition: CREMapInformation.cpp:86
CREMapInformation::myShopMin
quint64 myShopMin
Definition: CREMapInformation.h:118
CREMapInformation::experience
qint64 experience
Definition: CREMapInformation.h:24
say.max
dictionary max
Definition: say.py:148
CREMapInformation::path
QString path
Definition: CREMapInformation.h:20
animate.anim
string anim
Definition: animate.py:20
CRETPanel::setItem
virtual void setItem(T *item)=0
CREMapInformation::quests
QStringList quests() const
Definition: CREMapInformation.cpp:183
CREMapInformation::computedDifficulty
int computedDifficulty
Definition: CREMapInformation.h:23
CREMapInformation::myComputedDifficulty
int myComputedDifficulty
Definition: CREMapInformation.h:110
CREMapInformation::myBackgroundMusic
QString myBackgroundMusic
Definition: CREMapInformation.h:120
CREMapInformation::addExitTo
void addExitTo(const QString &path)
Definition: CREMapInformation.cpp:116
diamondslots.message
string message
Definition: diamondslots.py:57
CREMapInformation::randomMaps
QList< RandomMap * > randomMaps() const
Definition: CREMapInformation.cpp:244
CREMapInformation::setBackgroundMusic
void setBackgroundMusic(const QString &music)
Definition: CREMapInformation.cpp:65
CREMapInformation::addRandomMap
void addRandomMap(RandomMap *map)
Definition: CREMapInformation.cpp:249
CREMapInformation::setMapTime
void setMapTime(const QDateTime &date)
Definition: CREMapInformation.cpp:106
CREMapInformation::setShopMax
void setShopMax(quint64 max)
Definition: CREMapInformation.cpp:239
CREPanel.h
CREMapInformation::myExperience
qint64 myExperience
Definition: CREMapInformation.h:111
CREMapInformation::setName
void setName(const QString &name)
Definition: CREMapInformation.cpp:55
CREMapInformation::addArchetype
void addArchetype(const QString &archetype)
Definition: CREMapInformation.cpp:75
CREMapInformation::faces
QStringList faces() const
Definition: CREMapInformation.cpp:81
CREMapInformation::myShopGreed
double myShopGreed
Definition: CREMapInformation.h:116
CREMapInformation::addAccessedFrom
void addAccessedFrom(const QString &path)
Definition: CREMapInformation.cpp:127
CREMapInformation::setExperience
void setExperience(qint64 experience)
Definition: CREMapInformation.cpp:158
CREMapInformation::myPath
QString myPath
Definition: CREMapInformation.h:101
CREMapInformation::myMapTime
QDateTime myMapTime
Definition: CREMapInformation.h:106
CREMapInformation::myRandomMaps
QList< RandomMap * > myRandomMaps
Definition: CREMapInformation.h:119
CREMapInformation::myRegion
QString myRegion
Definition: CREMapInformation.h:112
CREMapInformation::shopMax
quint64 shopMax() const
Definition: CREMapInformation.cpp:234
regiondef
Definition: map.h:275