Jump to content

Recommended Posts

Is it possible for one mod to check if another is enabled?  I'm working to make my mod combatable with the skin API mod an figured if I could tell when it was/wasn't enabled I could adjust my code accordingly, ensuring the skin options are always available.

11 hours ago, FurryEskimo said:

Is it possible for one mod to check if another is enabled?  I'm working to make my mod combatable with the skin API mod an figured if I could tell when it was/wasn't enabled I could adjust my code accordingly, ensuring the skin options are always available.

Coincidentally, I just finished it

local modID = "workshop-2812783478"
if GLOBAL.KnownModIndex:IsModEnabled(modID) then
    print("Mod with ID " .. modID .. " is enabled.")
else
    print("Mod with ID " .. modID .. " is not enabled.")
end
  • Like 1

Great, thanks.  I wrote it like this and didn't have an issue, but please feel free to let me know if I did something incorrectly:

if not GLOBAL.KnownModIndex:IsModEnabled("workshop-2812783478") then
	--Old code.
end

 

Edited by FurryEskimo

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...