Open pantherpusher opened 2 years ago
Set the canteen's pocket to not automatically be used to carry stuff
Please describe in details this point.
Enter the item menu for the canteen and select pocket settings. Toggle autopickup so that items will not be inserted into the pocket unless manually inserted
/confirmed
DEBUG : tried to put an item (water, amount 1) in a container (2lcanteen) that cannot contain it
FUNCTION : int item::fill_with(const item&, int, bool, bool, bool)
FILE : src/item.cpp
LINE : 12066
VERSION : cee383c
Toggling autopickup as described above is essential to reproducing this bug: if I skip this step, the bug does not trigger.
Setting ignore_settings
to true
should probably fix the issue and be kinda safe - I don't think autopickup is possible for liquids anyway:
diff --git a/src/item.cpp b/src/item.cpp
index 7ffa2bce87..69a5086ecc 100644
--- a/src/item.cpp
+++ b/src/item.cpp
@@ -11943,7 +11943,7 @@ bool item::reload( Character &u, item_location ammo, int qty )
} else if( is_watertight_container() && ammo->made_of_from_type( phase_id::LIQUID ) ) {
item contents( *ammo );
- fill_with( contents, qty );
+ fill_with( contents, qty, false, false, true );
if( ammo.has_parent() ) {
ammo.parent_item()->contained_where( *ammo.get_item() )->on_contents_changed();
}
Describe the bug
when I try to refill my 2.5L canteen from a 200L barrel of clean water, it throws up the following error and doesn't put water into the canteen
DEBUG : tried to put an item (water_clean, amount 1) in a container (2lcanteen) that cannot contain it
FUNCTION : fill_with FILE : D:\a\Cataclysm-DDA\Cataclysm-DDA\src\item.cpp LINE : 12067 VERSION : 60f648c
Steps to reproduce
Expected behavior
For the canteen to have water in it
Screenshots
No response
Versions and configuration
Additional context
No response