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

Fix loading of inline EoCs, enchantments, and allow recipe_categories to extend #74514

Merged
merged 8 commits into from
Jun 25, 2024

Conversation

anothersimulacrum
Copy link
Member

@anothersimulacrum anothersimulacrum commented Jun 14, 2024

Summary

None

Purpose of change

Fixes #74443

Describe the solution

Sorry for scope, I hope reasonable commits and that it's all in service of fixing the one issue (Mind Over Matter and Aftershock are incompatible) makes it acceptable.

Please read the commits for more details.

This does a few things:

  1. Fix the loading of src data (where the item was loaded from) for inline effect_on_conditions. This requires passing this src data down in a bunch of places, and so requires a bunch of changes. 4814801 37bc60b 2ecaa13 220517f 0a73730

  2. Do the same thing, but for magic_enchantments, and replace the homebrew duplicate checking with the duplicate checking used by everything else. 15d5ca8

  3. Allow extending recipe categories, so two mods can add to the same recipe category. Commit a7fe7ec

  4. Allow running the all mods test with both mindovermatter and aftershock again: 9ccf992

Describe alternatives you've considered

Doing this a simpler way.

Testing

tests/cata_test --mods=dda,mindovermatter,aftershock 'force_load_game' - no errors!
builds-scripts/get_all_mods.py | xargs -I{} tests/cata_test --mods={} 'force_load_game' - no errors!

Pull up the game and scroll through the crafting menu - looks the same.

Additional context

@github-actions github-actions bot added NPC / Factions NPCs, AI, Speech, Factions, Ownership Info / User Interface Game - player communication, menus, etc. Code: Build Issues regarding different builds and build environments [JSON] Changes (can be) made in JSON Mods Issues related to mods or modding Missions Quests and missions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` [Python] Code made in Python Lore Game lore, in-game communication. Also the Lore tab. Mods: Aftershock Anything to do with the Aftershock mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mechanics: Enchantments / Spells Enchantments and spells EOC: Effects On Condition Anything concerning Effects On Condition Mods: Mind Over Matter astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Jun 14, 2024
@github-actions github-actions bot removed the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 17, 2024
@Adm-Brodius
Copy link

I appreciate all your guys' work on this! This issue (MoM / Aftershock incompatibility) is driving me nuts!

@meelock
Copy link
Contributor

meelock commented Jun 21, 2024

Is there an ETA for this PR's completion, and does this PR simply fix the all the mods test or does it actually allow MoM and AFS to run together? Thanks!

EoCs need to have a src value defined so that they can overwrite
eachoter. When loaded inline, sometimes this is not the case.

Rip and tear dialogue stuff to ensure that EoCs can track their src.
snippets can load eocs, and the eocs should have a src defined.
Damage types have eocs, and right now they're just pretending they don't
have a src. Properly write it through.
The eoc iexamine actor can obviously load eocs, and so requires a src.
The eoc iuse actor loads eocs, and those eocs should have src values.
Load source for effects so it's meaningful, then use the built-in
mod_tracker + generic_factory support for checking for duplicates.
To enable using copy-from to extend recipe subcategories, so mods that
touch the same ones don't overwrite.
Now that the bugs making them incompatible have been fixed, there's no
reason to have the exclusion.
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Jun 21, 2024
@Maleclypse Maleclypse merged commit 6edd3c7 into CleverRaven:master Jun 25, 2024
27 of 29 checks passed
@anothersimulacrum anothersimulacrum deleted the crying branch June 25, 2024 19:59
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` Code: Build Issues regarding different builds and build environments Code: Tests Measurement, self-control, statistics, balancing. Crafting / Construction / Recipes Includes: Uncrafting / Disassembling EOC: Effects On Condition Anything concerning Effects On Condition Info / User Interface Game - player communication, menus, etc. [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Lore Game lore, in-game communication. Also the Lore tab. Mechanics: Enchantments / Spells Enchantments and spells Missions Quests and missions Mods: Aftershock Anything to do with the Aftershock mod Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods: Mind Over Matter Mods Issues related to mods or modding NPC / Factions NPCs, AI, Speech, Factions, Ownership [Python] Code made in Python
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The same EoC in two separate mods without dependencies on each other causes a double definition error
4 participants