03-16-2016, 08:26 PM
I did a quick code dive as i had a hard time falling asleep, and it seems that this would only happen when the server is under a high load, the following happens when you apply a styptic powder patch to someone.
- var/in_use is set to 1.
- reagents.reaction(M, TOUCH) is called without a volume modifier, which simply calls reaction_mob, which then in turn heals the affected mob via M.HealDamage("All", volume_passed, 0) using 40 units of styptic powder.
- reagents.trans_to(M, reagents.total_volume/2) is then called, which simply transfers 50% of the reagents into the affected mob, which then allows the next mob loop tick to call on_mob_life for the styptic powder reagent which then in turn calls M.HealDamage("All", 2, 0)
- var/in_use is set to 0.
- qdel(src) is called, which queues the patch for deletion.