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

The beggars at the refugee center eat all the smoked meat #73192

Closed
IdleSol opened this issue Apr 22, 2024 · 3 comments · Fixed by #73703
Closed

The beggars at the refugee center eat all the smoked meat #73192

IdleSol opened this issue Apr 22, 2024 · 3 comments · Fixed by #73703
Labels
[C++] Changes (can be) made in C++. Previously named `Code` (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@IdleSol
Copy link
Contributor

IdleSol commented Apr 22, 2024

Describe the bug

I have 100 pieces of smoked meat. After talking to one of the beggars (any beggar) and offering to take some food, I was left without meat.

Attach save file

Госпорт-trimmed.tar.gz

Steps to reproduce

  1. Load the save
  2. Check your inventory: 100 pieces of meat
  3. Talk to the beggars and give them something to eat
  4. Check inventory: 0 pieces of meat

Expected behavior

Beggars are too greedy

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19043 (21H1)
  • Game Version: cdda-experimental-2024-04-21-0738 0a3e18c [64-bit]
  • Graphics Version: Tiles
  • Game Language: Русский <color_dark_gray>(90.0%) [ru]
  • Mods loaded: [
    Тёмные Дни Впереди [dda],
    Отключить потребности у НПС [no_npc_food],
    Портальные штормы игнорируют НПС [personal_portal_storms],
    Медленный рост фунгалоидов [no_fungal_growth]
    ]

Additional context

No response

@IdleSol IdleSol added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 22, 2024
@PatrikLundell
Copy link
Contributor

I believe I've seen that in the past. If I recall correctly I made sure to only carry a single food item of the type when offering it to a beggar (dropping the rest and picking them up afterwards).

@RenechCDDA RenechCDDA added (S2 - Confirmed) Bug that's been confirmed to exist [C++] Changes (can be) made in C++. Previously named `Code` and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Apr 23, 2024
@RenechCDDA
Copy link
Member

RenechCDDA commented Apr 23, 2024

This seems to have been introduced by #72759.

seller->use_amount( d.cur_item, seller_has_loose );

I believe this line should just be seller_has, which returns the correct amount to hand over (1) as opposed to everything you're carrying (100).

Normally the value is hit with std::min and is set to the desired specified quantity (1) but seller_has_loose is not assigned in this way.

seller_has = ( quantity == -1 ) ? seller_has : std::min( seller_has, quantity );

@RenechCDDA
Copy link
Member

Adding it to the triage list for 0.H since it was introduced by one of the PRs closing an issue for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` (S2 - Confirmed) Bug that's been confirmed to exist
Projects
Status: Completed
3 participants