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.
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.