Jump to content

DlcManager.IsContentSubscribed() will break a lot of mods


SGT_Imalas
  • Branch: Preview Branch Version: Windows Fixed

The renaming of

DlcManager.IsContentSubscribed(string dlc_id)

to

DlcManager.IsContentSubscribed(string dlc_id)

will break all mods that call this function, ie. all mods that use a plib based mod config.

 

could you re-add a method with the old name (or revert the rename) so these mods don't break?

The old-name-method could simply call the new one and be marked as [Obsolete]

 


Steps to Reproduce

have a mod installed and enabled that calls this method.

notice a game crash when it is called by the mod (ie. on clicking a plib based config button in the mod menu)

(example mod where this is the case: https://steamcommunity.com/sharedfiles/filedetails/?id=2856555858)




User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Changed Status to Fixed

Checking if content is enabled/disabled now happens on SaveLoader as mentioned in the patch notes. IsContentEnabled is private and should not be called by mods. It might not be obvious if you're using Publicizer.

Quote
  • Content from loaded planet packs are filtered out of the Db when loading into a save without the DLC enabled.
    • To check if content is loaded: DlcManager.IsContentSubscribed
    • To check if content is available in a save: SaveLoader.Instance.IsDLCActiveForCurrentSave

An obsolete version of IsContentActive will be added in the next beta update to give mods time to transition to the new format. In most cases you'll want to replace it with a IsContentSubscribed.

Share this comment


Link to comment
Share on other sites

1 hour ago, EricKlei said:

IsContentEnabled is private and should not be called by mods

my bad, I forgot to adjust the method name in the post title.


Thanks!

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...