3 [
Attribute(
"true", UIWidgets.CheckBox,
"Set flashlights active or inactive?")]
4 protected bool m_bEnable;
9 override static string GetOnHoverDescription()
11 return "Sets all flashlights attached to vest enabled or disabled. Returns failure if no suitable flashlight found.";
16 override void OnInit(AIAgent owner)
22 protected override string GetNodeMiddleText()
24 return string.Format(
"Flashlights Enabled: %1", m_bEnable);
30 array<SCR_GadgetComponent> gadgets = gadgetManager.GetGadgetsByType(EGadgetType.FLASHLIGHT);
33 return ENodeResult.FAIL;
35 if (gadgets.IsEmpty())
36 return ENodeResult.FAIL;
39 foreach (SCR_GadgetComponent gadget : gadgets)
52 bool occluded = slot.IsOccluded();
54 gadget.ToggleActive(newState && !occluded);
59 return ENodeResult.SUCCESS;
61 return ENodeResult.FAIL;
65 static protected override bool VisibleInPalette()
76 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
79 return ENodeResult.FAIL;
85 override static protected bool VisibleInPalette()
96 override void OnAbort(AIAgent owner, Node nodeCausingAbort)
105 override ENodeResult EOnTaskSimulate(AIAgent owner,
float dt)
107 return ENodeResult.RUNNING;
111 override static protected bool VisibleInPalette()