public override void SetupBehavior() { base.SetupBehavior(); if (ClassicItemsCompat.enabled) { ClassicItemsCompat.RegisterEmbryo(catalogIndex); } }
protected override bool PerformEquipmentAction(EquipmentSlot slot) { CharacterBody body = slot.characterBody; if (!body) { return(false); } InteractionDriver interactionDriver = body.GetComponent <InteractionDriver>(); if (!interactionDriver) { return(false); } GameObject BestInteractableObject = interactionDriver.FindBestInteractableObject(); if (!BestInteractableObject) { return(false); } PurchaseInteraction purchaseInteraction = BestInteractableObject.GetComponent <PurchaseInteraction>(); if (!purchaseInteraction) { return(false); } float newUnlockChance = TrustyLockpicks_UnlockChance; if (ClassicItemsCompat.enabled && ClassicItemsCompat.CheckEmbryoProc(instance, body)) { newUnlockChance *= 1.3f; } //interactionDriver.interactor.interactableCooldown = 0.25f; if (AttemptUnlock(BestInteractableObject, interactionDriver, newUnlockChance)) { return(true); } else { return(false); } }