CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.3k stars 4.13k forks source link

Test tube incorrectly claims to fill with various liquids it cannot hold. #48921

Open Psiclops opened 3 years ago

Psiclops commented 3 years ago

When using (r)eload, the test tube will only fill up with certain liquids, although it claims success for all.

Successful reload liquid into test tube so far. (with message "You refill the test tube.") Liquid mercury (10) ethanol (10) denatured alcohol (10) nicotine liquid (2) hot sauce (2) dragon blood (10) All of the mutagenic serums (1)

Fails (with message "You refill the test tube.") lye blood antiseptic animal cooking oil vegetable cooking oil rum purifier mutagen hydrochloric acid gin whiskey maple syrup saline solution cough syrup, regular and non-drowsy hydrogen peroxide heartburn medicine lemonade vinegar water clean water

It seems that some liquids have a different amount of space that (1) unit takes up than others. If the liquid cannot fit in a test tube, it should have a failure message instead of claiming to succeed.

Since a test tube holds 10ml, it looks like (1) dragon blood is 1ml, but (1) hot sauce is 5ml, and any (1) mutagenic serum is 10ml. It stands to reason that a test tube could hold any liquid you tried to pour into it, but in the terms of a minimally usable amount it will not hold most liquids in the game.

forgot to add game version info, editing in below

actual-nh commented 3 years ago

The problem would appear to be the "You refill the test tube" message when there isn't 10 ml of the liquid in question in said test tube.

sharkfinsouperman commented 3 years ago

This is not a bug, because none of the items on your list of failed liquids can be stored in the test tube because the smallest individual units are greater than 10ml.

This issue can be closed.

actual-nh commented 3 years ago

This is not a bug, because none of the items on your list of failed liquids can be stored in the test tube because the smallest individual units are greater than 10ml.

It's not a bug that you can't put a unit in something too small for it; it is a bug that you're told you've refilled the test tube when you haven't.

This issue can be closed.

Given that there's still a bug - just not the one the OP thought - I'm not sure why you're saying this.

sharkfinsouperman commented 3 years ago

@actual-nh Seems I've misunderstood the issue. Thanks for clearing that up.

actual-nh commented 3 years ago

@actual-nh Seems I've misunderstood the issue. Thanks for clearing that up.

Quite welcome; you're perfectly correct that the issue as originally stated isn't a bug. @Psiclops, to reduce confusion could you change the title to something like "Test tube falsely stated to be refilled"? EDIT: Thanks!

RenechCDDA commented 1 year ago

https://github.com/CleverRaven/Cataclysm-DDA/blob/9afa65ce6bbaf3bb96f12cb0ce9046d096c04667/src/activity_actor.cpp#L4340-L4341

Needs to account for failures