public void DetachCrate(IMovableSnappable detaching) { capturedResource = null; detachTimer = StartCoroutine(DetachCrateTimer()); PumpHandle.tag = "Untagged"; CurrentPumpStatus = PumpStatus.PumpOff; RefreshPumpState(); if (connectedPumpable != null) { connectedPumpable.OnAdjacentChanged(); //trigger a recalculate for the connected thing } }
public static void RemoveAdjacentPumpable(IPumpable adjacentAlpha, IPumpable adjacentBeta) { adjacentAlpha.AdjacentPumpables.Remove(adjacentBeta); adjacentBeta.AdjacentPumpables.Remove(adjacentAlpha); adjacentAlpha.OnAdjacentChanged(); adjacentBeta.OnAdjacentChanged(); }