Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Infinite Healing Patches
#5
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.
So, you should technically be able to utilize a styptic powder patch twice, before it runs out of uses.


Messages In This Thread
Infinite Healing Patches - by atamusvaleo - 03-16-2016, 02:14 PM
RE: Infinite Healing Patches - by lambskin - 03-16-2016, 06:52 PM
RE: Infinite Healing Patches - by ZeWaka - 03-16-2016, 07:30 PM
RE: Infinite Healing Patches - by lambskin - 03-16-2016, 08:25 PM
RE: Infinite Healing Patches - by Erik - 03-16-2016, 08:26 PM
RE: Infinite Healing Patches - by atamusvaleo - 03-17-2016, 05:29 AM
RE: Infinite Healing Patches - by Grayshift - 03-17-2016, 08:49 AM
RE: Infinite Healing Patches - by Grek - 03-18-2016, 01:15 AM
RE: Infinite Healing Patches - by ZeWaka - 12-05-2017, 11:56 AM
RE: Infinite Healing Patches - by mbc - 12-05-2017, 02:07 PM
RE: Infinite Healing Patches - by ZeWaka - 12-05-2017, 06:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)