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 far-sighted butlers spawning without reading glasses #64168

Merged
merged 1 commit into from
Mar 13, 2023
Merged

Fix far-sighted butlers spawning without reading glasses #64168

merged 1 commit into from
Mar 13, 2023

Conversation

jesse-r-s-hines
Copy link
Contributor

@jesse-r-s-hines jesse-r-s-hines commented Mar 11, 2023

Summary

Bugfixes "Fix far-sighted butlers spawning without reading glasses"

Purpose of change

If there are wear conflicts on profession starting items without no_auto_equip, the second item would be silently dropped from inventory. This is noticeable with a far-sighted butler, the butler's default monocle would conflict with the reading glasses and cause the reading glasses to be deleted. The monocle only corrects near-sighted, so the character can't read until they find glasses. The same will occur with near-sighted Butlers, but the since the monocle corrects Near-Sighted its not an issue.

Describe the solution

Change the add_profession_items to fall-back to putting items in inventory if we can't auto-wear them instead of silently deleting the items.

Describe alternatives you've considered

This change does mean that "Near-Sighted" Butler's will spawn with both a monocle and redundant glasses now. We could simply remove the monocle from the Butler instead.

Or, better we could remove the monocle from the default profession items list and modify profession_item_substitutions to allow thematic profession substitutions so that "Near-Sighted" butlers spawn with a monocle instead of regular glasses.

@jesse-r-s-hines jesse-r-s-hines changed the title Fix far-sighted butler's spawning without reading glasses Fix far-sighted butlers spawning without reading glasses Mar 11, 2023
@jesse-r-s-hines
Copy link
Contributor Author

We could allow profession substitutions with something like so:

  {
    "type": "profession_item_substitutions",
    "profession": "main",
    "sub": [
      { "item": "glasses_eye", "new": [ "glasses_monocle" ] },
      { "item": "glasses_bifocal", "new": [ "glasses_monocle", "glasses_reading" ] }
    ]
  },

@github-actions github-actions bot added [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world <Bugfix> This is a fix for a bug (or closes open issue) labels Mar 11, 2023
src/newcharacter.cpp Outdated Show resolved Hide resolved
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Mar 12, 2023
@dseguin dseguin merged commit 82cabd9 into CleverRaven:master Mar 13, 2023
@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Mar 13, 2023
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 <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` Character / World Generation Issues and enhancements concerning stages of creating a character or a world json-styled JSON lint passed, label assigned by github actions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants