Jump to content

How to check if an other mod is loaded ?


Recommended Posts

I have 2 mods.

- Mod 1 adds a prefab,

- Mod 2 adds new rooms.

I'd like to make the mod2 detect if the mod1 is enabled and use different rooms in that case.

Something like:

if GLOBAL.Prefabs["mod1_prefab"] then
    print("Mod 1 detected !") 
    modimport("scripts/map/rooms/mod2_rooms")
else
    modimport("scripts/map/rooms/normal_rooms")
end

 

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
 Share

×
  • Create New...