Can anyone tell me any mod using MagicIncompatibleHullmod?
I want to see how it should work.
Don't have a clean example to refer you too, but its super-easy to implement.
You add code to your applyEffectsBeforeShipCreation like this:
if(stats.getVariant().getHullMods().contains("swp_shieldbypass")){
MagicIncompatibleHullmods.removeHullmodWithWarning(stats.getVariant(), "swp_shieldbypass", "CBCC_shieldscaling");
}
In my example:
1. applyEffectsBeforeShipCreation runs every time you add a hullmod to a ship, so this check occurs whenever you change something
2. If the mod with ID "swp_shieldbypass" is present, the IF triggers
3. 'MagicIncompatibleHullmods.removeHullmodWithWarning' removes "swp_shieldbypass" and replaces it with a dummy warning mod that specifies "CBCC_shieldscaling" as the reason, so these two mods can never be present together.
This is how it works as far as I know.