public bool WillInteract(HandApply interaction, NetworkSide side) { if (DefaultWillInteract.HandApply(interaction, side) == false) { return(false); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Wrench)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Welder)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Id)) { return(true); } if (interaction.HandObject == null) { return(true); } return(false); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (DefaultWillInteract.HandApply(interaction, side) == false) { return(false); } if (interaction.HandObject != this.gameObject) { return(false); } var Healthv2 = interaction.TargetObject.GetComponent <LivingHealthMasterBase>(); if (Healthv2 == null) { return(false); } var equipment = interaction.Performer.GetComponent <Equipment>(); if (equipment == null) { return(false); } var ObjectInSlot = equipment.GetClothingItem(NamedSlot.back).GameObjectReference; if (ObjectInSlot == null) { return(false); } if (Validations.HasItemTrait(ObjectInSlot, DefibrillatorTrait) == false) { return(false); } return(true); }
public bool Interact(HandApply interaction) { if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Client)) { return(false); } if (!SelfPowered) { if (RelatedAPC == null) { return(false); } if (RelatedAPC.Voltage == 0f) { return(false); } } if (switchCoolDown) { return(false); } StartCoroutine(CoolDown()); PlayerManager.LocalPlayerScript.playerNetworkActions.CmdToggleLightSwitch(gameObject); return(true); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (DefaultWillInteract.HandApply(interaction, side) == false) { return(false); } return(Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Emag)); }
public bool Interact(HandApply interaction) { if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Client)) { return(false); } InteractionMessageUtils.SendRequest(interaction, this); return(true); }
public bool ServerProcessInteraction(HandApply interaction) { if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Server)) { return(false); } isOn = !isOn; UpdateServerState(isOn); return(true); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (!DefaultWillInteract.HandApply(interaction, side)) { return(false); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Screwdriver)) { return(true); } return(false); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (DefaultWillInteract.HandApply(interaction, side) == false) { return(false); } if (Validations.HasItemTrait(interaction.HandObject, deconstructToolTrait)) { return(true); } return(false); }
public bool WillInteract(HandApply interaction, NetworkSide side) { //using wrench if (DefaultWillInteract.HandApply(interaction, side) && Validations.HasItemTrait(interaction.UsedObject, CommonTraits.Instance.Wrench)) { return(true); } //using any fillable gas container else if (DefaultWillInteract.HandApply(interaction, side) && Validations.HasItemTrait(interaction.UsedObject, CommonTraits.Instance.CanisterFillable)) { return(true); } else { return(false); } }
public bool Interact(HandApply interaction) { if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Client)) { return(false); } if (interaction.TargetObject != gameObject) { return(false); } if (!Validations.HasComponent <Welder>(interaction.HandObject)) { return(false); } PlayerManager.PlayerScript.playerNetworkActions.CmdRefillWelder(interaction.HandObject, gameObject); return(true); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (!DefaultWillInteract.HandApply(interaction, side)) { return(false); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Wrench)) { return(true); } if (interaction.HandObject == null) { return(true); } //TODO adding/removing tank logic return(false); }
public bool Interact(HandApply interaction) { if (!DefaultWillInteract.HandApply(interaction, NetworkSide.Client)) { return(false); } //if the button is idle and not animating it can be pressed //this is weird it should check all children objects to see if they are idle and finished if (animator.GetCurrentAnimatorStateInfo(0).IsName("Idle")) { PlayerManager.LocalPlayerScript.playerNetworkActions.CmdToggleShutters(gameObject); return(true); } else { Logger.Log("DOOR NOT FINISHED CLOSING YET!", Category.Shutters); } return(false); }
public bool WillInteract(HandApply interaction, NetworkSide side) { if (DefaultWillInteract.HandApply(interaction, side) == false) { return(false); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Welder)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Wrench)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.Screwdriver)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.GlassSheet)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.ReinforcedGlassSheet)) { return(true); } if (Validations.HasItemTrait(interaction.HandObject, CommonTraits.Instance.DiamondSheet)) { return(true); } return(false); }
protected override bool WillInteract(HandApply interaction, NetworkSide side) { //only wrench can be used return(DefaultWillInteract.HandApply(interaction, side) && Validations.IsTool(interaction.UsedObject, ToolType.Wrench)); }
public bool WillInteract(HandApply interaction, NetworkSide side) { //only wrench can be used return(DefaultWillInteract.HandApply(interaction, side) && Validations.HasItemTrait(interaction.UsedObject, CommonTraits.Instance.Wrench)); }