private void InterruptProgress(string reason, ActionInterruptionType interruptionType) { if (progressActionConfig.AllowMovement == true) { return; } Logger.LogTraceFormat("Server progress bar {0} interrupted: {1}.", Category.ProgressAction, ProgressBar.ID, reason); ProgressBar.ServerInterruptProgress(); onInterruption?.Invoke(interruptionType); }
private static void ProgressInterruptedActionPriv(PositionalHandApply interaction, ActionInterruptionType reason, PlaceableTileEntry placeableTileEntry) { switch (reason) { case ActionInterruptionType.ChangeToPerformerActiveSlot: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"You lack the materials to finish placing {placeableTileEntry.layerTile.DisplayName}"); break; case ActionInterruptionType.PerformerUnconscious: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"You dream of placing {placeableTileEntry.layerTile.DisplayName}"); break; case ActionInterruptionType.WelderOff: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"You need the welder to be on to finish this"); break; case ActionInterruptionType.PerformerOrTargetMoved: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"Cannot place {placeableTileEntry.layerTile.DisplayName}, you or your target moved too much"); break; case ActionInterruptionType.TargetDespawn: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"Placing {placeableTileEntry.layerTile.DisplayName} has become a tall order, seeing as the conceptual physical placement space has ceased to exist"); break; case ActionInterruptionType.PerformerDirection: Chat.AddExamineMsgFromServer(interaction.PerformerPlayerScript.connectedPlayer, $"You have looked away from placing {placeableTileEntry.layerTile.DisplayName}"); break; } }