GalloViking Posted May 17, 2022 Share Posted May 17, 2022 Heya folks, I'm at a loss here. I am trying to make a mod that adds "trading" recipes to buy and sell items with a ham radio. Problem is, I want to make it compatible with brita's for buying/selling their ammo and I don't know how to hide those recipes when the mod is not activated, through the use of Obsolete potentially. I know how to use getActivatedMods():contains("insertmodhere") but it only works in .lua, not .txt. An easy solution would be to make a patch for brita's weapons, but as I add more recipes for other mods, I'll end up with dozens of patches and I'd rather not. Link to comment Share on other sites More sharing options...
Xyberviri Posted June 3, 2022 Share Posted June 3, 2022 Just make the recipe invalid if the mod isnt installed: module MyModID { imports { Base } recipe Buy AN/PRC-77 Radio Man Pack { Money=1, Result: Bag_ARVN_Rucksack, Time: 50.0, OnCanPerform:Recipe.OnCanPerform.CanBuyFromBritaArmor } } function Recipe.OnCanPerform.CanBuyFromBritaArmor(recipe, playerObj, item) return getActivatedMods():contains("Brita2") end Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now