Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 23, 2008, 4:31:36 PM (16 years ago)
Author:
dafrick
Message:

Some cleanup…

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  
    3030    @file AddQuest.cc
    3131    @brief
    32         Implementation of the AddQuest class.
     32    Implementation of the AddQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/AddQuest.h

    r2221 r2251  
    3030    @file AddQuest.h
    3131    @brief
    32         Definition of the AddQuest class.
     32    Definition of the AddQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/AddQuestHint.cc

    r2226 r2251  
    3030    @file AddQuestHint.cc
    3131    @brief
    32         Implementation of the AddQuestHint class.
     32    Implementation of the AddQuestHint class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/AddQuestHint.h

    r2221 r2251  
    3030    @file AddQuestHint.h
    3131    @brief
    32         Definition of the AddQuestHint class.
     32    Definition of the AddQuestHint class.
    3333*/
    3434
     
    4848        Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on.
    4949       
    50         Creating a AddQuestHint through XML goes as follows:
     50    Creating a AddQuestHint through XML goes as follows:
    5151       
    5252        <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  
    3030    @file AddReward.cc
    3131    @brief
    32         Implementation of the AddReward class.
     32    Implementation of the AddReward class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/AddReward.h

    r2221 r2251  
    3030    @file AddReward.h
    3131    @brief
    32         Definition of the AddReward class.
     32    Definition of the AddReward class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/ChangeQuestStatus.cc

    r2226 r2251  
    3030    @file ChangeQuestStatus.cc
    3131    @brief
    32         Implementation of the ChangeQuestStatus class.
     32    Implementation of the ChangeQuestStatus class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/ChangeQuestStatus.h

    r2205 r2251  
    3030    @file ChangeQuestStatus.h
    3131    @brief
    32         Definition of the ChangeQuestStatus class.
     32    Definition of the ChangeQuestStatus class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.cc

    r2226 r2251  
    3030    @file CompleteQuest.cc
    3131    @brief
    32         Implementation of the CompleteQuest class.
     32    Implementation of the CompleteQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/CompleteQuest.h

    r2221 r2251  
    3030    @file CompleteQuest.h
    3131    @brief
    32         Definition of the CompleteQuest class.
     32    Definition of the CompleteQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/FailQuest.cc

    r2226 r2251  
    3030    @file FailQuest.cc
    3131    @brief
    32         Implementation of the FailQuest class.
     32    Implementation of the FailQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/FailQuest.h

    r2221 r2251  
    3030    @file FailQuest.h
    3131    @brief
    32         Definition of the FailQuest class.
     32    Definition of the FailQuest class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.cc

    r2226 r2251  
    3030    @file GlobalQuest.cc
    3131    @brief
    32         Implementation of the GlobalQuest class.
     32    Implementation of the GlobalQuest class.
    3333*/
    3434
     
    101101        }
    102102       
    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;
    104104        return false;
    105105    }
     
    131131        }
    132132       
    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;
    134134        return false;
    135135    }
     
    203203        }
    204204
    205         return questStatus::inactive;
     205    return questStatus::inactive;
    206206    }
    207207
  • code/branches/questsystem2/src/orxonox/objects/quest/GlobalQuest.h

    r2226 r2251  
    3030    @file GlobalQuest.h
    3131    @brief
    32         Definition of the GlobalQuest class.
     32    Definition of the GlobalQuest class.
    3333*/
    3434
     
    5656            <QuestDescription title="Title" description="Description." /> //The description of the quest.
    5757            <subquests>
    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>
     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>
    6767            <fail-effects>
    6868                <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  
    3030    @file LocalQuest.cc
    3131    @brief
    32         Implementation of the LocalQuest class.
     32    Implementation of the LocalQuest class.
    3333*/
    3434
     
    9393        }
    9494       
    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;
    9696        return false;
    9797    }
     
    100100    @brief
    101101        Completes the Quest for a given player.
    102         Invokes all the complete QuestEffects on the player.
     102    Invokes all the complete QuestEffects on the player.
    103103    @param player
    104104        The player.
     
    115115        }
    116116       
    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;
    118118        return false;
    119119    }
  • code/branches/questsystem2/src/orxonox/objects/quest/LocalQuest.h

    r2205 r2251  
    3030    @file LocalQuest.h
    3131    @brief
    32         Definition of the LocalQuest class.
     32    Definition of the LocalQuest class.
    3333*/
    3434
     
    5656            <QuestDescription title="Title" description="Description." /> //The description of the quest.
    5757            <subquests>
    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>
     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>
    6767            <fail-effects>
    6868                <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  
    3030    @file Quest.cc
    3131    @brief
    32         Implementation of the Quest class.
     32    Implementation of the Quest class.
    3333*/
    3434
     
    380380        }
    381381       
    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;
    383383        return false;
    384384    }
  • code/branches/questsystem2/src/orxonox/objects/quest/Quest.h

    r2205 r2251  
    3030    @file Quest.h
    3131    @brief
    32         Definition of the Quest class.
    33        
    34         The Quest is the parent class of LocalQuest and GlobalQuest.
     32    Definition of the Quest class.
     33   
     34    The Quest is the parent class of LocalQuest and GlobalQuest.
    3535*/
    3636 
     
    9090                { return this->parentQuest_; }
    9191               
    92             /**
    93             @brief Returns the list of subquests.
    94             @return Returns a reference to the list of subquests of the quest.
    95             */
     92        /**
     93        @brief Returns the list of subquests.
     94        @return Returns a reference to the list of subquests of the quest.
     95        */
    9696            inline const std::list<Quest*> & getSubQuestList(void) const
    9797                { return this->subQuests_; }
    9898               
    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
     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
    104104                { return this->hints_; }
    105105
     
    110110
    111111            bool start(PlayerInfo* player); //!< Sets a Quest to active.
    112             virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest.
     112        virtual bool fail(PlayerInfo* player) = 0; //!< Fails the Quest.
    113113            virtual bool complete(PlayerInfo* player) = 0; //!< Completes the Quest.
    114114
     
    131131                { return this->failEffects_; }
    132132               
    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)
     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)
    138138                { return this->completeEffects_; }
    139139
     
    141141            virtual bool setStatus(PlayerInfo* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
    142142           
    143         private:
     143    private:
    144144            Quest* parentQuest_; //!< Pointer to the parentquest.
    145145            std::list<Quest*> subQuests_; //!< List of all the subquests.
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestDescription.cc

    r2205 r2251  
    3030    @file QuestDescription.cc
    3131    @brief
    32         Implementation of the QuestDescription class.
     32    Implementation of the QuestDescription class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestDescription.h

    r2221 r2251  
    3030    @file QuestDescription.h
    3131    @brief
    32         Definition of the QuestDescription class.
     32    Definition of the QuestDescription class.
    3333*/
    3434
     
    6464            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a QuestDescription object through XML.
    6565
    66             /**
    67             @brief Returns the title.
    68             @return Returns a string containing the title of the QuestDescription.
    69             */
     66        /**
     67        @brief Returns the title.
     68        @return Returns a string containing the title of the QuestDescription.
     69        */
    7070            inline const std::string & getTitle(void) const
    7171                { return this->title_; }
    72            
    73             /**
    74             @brief Returns the description text.
    75             @return Returns a string containing the description text of the QuestDescription.
    76             */
     72       
     73        /**
     74        @brief Returns the description text.
     75        @return Returns a string containing the description text of the QuestDescription.
     76        */
    7777            inline const std::string & getDescription(void) const
    7878                { return this->description_; }
     
    8989                { this->title_ = title; }
    9090               
    91             /**
     91        /**
    9292            @brief Sets the description text.
    9393            @param description The description text to be set.
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffect.cc

    r2205 r2251  
    3030    @file QuestEffect.cc
    3131    @brief
    32         Implementation of the QuestEffect class.
     32    Implementation of the QuestEffect class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffect.h

    r2205 r2251  
    3030    @file QuestEffect.h
    3131    @brief
    32         Definition of the QuestEffect class.
     32    Definition of the QuestEffect class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.cc

    r2226 r2251  
    3030    @file QuestEffectBeacon.cc
    3131    @brief
    32         Implementation of the QuestEffectBeacon class.
     32    Implementation of the QuestEffectBeacon class.
    3333*/
    3434
     
    9191        SUPER(QuestEffectBeacon, processEvent, event);
    9292   
    93         SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
     93    SetSubclassEvent(QuestEffectBeacon, "execute", execute, event, PlayerTrigger);
    9494    }
    9595   
     
    9898        Executes the QuestEffectBeacon.
    9999        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 b
    101         TDO: What is this???
    102100    @param trigger
    103101        Apointer to the PlayerTrigger that threw the Event.
     
    147145            this->decrementTimes(); //!< Decrement the number of times the beacon can be used.
    148146            return true;
    149         }
    150 
    151         return false;
     147    }
     148
     149    return false;
    152150    }
    153151   
     
    169167        if(activate)
    170168        {
    171             this->status_ = QuestEffectBeaconStatus::active;
    172             return true;
     169        this->status_ = QuestEffectBeaconStatus::active;
     170        return true;
    173171        }
    174172       
     
    195193       
    196194        this->times_ = this->times_ - 1; //!< Decrement number of times the QuestEffectBeacon can be executed.
    197         if(this->getTimes() == 0) //!< Set the QuestEffectBeacon to inactive when the number of times it can be executed is reduced to 0.
    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    {
    199197            this->status_ = QuestEffectBeaconStatus::inactive;
    200         }
     198    }
    201199       
    202200        return true;
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestEffectBeacon.h

    r2226 r2251  
    3030    @file QuestEffectBeacon.h
    3131    @brief
    32         Definition of the QuestEffectBeacon class.
     32    Definition of the QuestEffectBeacon class.
    3333*/
    3434
     
    6161        A QuestEffectBeacon can be inactive or active.
    6262       
    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.
     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.
    6666            <effects>
    6767                <QuestEffect /> //A list of QuestEffects, invoked when the QuestEffectBeacon is executed, see QuestEffect for the full XML representation.
     
    7070            </effects>
    7171            <events>
    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>
     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>
    8080    @author
    8181        Damian 'Mozork' Frick
     
    8383    class _OrxonoxExport QuestEffectBeacon : public PositionableEntity
    8484    {
    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:
     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:
    105105            bool decrementTimes(void); //!< Decrement the number of times the QuestEffectBeacon can still be executed.
    106106           
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.cc

    r2226 r2251  
    3030    @file QuestHint.cc
    3131    @brief
    32         Implementation of the QuestHint class.
     32    Implementation of the QuestHint class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestHint.h

    r2205 r2251  
    3030    @file QuestHint.h
    3131    @brief
    32         Definition of the QuestHint class.
     32    Definition of the QuestHint class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.cc

    r2159 r2251  
    3030    @file QuestItem.cc
    3131    @brief
    32         Implementation of the QuestItem class.
     32    Implementation of the QuestItem class.
    3333*/
    3434
     
    7777    @brief
    7878        Sets the id of the QuestItem.
    79         The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information.
     79    The id must be of GUID form. See 'http://en.wikipedia.org/wiki/Globally_Unique_Identifier#Basic_structure' for more information.
    8080    @param id
    8181        The id to be set.
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestItem.h

    r2191 r2251  
    3030    @file QuestItem.h
    3131    @brief
    32         Definition of the QuestItem class.
    33        
    34         The QuestItem is the parent class of Quest and QuestHint.
     32    Definition of the QuestItem class.
     33   
     34    The QuestItem is the parent class of Quest and QuestHint.
    3535*/
    3636
     
    6767            /**
    6868            @brief Returns the id of this QuestItem.
    69             @return Returns the id of the QuestItem.
     69        @return Returns the id of the QuestItem.
    7070            */
    7171            inline const std::string & getId(void) const
    7272                { return this->id_; }
    73             /**
    74             @brief Returns the QuestDescription of the QuestItem.
    75             @return Returns a pointer to the QuestDescription object of the QuestItem.
    76             */
     73        /**
     74        @brief Returns the QuestDescription of the QuestItem.
     75        @return Returns a pointer to the QuestDescription object of the QuestItem.
     76        */
    7777            inline const QuestDescription* getDescription(void) const
    7878                { return this->description_; }
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestManager.cc

    r2191 r2251  
    3030    @file QuestManager.cc
    3131    @brief
    32         Implementation of the QuestManager class.
     32    Implementation of the QuestManager class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/QuestManager.h

    r2191 r2251  
    3030    @file QuestManager.h
    3131    @brief
    32         Definition of the QuestManager class.
     32    Definition of the QuestManager class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/Rewardable.cc

    r2159 r2251  
    3030    @file Rewardable.cc
    3131    @brief
    32         Implementation of the Rewardable class.
     32    Implementation of the Rewardable class.
    3333*/
    3434
  • code/branches/questsystem2/src/orxonox/objects/quest/Rewardable.h

    r2205 r2251  
    3030    @file Rewardable.h
    3131    @brief
    32         Definition of the Rewardable class.
     32    Definition of the Rewardable class.
    3333*/
    3434
     
    6161                Method to transcribe a rewardable object to the player.
    6262                Must be implemented by every class inheriting from Rewardable.
    63             @param player
     63        @param player
    6464                A pointer to the ControllableEntity, do whatever you want with it.
    65             @return
     65        @return
    6666                Return true if successful.
    6767            */
Note: See TracChangeset for help on using the changeset viewer.