Open Erlite opened 2 years ago
Spyglass_SanctionData
AddCallback_SpyglassOnSanctionRequired()
function to allow mods to add their own functions to the callback.Spyglass_ApplySanctionToPlayer()
function. This function should have the player, their infractions and infraction score as an input.Spyglass_ApplySanctionToPlayer()
should call all the callbacks to see if it should abort the default sanction or not. If not, apply defaults.
Basically have an array of callbacks to call prior to giving a player the default sanction. Mods should be able to prevent Spyglass from giving the default sanction (probably return true to override it). Local array of callbacks, global functions to register callbacks to it.