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

Can't attach power conversion mod to e-ink tablet PC #76717

Open
dev-dsp opened this issue Sep 29, 2024 · 8 comments
Open

Can't attach power conversion mod to e-ink tablet PC #76717

dev-dsp opened this issue Sep 29, 2024 · 8 comments
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Good First Issue This is a good first issue for a new contributor (S2 - Confirmed) Bug that's been confirmed to exist

Comments

@dev-dsp
Copy link

dev-dsp commented Sep 29, 2024

Describe the bug

I'm trying to attach bionic pcm to my e-ink tablet, but receive the following:

You can't unload a <device name>!
You cancel unloading the tool.

Attach save file

Nairn-trimmed.tar.gz

Steps to reproduce

  1. 'a'ttach tool to a charged device

Expected behavior

Able to attach mods to tools

Screenshots

image

Versions and configuration

  • OS: Linux
    • OS Version: LSB Version: n/a; Distributor ID: Gentoo; Description: Gentoo Linux; Release: 2.15; Codename: n/a;
  • Game Version: cdda-experimental-2024-09-28-2040 5213009 [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Portal Storms Ignore NPCs [personal_portal_storms],
    Slowdown Fungal Growth [no_fungal_growth],
    Mind Over Matter [mindovermatter],
    Stats Through Kills [stats_through_kills],
    SpeedyDex [speedydex]
    ]

Additional context

No response

@dev-dsp dev-dsp added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Sep 29, 2024
@BaumgeistOne
Copy link

Is there still charge left?

I had the same problem, but once I drained all the charge, I was able to install the mod.

@dev-dsp
Copy link
Author

dev-dsp commented Sep 29, 2024

Yep, it's 86/86, but it shouldn't be a problem since by modding either the battery should be removed, or the connector replaced. In both options you don't need to drain the charge, hence I believe it's a bug.

@BaumgeistOne
Copy link

Of course it is a bug, I just wanted to mention a possibility of working around it. :)

@Kantonine
Copy link
Contributor

I tried doing this yesterday, and I found out (same with smartphones too actually) that attaching a battery mod doesnt allow you to use batteries to reload it

@GuardianDll
Copy link
Member

i suspect tool_mod require tool being empy, and having charges inside a tool makes it think it is not empty

@Kantonine
Copy link
Contributor

i suspect tool_mod require tool being empy, and having charges inside a tool makes it think it is not empty

Do you mean when something is even partially charged? I turned on the tablet for the entire night while I was sleeping, so it could drain its entire battery, so that i can install the mod. so it showed up as being E-ink tablet +1. if i kept it charged at all, it wouldnt attach. I suspect it's because that installing a battery mod has the process of trying to unload the physical battery from the item. This works with items that don't have a internal battery, or any battery slots (Flashlights and Hotplates for example). Meanwhile, you can't unload the battery from E-ink Tablets or smartphones as it is integrated, and thus, you can't remove the previous battery connection. For the e-ink tablet, this shows up as having no acceptable form factors for batteries. Smartphones also don't have this, and asfaik, still need a ups connection to recharge (I haven't been able to test whether the actual capacity has changed afterwards)

@GuardianDll
Copy link
Member

Cataclysm-DDA/src/iuse.cpp

Lines 5364 to 5369 in 5f6f5e0

if( loc->ammo_remaining() ) {
if( !p->unload( loc ) ) {
p->add_msg_if_player( m_info, _( "You cancel unloading the tool." ) );
return std::nullopt;
}
}

As i told, trying to install gunmod check is there any ammo inside tool, but because !p->unload( loc ) fails (because battery charges has NO_UNLOAD), it simply refuses to install one
In theory one just need to add a code here, that checks if tool has NO_UNLOAD flag

@GuardianDll GuardianDll added Good First Issue This is a good first issue for a new contributor (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 Oct 4, 2024
@chaoticidealism
Copy link

This also prevents you from attaching a battery mod to your tool (the kind that lets you use replaceable batteries). Very annoying on my No Vehicles/Wayfarer run!

Pabblusansky added a commit to Pabblusansky/Cataclysm-DDA that referenced this issue Oct 17, 2024
Simply makes it possible to attach mods to tools. fixes CleverRaven#76717
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` Good First Issue This is a good first issue for a new contributor (S2 - Confirmed) Bug that's been confirmed to exist
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants