Soft Depend

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Soft Depend

by rubenwardy » Thu Aug 30, 2012 17:06

A kind of depend, that if the mod that is depended is not found, then the mod load is still done.

If the mod is found, then it loads it first

Maybe in a preload.txt file
 

wokste
Member
 
Posts: 78
Joined: Sat Feb 11, 2012 09:06

by wokste » Fri Aug 31, 2012 10:08

I think it could better be in depends.txt. Maybe:
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
default
moreores optional
We must be careful not to clone Notches mistakes.
 

User avatar
RabbiBob
Member
 
Posts: 335
Joined: Sat Jan 28, 2012 22:40

by RabbiBob » Fri Aug 31, 2012 11:15

Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Aug 31, 2012 11:38

You can do 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
minetest.after(0, function()
    .. your code here will be run after the game starts ..
end)
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Fri Aug 31, 2012 12:05

RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?


I want to load a mod before my mod, but not depend on it

cornernote wrote:You can do 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
minetest.after(0, function()
    .. your code here will be run after the game starts ..
end)


Thank you cornernote
 

ArchZombie
New member
 
Posts: 4
Joined: Sat Sep 08, 2012 17:03

by ArchZombie » Sat Sep 08, 2012 17:22

RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?

Sometimes if e.g., another mod has useful functionality that can be integrated with this mod, then you can load it first. But it may not be necessary for the mod to function.
Last edited by ArchZombie on Sat Sep 08, 2012 17:22, edited 1 time in total.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

by rubenwardy » Sun Sep 16, 2012 13:39

ArchZombie wrote:
RabbiBob wrote:Presumably you're using functionality from the mod you're depending on so your mod would be broken. If you're not using a piece of the other mod, then why depend on it?

I can't remember right now why I wanted to defer a load until a later time (i.e. load something else first), but maybe that's what you're wanting?

Sometimes if e.g., another mod has useful functionality that can be integrated with this mod, then you can load it first. But it may not be necessary for the mod to function.


Like mesecons in the carts mod.
Last edited by rubenwardy on Wed Apr 10, 2013 12:34, edited 1 time in total.
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 12 guests