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

Player is prompted to turn off/extinguish their wet towel (active) #59809

Closed
DamienRoyan opened this issue Aug 1, 2022 · 10 comments · Fixed by #73408
Closed

Player is prompted to turn off/extinguish their wet towel (active) #59809

DamienRoyan opened this issue Aug 1, 2022 · 10 comments · Fixed by #73408
Labels
<Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. Items / Item Actions / Item Qualities Items and how they work and interact

Comments

@DamienRoyan
Copy link
Contributor

DamienRoyan commented Aug 1, 2022

Describe the bug

Screenshot says everything

I tried to sleep with this in my inventory and that showed up as if I had a flashlight or something on (I have no such thing in my inventory)

Steps to reproduce

  1. Get wet. Jump in pond in my case
  2. Dry self with towel
  3. Try to sleep with now wet towel in inventory

Expected behavior

Instructions unclear. How do I turn off my towel?...
Oh wait that's impossible... or is it >_>

Screenshots

image

Versions and configuration

  • OS: Windows
    • OS Version: 10.0.19044.1806 (21H2)
  • Game Version: 6b19368 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Vampiric Stuff [vamp_stuff],
    Arcana and Magic Items [Arcana],
    Magiclysm [magiclysm],
    Arcana/Magiclysm Patchmod [Arcana_Magiclysm_Patch],
    Vampiric Stuff + Arcana Mod Extension [vamp_stuff+arcana],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    SpeedyDex [speedydex],
    Stats Through Kills [stats_through_kills],
    Stats Through Skills [StatsThroughSkills],
    Tamable Wildlife [Tamable_Wildlife],
    Bionic Slots [cbm_slots],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

No response

@DamienRoyan DamienRoyan added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Aug 1, 2022
@NetSysFire NetSysFire added <Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. (S2 - Confirmed) Bug that's been confirmed to exist Items / Item Actions / Item Qualities Items and how they work and interact and removed (S1 - Need confirmation) Report waiting on confirmation of reproducibility labels Aug 1, 2022
@NetSysFire
Copy link
Member

Fun bug. Only thing I could think of why the game would warn you is that having soaking wet stuff around you could cause a cold but there is no way this is handled like this.

@CalamityKing
Copy link
Contributor

CalamityKing commented Aug 1, 2022

As an absolute noob whose last major experience programming anything was in secondary school/high school and can scarcely comprehend some of the code here, I'm going to hazard a guess and say its because the item towel_wet is located the tool_armor type. A lot of other stuff that can be turnt on or off is in there.

@descan
Copy link
Contributor

descan commented Aug 1, 2022

The 5-point anchor is also something that produces this pop-up.

I'm not sure how it's programmed, but it really should be only things that will keep the player awake that should prompt the pop-up.

@PatrikLundell
Copy link
Contributor

I suspect it's connected to having an "active" state vs. a passive one.
Apart from keeping the player awake, I'd also like to see a warning for active things that drain resources.
I get a warning about shooter's earplugs, and I think that's OK. Turning them off will make my character deaf, which will help sleep, but may also assist in dying if the screams you can't hear are the ones of your companions dying...

@CalamityKing
Copy link
Contributor

I've looked at the sleep code and the message is triggered to pop if an item:
Has the flag: flag_litcig OR
is active AND has sufficient ammo AND is considered a tool WITHOUT the flag flag_sleep_ignore.

Or at least I think I've read it right.

// List all active items, bionics or mutations so player can deactivate them std::vector<std::string> active; for( item_location &it : player_character.all_items_loc() ) { if( it->has_flag( flag_LITCIG ) || ( it->active && it->ammo_sufficient( &player_character ) && it->is_tool() && !it->has_flag( flag_SLEEP_IGNORE ) ) ) { active.push_back( it->tname() ); } }

@descan
Copy link
Contributor

descan commented Aug 1, 2022

Ah, so it sounds like fixing this issue would just be a matter of adding the flag_sleep_ignore flag to a wet towel. I think Patrik is right that things that would drain resources should also produce the flag, so even if keeping a 5-point-anchor on all night is probably wise for the characters it's relevant for, it should still produce a pop-up. Can anyone think of any other items that have produced the pop-up that shouldn't? Or conversely, any items that should produce the pop-up but that do not?

@CalamityKing
Copy link
Contributor

I think the bigger question is WHY does it even cause the message to pop? If I'm interpreting the conditions correctly, and if I'm honest I can't with 100% certainty say I am, it shouldn't appear because it has no ammo.

@descan
Copy link
Contributor

descan commented Aug 1, 2022

Either somehow it's being thought by the game to have ammo, or the only flag that wet towels have ("WET" oddly enough) is being treated as litcig as well?

@PatrikLundell
Copy link
Contributor

My interpretation is that the wet towel is presumably "active" when wet, and it has sufficient ammo as it doesn't need any.
Thus, a check whether it actually has any ammo type ought to do away with this (and other potential) cases.

"Active" "tools" that have two states, such as a folding knife might fall into this category as well?

@chrispikula
Copy link
Contributor

chrispikula commented Aug 2, 2022

I think the bigger question is WHY does it even cause the message to pop? If I'm interpreting the conditions correctly, and if I'm honest I can't with 100% certainty say I am, it shouldn't appear because it has no ammo.

'AMMO' isn't always ammo, it's a very useful mechanism for several hacky things. See, pens, acetylene torches, metal d20's, etc.

@Night-Pryanik Night-Pryanik added (S1 - Need confirmation) Report waiting on confirmation of reproducibility and removed (S2 - Confirmed) Bug that's been confirmed to exist labels Nov 19, 2022
@NetSysFire NetSysFire removed the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Info / User Interface Game - player communication, menus, etc. Items / Item Actions / Item Qualities Items and how they work and interact
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants