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

u_has_items and u_sell_item do not recognize anesthetic in an anesthesia kit #55918

Closed
haveric opened this issue Mar 7, 2022 · 2 comments · Fixed by #55986
Closed

u_has_items and u_sell_item do not recognize anesthetic in an anesthesia kit #55918

haveric opened this issue Mar 7, 2022 · 2 comments · Fixed by #55986
Labels
Mechanics: Effects / Skills / Stats Effects / Skills / Stats NPC / Factions NPCs, AI, Speech, Factions, Ownership

Comments

@haveric
Copy link
Contributor

haveric commented Mar 7, 2022

Describe the bug

The anesthesia kit uses "ammo" instead of count or charges and is therefore not recognized by either u_has_items or u_sell_item in dialogue conditions/effects. This probably affects other items that use ammo as well, but I haven't tested anything else.

Steps to reproduce

  1. Change a dialogue's condition to: "condition": { "u_has_items": { "item": "anesthetic", "count": 3000 } } and effect to "effect": { "u_sell_item": "anesthetic", "count": 3000 }
  2. Talk to npc, dialogue will not appear
  3. Spawn enough anesthetic in another container or unload the kit into another container
  4. Talk to npc, dialogue will appear and work correctly

I'm testing this on a new mission, so I don't believe there are any existing missions that do this.

Expected behavior

Anesthetic should be recognized in dialogue conditions and effects when it's in an anesthesia kit, just the same as in any other liquid container.

Screenshots

No response

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.1526 (21H2)
  • Game Version: 0.F-6540-g158330a8a0 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    Bionic Professions [package_bionic_professions]
    ]

Additional context

No response

@LeahLuong
Copy link

I think the problem is pretty widespread. Merchants (&, by proxy, mission-givers, I imagine) have difficulty w/ nested containers & containers w/ charges. Try selling a mag-using gun both un- & loaded. Try selling them the clip w/ bullets in or out. I found it best to always 'U'nload everything for merchants in order to obtain max value.

#51704 fixed a few things but I'm playing on 0.F-3. You could prob model a fix for this issue based on something in that PR.

@haveric
Copy link
Contributor Author

haveric commented Mar 8, 2022

This issue is targeted specifically at dialogue/mission interaction. Anything outside of that (trading) is outside the scope of this issue and should be brought up as its own issue if it isn't already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mechanics: Effects / Skills / Stats Effects / Skills / Stats NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants