Skip to content

Nullness safety on RECIPE_MODE - #11784

Open
armele wants to merge 5 commits into
ldtteam:version/1.21from
armele:recipe_mode_safety
Open

Nullness safety on RECIPE_MODE#11784
armele wants to merge 5 commits into
ldtteam:version/1.21from
armele:recipe_mode_safety

Conversation

@armele

@armele armele commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and accept the Contributing Guidelines
  • I have tested and confirmed my changes are working on the most recent commit of this pull request
  • I have used AI in the creation of this pull request

Related issues

Closes - Error reported in Trade Post discord.
Symptom revealed with injected "Dairyworker" (Trade Post mod) module for the Cowhand, which turns that building into one which hosts a crafting job, but whose settings module does not include "RECIPE_MODE". This nullness check is safe, and "add-on friendly", giving some protection against add-ons which may have this scenario.

Changes proposed in this pull request

  • Nullness check on whether or not the settings module contains the "RECIPE_MODE" setting.

Review please

}
}

final CrafterRecipeSetting recipeMode = building.getSetting(RECIPE_MODE);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this has to go inside the first if then =D

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No more code changes after midnight for me...

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.

2 participants