[Orxonox-commit 2844] r7547 - in code/trunk: data/levels/templates src/modules/pickup src/modules/pickup/items src/orxonox/interfaces src/orxonox/items src/orxonox/pickup src/orxonox/worldentities/pawns

dafrick at orxonox.net dafrick at orxonox.net
Sat Oct 16 12:37:10 CEST 2010


Author: dafrick
Date: 2010-10-16 12:37:09 +0200 (Sat, 16 Oct 2010)
New Revision: 7547

Modified:
   code/trunk/data/levels/templates/pickup_representation_templates.oxt
   code/trunk/src/modules/pickup/CollectiblePickup.h
   code/trunk/src/modules/pickup/Pickup.cc
   code/trunk/src/modules/pickup/Pickup.h
   code/trunk/src/modules/pickup/PickupCollection.cc
   code/trunk/src/modules/pickup/PickupCollection.h
   code/trunk/src/modules/pickup/PickupManager.cc
   code/trunk/src/modules/pickup/PickupManager.h
   code/trunk/src/modules/pickup/PickupRepresentation.h
   code/trunk/src/modules/pickup/PickupSpawner.cc
   code/trunk/src/modules/pickup/PickupSpawner.h
   code/trunk/src/modules/pickup/items/DronePickup.cc
   code/trunk/src/modules/pickup/items/DronePickup.h
   code/trunk/src/modules/pickup/items/HealthPickup.cc
   code/trunk/src/modules/pickup/items/HealthPickup.h
   code/trunk/src/modules/pickup/items/InvisiblePickup.cc
   code/trunk/src/modules/pickup/items/InvisiblePickup.h
   code/trunk/src/modules/pickup/items/MetaPickup.cc
   code/trunk/src/modules/pickup/items/MetaPickup.h
   code/trunk/src/modules/pickup/items/ShieldPickup.cc
   code/trunk/src/modules/pickup/items/ShieldPickup.h
   code/trunk/src/modules/pickup/items/SpeedPickup.cc
   code/trunk/src/modules/pickup/items/SpeedPickup.h
   code/trunk/src/orxonox/interfaces/PickupCarrier.cc
   code/trunk/src/orxonox/interfaces/PickupCarrier.h
   code/trunk/src/orxonox/interfaces/PickupListener.h
   code/trunk/src/orxonox/interfaces/Pickupable.cc
   code/trunk/src/orxonox/interfaces/Pickupable.h
   code/trunk/src/orxonox/items/Engine.cc
   code/trunk/src/orxonox/items/Engine.h
   code/trunk/src/orxonox/pickup/PickupIdentifier.h
   code/trunk/src/orxonox/worldentities/pawns/Pawn.h
   code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
   code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
Documenting and cleanup.


Modified: code/trunk/data/levels/templates/pickup_representation_templates.oxt
===================================================================
--- code/trunk/data/levels/templates/pickup_representation_templates.oxt	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/data/levels/templates/pickup_representation_templates.oxt	2010-10-16 10:37:09 UTC (rev 7547)
@@ -22,7 +22,7 @@
     shieldabsorption = 0.7
     shieldhealth = 300
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -48,7 +48,7 @@
     shieldabsorption = 0.8
     shieldhealth = 500
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -75,7 +75,7 @@
     shieldabsorption = 0.95
     shieldhealth = 700
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -239,7 +239,7 @@
     speedAdd = 0.0
     SpeedMultiply = 10.0
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -265,7 +265,7 @@
     speedAdd = 0.0
     SpeedMultiply = 25.0
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -291,7 +291,7 @@
     speedAdd = 0.0
     SpeedMultiply = 50.0
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 
@@ -317,7 +317,7 @@
     speedAdd = 5000.0
     SpeedMultiply = 1.0
     activationType = "immediate"
-    durationType = "once"
+    durationType = "continuous"
   />
 </Template>
 

Modified: code/trunk/src/modules/pickup/CollectiblePickup.h
===================================================================
--- code/trunk/src/modules/pickup/CollectiblePickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/CollectiblePickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -66,7 +66,7 @@
             @brief Check whether the given CollectiblePickup is par of a PickupCollection.
             @return Returns true if the CollectiblePickup is part of a PickupCollection.
             */
-            bool isInCollection(void)
+            bool isInCollection(void) const
                 { return this->isInCollection_; }
 
             bool addToCollection(PickupCollection* collection); //!< Adds this CollectiblePickup to the input PickupCollection.

Modified: code/trunk/src/modules/pickup/Pickup.cc
===================================================================
--- code/trunk/src/modules/pickup/Pickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/Pickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -118,7 +118,7 @@
     @return
         Returns a string containing the activation type.
     */
-    const std::string& Pickup::getActivationType(void)
+    const std::string& Pickup::getActivationType(void) const
     {
         switch(this->activationType_)
         {
@@ -137,7 +137,7 @@
     @return
         Returns a string containing the duration type.
     */
-    const std::string& Pickup::getDurationType(void)
+    const std::string& Pickup::getDurationType(void) const
     {
         switch(this->durationType_)
         {

Modified: code/trunk/src/modules/pickup/Pickup.h
===================================================================
--- code/trunk/src/modules/pickup/Pickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/Pickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -39,11 +39,10 @@
 
 #include "core/BaseObject.h"
 #include "core/XMLPort.h"
+#include "tools/Timer.h"
 
 #include "CollectiblePickup.h"
 
-#include "tools/Timer.h"
-
 namespace orxonox
 {
 
@@ -82,8 +81,8 @@
         The Pickup class offers (useful) base functionality for a wide range of pickups.
 
         Pickups ingeriting from this class can choose an activation type and a duration type.
-        - The <b>activation type</b> deals with what happens to the Pickup as soon as it is picked up. It can either be set to <em>immediate</em>, which means that the Pickup is activated/used immediately upon being picked up. Or to <em>onUse</em>, which means, that the Pickup will be activated/used if some outside entity (most commonly the player through the PickupInventory) decides to use it.
-        - The <b>duration type</b> deals with whether the Pickup has a continuous effect or whether its effect is focused on a singular instant. It can either be set to <em>once</em>, which means, that the Pickup just has an effect (at a singular instant in time) and is done once that effect has been applied. Or to <em>continuous</em>, which means that the effect of the Pickup unfolds over some timespan.
+        - The <b>activationType</b> deals with what happens to the Pickup as soon as it is picked up. It can either be set to <em>immediate</em>, which means that the Pickup is activated/used immediately upon being picked up. Or to <em>onUse</em>, which means, that the Pickup will be activated/used if some outside entity (most commonly the player through the PickupInventory) decides to use it. Default is <em>immediate</em>.
+        - The <b>durationType</b> deals with whether the Pickup has a continuous effect or whether its effect is focused on a singular instant. It can either be set to <em>once</em>, which means, that the Pickup just has an effect (at a singular instant in time) and is done once that effect has been applied. Or to <em>continuous</em>, which means that the effect of the Pickup unfolds over some timespan. Default is <em>once</em>.
 
         If it were not an abstract class it could for example be used as follows in XML.
         @code
@@ -109,45 +108,44 @@
             @brief Get the activation type of the Pickup.
             @return Returns the activation type of the Pickup.
             */
-            inline pickupActivationType::Value getActivationTypeDirect(void)
+            inline pickupActivationType::Value getActivationTypeDirect(void) const
                 { return this->activationType_; }
             /**
             @brief Get the duration type of the Pickup.
             @return Returns the duration type of the Pickup.
             */
-            inline pickupDurationType::Value getDurationTypeDirect(void)
+            inline pickupDurationType::Value getDurationTypeDirect(void) const
                 { return this->durationType_; }
 
-            const std::string& getActivationType(void); //!< Get the activation type of the Pickup.
-            const std::string& getDurationType(void); //!< Get the duration type of the Pickup.
+            const std::string& getActivationType(void) const; //!< Get the activation type of the Pickup.
+            const std::string& getDurationType(void) const; //!< Get the duration type of the Pickup.
 
             /**
             @brief Get whether the activation type is 'immediate'.
             @return Returns true if the activation type is 'immediate'.
             */
-            inline bool isImmediate(void)
+            inline bool isImmediate(void) const
                 { return this->getActivationTypeDirect() == pickupActivationType::immediate; }
             /**
             @brief Get whether the activation type is 'onUse'.
             @return Returns true if the activation type is 'onUse'.
             */
-            inline bool isOnUse(void)
+            inline bool isOnUse(void) const
                 { return this->getActivationTypeDirect() == pickupActivationType::onUse; }
             /**
             @brief Get whether the duration type is 'once'.
             @return Returns true if the duration type is 'once'.
             */
-            inline bool isOnce(void)
+            inline bool isOnce(void) const
                 { return this->getDurationTypeDirect() == pickupDurationType::once; }
             /**
             @brief Get whether the duration type is 'continuous'.
             @return Returns true if the duration type is 'continuous'.
             */
-            inline bool isContinuous(void)
+            inline bool isContinuous(void) const
                 { return this->getDurationTypeDirect() == pickupDurationType::continuous; }
 
             virtual void changedPickedUp(void); //!< Should be called when the pickup has transited from picked up to dropped or the other way around.
-
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the OrxonoxClass.
 
         protected:

Modified: code/trunk/src/modules/pickup/PickupCollection.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupCollection.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -234,7 +234,7 @@
     @return
         Returns true if the PickupCarrier identified by the input PickupIdentififer it is a target of this PickupCollection, false if not.
     */
-    bool PickupCollection::isTarget(PickupCarrier* carrier) const
+    bool PickupCollection::isTarget(const PickupCarrier* carrier) const
     {
         for(std::vector<CollectiblePickup*>::const_iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++)
         {
@@ -252,7 +252,7 @@
     @return
         Returns a pointer to the PickupIdentifier of this PickupCollection.
     */
-    const PickupIdentifier* PickupCollection::getPickupIdentifier(void)
+    const PickupIdentifier* PickupCollection::getPickupIdentifier(void) const
     {
         return this->pickupCollectionIdentifier_;
     }
@@ -283,7 +283,7 @@
     @return
         Returns a pointer to the Pickupable at the index given by index.
     */
-    const Pickupable* PickupCollection::getPickupable(unsigned int index)
+    const Pickupable* PickupCollection::getPickupable(unsigned int index) const
     {
         return this->pickups_[index];
     }

Modified: code/trunk/src/modules/pickup/PickupCollection.h
===================================================================
--- code/trunk/src/modules/pickup/PickupCollection.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupCollection.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -37,11 +37,11 @@
 
 #include "PickupPrereqs.h"
 
+#include <list>
+
+#include "CollectiblePickup.h"
 #include "core/BaseObject.h"
-#include "CollectiblePickup.h"
 
-#include <list>
-
 namespace orxonox
 {
 
@@ -82,12 +82,12 @@
 
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input pickup.
 
-            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
+            virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this PickupCollection.
 
-            virtual const PickupIdentifier* getPickupIdentifier(void); //!< Get the PickupIdentifier of this PickupCollection.
+            virtual const PickupIdentifier* getPickupIdentifier(void) const; //!< Get the PickupIdentifier of this PickupCollection.
 
             bool addPickupable(CollectiblePickup* pickup); //!< Add the input Pickupable to list of Pickupables combined by this PickupCollection.
-            const Pickupable* getPickupable(unsigned int index); //!< Get the Pickupable at the given index.
+            const Pickupable* getPickupable(unsigned int index) const; //!< Get the Pickupable at the given index.
 
             void pickupChangedUsed(bool changed); //!< Informs the PickupCollection, that one of its pickups has changed its used status to the input value.
             void pickupChangedPickedUp(bool changed); //!< Informs the PickupCollection, that one of its pickups has changed its picked up status to the input value.

Modified: code/trunk/src/modules/pickup/PickupManager.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupManager.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -388,8 +388,8 @@
         The parameters that are given are used to update the information (i.e. the PickupInventoryContainer) the concerning PickupManager has about the Pickupable that changed.
     @param pickup
         A number identifying the Pickupable that changed its pickedUp status.
-    @param unusable
-        Whether the Pickupable's used status can be changed to unused in the PickupInventory.
+    @param usable
+        Whether the Pickupable's used status can be changed to used in the PickupInventory.
     @param representationObjectId
         The objectId identifying (over the network) the PickupRepresentation that represents this Pickupable.
     @param pickedUp

Modified: code/trunk/src/modules/pickup/PickupManager.h
===================================================================
--- code/trunk/src/modules/pickup/PickupManager.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupManager.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -38,7 +38,6 @@
 #include "PickupPrereqs.h"
 
 #include <map>
-
 #include "core/WeakPtr.h"
 
 #include "pickup/PickupIdentifier.h"
@@ -74,7 +73,7 @@
     @brief
         The PickupManager class manages @ref orxonox::Pickupable "Pickupables".
 
-        It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their @ref orxonox::PickupIdentifier "PickupIdentifiers") to their respective @ref orxonox:PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref roxonox::Pickupable "Pickupables" for the covenience of the user.)
+        It has in essence two tasks to fulfill. Firstly it must link @ref orxonox::Pickupable "Pickupables" (through their @ref orxonox::PickupIdentifier "PickupIdentifiers") to their respective @ref orxonox::PickupRepresentation "PickupRepresentations". Secondly it manages the PickupInventory. (The PickupInventory is the GUI that displays @ref orxonox::Pickupable "Pickupables" for the covenience of the user.)
 
         @section PickupManagerTechnicalDetails Technical details
         Unfortunately <em>under the hood</em> it isn't just as easy. At least the PickupInventory part isn't. To grasp why this is we need to have a brief look at how the pickups module works over the network:
@@ -88,7 +87,7 @@
         Firstly there are a number of lists (where by list I really mean any kind of ordered data structure) kept.
         - The @ref orxonox::PickupManager::representations_ "representations_" list links @ref orxonox::PickupRepresentation "PickupRepresentations" with @ref orxonox::PickupIdentifier "PickupIdentifiers" and can be used to get the @ref orxonox::PickupRepresentation "PickupRepresentation" for a given @ref orxonox::Pickupable "Pickupable". It is only populated on the server (or in standalone mode). Each @ref orxonox::PickupRepresentation "PickupRepresentation" that is generated through XML registers itself with the PickupManager and is thereby added to the list.
         - The @ref orxonox::PickupManager::representationsNetworked_ "representationsNetworked_" list is the networked (hence the name) equivalent to the @ref orxonox::PickupManager::representations_ "representations_" list. It links an objectId of a @ref orxonox::PickupRepresentation "PickupRepresentation" to a @ref orxonox::PickupRepresentation "PickupRepresentation". This list is maintained on all hosts, each representation registers itself (in its constructor) with the PickupManager. Since the representations are synchronised they are created on each host. The "same" instance on each host is identified by the same objectId and that is why we store the representations with the objectId as key. We can then use this list to get a @ref orxonox::PickupRepresentation "PickupRepresentation" for a specific @ref orxonox::Pickupable "Pickupable" (or more precisely a number identifiying that particular pickup, but we'll see that, when we look at the next list) on a client to be used in the PickupInventory.
-        - The @ref orxonox::PickupManager::pickupInventoryContainers_ "pickupInventoryContainers_" list links a number identifying a @ref orxonox::Pickupable "Pickupable" to a data structure (the @ref orxonox::PickupInventoryContainer "PickupInventoryContainer"), which contains all necessary information about that @ref orxonox::Pickupable "Pickupable". This list is maintained on all hosts, a new container is inserted when a @ref orxonox::Pickupable "Pickupable" is picked up, but only if it has been picked up by the repsective host. This list is then used by the PickupInventory to access the required information and to get the correct @ref orxonox:.PickupRepresentation "PickupRepresentation".
+        - The @ref orxonox::PickupManager::pickupInventoryContainers_ "pickupInventoryContainers_" list links a number identifying a @ref orxonox::Pickupable "Pickupable" to a data structure (the @ref orxonox::PickupInventoryContainer "PickupInventoryContainer"), which contains all necessary information about that @ref orxonox::Pickupable "Pickupable". This list is maintained on all hosts, a new container is inserted when a @ref orxonox::Pickupable "Pickupable" is picked up, but only if it has been picked up by the repsective host. This list is then used by the PickupInventory to access the required information and to get the correct @ref orxonox::PickupRepresentation "PickupRepresentation".
         - The @ref orxonox::PickupManager::pickups_ "pickups_" list links a number identifiying a @ref orxonox::Pickupable "Pickupable" to a (weak pointer to a) @ref orxonox::Pickupable "Pickupable". It is only maintained by the server (or in standalone mode), to be able to use, unuse and drop @ref orxonox::Pickupable "Pickupables" through the PickupInventory. Since @ref orxonox::Pickupable "Pickupables" only exist on the server a client that wants to change a pickups status has so send a request over the network (with the number identifying the pickup) to the server and then the server facilitates the change, using this list to map from the identifyer to the actual @ref orxonox::Pickupable "Pickupable".
         - The @ref orxonox::PickupManager::indexes_ "indexes_" list links a @ref orxonox::Pickupable "Pickupable" to the number identifying it. This is only maintained on the server (or in standalone mode), and is used for the inverse mapping of the previous list, which means the server uses it identify pickups on clients when it communicates changes in pickups to clients.
 
@@ -138,7 +137,7 @@
                    Use this, after having called getNumPickups() to access all the PickupInventoryContainers individually and in succession.
             @return Returns the next PickupInventoryContainer in the list.
             */
-            orxonox::PickupInventoryContainer* popPickup(void)
+            const orxonox::PickupInventoryContainer* popPickup(void)
                 { return (this->pickupsIterator_++)->second; }
 
             void dropPickup(uint32_t pickup); //!< Drop the input Pickupable.
@@ -148,7 +147,7 @@
             @param pickup The Pickupable.
             @return Returns true if the input Pickupable is still valid, false if not.
             */
-            bool isValidPickup(uint32_t pickup)
+            const bool isValidPickup(uint32_t pickup) const
                 { return this->pickups_.find(pickup) != this->pickups_.end(); }
             // tolua_end
 

Modified: code/trunk/src/modules/pickup/PickupRepresentation.h
===================================================================
--- code/trunk/src/modules/pickup/PickupRepresentation.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupRepresentation.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -38,6 +38,7 @@
 #include "PickupPrereqs.h"
 
 #include "core/XMLPort.h"
+
 #include "interfaces/Pickupable.h"
 #include "pickup/PickupIdentifier.h"
 #include "worldentities/StaticEntity.h"
@@ -52,7 +53,7 @@
 
     /**
     @brief
-        The PickupRepresentation class represents a specific pickup type (identified by its @ref orxonox::PickupIdentififer "PickupIdentifier"). It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
+        The PickupRepresentation class represents a specific pickup type (identified by its @ref orxonox::PickupIdentifier "PickupIdentifier"). It defines the information displayed in the GUI (PickupInventory) and how @ref orxonox::PickupSpawner "PickupSpawners" that spawn the pickup type look like.
         They are created through XML and are registered with the @ref orxonox::PickupManager "PickupManager".
 
         Creating a PickupRepresentation in XML could look as follows:
@@ -70,7 +71,7 @@
         @endcode
         As you might have noticed, there is a parameter called <em>spawnerTemplate</em> and also another parameter called <em>inventoryRepresentation</em>. Let's first explain the second one, <em>inventoryRepresentation</em>.
         - The <b>inventoryRepresentation</b> specifies the image that is displayed in the PickupInventory for the specific type of @ref orxonox::Pickupable "Pickupable". More technically, it is the name of an image located in the <code>PickupInventory.imageset</code>, which in turn is located in <code>data_extern/gui/imagesets/</code>.
-        - The <b>spawnerTemplate</b> specifies how the type of @ref orxonox::Pickupable "Pickupable" (or more precisely the @ref orxonox::PickupSpawner "PickupSpawner", that spawns that type of @ref orxonox::Pickupable "Pickupable") is displayed ingame. It is a @ref orxnox::Template "Template" defined in XML. The <em>spawnerTemplate</em> can be specified as follows (keep in mind, that the template needs to have been specified before the definition of the PickupRepresentation that uses it).
+        - The <b>spawnerTemplate</b> specifies how the type of @ref orxonox::Pickupable "Pickupable" (or more precisely the @ref orxonox::PickupSpawner "PickupSpawner", that spawns that type of @ref orxonox::Pickupable "Pickupable") is displayed ingame. It is a @ref orxonox::Template "Template" defined in XML. The <em>spawnerTemplate</em> can be specified as follows (keep in mind, that the template needs to have been specified before the definition of the PickupRepresentation that uses it).
         @code
         <Template name="awesomePickupRepresentation">
             <PickupRepresentation>
@@ -104,6 +105,45 @@
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Method for creating a PickupRepresentation object through XML.
 
             /**
+            @brief Get the name of the Pickupable represented by this PickupRepresentation.
+            @return Returns the name.
+            */
+            inline const std::string& getPickupName(void) const { return this->name_; } // tolua_export
+            /**
+            @brief Get the description of the Pickupable represented by this PickupRepresentation.
+            @return Returns the description.
+            */
+            inline const std::string& getPickupDescription(void) const { return this->description_; } // tolua_export
+            /**
+            @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation.
+            @return Returns the name of the spawnerTemplate.
+            */
+            inline const std::string& getSpawnerTemplate(void) const
+                { return this->spawnerTemplate_; }
+            /**
+            @brief Get the StaticEntity that defines how the PickupSpawner of the Pickupable represented by this PickupRepresentation looks like.
+            @param index The index.
+            @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns NULL.
+            */
+            inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index) const
+                { if(index == 0) return this->spawnerRepresentation_; return NULL; }
+            /**
+            @brief Get the name of the image representing the pickup in the PickupInventory.
+            @return Returns the name of the image as a string.
+            */
+            inline const std::string& getInventoryRepresentation(void) const { return this->inventoryRepresentation_; } // tolua_export
+            /**
+            @brief Get the Pickupable represented by this PickupRepresentation.
+            @param index The index.
+            @return Returns (for index = 0) a pointer to the Pickupable. For index > 0 it returns NULL.
+            */
+            inline const Pickupable* getPickup(unsigned int index) const
+                { if(index == 0) return this->pickup_; return NULL; }
+
+            StaticEntity* getSpawnerRepresentation(PickupSpawner* spawner); //!< Get a spawnerRepresentation for a specific PickupSpawner.
+
+        protected:
+            /**
             @brief Set the name of the Pickupable represented by this PickupRepresentation.
             @param name The name.
             */
@@ -142,44 +182,6 @@
             inline void setPickup(Pickupable* pickup)
                 { this->pickup_ = pickup; }
 
-            /**
-            @brief Get the name of the Pickupable represented by this PickupRepresentation.
-            @return Returns the name.
-            */
-            inline const std::string& getPickupName(void) { return this->name_; } // tolua_export
-            /**
-            @brief Get the description of the Pickupable represented by this PickupRepresentation.
-            @return Returns the description.
-            */
-            inline const std::string& getPickupDescription(void) { return this->description_; } // tolua_export
-            /**
-            @brief Get the name of spawnerTemplate the Pickupable represented by this PickupRepresentation.
-            @return Returns the name of the spawnerTemplate.
-            */
-            inline const std::string& getSpawnerTemplate(void)
-                { return this->spawnerTemplate_; }
-            /**
-            @brief Get the StaticEntity that defines how the PickupSpawner of the Pickupable represented by this PickupRepresentation looks like.
-            @param index The index.
-            @return Returns (for index = 0) a pointer to the StaticEntity. For index > 0 it returns NULL.
-            */
-            inline const StaticEntity* getSpawnerRepresentationIndex(unsigned int index)
-                { if(index == 0) return this->spawnerRepresentation_; return NULL; }
-            /**
-            @brief Get the name of the image representing the pickup in the PickupInventory.
-            @return Returns the name of the image as a string.
-            */
-            inline const std::string& getInventoryRepresentation(void) { return this->inventoryRepresentation_; } // tolua_export
-            /**
-            @brief Get the Pickupable represented by this PickupRepresentation.
-            @param index The index.
-            @return Returns (for index = 0) a pointer to the Pickupable. For index > 0 it returns NULL.
-            */
-            inline const Pickupable* getPickup(unsigned int index)
-                { if(index == 0) return this->pickup_; return NULL; }
-
-            StaticEntity* getSpawnerRepresentation(PickupSpawner* spawner); //!< Get a spawnerRepresentation for a specific PickupSpawner.
-
         private:
             void initialize(void); //!< Initializes the member variables of this PickupRepresentation.
             StaticEntity* getDefaultSpawnerRepresentation(PickupSpawner* spawner); //!< Get the default spawnerRepresentation for a specific PickupSpawner.

Modified: code/trunk/src/modules/pickup/PickupSpawner.cc
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupSpawner.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -37,7 +37,9 @@
 #include "core/GameMode.h"
 #include "core/Template.h"
 #include "core/XMLPort.h"
+
 #include "worldentities/pawns/Pawn.h"
+
 #include "PickupManager.h"
 #include "PickupRepresentation.h"
 
@@ -186,9 +188,10 @@
                 Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
                 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
                 // If a Pawn, that fits the target-range of the item spawned by this Pickup, is in trigger-distance.
-                if (distance.length() < this->triggerDistance_ && carrier != NULL && carrier->isTarget(this->pickup_))
+                if (distance.length() < this->triggerDistance_ && carrier != NULL)
                 {
-                    this->trigger(*it);
+                    if(carrier->isTarget(this->pickup_))
+                        this->trigger(*it);
                 }
             }
         }
@@ -269,7 +272,7 @@
     @return
         Returns the Pickupable that is spawned by this PickupSpawner.
     */
-    const Pickupable* PickupSpawner::getPickupable(void)
+    const Pickupable* PickupSpawner::getPickupable(void) const
     {
         return this->pickup_;
     }

Modified: code/trunk/src/modules/pickup/PickupSpawner.h
===================================================================
--- code/trunk/src/modules/pickup/PickupSpawner.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/PickupSpawner.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -38,7 +38,6 @@
 #include "PickupPrereqs.h"
 
 #include <string>
-
 #include "tools/Timer.h"
 
 #include "interfaces/Pickupable.h"
@@ -91,42 +90,41 @@
             inline float getTriggerDistance() const
                 { return this->triggerDistance_; }
             /**
-            @brief Set the distance in which to trigger.
-            @param value The new distance in which to trigger.
-            */
-            inline void setTriggerDistance(float value)
-                { this->triggerDistance_ = value; }
-
-            /**
             @brief Get the time to respawn.
             @returns Returns the time after which this gets re-actived.
             */
             inline float getRespawnTime() const
                 { return this->respawnTime_; }
             /**
-            @brief Set the time to respawn.
-            @param time New time after which this gets re-actived.
-            */
-            inline void setRespawnTime(float time)
-                { this->respawnTime_ = time; }
-
-            /**
             @brief Get the maximum number of items that will be spawned by this PickupSpawner.
             @return Returns the maximum number of items spawned by this PickupSpawner.
             */
-            inline int getMaxSpawnedItems(void)
+            inline int getMaxSpawnedItems(void) const
                 { return this->maxSpawnedItems_; }
-            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
+            
 
         protected:
             void decrementSpawnsRemaining(void); //!< Decrements the number of remaining spawns.
-
             void startRespawnTimer(void);
 
+            /**
+            @brief Set the distance in which to trigger.
+            @param value The new distance in which to trigger.
+            */
+            inline void setTriggerDistance(float value)
+                { this->triggerDistance_ = value; }
+            /**
+            @brief Set the time to respawn.
+            @param time New time after which this gets re-actived.
+            */
+            inline void setRespawnTime(float time)
+                { this->respawnTime_ = time; }
+            void setMaxSpawnedItems(int items); //!< Sets the maximum number of spawned items.
+
             virtual Pickupable* getPickup(void); //!< Creates a new Pickupable.
 
             void setPickupable(Pickupable* pickup); //!< Sets a Pickupable for the PickupSpawner to spawn.
-            const Pickupable* getPickupable(void); //!< Get the Pickupable that is spawned by this PickupSpawner.
+            const Pickupable* getPickupable(void) const; //!< Get the Pickupable that is spawned by this PickupSpawner.
 
             Pickupable* pickup_; //!< The pickup to be spawned.
 

Modified: code/trunk/src/modules/pickup/items/DronePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/DronePickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/DronePickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -34,16 +34,13 @@
 #include "DronePickup.h"
 
 #include <sstream>
-
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/StringUtils.h"
 
 #include "controllers/DroneController.h"
 #include "pickup/PickupIdentifier.h"
-#include "worldentities/pawns/Pawn.h"
 #include "worldentities/Drone.h"
-#include "worldentities/StaticEntity.h"
+#include "worldentities/pawns/Pawn.h"
 
 namespace orxonox
 {

Modified: code/trunk/src/modules/pickup/items/DronePickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/DronePickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/DronePickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -47,6 +47,7 @@
     /**
     @brief
         The DronePickup adds a Drone to the Pawn upon being picked up.
+
         It can be used in XML as follows:
         @code
         <DronePickup droneTemplate="myDroneTemplate" />
@@ -70,12 +71,13 @@
             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
 
-            void setDroneTemplate(std::string templatename); //!< Set the droneTemplate.
             const std::string& getDroneTemplate() const; //!< Get the name of the droneTemplate.
 
         protected:
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
 
+            void setDroneTemplate(std::string templatename); //!< Set the droneTemplate.
+
         private:
             void initialize(void); //!< Initializes the member variables.
             std::string droneTemplate_; //!< The name of the template, based upon which the Drone is created.

Modified: code/trunk/src/modules/pickup/items/HealthPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/HealthPickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/HealthPickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -33,15 +33,13 @@
 
 #include "HealthPickup.h"
 
+#include <sstream>
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/StringUtils.h"
 
-#include "worldentities/pawns/Pawn.h"
 #include "pickup/PickupIdentifier.h"
+#include "worldentities/pawns/Pawn.h"
 
-#include <sstream>
-
 namespace orxonox
 {
 
@@ -306,7 +304,7 @@
     @return
         Returns the health type as a string.
     */
-    const std::string& HealthPickup::getHealthType(void)
+    const std::string& HealthPickup::getHealthType(void) const
     {
         switch(this->getHealthTypeDirect())
         {

Modified: code/trunk/src/modules/pickup/items/HealthPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/HealthPickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/HealthPickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -38,8 +38,6 @@
 #include "pickup/PickupPrereqs.h"
 
 #include <string>
-#include <worldentities/pawns/Pawn.h>
-#include "worldentities/StaticEntity.h"
 
 #include "pickup/Pickup.h"
 #include "tools/interfaces/Tickable.h"
@@ -64,14 +62,15 @@
 
     /**
     @brief
-        The Health Pickup is a Pickupable that can do (dependent upon the parameters) lots of different things to the health of a Pawn.
-        There are 4 parameters that can be chosen:
-        - The <b>health</b> The amount of health that (in a way dependent on the other parameters) is transferred to the Pawn.
-        - The <b>activation type</b> It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the health is transferred, either immediately after being picked up or only after the player uses it.
-        - The <b>duration type</b> It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the specified health is transferred once to the Pawn, for <em>continuous</em> the set health is transferred over a span of time at a rate defined by the health rate parameter.
-        - The <b>health type</b> The health type can be chosen to be <em>limited</em>, <em>temporary</em> or <em>permanent</em>. <em>limited</em> means that the health is increased only to the maximum health of the Pawn. 'temporary' means that the maximum health is temporarily elevated but will be set back as soon as the pickup is no longer in use. <em>permanent</em> means that the maximum health of the Pawn is increased such that the health provided by the pickup will fit in and the maximum health stays that way.
+        The HealthPickup is a Pickupable that can do (dependent upon the parameters) lots of different things to the health of a Pawn.
+        There are 5 parameters that can be chosen:
+        - The @b activationType It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the health is transferred, either immediately after being picked up or only after the player uses it. The default is <em>immediate</em>.
+        - The @b durationType It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the specified health is transferred once to the Pawn, for <em>continuous</em> the set health is transferred over a span of time at a rate defined by the health rate parameter. The default is <em>once</em>.
+        - The @b health The amount of health that (in a way dependent on the other parameters) is transferred to the Pawn. Default is 0.
+        - The @b healthType The health type can be chosen to be <em>limited</em>, <em>temporary</em> or <em>permanent</em>. <em>limited</em> means that the health is increased only to the maximum health of the Pawn. 'temporary' means that the maximum health is temporarily elevated but will be set back as soon as the pickup is no longer in use. <em>permanent</em> means that the maximum health of the Pawn is increased such that the health provided by the pickup will fit in and the maximum health stays that way. The default is <em>limited</em>.
+        - The @b healthRate If set to continuous, the health that is transferred per second is the <em>healthRate</em>. There is health transferred until the health set by <em>health</em> is depleted. The default is 0.
 
-        An examle of a XML implementation of a HealthPickup would be:
+        An example of a XML implementation of a HealthPickup would be:
         @code
         <HealthPickup
             health = 33
@@ -103,22 +102,22 @@
             @brief Get the health that is transferred to the Pawn upon usage of this pickup.
             @return Returns the health.
             */
-            inline float getHealth(void)
+            inline float getHealth(void) const
                 { return this->health_; }
             /**
             @brief Get the rate at which the health is transferred to the Pawn, if this pickup has duration type 'continuous'.
             @return Returns the rate.
             */
-            inline float getHealthRate(void)
+            inline float getHealthRate(void) const
                 { return this->healthRate_; }
 
             /**
             @brief Get the type of HealthPickup, this pickup is.
             @return Returns the health type as an enum.
             */
-            inline pickupHealthType::Value getHealthTypeDirect(void)
+            inline pickupHealthType::Value getHealthTypeDirect(void) const
                 { return this->healthType_; }
-            const std::string& getHealthType(void); //!< Get the health type of this pickup.
+            const std::string& getHealthType(void) const; //!< Get the health type of this pickup.
 
         protected:
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.

Modified: code/trunk/src/modules/pickup/items/InvisiblePickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/InvisiblePickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/InvisiblePickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -34,15 +34,13 @@
 #include "InvisiblePickup.h"
 
 #include <sstream>
-#include <OgreEntity.h>
-#include <OgreAnimationState.h>
-
-#include "util/StringUtils.h"
+//#include <OgreEntity.h>
+//#include <OgreAnimationState.h>
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
 
+#include "pickup/PickupIdentifier.h"
 #include "worldentities/pawns/Pawn.h"
-#include "pickup/PickupIdentifier.h"
 
 namespace orxonox
 {
@@ -67,16 +65,6 @@
     {
     }
 
-
-    void InvisiblePickup::initializeIdentifier(void)
-    {
-        std::stringstream stream;
-        stream << this->getDuration();
-        std::string type1 = "duration";
-        std::string val1 = stream.str();
-        this->pickupIdentifier_->addParameter(type1, val1);
-    }
-
     /**
     @brief
     Initializes the member variables.
@@ -90,6 +78,19 @@
 
     /**
     @brief
+        Initializes the PickupIdentifier of this pickup.
+    */
+    void InvisiblePickup::initializeIdentifier(void)
+    {
+        std::stringstream stream;
+        stream << this->getDuration();
+        std::string type1 = "duration";
+        std::string val1 = stream.str();
+        this->pickupIdentifier_->addParameter(type1, val1);
+    }
+
+    /**
+    @brief
         Method for creating a HealthPickup object through XML.
     */
     void InvisiblePickup::XMLPort(Element& xmlelement, orxonox::XMLPort::Mode mode)
@@ -112,8 +113,10 @@
         if(!this->isPickedUp())
             return;
 
+        // If the pickup has transited to used.
         if (this->isUsed())
         {
+            // If its durationType is continuous, we set a Timer to be reminded, when the time has run out.
             if(this->isContinuous())
             {
                 if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
@@ -133,38 +136,21 @@
         {
             this->setInvisible(false);
 
+            // We destroy the pickup if either, the pickup has activationType immediate and durationType once or it has durationType continuous and the duration was exceeded.
             if((!this->isContinuous() && this->isImmediate()) || (this->isContinuous() && !this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration()))
             {
                 this->Pickupable::destroy();
             }
+            // We pause the Timer if the pickup is continuous and the duration is not yet exceeded,
             else if(this->isContinuous() && this->durationTimer_.isActive())
             {
                 this->durationTimer_.pauseTimer();
             }
         }
-
     }
 
     /**
     @brief
-        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
-    @return
-        A pointer to the Pawn, or NULL if the conversion failed.
-    */
-    Pawn* InvisiblePickup::carrierToPawnHelper(void)
-    {
-        PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
-
-        if(pawn == NULL)
-        {
-            COUT(1) << "Invalid PickupCarrier in InvisiblePickup." << std::endl;
-        }
-        return pawn;
-    }
-
-    /**
-    @brief
         Creates a duplicate of the input OrxonoxClass.
     @param item
         A pointer to the Orxonox class.
@@ -211,6 +197,24 @@
 
     /**
     @brief
+        Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+    @return
+        A pointer to the Pawn, or NULL if the conversion failed.
+    */
+    Pawn* InvisiblePickup::carrierToPawnHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+
+        if(pawn == NULL)
+        {
+            COUT(1) << "Invalid PickupCarrier in InvisiblePickup." << std::endl;
+        }
+        return pawn;
+    }
+
+    /**
+    @brief
         Sets the time the InvisibilityPickup will last.
     @param duration
         The duration in seconds.

Modified: code/trunk/src/modules/pickup/items/InvisiblePickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/InvisiblePickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/InvisiblePickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -39,8 +39,6 @@
 
 #include <string>
 
-#include <worldentities/pawns/Pawn.h>
-#include "worldentities/StaticEntity.h"
 #include "pickup/Pickup.h"
 
 namespace orxonox {
@@ -48,14 +46,14 @@
     /**
     @brief
         A pickup that makes the Pawn invisible.
-        There are 2 parameters that can be chosen:
-        - The <b>activation type</b> It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the Pawn will be invisible, either immediately after being picked up or only after the player uses it.
-        - The <b>duration type</b> It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the InvisiblePickup just makes the Pawn invisible for as long as it is used, for <em>continuous</em> the Pawn is invisible for the specified duration.
-        - The <b>duration</b> Specifies how long (in seconds) the invisibility lasts.
+        There are 3 parameters that can be chosen:
+        - The @b activationType It can be chosen to be either <em>immediate</em> or <em>onUse</em>. The activation type essentially (as indicated by the name) defines when the Pawn will be invisible, either immediately after being picked up or only after the player uses it. The default is <em>immediate</em>.
+        - The @b durationType< It can be chosen to be either <em>once</em> or <em>continuous</em>. For <em>once</em> the InvisiblePickup just makes the Pawn invisible for as long as it is used, for <em>continuous</em> the Pawn is invisible for the specified duration. The default is <em>once</em>.
+        - The @b duration Specifies how long (in seconds) the invisibility lasts. The default is 0.
 
-        An examle of a XML implementation of a InvisiblePickup would be:
+        An example of a XML implementation of a InvisiblePickup would be:
         @code
-        <HealthPickup
+        <InvisiblePickup
             activationType = "immediate"
             durationType = "continuous"
             duration = 30.0
@@ -82,17 +80,17 @@
             @brief Checks whether the Pawn is invisible.
             @return Returns if the Pawn is invisible.
             */
-            inline bool getInvisibility(bool)
+            inline bool getInvisibility(bool) const
                 { return this->invisible_; }
             /**
             @brief Get the time the InvisibilityPickup lasts.
             @return Returns the time in seconds the InvisibiltyPickup lasts.
             */
-            inline float getDuration(void)
+            inline float getDuration(void) const
                 { return this->duration_; }
 
         protected:
-            void initializeIdentifier(void);
+            void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
 
             bool setInvisible(bool invisibility); //!< Set the Pawn to be invisible or visible again.
             void setDuration(float duration); //!< Sets the time the InvisibilityPickup will last.

Modified: code/trunk/src/modules/pickup/items/MetaPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/MetaPickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/MetaPickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -33,9 +33,10 @@
 
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "worldentities/pawns/Pawn.h"
+
 #include "interfaces/PickupCarrier.h"
 #include "pickup/PickupIdentifier.h"
+#include "worldentities/pawns/Pawn.h"
 
 #include "MetaPickup.h"
 
@@ -78,7 +79,6 @@
     {
         this->addTarget(ClassIdentifier<PickupCarrier>::getIdentifier());
 
-        this->setActivationTypeDirect(pickupActivationType::immediate);
         this->setDurationTypeDirect(pickupDurationType::once);
         this->metaType_ = pickupMetaType::none;
     }
@@ -116,12 +116,13 @@
     {
         SUPER(MetaPickup, changedUsed);
 
-        //! If the MetaPickup transited to used.
-        if(this->isUsed())
+        // If the MetaPickup transited to used, and the metaType is not none.
+        if(this->isUsed() && this->metaType_ != pickupMetaType::none)
         {
             PickupCarrier* carrier = this->getCarrier();
             if(this->getMetaTypeDirect() != pickupMetaType::none && carrier != NULL)
             {
+                // If the metaType is destroyCarrier, then the PickupCarrier is destroyed.
                 if(this->getMetaTypeDirect() == pickupMetaType::destroyCarrier)
                 {
                     this->Pickupable::destroy(); //TODO: Needed?
@@ -130,30 +131,27 @@
                     return;
                 }
                 std::set<Pickupable*> pickups = carrier->getPickups();
-                //! Set all Pickupables carried by the PickupCarrier either to used or drop them, depending on the meta type.
+                // Iterate over all Pickupables of the PickupCarrier.
                 for(std::set<Pickupable*>::iterator it = pickups.begin(); it != pickups.end(); it++)
                 {
-                    Pickup* pickup = dynamic_cast<Pickup*>(*it);
-                    if(this->getMetaTypeDirect() == pickupMetaType::use)
+                    Pickupable* pickup = (*it);
+                    if(pickup == NULL || pickup == this)
+                        continue;
+
+                    // If the metaType is use, then the Pickupable is set to used.
+                    if(this->getMetaTypeDirect() == pickupMetaType::use && !pickup->isUsed())
                     {
-                        if(pickup != NULL && pickup != this && pickup->isOnUse() && !pickup->isUsed())
-                        {
-                            pickup->setUsed(true);
-                        }
+                        pickup->setUsed(true);
                     }
-                    if(this->getMetaTypeDirect() == pickupMetaType::drop)
+                    // If the metaType is drop, then the Pickupable is dropped.
+                    else if(this->getMetaTypeDirect() == pickupMetaType::drop)
                     {
-                        if(pickup != NULL && pickup != this)
-                        {
-                            pickup->drop();
-                        }
+                        pickup->drop();
                     }
-                    if(this->getMetaTypeDirect() == pickupMetaType::destroy)
+                    // If the metaType is destroy, then the Pickupable is destroyed.
+                    else if(this->getMetaTypeDirect() == pickupMetaType::destroy)
                     {
-                        if(pickup != NULL && pickup != this)
-                        {
-                            pickup->Pickupable::destroy();
-                        }
+                        pickup->Pickupable::destroy();
                     }
                 }
             }
@@ -186,7 +184,7 @@
     @return
         Returns a string with the meta type of the MetaPickup.
     */
-    const std::string& MetaPickup::getMetaType(void)
+    const std::string& MetaPickup::getMetaType(void) const
     {
         switch(this->getMetaTypeDirect())
         {

Modified: code/trunk/src/modules/pickup/items/MetaPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/MetaPickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/MetaPickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -41,28 +41,48 @@
 
 namespace orxonox {
 
-    //! The meta type, deciding what the pickup does exactly.
+    /**
+    @brief
+        The meta type, specifying what the @ref orxonox::MetaPickup "MetaPickup" does exactly.
+
+    @ingroup PickupItems
+    */
     namespace pickupMetaType
     {
         enum Value
         {
-            none,
-            use,
-            drop,
-            destroy,
-            destroyCarrier
+            none, //!< The @ref orxonox::MetaPickup "MetaPickup" does nothing.
+            use, //!< The @ref orxonox::MetaPickup "MetaPickup" uses all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables".
+            drop, //!< The @ref orxonox::MetaPickup "MetaPickup" drops all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables".
+            destroy, //!< The @ref orxonox::MetaPickup "MetaPickup" destroys all the @ref orxonox::PickupCarrier "PickupCarriers'" @ref orxonox::Pickupable "Pickupables".
+            destroyCarrier //!< The @ref orxonox::MetaPickup "MetaPickup" destroys the @ref orxonox::PickupCarrier "PickupCarrier".
         };
     }
 
     /**
     @brief
-        The MetaPickup is a pickup that can, depending on the parameter 'metaType', do different things. If the 'metaType' is set to
-        - @b use All the pickups, the PickupCarrier has, are immediately set to used upon pickup of the MetaPickup.
-        - @b drop All the pickups, the PickupCarrier has, are immediately dropped upon pickup of the MetaPickup.
-        - @b destroy All the pickups, the PickupCarrier has, are immediately destroyed upon pickup of the MetaPickup.
-        - @b destroyCarrier The PickupCarrier is immediately destroyed upon pickup of the MetaPickup.
+        The MetaPickup is a Pickupable that can, depending on the parameter <em>metaTye</em>, do different things. If the <em>metaTye</em> is set to
+        - @b use All the @ref orxonox::Pickupable "Pickupables", the PickupCarrier has, are immediately set to used upon using the MetaPickup.
+        - @b drop All the @ref orxonox::Pickupable "Pickupables", the PickupCarrier has, are immediately dropped upon using the MetaPickup.
+        - @b destroy All the @ref orxonox::Pickupable "Pickupables", the PickupCarrier has, are immediately destroyed upon using the MetaPickup.
+        - @b destroyCarrier The PickupCarrier is immediately destroyed upon using the MetaPickup.
+
+        The default value is <em>none</em>, which basically does nothing.
+        
+        The parameter <b>activation type</b> can be used to specify, whether the MetaPickup is used upon pickup (<em>immediate</em>) or not (<em>onUse</em>). With <em>immediate</em> being the default.
+
+        An example of a XML implementation of a MetaPickup would be:
+        @code
+        <MetaPickup
+            activationType = "immediate"
+            metaType = "use"
+        />
+        @endcode
+
     @author
         Damian 'Mozork' Frick
+
+    @ingroup PickupItems
     */
     class _PickupExport MetaPickup : public Pickup
     {
@@ -80,9 +100,9 @@
             @brief Returns the meta type of the MetaPickup.
             @return Returns an enum with the meta type of the MetaPickup.
             */
-            inline pickupMetaType::Value getMetaTypeDirect(void)
+            inline pickupMetaType::Value getMetaTypeDirect(void) const
                 { return this->metaType_; }
-            const std::string& getMetaType(void); //!< Get the meta type of this MetaPickup.
+            const std::string& getMetaType(void) const; //!< Get the meta type of this MetaPickup.
 
         protected:
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.

Modified: code/trunk/src/modules/pickup/items/ShieldPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/ShieldPickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/ShieldPickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -33,17 +33,13 @@
 
 #include "ShieldPickup.h"
 
+#include <sstream>
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/StringUtils.h"
 
-#include "worldentities/pawns/SpaceShip.h"
-#include "items/Engine.h"
 #include "pickup/PickupIdentifier.h"
+#include "worldentities/pawns/Pawn.h"
 
-#include <sstream>
-
-
 namespace orxonox
 {
     CreateFactory(ShieldPickup);
@@ -70,24 +66,6 @@
 
     /**
     @brief
-    Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
-    @return
-    A pointer to the Pawn, or NULL if the conversion failed.
-    */
-    Pawn* ShieldPickup::carrierToPawnHelper(void)
-    {
-        PickupCarrier* carrier = this->getCarrier();
-        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
-
-        if(pawn == NULL)
-        {
-            COUT(1) << "Invalid PickupCarrier in ShieldPickup." << std::endl;
-        }
-        return pawn;
-    }
-
-    /**
-    @brief
         Initializes the member variables.
     */
     void ShieldPickup::initialize(void)
@@ -133,9 +111,9 @@
     {
         SUPER(ShieldPickup, XMLPort, xmlelement, mode);
 
-        XMLPortParam(ShieldPickup, "duration", setDuration, getDuration, xmlelement, mode);
         XMLPortParam(ShieldPickup, "shieldhealth", setShieldHealth, getShieldHealth, xmlelement, mode);
         XMLPortParam(ShieldPickup, "shieldabsorption", setShieldAbsorption, getShieldAbsorption, xmlelement, mode);
+        XMLPortParam(ShieldPickup, "duration", setDuration, getDuration, xmlelement, mode);
 
         this->initializeIdentifier();
     }
@@ -148,7 +126,7 @@
     {
         SUPER(ShieldPickup, changedUsed);
 
-        //! If the pickup is not picked up nothing must be done.
+        // If the pickup is not picked up nothing must be done.
         if(!this->isPickedUp())
             return;
 
@@ -156,17 +134,21 @@
         if(pawn == NULL)
             this->Pickupable::destroy();
 
-        //! If the pickup has transited to used.
+        // If the pickup has transited to used.
         if(this->isUsed())
         {
-            if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
+            // If its durationType is continuous, we set a Timer to be reminded, when the time has run out.
+            if(this->isContinuous())
             {
-                this->durationTimer_.unpauseTimer();
+                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
+                {
+                    this->durationTimer_.unpauseTimer();
+                }
+                else
+                {
+                    this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&ShieldPickup::pickupTimerCallback, this)));
+                }
             }
-            else
-            {
-                this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&ShieldPickup::pickupTimerCallback, this)));
-            }
             pawn->setShieldAbsorption(this->getShieldAbsorption());
             pawn->setShieldHealth(this->getShieldHealth());
         }
@@ -176,22 +158,39 @@
             this->setShieldHealth(pawn->getShieldHealth());
             pawn->setShieldHealth(0.0f);
 
-            if(this->isOnce())
+            // We destroy the pickup if either, the pickup has activationType immediate and durationType once or it has durationType continuous and the duration was exceeded.
+            if((!this->isContinuous() && this->isImmediate()) || (this->isContinuous() && !this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration()))
             {
-                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration())
-                {
-                    this->Pickupable::destroy();
-                }
-                else
-                {
-                    this->durationTimer_.pauseTimer();
-                }
+                this->Pickupable::destroy();
             }
+            // We pause the Timer if the pickup is continuous and the duration is not yet exceeded,
+            else if(this->isContinuous() && this->durationTimer_.isActive())
+            {
+                this->durationTimer_.pauseTimer();
+            }
         }
     }
 
     /**
     @brief
+    Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
+    @return
+    A pointer to the Pawn, or NULL if the conversion failed.
+    */
+    Pawn* ShieldPickup::carrierToPawnHelper(void)
+    {
+        PickupCarrier* carrier = this->getCarrier();
+        Pawn* pawn = dynamic_cast<Pawn*>(carrier);
+
+        if(pawn == NULL)
+        {
+            COUT(1) << "Invalid PickupCarrier in ShieldPickup." << std::endl;
+        }
+        return pawn;
+    }
+
+    /**
+    @brief
         Creates a duplicate of the input OrxonoxClass.
     @param item
         A pointer to the Orxonox class.
@@ -212,28 +211,28 @@
 
     /**
     @brief
-    Sets the percentage the shield absorbs of the dealt damage.
-    @param shieldAbsorption
-    The shieldAbsorption. Has to be between 0 and 1
+        Sets the duration.
+    @param duration
+        The duration in seconds.
     */
-    void ShieldPickup::setShieldAbsorption(float shieldAbsorption)
+    void ShieldPickup::setDuration(float duration)
     {
-        if (shieldAbsorption>=0 && shieldAbsorption<=1)
+        if(duration >= 0.0f)
         {
-            this->shieldAbsorption_=shieldAbsorption;
+            this->duration_ = duration;
         }
         else
         {
-            COUT(1) << "Invalid Absorption in ShieldPickup." << std::endl;
-            this->shieldAbsorption_=0;
+            COUT(1) << "Invalid duration in ShieldPickup." << std::endl;
+            this->duration_ = 0.0f;
         }
     }
 
     /**
     @brief
-    Sets the health of the shield.
+        Sets the health of the shield.
     @param shieldHealth
-    The shieldHealth
+        The shieldHealth.
     */
     void ShieldPickup::setShieldHealth(float shieldHealth)
     {
@@ -250,23 +249,27 @@
 
     /**
     @brief
-        Sets the duration.
-    @param duration
-        The duration
+        Sets the percentage the shield absorbs of the dealt damage.
+    @param shieldAbsorption
+        The shieldAbsorption. Has to be between 0 and 1.
     */
-    void ShieldPickup::setDuration(float duration)
+    void ShieldPickup::setShieldAbsorption(float shieldAbsorption)
     {
-        if(duration >= 0.0f)
+        if (shieldAbsorption>=0 && shieldAbsorption<=1)
         {
-            this->duration_ = duration;
+            this->shieldAbsorption_=shieldAbsorption;
         }
         else
         {
-            COUT(1) << "Invalid duration in ShieldPickup." << std::endl;
-            this->duration_ = 0.0f;
+            COUT(1) << "Invalid Absorption in ShieldPickup." << std::endl;
+            this->shieldAbsorption_=0;
         }
     }
 
+    /**
+    @brief
+        Helper method. Is called by the Timer as soon as it expires.
+    */
     void ShieldPickup::pickupTimerCallback(void)
     {
         this->setUsed(false);

Modified: code/trunk/src/modules/pickup/items/ShieldPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/ShieldPickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/ShieldPickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -39,8 +39,6 @@
 #include "pickup/PickupPrereqs.h"
 
 #include <string>
-#include "worldentities/pawns/Pawn.h"
-#include "worldentities/StaticEntity.h"
 
 #include "pickup/Pickup.h"
 
@@ -50,14 +48,28 @@
     @brief
         A Pickup which can add a Shield to the Pawn.
 
-        There are 4 parameters that can be cosen.
-        - The @b percentage The percentage the shield takes from the damage dealt to a Pawn
-        - The @b hit @b points The amount of damage points a shield can teake before collapsing
-        - The @b activation @b type 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it.
-        - The @b duration the activation time of the pickup.
+        There are 5 parameters that can be cosen.
+        - The @b shieldhealth< The amount of damage points a shield can take before collapsing. The default is 0.
+        - The @b shieldabsorption The percentage the shield takes from the damage dealt to a Pawn. The default is 0.
+        - The @b activationType, <em>immediate</em> or <em>onUse</em>. defines if the ShiedlPickup is used when it's picked up or only after the player chooses to use it. The default is <em>immediate</em>.
+        - The @b durationType, <em>once</em> means, that the shield will stay until it collapses, <em>continuous</em> means, that the shield only stays for a limited amount of time, specifiey by the duration. The default is <em>once</em>.
+        - The @b duration the time in seconds the shield is active at the most. The default is 0.
 
+        An example of a XML implementation of a ShieldPickup would be:
+        @code
+        <ShieldPickup
+            shieldhealth = 30
+            shieldabsorption = 0.8
+            activationType = "immediate"
+            durationtype = "continuous"
+            duration = 20.0
+        />
+        @endcode
+
     @author
         Eric Beier
+
+    @ingroup PickupItems
     */
     class _PickupExport ShieldPickup : public Pickup
     {
@@ -71,22 +83,33 @@
             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
 
-            inline float getDuration(void)
+            /**
+            @brief Get the duration, the time the shield is actvie at the most.
+            @return Returns the duration in seconds.
+            */
+            inline float getDuration(void) const
                 { return this->duration_; }
-            inline float getShieldHealth()
+            /**
+            @brief Get the shield health, the amount of damage the shield can sustain.
+            @return Returns the shield health.
+            */
+            inline float getShieldHealth() const
                 { return this->shieldHealth_; }
-            inline float getShieldAbsorption()
+            /**
+            @brief Get the shield absorption, the percentage of damage that is absorbed by the shield.
+            @return Returns the shield absorption.
+            */
+            inline float getShieldAbsorption() const
                 { return this->shieldAbsorption_; }
 
         protected:
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
+            void pickupTimerCallback(void); //!< Helper method. Is called by the Timer as soon as it expires.
 
-            void pickupTimerCallback(void); //!< Function that gets called when timer ends.
+            void setDuration(float duration); //!< Sets the duration.
+            void setShieldHealth(float shieldHealth); //!< Sets the health of the shield.
+            void setShieldAbsorption(float shieldAbsorption); //!< Sets the percentage the shield absorbs of the dealt damage.
 
-            void setDuration(float duration);
-            void setShieldHealth(float shieldHealth);
-            void setShieldAbsorption(float shieldAbsorption);
-
         private:
             void initialize(void); //!< Initializes the member variables.
             Pawn* carrierToPawnHelper(void); //!< Helper to transform the PickupCarrier to a Pawn, and throw an error message if the conversion fails.
@@ -94,8 +117,8 @@
             Timer durationTimer_; //!< Timer.
 
             float duration_; //!< The health that is transferred to the Pawn.
-            float shieldHealth_;
-            float shieldAbsorption_; // Has to be between 0 and 1
+            float shieldHealth_; //!< The amount of damage the shield can sustain.
+            float shieldAbsorption_; //!< The percentage of damage that is absorbed by the shield.
 
     };
 }

Modified: code/trunk/src/modules/pickup/items/SpeedPickup.cc
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -33,17 +33,14 @@
 
 #include "SpeedPickup.h"
 
+#include <sstream>
 #include "core/CoreIncludes.h"
 #include "core/XMLPort.h"
-#include "util/StringUtils.h"
 
-#include "worldentities/pawns/SpaceShip.h"
 #include "items/Engine.h"
 #include "pickup/PickupIdentifier.h"
+#include "worldentities/pawns/SpaceShip.h"
 
-#include <sstream>
-
-
 namespace orxonox
 {
     CreateFactory(SpeedPickup);
@@ -129,25 +126,30 @@
     {
         SUPER(SpeedPickup, changedUsed);
 
-        //! If the pickup is not picked up nothing must be done.
+        // If the pickup is not picked up nothing must be done.
         if(!this->isPickedUp())
             return;
 
         Engine* engine = this->carrierToEngineHelper();
-        if(engine == NULL) //!< If the PickupCarrier is no Engine, then this pickup is useless and therefore is destroyed.
+        if(engine == NULL) // If the PickupCarrier is no Engine, then this pickup is useless and therefore is destroyed.
             this->Pickupable::destroy();
 
-        //! If the pickup has transited to used.
+        // If the pickup has transited to used.
         if(this->isUsed())
         {
-            if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
+            // If its durationType is continuous, we set a Timer to be reminded, when the time has run out.
+            if(this->isContinuous())
             {
-                this->durationTimer_.unpauseTimer();
+                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() > 0.0f)
+                {
+                    this->durationTimer_.unpauseTimer();
+                }
+                else
+                {
+                    this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&SpeedPickup::pickupTimerCallback, this)));
+                }
             }
-            else
-            {
-                this->durationTimer_.setTimer(this->getDuration(), false, createExecutor(createFunctor(&SpeedPickup::pickupTimerCallback, this)));
-            }
+
             engine->setSpeedAdd(this->getSpeedAdd());
             engine->setSpeedMultiply(this->getSpeedMultiply());
         }
@@ -156,17 +158,16 @@
             engine->setSpeedAdd(0.0f);
             engine->setSpeedMultiply(1.0f);
 
-            if(this->isOnce())
+            // We destroy the pickup if either, the pickup has activationType immediate and durationType once or it has durationType continuous and the duration was exceeded.
+            if((!this->isContinuous() && this->isImmediate()) || (this->isContinuous() && !this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration()))
             {
-                if(!this->durationTimer_.isActive() && this->durationTimer_.getRemainingTime() == this->getDuration())
-                {
-                    this->Pickupable::destroy();
-                }
-                else
-                {
-                    this->durationTimer_.pauseTimer();
-                }
+                this->Pickupable::destroy();
             }
+            // We pause the Timer if the pickup is continuous and the duration is not yet exceeded,
+            else if(this->isContinuous() && this->durationTimer_.isActive())
+            {
+                this->durationTimer_.pauseTimer();
+            }
         }
     }
 
@@ -212,9 +213,9 @@
 
     /**
     @brief
-        Sets the duration.
+        Sets the duration for which the SpeedPickup stays active.
     @param duration
-        The duration
+        The duration in seconds.
     */
     void SpeedPickup::setDuration(float duration)
     {
@@ -231,9 +232,9 @@
 
     /**
     @brief
-        Sets the SpeedAdd
+        Sets the speedAdd, the value that is added to the speed of the Pawn.
     @param speedAdd
-        The added Speed
+        The added speed.
     */
     void SpeedPickup::setSpeedAdd(float speedAdd)
     {
@@ -250,9 +251,9 @@
 
     /**
     @brief
-        Sets the SpeedMultiply
+        Sets the speedMultiply, the factor by which the speed of the Pawn is multiplied.
     @param speedMultiply
-        The multiplied Speed
+        The factor by which the speed is mutiplied.
     */
     void SpeedPickup::setSpeedMultiply(float speedMultiply)
     {

Modified: code/trunk/src/modules/pickup/items/SpeedPickup.h
===================================================================
--- code/trunk/src/modules/pickup/items/SpeedPickup.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/modules/pickup/items/SpeedPickup.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -38,8 +38,6 @@
 #include "pickup/PickupPrereqs.h"
 
 #include <string>
-#include "worldentities/pawns/Pawn.h"
-#include "worldentities/StaticEntity.h"
 
 #include "pickup/Pickup.h"
 
@@ -49,14 +47,28 @@
     @brief
         A Pickup which can manipulate the Speed of a Pawn.
 
-        There are 4 parameters that can be cosen:
-        - The @b speed @b multiplier
-        - The @b additional (forward) @b speed
-        - The @b activation @b type 'immediate' or 'onUse'. defines if the item is used when it's picked up or only after the player chooses to use it.
-        - The @b duration The activation time of the pickup.
+        There are 5 parameters that can be cosen:
+        - The @b speedMultiply, specifies a factor by which the Spaceships speed is multiplied. The default is 1.
+        - The @b speedAdd, specifies a value that is added to the speed of the Spaceship. The default is 0.
+        - The @b activationType <em>immediate</em> or <em>onUse</em>, defines if the SpeedPickup is used when it's picked up or only after the player chooses to use it. The default is <em>immediate</em>.
+        - The @b durationType Can be either <em>once</em> or <em>continuous</em>. For <em>once</em> the SpeedPickup is just active for as long as it is used, for <em>continuous</em> the SpeedPickup is active only for the specified duration. The default is <em>once</em>.
+        - The @b duration The time in seconds the SpeedPickup is active at the most. The default is 0.
 
+        An example, how a SpeedPickup could be defined in XML could be:
+        @code
+        <SpeedPickup
+            speedMultiply = 2.0
+            speedAdd = 10.0
+            activationType = "immediate"
+            durationType = "continuous"
+            duration = 30.0
+        />
+        @endcode
+
     @author
         Eric Beier
+
+    @ingroup PickupItems
     */
     class _PickupExport SpeedPickup : public Pickup
     {
@@ -70,21 +82,32 @@
             virtual void changedUsed(void); //!< Is called when the pickup has transited from used to unused or the other way around.
             virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass.
 
-            inline float getDuration(void)
+            /**
+            @brief Get the duration, the time the SpeedPickup is active.
+            @return Returns the duration in seconds.
+            */
+            inline float getDuration(void) const
                 { return this->duration_; }
-            inline float getSpeedAdd(void)
+            /**
+            @brief Get the value that is added to the speed of the Pawn.
+            @return Returns the speedAdd.
+            */
+            inline float getSpeedAdd(void) const
                 { return this->speedAdd_; }
-            inline float getSpeedMultiply(void)
+            /**
+            @brief Get the factor by wich the speed of the Pawn is multplied.
+            @return Returns the speedMultiply.
+            */
+            inline float getSpeedMultiply(void) const
                 { return this->speedMultiply_; }
 
         protected:
             void initializeIdentifier(void); //!< Initializes the PickupIdentifier of this pickup.
-
             void pickupTimerCallback(void); //!< Function that gets called when timer ends.
 
-            void setDuration(float duration);
-            void setSpeedAdd(float speedAdd);
-            void setSpeedMultiply(float speedMultiply);
+            void setDuration(float duration); //!< Sets the duration.
+            void setSpeedAdd(float speedAdd); //!< Sets the SpeedAdd, the value that is added to the speed of the Pawn.
+            void setSpeedMultiply(float speedMultiply); //!< Sets the speedMultiply, the factor by which the speed of the Pawn is multiplied.
 
         private:
             void initialize(void); //!< Initializes the member variables.
@@ -92,9 +115,9 @@
 
             Timer durationTimer_; //!< Timer.
 
-            float duration_; //!< The health that is transferred to the Pawn.
-            float speedAdd_;
-            float speedMultiply_;
+            float duration_; //!< The time in seconds for which the SpeedPickup stays active.
+            float speedAdd_; //!< The value that is added to the speed of the Pawn.
+            float speedMultiply_; //!< The factor by which the speed of the Pawn is multiplied.
     };
 }
 

Modified: code/trunk/src/orxonox/interfaces/PickupCarrier.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -35,6 +35,7 @@
 
 #include "core/CoreIncludes.h"
 #include "core/Identifier.h"
+
 #include "Pickupable.h"
 
 namespace orxonox {
@@ -88,7 +89,7 @@
     @return
         Returns true if the PickupCarrier or one of its children is a target, false if not.
     */
-    bool PickupCarrier::isTarget(const Pickupable* pickup)
+    bool PickupCarrier::isTarget(const Pickupable* pickup) const
     {
         if(pickup->isTarget(this)) // If the PickupCarrier itself is a target.
             return true;

Modified: code/trunk/src/orxonox/interfaces/PickupCarrier.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupCarrier.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/interfaces/PickupCarrier.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -63,11 +63,13 @@
 
         Different PickupCarriers are structured hierarchically, a pickup can be picked up by a PickupCarrier that can't really carry that particular pickup but one of its children (or one of their children) can, and thus it gets "handed down" until it is at the right place.
         But this structure has to be established first.
-        - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonx::Engine "Engine".
+        - <b>getCarrierChildren()</b> To this end a PickupCarrier needs to implement getCarrierChildren() which returns a list of its direct PickupCarrier children. If you need an example, have a look at @ref orxonox::Pawn "Pawn" and @ref orxonox::Engine "Engine".
         - <b>getCarrierParent()</b> This is the method in the other direction. It returns the parent of this PickupCarrier, or NULL if the PickupCarrier is a root node in this hierarchy.
 
     @author
         Damian 'Mozork' Frick
+
+    @ingroup Pickup
     */
     class _OrxonoxExport PickupCarrier : virtual public OrxonoxClass
     {
@@ -87,7 +89,7 @@
             virtual ~PickupCarrier(); //!< Destructor.
             void preDestroy(void); //!< Is called before the PickupCarrier is effectively destroyed.
 
-            bool isTarget(const Pickupable* pickup); //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
+            bool isTarget(const Pickupable* pickup) const; //!< Can be used to check whether the PickupCarrier or a child of his is a target ot the input Pickupable.
             PickupCarrier* getTarget(const Pickupable* pickup); //!< Get the carrier that is both a child of the PickupCarrier (or the PickupCarrier itself) and a target of the input Pickupable.
 
             /**
@@ -95,7 +97,7 @@
                    This method needs to be implemented by any direct derivative class of PickupCarrier.
             @return Returns the position as a Vector3.
             */
-            virtual const Vector3& getCarrierPosition(void) = 0;
+            virtual const Vector3& getCarrierPosition(void) const = 0;
 
         protected:
             /**
@@ -104,13 +106,13 @@
                    The returned list will be deleted by the methods calling this function.
             @return Returns a pointer to a list of all direct children.
             */
-            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) = 0;
+            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const = 0;
             /**
             @brief Get the parent of this PickupSpawner.
                    This method needs to be implemented by any direct derivative class of PickupCarrier.
             @return Returns a pointer to the parent.
             */
-            virtual PickupCarrier* getCarrierParent(void) = 0;
+            virtual PickupCarrier* getCarrierParent(void) const = 0;
 
             /**
             @brief Get all Pickupables this PickupCarrier has.

Modified: code/trunk/src/orxonox/interfaces/PickupListener.h
===================================================================
--- code/trunk/src/orxonox/interfaces/PickupListener.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/interfaces/PickupListener.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -47,9 +47,12 @@
     @brief
         The PickupListener class facilitates the flow of information regarding the picking up, dropping, using and unusing of @ref orxonox::Pickupable "Pickupables" to interested parties (such as the @ref orxonox::PickupManager "PickupManager").
 
-        All you need to to do be notified is to inherit from PickupListener and implement the two methods pickupChangedUsed() and pickupChangedPickedUp().
+        All you need to to do be notified is to inherit from PickupListener and implement the two methods <code>pickupChangedUsed()</code> and <code>pickupChangedPickedUp()</code>.
+
     @author
         Damian 'Mozork' Frick
+
+    @ingroup Pickup
     */
     class _OrxonoxExport PickupListener : virtual public OrxonoxClass
     {

Modified: code/trunk/src/orxonox/interfaces/Pickupable.cc
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/interfaces/Pickupable.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -146,7 +146,7 @@
     @return
         Returns true if the given PickupCarrier is a target.
     */
-    bool Pickupable::isTarget(PickupCarrier* carrier) const
+    bool Pickupable::isTarget(const PickupCarrier* carrier) const
     {
         if(carrier == NULL)
             return false;
@@ -164,7 +164,7 @@
     */
     bool Pickupable::isTarget(const Identifier* identifier) const
     {
-        //! Iterate through all targets of this Pickupable.
+        // Iterate through all targets of this Pickupable.
         for(std::list<Identifier*>::const_iterator it = this->targets_.begin(); it != this->targets_.end(); it++)
         {
             if(identifier->isA(*it))
@@ -197,7 +197,7 @@
     */
     bool Pickupable::addTarget(Identifier* target)
     {
-        if(this->isTarget(target)) //!< If the input target is already present in the list of targets.
+        if(this->isTarget(target)) // If the input target is already present in the list of targets.
             return false;
 
         COUT(4) << "Target " << target->getName() << " added to Pickupable (&" << this << ")." << std::endl;
@@ -215,7 +215,7 @@
     */
     bool Pickupable::pickup(PickupCarrier* carrier)
     {
-        if(carrier == NULL || this->isPickedUp()) //!< If carrier is NULL or the Pickupable is already picked up.
+        if(carrier == NULL || this->isPickedUp()) // If carrier is NULL or the Pickupable is already picked up.
             return false;
 
         if(!this->setCarrier(carrier))

Modified: code/trunk/src/orxonox/interfaces/Pickupable.h
===================================================================
--- code/trunk/src/orxonox/interfaces/Pickupable.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/interfaces/Pickupable.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -50,12 +50,14 @@
     @brief
         An Interface (or more precisely an abstract class) to model and represent different (all kinds of) pickups.
 
-        Pickups (@ref orxonox:Pickupable "Pickupables") are objects that (quite unsurprisingly) can be picked up. Additionally they can be used and unused (transition from used to not used), and also dropped.
+        Pickups (@ref orxonox::Pickupable "Pickupables") are objects that (quite unsurprisingly) can be picked up. Additionally they can be used and unused (transition from used to not used), and also dropped.
 
         A class of Pickups can incorporate many different types of pickups (see @ref orxonox::PickupIdentifier "PickupIdentifier"), each type is uniquely defined by a @ref orxonox::PickupIdentifier "PickupIdentifier". Each pickup has such an identifier identiying its type. This means that two pickups of the same type have identifiers which are equal.
 
     @author
         Damian 'Mozork' Frick
+
+    @ingroup Pickup
     */
     class _OrxonoxExport Pickupable : virtual public OrxonoxClass, public Rewardable
     {
@@ -69,7 +71,7 @@
             @brief Get whether the Pickupable is currently in use or not.
             @return Returns true if the Pickupable is currently in use.
             */
-            inline bool isUsed(void)
+            inline bool isUsed(void) const
                 { return this->used_; }
             /**
             @brief  Should be called when the Pickupable has transited from used to unused or the other way around.
@@ -93,7 +95,7 @@
             @brief Returns whether the Pickupable is currently picked up.
             @return Returns true if the Pickupable is currently picked up, false if not.
             */
-            inline bool isPickedUp(void)
+            inline bool isPickedUp(void) const
                 { return this->pickedUp_; }
             /**
             @brief  Should be called when the Pickupable has transited from picked up to dropped or the other way around.
@@ -105,14 +107,14 @@
             @brief Returns whether the Pickupable can be used.
             @return Returns true if it can be used.
             */
-            inline bool isUsable(void)
+            inline bool isUsable(void) const
                 { return this->enabled_; }
 
             /**
             @brief Returns whether the Pickupable can be unused.
             @return Returns true if it can be unused.
             */
-            inline bool isUnusable(void)
+            inline bool isUnusable(void) const
                 { return this->enabled_; }
 
             /**
@@ -120,13 +122,13 @@
                    Once a Pickupable is disabled it cannot be enabled again. A Pickupable that is disabled can neither be used nor unused.
             @return Returns true if the Pickupable is enabled.
             */
-            inline bool isEnabled(void)
+            inline bool isEnabled(void) const
                 { return this->enabled_; }
 
             bool pickup(PickupCarrier* carrier); //!< Can be called to pick up a Pickupable.
             bool drop(bool createSpawner = true); //!< Can be called to drop a Pickupable.
 
-            virtual bool isTarget(PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable.
+            virtual bool isTarget(const PickupCarrier* carrier) const; //!< Get whether the given PickupCarrier is a target of this Pickupable.
             bool isTarget(const Identifier* identifier) const; //!< Get whether a given class, represented by the input Identifier, is a target of this Pickupable.
             bool addTarget(PickupCarrier* target); //!< Add a PickupCarrier as target of this Pickupable.
             bool addTarget(Identifier* identifier); //!< Add a class, representetd by the input Identifier, as target of this Pickupable.
@@ -138,7 +140,7 @@
             @brief Get the PickupIdentifier of this Pickupable.
             @return Returns a pointer to the PickupIdentifier of this Pickupable.
             */
-            virtual const PickupIdentifier* getPickupIdentifier(void)
+            virtual const PickupIdentifier* getPickupIdentifier(void) const
                 { return this->pickupIdentifier_; }
 
             bool setUsed(bool used); //!< Sets the Pickupable to used or unused, depending on the input.

Modified: code/trunk/src/orxonox/items/Engine.cc
===================================================================
--- code/trunk/src/orxonox/items/Engine.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/items/Engine.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -247,12 +247,12 @@
             return Vector3::ZERO;
     }
 
-    PickupCarrier* Engine::getCarrierParent(void)
+    PickupCarrier* Engine::getCarrierParent(void) const
     {
         return this->ship_;
     }
 
-    const Vector3& Engine::getCarrierPosition(void)
+    const Vector3& Engine::getCarrierPosition(void) const
     {
         return this->ship_->getWorldPosition();
     }

Modified: code/trunk/src/orxonox/items/Engine.h
===================================================================
--- code/trunk/src/orxonox/items/Engine.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/items/Engine.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -111,7 +111,7 @@
 
             virtual const Vector3& getDirection() const;
 
-            virtual const Vector3& getCarrierPosition(void);
+            virtual const Vector3& getCarrierPosition(void) const;
 
             //TODO: Move to protected or private. How?
             inline void setSpeedAdd(float speedAdd)
@@ -120,9 +120,9 @@
                 { this->speedMultiply_=speedMultiply; }
 
         protected:
-            virtual std::vector<PickupCarrier*>* getCarrierChildren(void)
+            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
                 { return new std::vector<PickupCarrier*>(); }
-            virtual PickupCarrier* getCarrierParent(void);
+            virtual PickupCarrier* getCarrierParent(void) const;
 
         private:
             void registerVariables();

Modified: code/trunk/src/orxonox/pickup/PickupIdentifier.h
===================================================================
--- code/trunk/src/orxonox/pickup/PickupIdentifier.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/pickup/PickupIdentifier.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -56,8 +56,11 @@
         To that purpose this class provides functionality to compare two @ref orxonox::PickupIdentifier "PickupIdentifiers" (and since all @ref orxonox::Pickupable "Pickupables" have an identifier, we can use it to compare pickups). It als provides functionality to add parameters that distinguish between different types of pickups in the same pickup class.
 
         Lastly a struct (@ref orxonox::PickupIdentifierCompare "PickupIdentifierCompare") is provided that can be used in stl containers to establish a strictly lesser ordering between @ref orxonox::PickupIdentifier "PickupIdentifiers" (and thus @ref orxonox::Pickupable "Pickupables").
+
     @author
         Damian 'Mozork' Frick
+
+    @ingroup Pickup
     */
     class _OrxonoxExport PickupIdentifier : virtual public OrxonoxClass
     {

Modified: code/trunk/src/orxonox/worldentities/pawns/Pawn.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/worldentities/pawns/Pawn.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -127,7 +127,7 @@
             Vector3 getAimPosition()
                 { return this->aimPosition_; }
 
-            virtual const Vector3& getCarrierPosition(void)
+            virtual const Vector3& getCarrierPosition(void) const
                 { return this->getWorldPosition(); };
 
         protected:
@@ -143,9 +143,9 @@
 
             bool bAlive_;
 
-            virtual std::vector<PickupCarrier*>* getCarrierChildren(void)
+            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
                 { return new std::vector<PickupCarrier*>(); }
-            virtual PickupCarrier* getCarrierParent(void)
+            virtual PickupCarrier* getCarrierParent(void) const
                 { return NULL; }
 
             float health_;

Modified: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc	2010-10-16 10:37:09 UTC (rev 7547)
@@ -220,7 +220,7 @@
             engine->addToSpaceShip(this);
     }
 
-    std::vector<PickupCarrier*>* SpaceShip::getCarrierChildren(void)
+    std::vector<PickupCarrier*>* SpaceShip::getCarrierChildren(void) const
     {
         std::vector<PickupCarrier*>* list = new std::vector<PickupCarrier*>();
         list->push_back(this->engine_);

Modified: code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	2010-10-15 06:43:02 UTC (rev 7546)
+++ code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h	2010-10-16 10:37:09 UTC (rev 7547)
@@ -84,7 +84,7 @@
                 { return this->bPermanentBoost_; }
 
         protected:
-            virtual std::vector<PickupCarrier*>* getCarrierChildren(void);
+            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const;
             bool bInvertYAxis_;
 
             bool bBoost_;




More information about the Orxonox-commit mailing list