# Planning to code out a camel bag/hydration pack

**URL:** https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701
**Category:** The Toolbox
**Created:** [October 29, 2014, 4:29pm UTC](https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701 "2014-10-29T16:29:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![jokermatt999](https://avatars.discourse-cdn.com/v4/letter/j/e9bcb4/32.png) [@jokermatt999](https://discourse.cataclysmdda.org/u/jokermatt999)
#### Post date: [October 29, 2014, 4:29pm UTC](https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701/1 "2014-10-29T16:29:26Z")

</div>

So I was planning to add a hydration bag too the game (commonly known as CamelBak), and I’ve got it mostly planned out. It’ll be a CONTAINER, able to sheath in a runner or survivor pack, which can be drank from once sheathed. So far, I can psuedo code out most of that, referencing various snippets (container.json, iuse sheath\_foo, adding iuse to items)…but the part I’m missing is actually the most basic: drinking from it. What would be the code to consume it once I’ve got the liquid from the contents of the backpack? I can’t seem to find it, and I want to do it properly.

---

<div class="post-metadata">

### Author: ![jcd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.cataclysmdda.org/jcd/32/338_2.png) [@jcd](https://discourse.cataclysmdda.org/u/jcd)
#### Post date: [October 29, 2014, 9:03pm UTC](https://discourse.cataclysmdda.org/t/planning-to-code-out-a-camel-bag-hydration-pack/7701/2 "2014-10-29T21:03:52Z")

</div>

the way i read it, its this function:

bool player::consume(int target\_position)

in:  
src/player.cpp  
src/player.h

but, you should not have to touch it, just call it from your new iuse function.
