Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2043


Ignore:
Timestamp:
Oct 29, 2008, 8:34:59 AM (16 years ago)
Author:
dafrick
Message:

Some minor adjustements, just comitting to be on the safe side.

Location:
code/branches/questsystem/src/orxonox
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • code/branches/questsystem/src/orxonox/CMakeLists.txt

    r2022 r2043  
    7777  objects/QuestItem.cc
    7878  objects/QuestManager.cc
     79  objects/Rewardable.cc
    7980
    8081  tolua/tolua_bind.cc
  • code/branches/questsystem/src/orxonox/objects/GlobalQuest.cc

    r2021 r2043  
    7272        Returns true if the quest can be started, false if not.
    7373    */
    74     bool GlobalQuest::isStartable(Player* player)
     74    bool GlobalQuest::isStartable(const Player* player) const
    7575    {
    7676        return this->isInactive(player) || this->isActive(player);
     
    8585        Returns true if the quest can be failed, false if not.
    8686    */
    87     bool GlobalQuest::isFailable(Player* player)
     87    bool GlobalQuest::isFailable(const Player* player) const
    8888    {
    8989        return this->isActive(player);
     
    9898        Returns true if the quest can be completed, false if not.
    9999    */
    100     bool GlobalQuest::isCompletable(Player* player)
     100    bool GlobalQuest::isCompletable(const Player* player) const
    101101    {
    102102        return this->isActive(player);
     
    109109        The player.
    110110    */
    111     questStatus::Enum GlobalQuest::getStatus(const Player* player)
     111    questStatus::Enum GlobalQuest::getStatus(const Player* player) const
    112112    {
    113113        //TDO: Does this really work???
  • code/branches/questsystem/src/orxonox/objects/GlobalQuest.h

    r2021 r2043  
    5353           
    5454        protected:
    55             virtual bool isStartable(Player* player); //!< Checks whether the quest can be started.
    56             virtual bool isFailable(Player* player); //!< Checks whether the quest can be failed.
    57             virtual bool isCompletable(Player* player); //!< Checks whether the quest can be completed.
     55            virtual bool isStartable(const Player* player) const; //!< Checks whether the quest can be started.
     56            virtual bool isFailable(const Player* player) const; //!< Checks whether the quest can be failed.
     57            virtual bool isCompletable(const Player* player) const; //!< Checks whether the quest can be completed.
    5858       
    59             virtual questStatus::Enum getStatus(const Player* player); //!< Returns the status of the quest for a specific player.
     59            virtual questStatus::Enum getStatus(const Player* player) const; //!< Returns the status of the quest for a specific player.
    6060            virtual bool setStatus(Player* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
    6161           
  • code/branches/questsystem/src/orxonox/objects/LocalQuest.cc

    r2021 r2043  
    7272        Returns true if the quest can be started, false if not.
    7373    */
    74     bool LocalQuest::isStartable(Player* player)
     74    bool LocalQuest::isStartable(const Player* player) const
    7575    {
    7676        return this->isInactive(player);
     
    8585        Returns true if the quest can be failed, false if not.
    8686    */
    87     bool LocalQuest::isFailable(Player* player)
     87    bool LocalQuest::isFailable(const Player* player) const
    8888    {
    8989        return this->isActive(player);
     
    9898        Returns true if the quest can be completed, false if not.
    9999    */
    100     bool LocalQuest::isCompletable(Player* player)
     100    bool LocalQuest::isCompletable(const Player* player) const
    101101    {
    102102        return this->isActive(player);
     
    111111        Returns the status of the quest for the input player.
    112112    */
    113     questStatus::Enum LocalQuest::getStatus(const Player* player)
     113    questStatus::Enum LocalQuest::getStatus(const Player* player) const
    114114    {
    115115        std::map<Player*, questStatus::Enum>::const_iterator it = this->playerStatus_.find((Player*)(void*)player); //Thx. to x3n for the (Player*)(void*) 'hack'.
  • code/branches/questsystem/src/orxonox/objects/LocalQuest.h

    r2021 r2043  
    5353           
    5454        protected:
    55             virtual bool isStartable(Player* player); //!< Checks whether the quest can be started.
    56             virtual bool isFailable(Player* player); //!< Checks whether the quest can be failed.
    57             virtual bool isCompletable(Player* player); //!< Checks whether the quest can be completed.
     55            virtual bool isStartable(const Player* player) const; //!< Checks whether the quest can be started.
     56            virtual bool isFailable(const Player* player) const; //!< Checks whether the quest can be failed.
     57            virtual bool isCompletable(const Player* player) const; //!< Checks whether the quest can be completed.
    5858       
    59             virtual questStatus::Enum getStatus(const Player* player); //!< Returns the status of the quest for a specific player.
     59            virtual questStatus::Enum getStatus(const Player* player) const; //!< Returns the status of the quest for a specific player.
    6060            virtual bool setStatus(Player* player, const questStatus::Enum & status); //!< Sets the status for a specific player.
    6161               
  • code/branches/questsystem/src/orxonox/objects/Quest.h

    r2021 r2043  
    8080            bool addSubQuest(Quest* quest); //!< Adds a sub quest to the quest.
    8181           
    82             inline bool isInactive(Player* player) //!< Returns true if the quest status for the specific player is 'inactive'.
     82            inline bool isInactive(const Player* player) const //!< Returns true if the quest status for the specific player is 'inactive'.
    8383               { return this->getStatus(player) == questStatus::inactive; }
    84             inline bool isActive(Player* player) //!< Returns true if the quest status for the specific player is 'active'.
     84            inline bool isActive(const Player* player) const //!< Returns true if the quest status for the specific player is 'active'.
    8585               { return this->getStatus(player) == questStatus::active; }
    86             inline bool isFailed(Player* player) //!< Returns true if the quest status for the specific player is 'failed'.
     86            inline bool isFailed(const Player* player) const //!< Returns true if the quest status for the specific player is 'failed'.
    8787               { return this->getStatus(player) == questStatus::failed; }
    88             inline bool isCompleted(Player* player) //!< Returns true if the quest status for the specific player is 'completed'.
     88            inline bool isCompleted(const Player* player) const //!< Returns true if the quest status for the specific player is 'completed'.
    8989               { return this->getStatus(player) == questStatus::completed; }
    9090               
     
    9898            void initialize(void); //!< Initialized the object.
    9999           
    100             virtual bool isStartable(Player* player) = 0; //!< Checks whether the quest can be started.
    101             virtual bool isFailable(Player* player) = 0; //!< Checks whether the quest can be failed.
    102             virtual bool isCompletable(Player* player) = 0; //!< Checks whether the quest can be completed.
     100            virtual bool isStartable(const Player* player) const = 0; //!< Checks whether the quest can be started.
     101            virtual bool isFailable(const Player* player) const = 0; //!< Checks whether the quest can be failed.
     102            virtual bool isCompletable(const Player* player) const = 0; //!< Checks whether the quest can be completed.
    103103           
    104104            //TDO: Get the parameter const...
    105             virtual questStatus::Enum getStatus(const Player* player) = 0; //!< Returns the status of the quest for a specific player.
     105            virtual questStatus::Enum getStatus(const Player* player) const = 0; //!< Returns the status of the quest for a specific player.
    106106            virtual bool setStatus(Player* player, const questStatus::Enum & status) = 0; //!< Changes the status for a specific player.
    107107           
  • code/branches/questsystem/src/orxonox/objects/Rewardable.cc

    r2021 r2043  
    3333namespace orxonox {
    3434
    35     CreateFactory(Rewardable);
    36 
    3735    Rewardable::Rewardable() : BaseObject()
    3836    {
Note: See TracChangeset for help on using the changeset viewer.