CKAN
CKAN copied to clipboard
Preliminary support for Factorio
Motivation
In #3223 we tried to separate KSP1-specific logic from generic core logic in preparation for KSP2, see #2863.
However, just having tried to make those changes doesn't exercise the code robustly the way that an actual additional game would. The more bugs we find before KSP2 comes out, the better.
Background
This PR builds upon the fixes in #3308.
The CFAN project is a fork of CKAN that was customized for Factorio. It was started quite a long time ago, and it was last updated around the time TLS1.2 became mandatory on GitHub (early 2018).
CFAN unfortunately defined its own .cfan
file format rather than using .ckan
, but it kind of makes sense because Factorio itself defines a fairly robust core mod metadata format that all its mods apparently use, so CFAN piggybacked on that and added some of its own fields.
Changes
- Now the elements of CFAN that are specific to Factorio are added to a new
Core/Games/Factorio.cs
class, which is added to the list of known games. This means if you click to add a game instance to CKAN, a Factorio folder can now be selected and will work. We use CFAN's metadata repository to populate Factorio instances. - The repo update code now scans for
.cfan
files and translates them toCkanModule
format.
No changes are made to Netkan yet.
@trakos, is it correct that CFAN's metadata is no longer being updated? The compatible game versions look outdated by a few releases.
@HebaruSan yes, it's true, there were some changes in factorio's mod portal APIs and netfan updates stopped working. Since no-one reported it, I've assumed users moved on to using game's built-in mod installation (it improved in the meantime).
Anyway, I could probably get it fixed if you want to test ckan's multi-game capability on it.
I fixed a couple things in netfan, it's non-empty now, though there are still some things lacking for now.
Gonna split the fixes into a separate PR, then hopefully we can look at releasing v1.30.0...
The first commit looks pretty good. Got a bit caught up in all the other stuff. I'll give it one last test run, then you can merge that commit in separately, if you want without extra PR.
I'll create the new PR. That way it will be easier to see what is and is not in the master branch and why. (And I will not have to confront the question of how to update the change log without a pull request number.)
Let's not do this. KSP 2 will be out soon anyway.