GmodStarfall / Starfall

Starfall Processor for Garry's Mod + Wiremod
http://www.wiremod.com/forum/developers-showcase/22739-starfall-processor.html
Other
13 stars 6 forks source link

Add error callback to instances #116

Open ColonelThirtyTwo opened 12 years ago

ColonelThirtyTwo commented 12 years ago

Currently, there's no way for libraries running callback functions or their own hooks to tell the programs using the instance if the instance has errored. This can be solved with library hooks, yes, but library hooks are called for all instances, and most cleanup code isn't applicable for more than a few instances. So an error callback in the context would be nice.

Ex. A SF Processor's instance registers a timer callback. The timer library only sees the instance and not the underlying entity, and has no way of triggering the Processor's clean up code (turning red and updating the overlay text).