Index: trunk/src/defs/class_id.h
===================================================================
--- trunk/src/defs/class_id.h	(revision 6653)
+++ trunk/src/defs/class_id.h	(revision 6655)
@@ -209,4 +209,5 @@
 
   CL_WEAPON_MANAGER             =    0x00000503,
+  CL_AMMO_CONTAINER             =    0x00000504,
   CL_HUD                        =    0x00000520,
 
Index: trunk/src/util/loading/resource_manager.cc
===================================================================
--- trunk/src/util/loading/resource_manager.cc	(revision 6653)
+++ trunk/src/util/loading/resource_manager.cc	(revision 6655)
@@ -22,4 +22,5 @@
 
 #include <algorithm>
+#include <assert.h>
 
 // different resource Types
Index: trunk/src/world_entities/Makefile.am
===================================================================
--- trunk/src/world_entities/Makefile.am	(revision 6653)
+++ trunk/src/world_entities/Makefile.am	(revision 6655)
@@ -27,4 +27,5 @@
                   \
                   world_entities/weapons/weapon_manager.cc \
+                  world_entities/weapons/ammo_container.cc \
                   world_entities/weapons/weapon.cc \
                   world_entities/weapons/test_gun.cc \
@@ -79,4 +80,5 @@
                  \
                  world_entities/weapons/weapon_manager.h \
+                 world_entities/weapons/ammo_container.h \
                  world_entities/weapons/weapon.h \
                  world_entities/weapons/test_gun.h \
Index: trunk/src/world_entities/items/item_container.cc
===================================================================
--- trunk/src/world_entities/items/item_container.cc	(revision 6655)
+++ trunk/src/world_entities/items/item_container.cc	(revision 6655)
@@ -0,0 +1,50 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "item_container.h"
+
+using namespace std;
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+ItemContainer::ItemContainer ()
+{
+   this->setClassID(CL_ITEM_CONTAINER, "ItemContainer");
+
+   /* If you make a new class, what is most probably the case when you write this file
+      don't forget to:
+       1. Add the new file new_class.cc to the ./src/Makefile.am
+       2. Add the class identifier to ./src/class_id.h eg. CL_NEW_CLASS
+
+      Advanced Topics:
+      - if you want to let your object be managed via the ObjectManager make sure to read
+        the object_manager.h header comments. You will use this most certanly only if you
+        make many objects of your class, like a weapon bullet.
+   */
+}
+
+
+/**
+ * standard deconstructor
+*/
+ItemContainer::~ItemContainer ()
+{
+  // delete what has to be deleted here
+}
Index: trunk/src/world_entities/items/item_container.h
===================================================================
--- trunk/src/world_entities/items/item_container.h	(revision 6655)
+++ trunk/src/world_entities/items/item_container.h	(revision 6655)
@@ -0,0 +1,27 @@
+/*!
+ * @file item_container.h
+ * @brief Definition of a Container for Items one can pick up
+ */
+
+#ifndef _ITEM_CONTAINER_H
+#define _ITEM_CONTAINER_H
+
+#include "base_object.h"
+
+// FORWARD DECLARATION
+
+
+
+//! A class for storing collected Items.
+class ItemContainer : public BaseObject {
+
+ public:
+  ItemContainer();
+  virtual ~ItemContainer();
+
+
+ private:
+
+};
+
+#endif /* _ITEM_CONTAINER_H */
Index: trunk/src/world_entities/projectiles/laser.cc
===================================================================
--- trunk/src/world_entities/projectiles/laser.cc	(revision 6653)
+++ trunk/src/world_entities/projectiles/laser.cc	(revision 6655)
@@ -17,4 +17,6 @@
 
 #include "laser.h"
+#include <assert.h>
+
 
 #include "fast_factory.h"
@@ -26,4 +28,5 @@
 #include "particle_emitter.h"
 #include "sprite_particles.h"
+
 
 
Index: trunk/src/world_entities/weapons/ammo_container.cc
===================================================================
--- trunk/src/world_entities/weapons/ammo_container.cc	(revision 6655)
+++ trunk/src/world_entities/weapons/ammo_container.cc	(revision 6655)
@@ -0,0 +1,91 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Benjamin Grauer
+   co-programmer: ...
+*/
+
+//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
+
+#include "ammo_container.h"
+
+#include "weapon.h"
+
+#include <assert.h>
+
+using namespace std;
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+AmmoContainer::AmmoContainer (ClassID projectileType, float maxEnergy)
+{
+   this->setClassID(CL_AMMO_CONTAINER, "AmmoContainer");
+
+
+}
+
+
+/**
+ * standard deconstructor
+*/
+AmmoContainer::~AmmoContainer ()
+{
+  // delete what has to be deleted here
+}
+
+
+
+float AmmoContainer::increaseEnergy(float energy)
+{
+  this->energy += energy;
+
+  if (unlikely(this->energy > this->maxEnergy))
+  {
+    float retEnergy = this->energy - this->maxEnergy;
+    this->energy = this->maxEnergy;
+    return retEnergy;
+  }
+  else
+    return 0.0f;
+}
+
+
+float AmmoContainer::decreaseEnergy(float energy)
+{
+  this->energy -= energy;
+
+  if (unlikely(this->energy < 0))
+  {
+    float retEnergy = 0 - this->energy;
+    this->energy = 0;
+    return retEnergy;
+  }
+  else
+    return 0.0f;
+}
+
+bool AmmoContainer::weaponValid(const Weapon* weapon)
+{
+  return (weapon->isA(this->projectileType));
+}
+
+
+void AmmoContainer::fillWeapon(Weapon* weapon)
+{
+  assert (weapon != NULL);
+
+  float fillEnergy = weapon->getEnergyMax();
+
+  float restEnergy = weapon->increaseEnergy(fillEnergy);
+  this->decreaseEnergy(fillEnergy - restEnergy);
+}
Index: trunk/src/world_entities/weapons/ammo_container.h
===================================================================
--- trunk/src/world_entities/weapons/ammo_container.h	(revision 6655)
+++ trunk/src/world_entities/weapons/ammo_container.h	(revision 6655)
@@ -0,0 +1,45 @@
+/*!
+ * @file proto_class.h
+ * @brief Definition of ...
+*/
+
+#ifndef _AMMO_CONTAINER_H
+#define _AMMO_CONTAINER_H
+
+#include "base_object.h"
+
+
+// FORWARD DECLARATION
+class Weapon;
+
+#define DEFAULT_MAX_ENERGY 100
+
+//! A class for Storing energy of Projectiles.
+class AmmoContainer : public BaseObject {
+
+ public:
+  AmmoContainer(ClassID projectileType, float maxEnergy = DEFAULT_MAX_ENERGY);
+  virtual ~AmmoContainer();
+
+  ClassID getProjectileType() const { return this->projectileType; };
+
+
+  float increaseEnergy(float energy);
+  float decreaseEnergy(float energy);
+
+  float getMaxEnergy() const { return this->maxEnergy; };
+
+  void increaseMaxEnergy(float increase);
+
+  bool weaponValid(const Weapon* weapon);
+  void fillWeapon(Weapon* weapon);
+
+
+ private:
+   float  energy;
+   float  maxEnergy;
+
+   ClassID projectileType;
+};
+
+#endif /* _AMMO_CONTAINER_H */
