Food>Diet/Hud>MTfoods>Food Depends Loop

MTDad
Member
 
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Food>Diet/Hud>MTfoods>Food Depends Loop

by MTDad » Sat Sep 27, 2014 18:44

I can't find in a search where this was discussed, only the hud topic touches on a similar problem, so I'm asking here if anyone has found a solution. My head hurts from trying.

-food requires diet and or hud to run first. diet requires hud first. no problem there.
-hud/diet require mt foods to run first, or mtfoods won't register with those mods.
-mtfoods requires food to run first so it can utilize the food groups.
-Minetest doesn't seem to be able to resolve the loop, and the mods don't load.

Leave out mtfoods, everythings fine, leave out hud and diet and everything's fine, leave out food and everything is fine (mt foods just won't be able to utilize the range of food sources that food covers).

For now I'm planning on removing the food mod support from mtfoods and editing in the appropriate ingredients for my games so mtfoods can load first.

Anyone come up with a better solution?
 

User avatar
Krock
Member
 
Posts: 3598
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by Krock » Sat Sep 27, 2014 20:31

It's impossible to get a proper soulation. You'll have to disable one of them.
Newest Win32 builds - Find a mod - All my mods
ALL YOUR DONATION ARE BELONG TO PARAMAT (Please support him and Minetest)
New DuckDuckGo !bang: !mtmod <keyword here>
 

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

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by rubenwardy » Sat Sep 27, 2014 20:48

Remove food from the depends of mtfood. It shouldn't be there.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by Wuzzy » Sat Sep 27, 2014 21:01

Oh, Krock, don’t say the word “impossible”.

Maybe you should inform the modders of this problem.

But I can’t see the cyclic dependency here. According to the depends.txt files or the respective threads:

food has an optional dependency on diet and on mtfoods.
diet has no dependencies at all.
hud depends on default.
mtfoods depends on many mods, but none of the above.

Where exactly is the cycle?

@rubenwardy: If your solution works, this change should directly go upstream to mtfoods.
 

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

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by rubenwardy » Sat Sep 27, 2014 21:04

Diet optionally depends on HUD.

An Optional dependency just means that an error is not thrown when the mod it is depending on in is not present. If the mod is present then it must be loaded before the depending mod.

I am the creator of the Food and Diet mods.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by Wuzzy » Sat Sep 27, 2014 21:14

Sorry, I still don’t get it.

Where and why exactly is there a dependency circle? Someone please explain it to me. :-(

And yes, I already know what an optional dependency is.
 

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

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by rubenwardy » Sat Sep 27, 2014 21:24

Food on HUD
HUD on mtfoods
Mtfoods on food.


Or

Food on diet
Diet on mtfoods
Mtfoods on food.
 

MTDad
Member
 
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by MTDad » Sat Sep 27, 2014 22:04

yup, like Ruben puts it and I tried to explain. Its a circle.

problem with removing mtfoods dependency, is then the game errors, as mtfoods attempts to "index global 'food' (a nil value)". Would have to actually remove/change part of mtfoods code to make that work, which I guess I will have to in my local copy.

Thanks for the input.
 

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

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by rubenwardy » Sat Sep 27, 2014 22:07

I will fix this tomorrow.
 

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

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by rubenwardy » Mon Sep 29, 2014 17:58

This has been fixed in Food, and a pull request has been made to mtfoods.

Get the latest version of Food.

Get the fixed version of mtfoods from here: https://github.com/rubenwardy/mtfoods/
Last edited by rubenwardy on Mon Sep 29, 2014 19:30, edited 1 time in total.
 

User avatar
Wuzzy
Member
 
Posts: 2161
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by Wuzzy » Mon Sep 29, 2014 19:27

Great!
 

MTDad
Member
 
Posts: 53
Joined: Fri Aug 29, 2014 05:38

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by MTDad » Mon Sep 29, 2014 21:50

Excellent!
Ruben, thank you!
 

User avatar
philipbenr
Member
 
Posts: 1665
Joined: Fri Jun 14, 2013 01:56
GitHub: philipbenr
IRC: philipbenr
In-game: WisdomFire or philipbenr

Re: Food>Diet/Hud>MTfoods>Food Depends Loop

by philipbenr » Mon Sep 29, 2014 23:48

@Ruben: Pull request merged. Mtfoods should be fixed now.
 


Return to Modding Discussion

Who is online

Users browsing this forum: No registered users and 10 guests

cron