GetPrimaryModCount();
GetPrimaryModName();
UnitSync is not checking game's dependencies, isn't it ?
For example: if we have downloaded BA Chicken Defense but haven't downloaded Balanced Annihilation.
UnitSync :: Game Dependencies
Moderators: Moderators, Lobby Developers
Re: UnitSync :: Game Dependencies
I suggest you read the doxygen comments again and explain in detail what you didn't understand or what your actual problem is.
https://raw.github.com/spring/spring/de ... sync_api.h
https://raw.github.com/spring/spring/de ... sync_api.h
Re: UnitSync :: Game Dependencies
When we build avialable game list, we using GetPrimaryModCount / GetPrimaryModName. And that function return that we have BA chicken defense, for example. But for runing that game we need BA itself. What is the best way to get game dependencies in that case?
Re: UnitSync :: Game Dependencies
unitsync currently offers no function to detect dependencies, when the file isn't available.
on http://api.springfiles.com, i solved that by parsing modinfo.lua / mapinfo.lua. not a clean solution, but works fine for the moment.
https://github.com/springfiles/upq/blob ... ta.py#L390
i don't know, if it worked with an old version of unitsync to get the depends or if it broke at some version. :-/
the problem was, spring could be run without all depends, now it enforces it, and maybe that is the cause, why it gets not listed with GetPrimaryModCount / GetPrimaryModName. see https://github.com/spring/spring/commit ... 9216f22245
afaik, GetNextError() should be non-empty after calling AddAllArchives() when a depends is missing.
so: currently the cleanest way is to check depends is before / while downloading. (plasma/springfiles api/rapid have depends)
i made a bug-report: http://springrts.com/mantis/view.php?id=3000
and yes, this code/api really needs a cleanup!
Note: GetPrimaryModName is deprecated...
on http://api.springfiles.com, i solved that by parsing modinfo.lua / mapinfo.lua. not a clean solution, but works fine for the moment.
https://github.com/springfiles/upq/blob ... ta.py#L390
i don't know, if it worked with an old version of unitsync to get the depends or if it broke at some version. :-/
the problem was, spring could be run without all depends, now it enforces it, and maybe that is the cause, why it gets not listed with GetPrimaryModCount / GetPrimaryModName. see https://github.com/spring/spring/commit ... 9216f22245
afaik, GetNextError() should be non-empty after calling AddAllArchives() when a depends is missing.
so: currently the cleanest way is to check depends is before / while downloading. (plasma/springfiles api/rapid have depends)
i made a bug-report: http://springrts.com/mantis/view.php?id=3000
and yes, this code/api really needs a cleanup!
Note: GetPrimaryModName is deprecated...
Re: UnitSync :: Game Dependencies
Thanks, Abma.
May be add to UnitSync GetModDependeciesCount/GetModDependecie?
P.S. I replace GetPrimaryModName with GetPrimaryModInfoCount/GetInfo...
May be add to UnitSync GetModDependeciesCount/GetModDependecie?
P.S. I replace GetPrimaryModName with GetPrimaryModInfoCount/GetInfo...