Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 15, 2010, 7:29:16 PM (14 years ago)
Author:
dafrick
Message:

Reviewing documentation fo Questsystem, moving documentation fully into doxygen.
Added some files to modules they belong to.

Location:
code/trunk/src/modules/questsystem/effects
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/questsystem/effects/AddQuest.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddQuest.cc
    3131    @brief Implementation of the AddQuest class.
    3232*/
     
    3434#include "AddQuest.h"
    3535
     36#include "core/CoreIncludes.h"
     37#include "core/XMLPort.h"
    3638#include "util/Exception.h"
    37 #include "core/CoreIncludes.h"
     39
     40#include "questsystem/Quest.h"
    3841#include "questsystem/QuestManager.h"
    39 #include "questsystem/Quest.h"
    4042
    4143namespace orxonox
     
    8183    bool AddQuest::invoke(PlayerInfo* player)
    8284    {
    83         if(player == NULL) //!< Null-pointers are badass.
     85        //TODO: Replace with assert?
     86        if(player == NULL) // Null-pointers are badass.
    8487        {
    8588            COUT(2) << "Input player is NULL." << std::endl;
     
    9396            Quest* quest = QuestManager::getInstance().findQuest(this->getQuestId());
    9497            if(quest == NULL || !quest->start(player))
    95             {
    9698               return false;
    97             }
    9899        }
    99100        catch(const orxonox::Exception& ex)
  • code/trunk/src/modules/questsystem/effects/AddQuest.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddQuest.h
    3131    @brief Definition of the AddQuest class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4243    /**
    4344    @brief
    44         Adds a Quest, resp. changes the quests status to active for the player invoking the Quest.
     45        Adds a @ref orxonox::Quest "Quest", resp. changes the @ref orxonox::Quest "Quests" status to active for the player invoking the @ref orxonox::Quest "Quest".
    4546
    46         Creating a AddQuest through XML goes as follows:
    47 
     47        Creating an AddQuest through XML goes as follows:
    4848        @code
    4949        <AddQuest questId="id" />  //Where id identifies the Quest that should be added.
  • code/trunk/src/modules/questsystem/effects/AddQuestHint.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddQuestHint.cc
    3131    @brief Implementation of the AddQuestHint class.
    3232*/
     
    3434#include "AddQuestHint.h"
    3535
    36 #include "util/Exception.h"
    3736#include "core/CoreIncludes.h"
    3837#include "core/XMLPort.h"
     38#include "util/Exception.h"
     39
     40#include "questsystem/QuestHint.h"
    3941#include "questsystem/QuestManager.h"
    4042#include "questsystem/QuestItem.h"
    41 #include "questsystem/QuestHint.h"
    4243
    4344namespace orxonox
     
    105106    bool AddQuestHint::invoke(PlayerInfo* player)
    106107    {
    107         if(player == NULL) //!< NULL-pointers are evil!
     108        //TODO: Replace with assert?
     109        if(player == NULL) // NULL-pointers are evil!
    108110        {
    109111            COUT(2) << "The input player is NULL." << std::endl;
     
    117119            QuestHint* hint = QuestManager::getInstance().findHint(this->hintId_);
    118120            if(hint == NULL || !hint->setActive(player))
    119             {
    120121                return false;
    121             }
    122122        }
    123123        catch(const Exception& e)
  • code/trunk/src/modules/questsystem/effects/AddQuestHint.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddQuestHint.h
    3131    @brief Definition of the AddQuestHint class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4445    /**
    4546    @brief
    46         Adds a QuestHint, resp. activates the QuestHint of the given id for the player the QuestEffect is invoked on.
     47        Adds a @ref orxonox::QuestHint "QuestHint", resp. activates the @ref orxonox::QuestHint "QuestHint" of the given id for the player the QuestEffect is invoked on.
    4748
    4849        Creating a AddQuestHint through XML goes as follows:
    49 
    5050        @code
    5151        <AddQuestHint hintId="id" />  //Where id identifies the QuestHint that should be added.
  • code/trunk/src/modules/questsystem/effects/AddReward.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddReward.cc
    3131    @brief Implementation of the AddReward class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38
    3839#include "interfaces/Rewardable.h"
    3940
     
    5758    AddReward::~AddReward()
    5859    {
     60
    5961    }
    6062
     
    8587        {
    8688            if(i == 0)
    87             {
    8889               return *reward;
    89             }
    9090            i--;
    9191        }
     
    107107        bool check = true;
    108108        for ( std::list<Rewardable*>::iterator reward = this->rewards_.begin(); reward != this->rewards_.end(); ++reward )
    109         {
    110109            check = check && (*reward)->reward(player);
    111         }
    112110
    113111        COUT(4) << "Rewardable successfully added to player." << player << " ." << std::endl;
  • code/trunk/src/modules/questsystem/effects/AddReward.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file AddReward.h
    3131    @brief Definition of the AddReward class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4445    /**
    4546    @brief
    46         Adds a list of Rewardables to a player.
     47        Adds a list of @ref orxonox::Rewardable "Rewardables" to a player.
    4748
    4849        Creating a AddReward through XML goes as follows:
    49 
    5050        @code
    5151        <AddReward>
  • code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file ChangeQuestStatus.cc
    3131    @brief Implementation of the ChangeQuestStatus class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    3637#include "core/CoreIncludes.h"
    3738#include "core/XMLPort.h"
     39
    3840#include "questsystem/QuestItem.h"
    3941
     
    5557    ChangeQuestStatus::~ChangeQuestStatus()
    5658    {
     59
    5760    }
    5861
  • code/trunk/src/modules/questsystem/effects/ChangeQuestStatus.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file ChangeQuestStatus.h
    3131    @brief Definition of the ChangeQuestStatus class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4445    /**
    4546    @brief
    46         A QuestEffect which changes the status of a specified Quest for the player invoking the QuestEffect.
     47        A QuestEffect which changes the status of a specified @ref orxonox::Quest "Quest" for the player invoking the QuestEffect.
    4748    @author
    4849        Damian 'Mozork' Frick
  • code/trunk/src/modules/questsystem/effects/CompleteQuest.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file CompleteQuest.cc
    3131    @brief Implementation of the CompleteQuest class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38
     39#include "questsystem/Quest.h"
    3840#include "questsystem/QuestManager.h"
    39 #include "questsystem/Quest.h"
    4041
    4142namespace orxonox
     
    5859    CompleteQuest::~CompleteQuest()
    5960    {
     61
    6062    }
    6163
     
    8183    bool CompleteQuest::invoke(PlayerInfo* player)
    8284    {
    83         if(player == NULL) //!< You know, what we think of NULL-pointers...
     85        //TODO: Replace with assert?
     86        if(player == NULL) // You know, what we think of NULL-pointers...
    8487        {
    8588            COUT(2) << "Input player is NULL." << std::endl;
     
    9598            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    9699            if(quest == NULL || !quest->complete(player))
    97             {
    98100               return false;
    99             }
    100101        }
    101102        catch(const Exception& e)
  • code/trunk/src/modules/questsystem/effects/CompleteQuest.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file CompleteQuest.h
    3131    @brief Definition of the CompleteQuest class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4243    /**
    4344    @brief
    44         Completes a Quest (with a specified id) for the player invoking the QuestEffect.
     45        Completes a @ref orxonox::Quest "Quest" (with a specified id) for the player invoking the QuestEffect.
    4546
    4647        Creating a CompleteQuest through XML goes as follows:
    47 
    4848        @code
    4949        <CompleteQuest questId="id" />  //Where id identifies the Quest that should be completed.
  • code/trunk/src/modules/questsystem/effects/FailQuest.cc

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file FailQuest.cc
    3131    @brief Implementation of the FailQuest class.
    3232*/
     
    3636#include "core/CoreIncludes.h"
    3737#include "core/XMLPort.h"
     38
     39#include "questsystem/Quest.h"
    3840#include "questsystem/QuestManager.h"
    39 #include "questsystem/Quest.h"
    4041
    4142namespace orxonox
     
    5859    FailQuest::~FailQuest()
    5960    {
     61
    6062    }
    6163
     
    6870        SUPER(FailQuest, XMLPort, xmlelement, mode);
    6971
    70         COUT(4) << "New FailQUest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
     72        COUT(4) << "New FailQuest, with target Quest {" << this->getQuestId() << "}, created." << std::endl;
    7173    }
    7274
     
    8183    bool FailQuest::invoke(PlayerInfo* player)
    8284    {
    83         if(player == NULL) //!< We don't know what to do with no player.
     85        //TODO: Replace with assert?
     86        if(player == NULL) // We don't know what to do with no player.
    8487        {
    8588            COUT(2) << "Input player is NULL." << std::endl;
     
    9497            quest = QuestManager::getInstance().findQuest(this->getQuestId());
    9598            if(quest == NULL || !quest->fail(player))
    96             {
    9799               return false;
    98             }
    99100        }
    100101        catch(const Exception& e)
  • code/trunk/src/modules/questsystem/effects/FailQuest.h

    r7401 r7456  
    2828
    2929/**
    30     @file
     30    @file FailQuest.h
    3131    @brief Definition of the FailQuest class.
     32    @ingroup QuestEffects
    3233*/
    3334
     
    4243    /**
    4344    @brief
    44         Fails a quest (with a specified id) for the player invoking the QuestEffect.
     45        Fails a @ref orxonox::Quest "Quest" (with a specified id) for the player invoking the QuestEffect.
    4546
    4647        Creating a FailQuest through XML goes as follows:
    47 
    4848        @code
    4949        <FailQuest questId="id" />  //Where id identifies the Quest that should be failed.
Note: See TracChangeset for help on using the changeset viewer.