7 [
Attribute(
"1", UIWidgets.CheckBox,
"Only if gadget is in hands",
"")]
8 protected bool m_bEquipped;
10 [
Attribute(
"0", UIWidgets.CheckBox,
"Only if gadget is not in hands and in ",
"")]
11 protected bool m_bNotEquipped;
13 [
Attribute(
"1", UIWidgets.CheckBox,
"Specified gadget type",
"")]
14 protected bool m_bCheckSpecificGadget;
16 [
Attribute(defvalue:
SCR_Enum.GetDefault(EGadgetType.MAP), UIWidgets.ComboBox,
"Gadget type",
"", ParamEnumArray.FromEnum(EGadgetType))]
17 protected EGadgetType m_eGadget;
19 [
Attribute(
"0", UIWidgets.CheckBox,
"Pass if the gadget is turned on",
"")]
20 protected bool m_bIsToggledOn;
22 [
Attribute(
"0", UIWidgets.CheckBox,
"Pass if the gadget is turned off",
"")]
23 protected bool m_bIsToggledOff;
35 SCR_GadgetComponent gadgetComponent =
data.GetHeldGadgetComponent();
38 if (m_bCheckSpecificGadget)
39 equipped = gadgetComponent.GetType() == m_eGadget;
45 if (equipped && m_bNotEquipped)
56 gadgetComponent =
null;
59 IEntity gadget =
data.GetGadget(m_eGadget);
64 if (m_bIsToggledOn || m_bIsToggledOff)
65 gadgetComponent = SCR_GadgetComponent.Cast(gadget.FindComponent(SCR_GadgetComponent));
71 if (result && (m_bIsToggledOn || m_bIsToggledOff))
74 bool isToggledOn = gadgetComponent && gadgetComponent.IsToggledOn();
75 if (isToggledOn && m_bIsToggledOn)
77 else if (!isToggledOn && m_bIsToggledOff)
83 return GetReturnResult(result);