Closed matt32106 closed 1 year ago
Going to try and Repro for Windows
It looks like the bug where USBs don't show their contents struck again. It happens once per experimental apparently. You probably have the software, the USB is just not telling you.
the USB is just not telling you. Yes! I tried teleport to base and I could complete the mission. I'll EDIT the dezscription of the bug, thanks.
Do you know if there is a fix in the making for this? I am interested in looking for a fix.
Repro Steps:
To quickly repro Spawn a Random NPC on Overmap
Go to Edit Player/NPC from debug menu and select newly spawned NPC and "Add Mission" to them
Add Download encryption codes
Speak to NPC and Accept mission - Debug Teleport to the expected location and find the Computer with Encryption Codes
I had to find them here - -2 Down in Lab
After the download you will no change the the USB you downloaded
--
However (as mentioned above) We can still complete the mission; its just that both the USB and Mission do not update upon you completing the download.
So if I were to go about fixing this:
I'd look for how "pocket_type": "SOFTWARE" can be surfaced in the Item description
{
"type": "TOOL",
"id": "usb_drive",
"symbol": ",",
"color": "white",
"name": { "str": "USB drive" },
"description": "A USB thumb drive. Useful for holding software.",
"price": 10000,
"price_postapoc": 10,
"material": [ "plastic" ],
"weight": "18 g",
"volume": "5 ml",
"pocket_data": [
**{ "pocket_type": "SOFTWARE", "max_contains_volume": "1 L", "max_contains_weight": "1 kg" },**
{
"pocket_type": "EBOOK",
"rigid": true,
"max_contains_volume": "1 ml",
"max_contains_weight": "1 g",
"weight_multiplier": 0.0
}
],
"to_hit": -3,
"flags": [ "MC_USED" ]
},
Here is the 'pocket' logic of which I would have to mess with to get this to work
If I don't see a response for this in the next 3 or so days, I'm going to tackle this officially.
I broke this in #63579
Quick fix:
diff --git a/src/item.cpp b/src/item.cpp
index 43aedd8496..e106d0c510 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -13758,7 +13758,9 @@ item const *item::this_or_single_content() const
bool item::contents_only_one_type() const
{
- std::list<const item *> const items = all_items_top();
+ std::list<const item *> const items = is_software_storage()
+ ? all_items_top( item_pocket::pocket_type::SOFTWARE )
+ : all_items_top();
return items.size() == 1 ||
( items.size() > 1 &&
std::all_of( ++items.begin(), items.end(), [&items]( item const * e ) {
I would prefer to see item_contents::all_items_top( const std::function<bool( item_pocket & )> &filter )
exposed at the item
-level though.
This also needs a test unit in item_tname_test.cpp
So what is the etiquette for something like this? @andrei8l
So what is the etiquette for something like this?
I've fixed this one but don't be afraid to just submit bug fixes. You won't step on anyone's toes.
Describe the bug
I am doing the download encryption codes mission. I opened the console, download the codes but they are not shown on the USB drive. See save attached.
Attach save file
Usher-trimmed.tar.gz
Steps to reproduce
E to open console Enter 3 times The console says Software downloaded Look at inventory, the 3 USB drives all look empty (it seems that in fact the codes are downloaded to the USB drive but they are just not showing in the inventory window).
Expected behavior
One of the USB drives should display the fact that it contains the codes
Screenshots
No response
Versions and configuration
Additional context
No response