Index: code/branches/AsteroidMining_HS17/data/levels/AsteroidFarming.oxw
===================================================================
--- code/branches/AsteroidMining_HS17/data/levels/AsteroidFarming.oxw	(revision 11508)
+++ code/branches/AsteroidMining_HS17/data/levels/AsteroidFarming.oxw	(revision 11520)
@@ -76,4 +76,5 @@
           <visibility>
             <EventListener event="flying4" />
+
           </visibility>
         </events>
@@ -84,6 +85,10 @@
             <BoxCollisionShape position="0,0,0" halfExtents="15,15,15" />
         </collisionShapes>
+    </Pawn>
 
-    </Pawn>
+
+    <!-----AsteroidMinable --->
+
+    <AsteroidMinable size=5 position="0,-500,0" />
 
     
Index: code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.cc
===================================================================
--- code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.cc	(revision 11508)
+++ code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.cc	(revision 11520)
@@ -66,4 +66,7 @@
 
 #include "controllers/FormationController.h"
+#include "pickup/items/HealthPickup.h"
+#include "pickup/PickupSpawner.h"
+#include "pickup/Pickup.h"
 
 namespace orxonox
@@ -74,20 +77,14 @@
     {
         RegisterObject(AsteroidMinable);
-
-        this->bAlive_ = true;
-        this->bVulnerable_ = true;
-
-        this->health_ = 0;
-        this->maxHealth_ = 0;
-        this->initialHealth_ = 0;
-
-        this->damageMultiplier_ = 1;
-
-        this->spawnparticleduration_ = 3.0f;
-
-        this->aimPosition_ = Vector3::ZERO;
-
-        this->setRadarObjectColour(ColourValue::Yellow);
+        this->setRadarObjectColour(ColourValue(1.0f, 1.0f, 0.0f, 1.0f));
         this->setRadarObjectShape(RadarViewable::Shape::Dot);
+
+        this->size = 5;
+        this->context = context;
+
+
+
+        //      <Model position="0,-40,40" yaw="90" pitch="-90" roll="0" scale="4" mesh="ast6.mesh" />
+
  
     }
@@ -101,4 +98,7 @@
     {
         SUPER(AsteroidMinable, XMLPort, xmlelement, mode);
+        //        XMLPortParam(PickupSpawner, "pickup", setPickupTemplateName, getPickupTemplateName, xmlelement, mode);
+        XMLPortParam(AsteroidMinable, "size", setSize,getSize, xmlelement, mode);
+
     }
 
@@ -107,5 +107,5 @@
         SUPER(AsteroidMinable, XMLEventPort, xmlelement, mode);
 
-        XMLPortEventState(AsteroidMinable, BaseObject, "vulnerability", setVulnerable, xmlelement, mode);
+        //XMLPortEventState(AsteroidMinable, BaseObject, "vulnerability", setVulnerable, xmlelement, mode);
     }
 
@@ -124,7 +124,33 @@
     }
 
+    void AsteroidMinable::setSize(float s){
+        this->size = s;
+        this->health_ = 200*s;
+    }
+
+    float AsteroidMinable::getSize(){
+        return this->size;
+    }
+
     void AsteroidMinable::death() //ueberschreiben
     {
         this->setHealth(1);
+
+
+
+        // Spawn Pickup
+        HealthPickup* hP = new HealthPickup(context);
+        //OFFEN: Add custom pickup 'resources' 
+        PickupSpawner* thingy = new PickupSpawner(context);
+        thingy->createDroppedPickup(context, hP, nullptr, 10);
+//    /*static*/ PickupSpawner* PickupSpawner::createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance)
+   
+
+
+
+        this->spawnChildren();
+
+
+
         if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
         {
@@ -138,5 +164,36 @@
     }
 
+
+void AsteroidMinable::spawnChildren(){
+    // Spawn smaller Children
+    int massRem = this->size-1; //some mass is lost
+    int num = round(massRem*rand()); // random number of children
+    massRem = massRem-num;
+    int extra = 0;
+    for(int fisch=num; fisch>=1; fisch++){
+        // to distribute remaining mass
+        if(fisch==1){ 
+            extra = massRem;
+        }else{
+            extra = round(massRem*rand());
+            massRem = massRem-extra;
+        }
+        //Spawn this child
+        AsteroidMinable* child = new AsteroidMinable(context);
+        child->setSize(extra + 1);
+            
+        //OFFEN:Kollision der Kinder verhindern
+        //Relativ zu Elternteil automatisch?
+        //Typ position:rand()*Vektoriwas?
+        child->setPosition(this->getCarrierPosition());
+    }
 }
+
+
+
+
+}
+
+
 
 
Index: code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.h
===================================================================
--- code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.h	(revision 11508)
+++ code/branches/AsteroidMining_HS17/src/orxonox/worldentities/pawns/AsteroidMinable.h	(revision 11520)
@@ -53,4 +53,10 @@
             virtual ~AsteroidMinable();
             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
+            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
+            virtual void tick(float dt) override;
+
+            virtual void setSize(float f);
+            virtual float getSize();
+
 
         protected:
@@ -58,8 +64,15 @@
             float asteroidVersion; // Bodenstrich-Konvention?, 
             // Wert zwischen 1 und 6 (Spezialdinger?), die Mesh-Form
-            float asteroidSize;
+            float size;
             bool generateSmaller;
+            virtual void death();
+
+
 
         private:
+            void registerVariables();
+            virtual void spawnChildren();
+
+            Context* context;
 
 
