Proc Handler

by Ss4toby
Create delayed and loop procedures out of any procudure. Can be halted or destroyed at anytime.
ID:1237149
 
I actually made this library for personal use. However, I figured somebody might find it useful besides myself. With the system, you can turn any procedure into a loop, or have an initialization delay. It also blocks stacking, which would be idea to prevent systems from causing abnormalities due to such.

For example, if you have a freeze movement system that is activated. The delay feature of this library will allow for an unfreeze to be called and be set for X amount of time. While, you would also be allowed to create a separate means to unfreeze. If this library is used correctly you will avoid issues such as, they unfroze manually then were frozen again, but the original delay unfreeze kicked in too soon allowing for a glitch.

There are more means for this library then just that. Truth be told the most appealing aspect is the ability to create a loop out of any procedure or verb.

Version 1.2:

Added a little demo for the library and made the actual library only contain features needed for the system(as BYOND standards for libraries).

Also, redid the stopCALL() procedure to allow halt of a delay and when resumed time ran is deducted from time remaining.

version 1.3:

Only re-uploaded files due to invalid upload.

version 1.4:

Added a procTrashCollector() script that runs
on a set time and looks for old Proc datums
or Proc datums that were abandoned.

Also, made the Proc datum destroy itself if
an SRC was not found when it tries to run even
when one should had been found.

version 1.5

Noticed failure to add ..() in the world/New() proc in order to prevent the library from canceling out any other world/New() proc's when included. Minor but major change.