//-----------------------------------------------------------
//
//  - UnrealRider -  UR_ShieldGeneratorEvent
//  Written/tested by Erwan Allain (zall1@hotmail.com)
//
//  event thrown when a generator change its state
//
//-----------------------------------------------------------
class UR_ShieldGeneratorEvent extends SequenceEvent;

function notifyShieldGeneratorEvent(name EventType, UR_ShieldGenerator UR_SG)
{
        local array<int> ActivateIndices;
        local int i;

        for (i = 0; i < OutputLinks.length; i++)
                if (EventType == name(OutputLinks[i].LinkDesc))
                        ActivateIndices[ActivateIndices.length] = i;

        if (ActivateIndices.length == 0)
                ScriptLog("Not activating" @ self @ "for event" @ EventType @ "because there are no matching outputs");
        else
          CheckActivate(Originator, UR_SG, false, ActivateIndices);

}

defaultproperties
{
   bPlayerOnly=False
   OutputLinks(0)=(LinkDesc="disable")
   OutputLinks(1)=(LinkDesc="enable")
   ObjClassVersion=2
   MaxTriggerCount=0
   ObjName="ShieldGeneratorEvent"
   ObjCategory="UR_Event"
}