Skip to content

Conversation

PatrikLundell
Copy link
Contributor

@PatrikLundell PatrikLundell commented Sep 24, 2025

Summary

None

Purpose of change

  • Warn against useless definitions of tools, qualities, and components in abstract recipes to warn against thinking these would be inherited.
  • Fix the seed extraction recipes suffering from the above problem
  • Disable qualities from the abstract ammo_cartridge recipe.
    Edit: Additions
  • Flag suspect cases of copy-from from recipes defining tools/qualities/components without definition of replacements (as those aren't inherited).
  • Deal with all the cases in JSON flagged by the above check.

Describe the solution

See purpose.

Describe alternatives you've considered

  • Do the extra work in a separate PR.
  • Leave the weirdo turban recipes alone and take them being flagged as suspect. However, that would annoy players for no real reason other than my aversion to touch the mess.
  • Figure out how to print the name of the recipe copied from. My attempt resulted in a name of internal_<the inheriting recipes' name> or similar, which was useless for information purposes.

Testing

  • Implemented the code changes and saw warnings for the cutting seed extraction recipe (as expected) and the ammo_cartridge one (discovery).
  • Verified the pumpkin seed extraction recipe now has qualities.
  • Verified my save now loads without any errors (after having checked that some recipe early in the process did in fact reflect the entry copied over).
  • Tested that game with Magiclysm can reach character generation without inheritance errors (which wasn't the case prior to changing the inheriting recipes).

Additional context

Looked at all the usages of the ammo_cartridge recipe to verify the qualities are copied into all of them.

There was some weird stuff among the warnings, as well as things that might warrant a further look:

  • Rivets tried to use "extend" without either success or the flagging of the failure.
  • Smoked mutant meat had to be moved within the file because of a load order issue when the copy-from recipe hadn't been processed yet.
  • The xs/xl_ch_helmet_turban recipes were weird, having explicitly empty component clauses while the normal size recipe had some stuff. I decided the xs/xl recipes were better off with the same components. However, the recipes are really weird in that they list a whole lot of metal working proficiency and tools to deal with a small amount of organic material.
  • There was one XL recipe that didn't have components while the XS one did. I changed the (failed) presumed logic of using the same resources as for normal size by increasing the one XS decreased with the decreased amount.
  • A lot of missing tools include "fuel", which might be suitable to increase for XL and decrease for XS. However, I just copied the normal entry, as that's probably what the author's thought they did via copy-from (and I wouldn't be surprised if it actually worked that way when the recipes were made: if all the recipes updated were actually behaving the way the do now at the time of their creation, there's a significant amount of sloppy testing not to notice that any of them are missing stuff among a fair number of contributors. That said, I may end up with egg on my face as I have only actually tested a small sample of the changes made).

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling [C++] Changes (can be) made in C++. Previously named `Code` Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Sep 24, 2025
@github-actions github-actions bot added the Items: Armor / Clothing Armor and clothing label Sep 24, 2025
Copy link
Contributor

@ehughsbaird ehughsbaird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would rather fix inheritance and extend/delete, but that looks complex, and just warning about it is fine.

@GuardianDll
Copy link
Member

Mod stuff should be fixed also, otherwise CI do not pass

@PatrikLundell
Copy link
Contributor Author

Thanks for the heads up. I've just given up on checking tests since the always fail for irrelevant reasons (some icecream stuff for instance).
I'll have to dive into the sewers and root out rats, then.

@github-actions github-actions bot added the Mods: Magiclysm Anything to do with the Magiclysm mod label Sep 25, 2025
@github-actions github-actions bot requested a review from KorGgenT September 25, 2025 12:57
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-requesting reviews from non-collaborators: @LyleSY

@github-actions github-actions bot added the Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) label Sep 25, 2025
@PatrikLundell
Copy link
Contributor Author

Ah, great. The test suit gives up after inheritance errors have been reported for one mod, so this will apparently be a one mod-failure-fix that-next mod failure exercise.

@github-actions github-actions bot added the Mods: Aftershock Anything to do with the Aftershock mod label Sep 25, 2025
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Sep 26, 2025
@GuardianDll
Copy link
Member

Need to resolve a conflict

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Info / User Interface Game - player communication, menus, etc. Items: Ammo / Guns Ammunition for all kinds of weapons and these weapons themselves Items: Armor / Clothing Armor and clothing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mods: Aftershock Anything to do with the Aftershock mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Magiclysm Anything to do with the Magiclysm mod
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants