Blacklist and Whitlist for mods depends

User avatar
mahmutelmas06
Member
 
Posts: 355
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Blacklist and Whitlist for mods depends

by mahmutelmas06 » Sat Dec 10, 2016 10:55

Mods and subgames should have a blacklist.txt

non other mods would be enabled even if installed. Or a message will be showen to player to disable it.

For example if there is bakedclay mod installed it can blacklist the same mod like hardenedclay
or it can disable any mod which brokes the mod itself.
My Mods:

Beverage
 

User avatar
MineYoshi
Member
 
Posts: 4267
Joined: Wed Jul 08, 2015 13:20
GitHub: MineYosh
IRC: MineYoshi
In-game: Kirby_Retro

Re: Blacklist and Whitlist for mods depends

by MineYoshi » Sat Dec 10, 2016 19:40

You can make the mod don't execute if there is a "incompatibility_mod" with this.

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if not ( minetest.get_modpath("incompatibility_mod")) then
dofile(minetest.get_modpath("Your_mod").."/code.lua")
end


If the folder of the "incompatibility_mod" is finded, the mod won't execute the code that is the mod itself.
You put this at init.lua, but i don't know how to disable the init.lua of the "incompatibility_mod" if finded. This is by far i solution i can do. :)
People talk about freedom of speech, so i'll say that God exists.
Open your eyes!! See The big unicorn conspiracy.!! :D The government has been lying to us about unicorns!!
"I've learned there are three things you don't discuss with people: religion, politics and the Great Pumpkin" - Linus Van Pelt
I'm the Officially 1st ABJist in the world ( ͡° ͜ʖ ͡°)
 

cheapie
Member
 
Posts: 304
Joined: Mon May 14, 2012 00:59
GitHub: cheapie
IRC: cheapie
In-game: cheapie

Re: Blacklist and Whitlist for mods depends

by cheapie » Thu Dec 15, 2016 18:05

You could try this:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
if minetest.get_modpath("technic") then
     error("mymod and technic are not compatible. Please disable technic and try again.")
end
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 30 guests

cron