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

Error when installing CBM with installation data #49752

Closed
AdamChirnside opened this issue Jul 8, 2021 · 1 comment · Fixed by #49759
Closed

Error when installing CBM with installation data #49752

AdamChirnside opened this issue Jul 8, 2021 · 1 comment · Fixed by #49759
Labels
Bionics CBM (Compact Bionic Modules) <Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling

Comments

@AdamChirnside
Copy link
Contributor

Describe the bug

When installing a CBM with the relevant install data in the inventory, an error occurs.

Steps To Reproduce

  1. Make a character with a sterile CBM item and its install data item (for example, Power Storage).
  2. Use an autodoc and choose to install said CBM.

Expected behavior

Screenshots

N/A

Versions and configuration

  • OS: Windows
    • OS Version: 10.0 2009
  • Game Version: 335ab2a [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Aftershock [aftershock],
    C.R.I.T Expansion Mod [crt_expansion],
    Magiclysm [magiclysm],
    Blaze Industries [blazeindustries],
    Disable NPC Needs [no_npc_food],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    SpeedyDex [speedydex],
    Alternative Map Key [alt_map_key],
    Graphical Overmap [Graphical_Overmap],
    Graphical Overmap Magiclysm [Graphical_Overmap_Magiclysm],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

DEBUG : Attempted a recipe with no available components!

FUNCTION : comp_selection<item_comp> Character::select_item_component(const std::vector<item_comp>&, int, read_only_visitable&, bool, const std::function<bool(const item&)>&, bool)
FILE : src/crafting.cpp
LINE : 1570
VERSION : 335ab2a

@actual-nh actual-nh added (S1 - Need confirmation) Report waiting on confirmation of reproducibility Bionics CBM (Compact Bionic Modules) Crafting / Construction / Recipes Includes: Uncrafting / Disassembling labels Jul 8, 2021
@GoLoT
Copy link
Contributor

GoLoT commented Jul 9, 2021

Reproduced by trying to install a CBM on an NPC while carrying a CBM + AID item.

It looks like the code is trying to find the AID item checking the map (items around) and the inventory of the target of the CBM installation instead of the installer. Since the NPC is unable to find the AID item the game throws the error message.

Dropping the AID item to the ground allows the NPC to find the item.

Relevant code:
https://github.com/CleverRaven/Cataclysm-DDA/blob/master/src/iexamine.cpp#L4846

It is checking the patient's inventory. patient->consume_charges() should be p->consume_charges().

I'll try to have a PR ready in a bit.

@actual-nh actual-nh added <Bug> This needs to be fixed and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bionics CBM (Compact Bionic Modules) <Bug> This needs to be fixed Crafting / Construction / Recipes Includes: Uncrafting / Disassembling
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants