I've been plugging away at my mod and it's all coming along nice but have a couple of questions..
I have decent technical, but limited Java knowledge, which I'm using creating this mod to help me develop.
I'm trying to find somewhere to inject myself into the Surveying process in order to potentially add an additional possible find to interesting planets/conditions so I've created myself a SurveyPlugin Implementation which extends SurveyPluginImpl in order to create a modified getSurveyDataType, figuring it's less than an ideal place but I can call my own function before it returns and use the InteractionDialogAPI to deal with adding a notification. I see that this is called from the static addSurveyDataFor function (which would be better but isn't an option) in Misc using Global.getSettings().getNewPluginInstance("surveyPlugin");
Because of this new instancing my override for getSurveyDataType doesn't seem to be called rather the original is used.
Is there someplace I can set a new instance to use my own Implementation instead or perhaps a better place to do what I'm attempting?
I feel like there probably is a simple way using a CoreCampaignPlugin but I'm missing it.
My second Question seems so simple I must be an idiot not being able to find it myself, but I've created a couple of new commodities, these are not really designed to be sold on the market but used with my own nonsense, however I can't seem to find a way to create a new demand class for them, how would I do this? It looks a bit silly using an existing demand class as they're then price adjusted based on demand.