Jump to content

ScienceData changes in 1.0.5


Recommended Posts

I'm trying to update Impact to KSP 1.0.5, which is challenging because of the changes to the science system.  There's the new ReturnData method, for one thing, but it seems like the ScienceData class itself has a couple of new members -- a boolean, and part.flightID.  What's the boolean do? (This would be great to add to the Anatid API.)

Also, are there any other changes to ScienceData flying around?

Link to comment
Share on other sites

The bool, Triggered, is used by the science lab and resource scanner. It signals the R&D system to not treat it like normal science and to trigger a callback method upon transmission completion. There is a GameEvent, OnTriggeredDataTransmission that can be used to invoke these methods.

The uint is the part id used by the new transmission interrupt system. When creating new ScienceData you add the Part.flightID number to the science data, the transmitter can then use that ID to return the data to its original location if transmission fails. The id gets changed whenever you transfer data to a new container (at least when using the stock mechanisms to do so).

I don't think anything else has changed about ScienceData. The IScienceDataContainer interface has a new method ReturnData, used by the transmission failure mechanism. If this method isn't added to a class implementing that interface it won't work; old mods that implement the interface won't work at all.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...