Index: /code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc
===================================================================
--- /code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11552)
+++ /code/branches/AsteroidMining_HS17/src/modules/asteroidmining/AsteroidMinable.cc	(revision 11553)
@@ -50,5 +50,16 @@
 - Neue Asteroiden generieren -> Absturz
 - Pickup spawning -> Absturz
+
+o hat's mit den Context-Eingenschaften zu tun? Je einen Neuen/Aktuellen besorgen? 
+
+Nicht Pointer uebergeben?
 - Manchmal: Absturz bei Zerstoerung eines Asteroiden
+- Was tut 'Register Variables'?
+
+o Error messages: change context::pickups to something else
+
+
+OFFEN: 
+o Add custom pickup 'resources' 
 
 
@@ -85,4 +96,5 @@
 #include "../pickup/PickupSpawner.h"
 #include "../pickup/Pickup.h"
+//#include "../pickup/pickup ..... pickupable
 #include "../objects/collisionshapes/SphereCollisionShape.h"
 #include "../../orxonox/graphics/Model.h"
@@ -119,8 +131,17 @@
 
 
+
+
+
+
+
+
+
         // DELETE if other stuff works! (wrong size etc.)
         SphereCollisionShape* cs = new SphereCollisionShape(this->context);
         cs->setRadius((this->size)*2); //OFFEN: Feinabstimmung der Radien 
         this->attachCollisionShape(cs); 
+
+
 
 
@@ -154,7 +175,6 @@
         // Collision shape
         SphereCollisionShape* cs = new SphereCollisionShape(this->context);
-        cs->setRadius((this->size)*2); //OFFEN: Feinabstimmung der Radien 
+        cs->setRadius((this->size)*2); //OFFEN: Feinabstimmung der Radien. 2.5 in AsteroidField.lua
         this->attachCollisionShape(cs); 
-
 
 
@@ -186,4 +206,14 @@
         registerVariable(this->size, VariableDirection::ToClient);
         registerVariable(this->generateSmaller, VariableDirection::ToClient);
+
+        registerVariable(this->initialised, VariableDirection::ToClient);
+        //registerVariable(this->context, VariableDirection::ToClient); // can't link that since it's a context
+
+
+            //         float size;
+            // bool generateSmaller;
+            // bool initialised;
+
+            // Context* context;
     }
 
@@ -211,20 +241,45 @@
 
 
-
-
-        //Spawn Pickup
+        //Spawn Pickup // Create at start already? ( Hidden in CollisionShape)
         HealthPickup* hP = new HealthPickup(this->context);
+        if(hP == nullptr){
+            orxout(internal_error, context::pickups) << "Weird, can't create new HealthPickup." << endl;
+        }
+        // hP->setPosition(this->getPosition()); // Does not have a member named 'setPosition' (Inherits from Pickup//BAse Object)
+
+        // invoke spawnPickup on the pikcup itself? (returns bool, creates the hideous thing)
+        // HealthPickup inherits from Pickup. 
+        // createSpawner is protected ->can be used as well in inheriting classes, but not here!
+        // bool unnecessary = hP->createSpawner();
+        // hP->setPosition(this->getPosition());
         //OFFEN: Add custom pickup 'resources' 
-        PickupSpawner* thingy = new PickupSpawner(this->context);
-        thingy->setPosition(this->getPosition());
-        thingy->createDroppedPickup(this->context, hP, nullptr, 10);
-
+
+        // createPickup is private, hP is of type Pickup!
+        // CreateDroppedPickup returns a PickupSpawner! 
+        // PickupSpawner don't have public set methods, just that ugly 'factory method' which returns another PickupSpawner
+        // PickupSpawner* thingy = new PickupSpawner(this->context); 
+        // What is Pickupable? says: Interface, no way to set type. Why do I even need the spawner? Trigger Distance?
+        
+
+        // Plan: Solve the Pickupable mystery, try to adapt the spawner somehow. Ask to modify it if that fails. (Change method types)
+
+
+        // PickupSpawner* thingy = (new PickupSpawner(this->context))->createDroppedPickup(this->context, hP, nullptr, 10);
 //    /*static*/ PickupSpawner* PickupSpawner::createDroppedPickup(Context* context, Pickupable* pickup, PickupCarrier* carrier, float triggerDistance)
+
+
+
+        // if(thingy == nullptr){
+        //     orxout(internal_error, context::pickups) << "Weird, can't create new PickupSpawner." << endl;
+        // }
+        // thingy->setPosition(this->getPosition());
+        // thingy->setMaxSpawnedItems(1);//Default is 1 already, private anyways
+        
    
 
-        // Smaller Parts
-        if(this->generateSmaller){
-            this->spawnChildren();
-        }
+        // // Smaller Parts
+        // if(this->generateSmaller){
+        //     this->spawnChildren();
+        // }
 
 
@@ -271,11 +326,21 @@
         //Spawn this child  Game crashes!
         AsteroidMinable* child = new AsteroidMinable(this->context);
-        child->setSize(extra + 1);
-            
-        //OFFEN:Kollision der Kinder verhindern
-        //Relativ zu Elternteil automatisch?
-        //Typ position:rand()*Vektoriwas?
-        //pawn->getWorldPosition() + Vector3(30,0,-30);
-        child->setPosition(this->getPosition() + Vector3(num*5, 0, 0));
+        // if(!(child == nullptr)){//Errorgebastel
+
+
+
+            if(child == nullptr){
+                orxout(internal_error, context::pickups) << "Weird, can't create new AsteroidMinable." << endl;
+            }
+
+            child->setSize(extra + 1);
+                
+            //OFFEN:Kollision der Kinder verhindern
+            //Relativ zu Elternteil automatisch?
+            //Typ position:rand()*Vektoriwas?
+            //pawn->getWorldPosition() + Vector3(30,0,-30);
+            child->setPosition(this->getPosition() + Vector3(num*5, 0, 0));
+
+        // }
 
 
