private IEnumerator ConstructAsync(Constructable c, bool state) { float amount = ((!state) ? powerConsumptionDeconstruct : powerConsumptionConstruct) * Time.deltaTime; this.EnergyMixin.ConsumeEnergy(amount); bool constructed = c.constructed; bool wasConstructed = c.constructed; bool flag; if (state) { flag = c.Construct(); } else { #if SUBNAUTICA_EXP || BZ TaskResult <bool> result = new TaskResult <bool>(); yield return(c.DeconstructAsync(result)); flag = result.Get(); result = null; #elif SUBNAUTICA_STABLE flag = c.Deconstruct(); #endif } if (!flag && state && !wasConstructed) { Utils.PlayFMODAsset(this.completeSound, c.transform, 20f); } yield break; }