private static bool ClientCanRelocateStructure(IStaticWorldObject worldObject)
 {
     return(ClientComponentObjectInteractionHelper.MouseOverObject == worldObject &&
            ClientHotbarSelectedItemManager.SelectedItem?.ProtoItem is IProtoItemToolToolbox &&
            !ConstructionRelocationSystem.IsInObjectPlacementMode &&
            ConstructionRelocationSystem.SharedIsRelocatable(worldObject));
 }
        private static void Update()
        {
            if (LoadingSplashScreenManager.Instance.CurrentState
                != LoadingSplashScreenState.Hidden)
            {
                return;
            }

            IStaticWorldObject    worldObject    = null;
            IProtoObjectStructure protoStructure = null;

            var selectedProtoItem = ClientHotbarSelectedItemManager.SelectedItem?.ProtoItem;

            if (selectedProtoItem is IProtoItemToolToolbox ||
                selectedProtoItem is IProtoItemToolCrowbar)
            {
                worldObject    = ClientComponentObjectInteractionHelper.MouseOverObject as IStaticWorldObject;
                protoStructure = worldObject?.ProtoGameObject as IProtoObjectStructure;
            }

            if (currentTooltipsWorldObject != worldObject)
            {
                tooltipBuildOrRepair?.Destroy();
                tooltipBuildOrRepair = null;

                tooltipRelocate?.Destroy();
                tooltipRelocate = null;

                tooltipDeconstruct?.Destroy();
                tooltipDeconstruct = null;

                currentTooltipsWorldObject = worldObject;
            }

            if (protoStructure is null)
            {
                return;
            }

            // process structure repair tooltip
            var isBuildTooltipRequired
                = selectedProtoItem is IProtoItemToolToolbox &&
                  protoStructure.ClientIsConstructionOrRepairRequirementsTooltipShouldBeDisplayed(worldObject);

            if (tooltipBuildOrRepair is null)
            {
                if (isBuildTooltipRequired)
                {
                    tooltipBuildOrRepair = ConstructionOrRepairRequirementsTooltip.CreateAndAttach(worldObject);
                }
            }
            else if (!isBuildTooltipRequired)
            {
                tooltipBuildOrRepair.Destroy();
                tooltipBuildOrRepair = null;
            }

            // process structure relocation tooltip
            var canRelocate = selectedProtoItem is IProtoItemToolToolbox &&
                              !ConstructionRelocationSystem.IsInObjectPlacementMode &&
                              ConstructionRelocationSystem.SharedIsRelocatable(worldObject);

            if (tooltipRelocate is null)
            {
                if (canRelocate)
                {
                    tooltipRelocate = ConstructionRelocationTooltip.CreateAndAttach(worldObject);
                }
            }
            else if (!canRelocate)
            {
                tooltipRelocate.Destroy();
                tooltipRelocate = null;
            }

            // process structure deconstruction tooltip
            var canDeconstruct = selectedProtoItem is IProtoItemToolCrowbar &&
                                 DeconstructionSystem.SharedIsDeconstructable(protoStructure);

            if (tooltipDeconstruct is null)
            {
                if (canDeconstruct)
                {
                    tooltipDeconstruct = ConstructionDeconstructTooltip.CreateAndAttach(worldObject);
                }
            }
            else if (!canDeconstruct)
            {
                tooltipDeconstruct.Destroy();
                tooltipDeconstruct = null;
            }
        }