Changeset 2251 for code/branches/questsystem2/src/orxonox
- Timestamp:
- Nov 23, 2008, 4:31:36 PM (16 years ago)
- Location:
- code/branches/questsystem2/src/orxonox/objects/quest
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/questsystem2/src/orxonox/objects/quest/AddQuest.cc
r2226 r2251 30 30 @file AddQuest.cc 31 31 @brief 32 32 Implementation of the AddQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/AddQuest.h
r2221 r2251 30 30 @file AddQuest.h 31 31 @brief 32 32 Definition of the AddQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/AddQuestHint.cc
r2226 r2251 30 30 @file AddQuestHint.cc 31 31 @brief 32 32 Implementation of the AddQuestHint class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/AddQuestHint.h
r2221 r2251 30 30 @file AddQuestHint.h 31 31 @brief 32 32 Definition of the AddQuestHint class. 33 33 */ 34 34 … … 48 48 Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on. 49 49 50 50 Creating a AddQuestHint through XML goes as follows: 51 51 52 52 <AddQuestHint hintId="id" /> //Where id is a GUID, see http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure for more information, and identifies the QuestHint that should be added. -
code/branches/questsystem2/src/orxonox/objects/quest/AddReward.cc
r2228 r2251 30 30 @file AddReward.cc 31 31 @brief 32 32 Implementation of the AddReward class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/AddReward.h
r2221 r2251 30 30 @file AddReward.h 31 31 @brief 32 32 Definition of the AddReward class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/ChangeQuestStatus.cc
r2226 r2251 30 30 @file ChangeQuestStatus.cc 31 31 @brief 32 32 Implementation of the ChangeQuestStatus class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/ChangeQuestStatus.h
r2205 r2251 30 30 @file ChangeQuestStatus.h 31 31 @brief 32 32 Definition of the ChangeQuestStatus class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.cc
r2226 r2251 30 30 @file CompleteQuest.cc 31 31 @brief 32 32 Implementation of the CompleteQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.h
r2221 r2251 30 30 @file CompleteQuest.h 31 31 @brief 32 32 Definition of the CompleteQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/FailQuest.cc
r2226 r2251 30 30 @file FailQuest.cc 31 31 @brief 32 32 Implementation of the FailQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/FailQuest.h
r2221 r2251 30 30 @file FailQuest.h 31 31 @brief 32 32 Definition of the FailQuest class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc
r2226 r2251 30 30 @file GlobalQuest.cc 31 31 @brief 32 32 Implementation of the GlobalQuest class. 33 33 */ 34 34 … … 101 101 } 102 102 103 COUT( 2) << "A non-completable quest was trying to be failed." << std::endl;103 COUT(4) << "A non-completable quest was trying to be failed." << std::endl; 104 104 return false; 105 105 } … … 131 131 } 132 132 133 COUT( 2) << "A non-completable quest was trying to be completed." << std::endl;133 COUT(4) << "A non-completable quest was trying to be completed." << std::endl; 134 134 return false; 135 135 } … … 203 203 } 204 204 205 205 return questStatus::inactive; 206 206 } 207 207 -
code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.h
r2226 r2251 30 30 @file GlobalQuest.h 31 31 @brief 32 32 Definition of the GlobalQuest class. 33 33 */ 34 34 … … 56 56 <QuestDescription title="Title" description="Description." /> //The description of the quest. 57 57 <subquests> 58 59 60 61 62 63 64 65 66 58 <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well. 59 ... 60 <Quest id="questIdn" /> 61 </subquests> 62 <hints> 63 <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those. 64 ... 65 <QuestHint id="hintIdn" /> 66 </hints> 67 67 <fail-effects> 68 68 <QuestEffect /> //A list of QuestEffects, invoked on all players possessing this quest, when the Quest is failed, see QuestEffect for the full XML representation. -
code/branches/questsystem2/src/orxonox/objects/quest/LocalQuest.cc
r2205 r2251 30 30 @file LocalQuest.cc 31 31 @brief 32 32 Implementation of the LocalQuest class. 33 33 */ 34 34 … … 93 93 } 94 94 95 COUT( 2) << "A non-failable quest was trying to be failed." << std::endl;95 COUT(4) << "A non-failable quest was trying to be failed." << std::endl; 96 96 return false; 97 97 } … … 100 100 @brief 101 101 Completes the Quest for a given player. 102 102 Invokes all the complete QuestEffects on the player. 103 103 @param player 104 104 The player. … … 115 115 } 116 116 117 COUT( 2) << "A non-completable quest was trying to be completed." << std::endl;117 COUT(4) << "A non-completable quest was trying to be completed." << std::endl; 118 118 return false; 119 119 } -
code/branches/questsystem2/src/orxonox/objects/quest/LocalQuest.h
r2205 r2251 30 30 @file LocalQuest.h 31 31 @brief 32 32 Definition of the LocalQuest class. 33 33 */ 34 34 … … 56 56 <QuestDescription title="Title" description="Description." /> //The description of the quest. 57 57 <subquests> 58 59 60 61 62 63 64 65 66 58 <Quest id ="questId1" /> //A list of n subquest, be aware, each of the <Quest /> tags must have a description and so on and so forth as well. 59 ... 60 <Quest id="questIdn" /> 61 </subquests> 62 <hints> 63 <QuestHint id="hintId1" /> //A list of n QuestHints, see QuestHint for the full XML representation of those. 64 ... 65 <QuestHint id="hintIdn" /> 66 </hints> 67 67 <fail-effects> 68 68 <QuestEffect /> //A list of QuestEffects, invoked when the Quest is failed, see QuestEffect for the full XML representation. -
code/branches/questsystem2/src/orxonox/objects/quest/Quest.cc
r2226 r2251 30 30 @file Quest.cc 31 31 @brief 32 32 Implementation of the Quest class. 33 33 */ 34 34 … … 380 380 } 381 381 382 COUT( 2) << "A non-startable quest was trying to be started." << std::endl;382 COUT(4) << "A non-startable quest was trying to be started." << std::endl; 383 383 return false; 384 384 } -
code/branches/questsystem2/src/orxonox/objects/quest/Quest.h
r2205 r2251 30 30 @file Quest.h 31 31 @brief 32 33 34 32 Definition of the Quest class. 33 34 The Quest is the parent class of LocalQuest and GlobalQuest. 35 35 */ 36 36 … … 90 90 { return this->parentQuest_; } 91 91 92 93 94 95 92 /** 93 @brief Returns the list of subquests. 94 @return Returns a reference to the list of subquests of the quest. 95 */ 96 96 inline const std::list<Quest*> & getSubQuestList(void) const 97 97 { return this->subQuests_; } 98 98 99 100 101 102 103 99 /** 100 @brief Returns the list of all QuestHints of this Quest. 101 @return Returns a reference to the list of QuestHints of the Quest. 102 */ 103 inline const std::list<QuestHint*> & getHintsList(void) const 104 104 { return this->hints_; } 105 105 … … 110 110 111 111 bool start(PlayerInfo* player); //!< Sets a Quest to active. 112 112 virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest. 113 113 virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest. 114 114 … … 131 131 { return this->failEffects_; } 132 132 133 134 135 136 137 133 /** 134 @brief Returns the list of complete QuestEffects. 135 @return Returns a reference to the list of complete QuestEffects. 136 */ 137 inline std::list<QuestEffect*> & getCompleteEffectList(void) 138 138 { return this->completeEffects_; } 139 139 … … 141 141 virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player. 142 142 143 143 private: 144 144 Quest* parentQuest_; //!< Pointer to the parentquest. 145 145 std::list<Quest*> subQuests_; //!< List of all the subquests. -
code/branches/questsystem2/src/orxonox/objects/quest/QuestDescription.cc
r2205 r2251 30 30 @file QuestDescription.cc 31 31 @brief 32 32 Implementation of the QuestDescription class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestDescription.h
r2221 r2251 30 30 @file QuestDescription.h 31 31 @brief 32 32 Definition of the QuestDescription class. 33 33 */ 34 34 … … 64 64 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML. 65 65 66 67 68 69 66 /** 67 @brief Returns the title. 68 @return Returns a string containing the title of the QuestDescription. 69 */ 70 70 inline const std::string & getTitle(void) const 71 71 { return this->title_; } 72 73 74 75 76 72 73 /** 74 @brief Returns the description text. 75 @return Returns a string containing the description text of the QuestDescription. 76 */ 77 77 inline const std::string & getDescription(void) const 78 78 { return this->description_; } … … 89 89 { this->title_ = title; } 90 90 91 91 /** 92 92 @brief Sets the description text. 93 93 @param description The description text to be set. -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffect.cc
r2205 r2251 30 30 @file QuestEffect.cc 31 31 @brief 32 32 Implementation of the QuestEffect class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffect.h
r2205 r2251 30 30 @file QuestEffect.h 31 31 @brief 32 32 Definition of the QuestEffect class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc
r2226 r2251 30 30 @file QuestEffectBeacon.cc 31 31 @brief 32 32 Implementation of the QuestEffectBeacon class. 33 33 */ 34 34 … … 91 91 SUPER(QuestEffectBeacon, processEvent, event); 92 92 93 93 SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger); 94 94 } 95 95 … … 98 98 Executes the QuestEffectBeacon. 99 99 This means extracting the ControllableEntity from the PlayerTrigger, provided by the Event causing the execution, and the extracting the PlayerInfo from the received ControllableEntity and invoking the QuestEffectbeacon's QuestEffects on the received PlayerInfo. 100 @param b101 TDO: What is this???102 100 @param trigger 103 101 Apointer to the PlayerTrigger that threw the Event. … … 147 145 this->decrementTimes(); //!< Decrement the number of times the beacon can be used. 148 146 return true; 149 150 151 147 } 148 149 return false; 152 150 } 153 151 … … 169 167 if(activate) 170 168 { 171 172 169 this->status_ = QuestEffectBeaconStatus::active; 170 return true; 173 171 } 174 172 … … 195 193 196 194 this->times_ = this->times_ - 1; //!< Decrement number of times the QuestEffectBeacon can be executed. 197 198 195 if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0. 196 { 199 197 this->status_ = QuestEffectBeaconStatus::inactive; 200 198 } 201 199 202 200 return true; -
code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h
r2226 r2251 30 30 @file QuestEffectBeacon.h 31 31 @brief 32 32 Definition of the QuestEffectBeacon class. 33 33 */ 34 34 … … 61 61 A QuestEffectBeacon can be inactive or active. 62 62 63 64 65 63 Creating a QuestEffectBeacon through XML goes as follows: 64 65 <QuestEffectBeacon times=n> //Where 'n' is eighter a number >= 0, which means the QuestEffectBeacon can be executed n times. Or n = -1, which means the QuestEffectBeacon can be executed an infinite number of times. 66 66 <effects> 67 67 <QuestEffect /> //A list of QuestEffects, invoked when the QuestEffectBeacon is executed, see QuestEffect for the full XML representation. … … 70 70 </effects> 71 71 <events> 72 73 74 75 76 77 78 79 72 <execute> 73 <EventListener event=eventIdString /> 74 </execute> 75 </events> 76 <attached> 77 <PlayerTrigger name=eventIdString /> //A PlayerTrigger triggering the execution of the QuestEffectBeacon. 78 </attached> 79 </QuestEffectBeacon> 80 80 @author 81 81 Damian 'Mozork' Frick … … 83 83 class _OrxonoxExport QuestEffectBeacon : public PositionableEntity 84 84 { 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 85 public: 86 QuestEffectBeacon(BaseObject* creator); 87 virtual ~QuestEffectBeacon(); 88 89 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestEffectBeacon object through XML. 90 91 virtual void processEvent(Event& event); //!< Processes an event for this QuestEffectBeacon. 92 93 bool execute(bool b, PlayerTrigger* trigger); //!< Executes the QuestEffects of the QuestEffectBeacon. 94 95 /** 96 @brief Tests whether the QuestEffectBeacon is active. 97 @return Returns true if the QuestEffectBeacon is active, fals if not. 98 */ 99 inline bool isActive(void) 100 { return this->status_ == QuestEffectBeaconStatus::active; } 101 102 bool setActive(bool activate); //!< Set the status of the QuestEffectBeacon. 103 104 protected: 105 105 bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed. 106 106 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.cc
r2226 r2251 30 30 @file QuestHint.cc 31 31 @brief 32 32 Implementation of the QuestHint class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h
r2205 r2251 30 30 @file QuestHint.h 31 31 @brief 32 32 Definition of the QuestHint class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.cc
r2159 r2251 30 30 @file QuestItem.cc 31 31 @brief 32 32 Implementation of the QuestItem class. 33 33 */ 34 34 … … 77 77 @brief 78 78 Sets the id of the QuestItem. 79 79 The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information. 80 80 @param id 81 81 The id to be set. -
code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.h
r2191 r2251 30 30 @file QuestItem.h 31 31 @brief 32 33 34 32 Definition of the QuestItem class. 33 34 The QuestItem is the parent class of Quest and QuestHint. 35 35 */ 36 36 … … 67 67 /** 68 68 @brief Returns the id of this QuestItem. 69 69 @return Returns the id of the QuestItem. 70 70 */ 71 71 inline const std::string & getId(void) const 72 72 { return this->id_; } 73 74 75 76 73 /** 74 @brief Returns the QuestDescription of the QuestItem. 75 @return Returns a pointer to the QuestDescription object of the QuestItem. 76 */ 77 77 inline const QuestDescription* getDescription(void) const 78 78 { return this->description_; } -
code/branches/questsystem2/src/orxonox/objects/quest/QuestManager.cc
r2191 r2251 30 30 @file QuestManager.cc 31 31 @brief 32 32 Implementation of the QuestManager class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/QuestManager.h
r2191 r2251 30 30 @file QuestManager.h 31 31 @brief 32 32 Definition of the QuestManager class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/Rewardable.cc
r2159 r2251 30 30 @file Rewardable.cc 31 31 @brief 32 32 Implementation of the Rewardable class. 33 33 */ 34 34 -
code/branches/questsystem2/src/orxonox/objects/quest/Rewardable.h
r2205 r2251 30 30 @file Rewardable.h 31 31 @brief 32 32 Definition of the Rewardable class. 33 33 */ 34 34 … … 61 61 Method to transcribe a rewardable object to the player. 62 62 Must be implemented by every class inheriting from Rewardable. 63 63 @param player 64 64 A pointer to the ControllableEntity, do whatever you want with it. 65 65 @return 66 66 Return true if successful. 67 67 */
Note: See TracChangeset
for help on using the changeset viewer.