CKAN icon indicating copy to clipboard operation
CKAN copied to clipboard

Preliminary support for Factorio

Open HebaruSan opened this issue 3 years ago • 6 comments

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 to CkanModule format.

No changes are made to Netkan yet.

HebaruSan avatar Jan 13 '21 06:01 HebaruSan

@trakos, is it correct that CFAN's metadata is no longer being updated? The compatible game versions look outdated by a few releases.

HebaruSan avatar Jan 13 '21 06:01 HebaruSan

@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.

trakos avatar Jan 15 '21 03:01 trakos

I fixed a couple things in netfan, it's non-empty now, though there are still some things lacking for now.

trakos avatar Jan 18 '21 08:01 trakos

Gonna split the fixes into a separate PR, then hopefully we can look at releasing v1.30.0...

HebaruSan avatar Mar 05 '21 21:03 HebaruSan

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.

DasSkelett avatar Mar 05 '21 21:03 DasSkelett

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.)

HebaruSan avatar Mar 05 '21 21:03 HebaruSan

Let's not do this. KSP 2 will be out soon anyway.

HebaruSan avatar Feb 18 '23 22:02 HebaruSan