Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factorio 2.0 / Space Age #320

Merged
merged 31 commits into from
Oct 20, 2024
Merged

Factorio 2.0 / Space Age #320

merged 31 commits into from
Oct 20, 2024

Conversation

SWeini
Copy link
Collaborator

@SWeini SWeini commented Oct 20, 2024

Contains the changes necessary to work with Factorio 2.0, as well as some additions:

  • Quality modules can be assigned like other modules, but they don't have an effect yet
  • Rudimentary support for spoilage
  • Rudimentary support for agricultural tower

Many features are still missing, but it's enough to start doing some calculations.
For further details, please see the checklists in the linked issues.

@SWeini SWeini requested a review from shpaass as a code owner October 20, 2024 14:09
This was linked to issues Oct 20, 2024
@shpaass
Copy link
Owner

shpaass commented Oct 20, 2024

Some of the tests don't pass, but I don't expect you to fix them now. I think we'll fix them in a separate ticket later.

@SWeini SWeini changed the title 2.0 Factorio 2.0 / Space Age Oct 20, 2024
@SWeini
Copy link
Collaborator Author

SWeini commented Oct 20, 2024

Some of the tests don't pass, but I don't expect you to fix them now. I think we'll fix them in a separate ticket later.

it wasn't too bad
but I butchered the test for the various boiler fluid temperatures

@shpaass
Copy link
Owner

shpaass commented Oct 20, 2024

Thank you for the fix!

I butchered the test for the various boiler fluid temperatures

I think we'll need to look into the boiler situation after pY decides what to do about boilers and liquid temperatures.
Aside from that, the only thing that comes to mind is whether or not boiler works for vanilla. It would be good to have it correct, but it's not critical.

@SWeini
Copy link
Collaborator Author

SWeini commented Oct 20, 2024

the only thing that comes to mind is whether or not boiler works for vanilla.

I made the current implementation work correctly for vanilla, which only uses one water temperature

@shpaass
Copy link
Owner

shpaass commented Oct 20, 2024

Then we're good. We'll have to address the pY temperatures once everything settles, I think.

IngredientPrototype and ProductPrototype now have very strict format requirements.
'require' works differently in 2.0:
The package.loaded cache is by resolved-path now instead of required-path.
allowed_effects only restrict positive
(for the player, not mathematically) effects.
there is no documentation of type 6 yet,
but it seems to be a 8 byte integer.

For type-7 see https://github.com/justarandomgeek/vscode-factoriomod-debug/blob/current/src/Util/PropertyTree.ts
For Yafc 2.0, we'll use separate config and autosave files,
so the two versions of Yafc can coexist if a user wants to play
both Factorio 1.1 and 2.0.

Also update the version and the changelog.
@shpaass
Copy link
Owner

shpaass commented Oct 20, 2024

Squashed the commit of changing the Factorio version to 1.2 with changing it to 2.0. Did the same with type-6 and 7, and Defines.
Added commit-prefixes.
Rephrased some commit subjects, so they fit into 70 chars and thus fit on Github.

@shpaass shpaass merged commit 39e328b into master Oct 20, 2024
1 check passed
@shpaass shpaass deleted the 2.0 branch October 20, 2024 19:47
shpaass added a commit that referenced this pull request Oct 28, 2024
I checked all of the #320 commits to see if they would a hard dependency
on the Space Age DLC. And I only found the one commit that adds the mods
by default.

As far as I could figure out, there is no need to forcefully add these
mods: when they are enabled in mod-list.json they get loaded. No other
code is depending on these mods, all related code adds support when it
is encountered when loading the mods.

I tested by loading both a Space Age and a non-Space Age project (with
the mods enabled/disabled) without issues.

So in the end the fix for #323 is fairly straightforward 😌
shpaass added a commit that referenced this pull request Oct 29, 2024
While checking for the Space Age changes of #320, I noticed 'new' errors
when loading a project. Which was triggered by the (lack of) support of
the new [research
triggers](https://lua-api.factorio.com/latest/concepts/ResearchTrigger.html).

Adding the `craft-item` type was fairly easy (I was fiddling a bit and
it worked):
_\<removed outdated screenshot, see comments for newer one\>_

So I cleaned the code a little and made this PR.

Note that supporting `mine-entity` was also easy, but for some reason it
makes most of the items inaccessible... So I did not include it in this
PR. We need to take a better look.
The other types, I did not try as their implementation was not directly
apparent to me (and `craft-fluid` is not in use, so I could not
try/test)
@DaleStan DaleStan removed a link to an issue Nov 5, 2024
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Factorio 2.0 Space Age - Agriculture
2 participants