Healing a friendly dog that follows you

A personal alteration of mine for my game has been to edit the code for dog food so that it can restore the hp of a friendly dog. I got the code from the MGS mod originally. I’ve been away from Cata for a while and since then I’ve removed all the cluttery old versions and code files and downloaded the latest. Also it seems dramas have unfolded, the source code for MGS mod isn’t available, and I don’t have the code I used to copy+paste anymore.

Simply put, I don’t know how to code what I’d like to do. Can anyone help?

Basically what you would want to do is put a check at the top of the dog food use action in iuse.cpp that checks if a dog is friendly, if a dog isn’t at full hp (probably providing some message if they are) and then increasing their hp before “return”-ing.