Custom Asteroids

Custom Asteroids

21.6k Downloads

Ore drills do not work in Custom Asteroids without Community Resource Pack

Starstrider42 opened this issue ยท 0 comments

commented

Description

dprostock reported that ore drills do not work if Custom Asteroids is installed. Attempts to reproduce led to the discovery that the drilling code (and only the drilling code) crashes if the asteroid has a ModuleAsteroidResource block with unknown resources.

To Reproduce
Steps to reproduce the behavior:

  1. Start a sandbox game of KSP

  2. Run time forward until asteroids spawn

  3. Create a ship equipped with an Advanced Grabbing Unit, a stock ore drill, and an ore storage tank

  4. Launch the ship, press Alt+F12, select "Cheats/Set Orbit" from the menu, and select a rendezvous with an asteroid

  5. Dock with the asteroid, deploy the drill, and tell it to start harvesting.

  6. The drill runs, but no ore is mined, nor does the drill heat up. The log is filled with messages like:

     [ERR 14:06:12.749] [RESOURCES] - Error in - BaseConverter_GetDeltaTime - System.NullReferenceException: Object reference not set to an instance of an object
       at ModuleAsteroidDrill.PrepareRecipe (System.Double deltaTime) [0x0038d] in <55ba45dc3a43403382024deac8dcd0be>:0 
       at BaseConverter.GetBestDeltaTime (System.Double deltaTime) [0x00000] in <55ba45dc3a43403382024deac8dcd0be>:0 
       at BaseConverter.GetDeltaTime () [0x000d5] in <55ba45dc3a43403382024deac8dcd0be>:0 
    

Background Info

  • Operating System: Windows
  • KSP Version 1.9.1
  • Custom Asteroids Version: dev build built against 1.9.1
  • Community Resource Pack must not be installed -- installing it and reloading the save game described above fixes the problem.