Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

baby proof the terminal #33281

Merged
merged 7 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Content.Server/Power/Components/CableComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ public sealed partial class CableComponent : Component
[DataField]
public EntProtoId CableDroppedOnCutPrototype = "CableHVStack1";

/// <summary>
/// The tool quality needed to cut the cable. Setting to null prevents cutting.
/// </summary>
[DataField]
public ProtoId<ToolQualityPrototype> CuttingQuality = SharedToolSystem.CutQuality;
public ProtoId<ToolQualityPrototype>? CuttingQuality = SharedToolSystem.CutQuality;

/// <summary>
/// Checked by <see cref="CablePlacerComponent"/> to determine if there is
Expand Down
5 changes: 4 additions & 1 deletion Content.Server/Power/EntitySystems/CableSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ private void OnInteractUsing(EntityUid uid, CableComponent cable, InteractUsingE
if (args.Handled)
return;

args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, cable.CuttingDelay, cable.CuttingQuality, new CableCuttingFinishedEvent());
if (cable.CuttingQuality != null)
{
args.Handled = _toolSystem.UseTool(args.Used, args.User, uid, cable.CuttingDelay, cable.CuttingQuality, new CableCuttingFinishedEvent());
}
}

private void OnCableCut(EntityUid uid, CableComponent cable, DoAfterEvent args)
Expand Down
Loading
Loading