Skip to content

Commit

Permalink
baby proof the terminal (space-wizards#33281)
Browse files Browse the repository at this point in the history
* baby proof the terminal

* Make a couple exceptions for items that you might take with you.

* alwayspoweredlights

* Uncuttable cables since cablecomp is a snowflake construction system

* chairs and vendors

* rerun heisentests

* rerun tests again
  • Loading branch information
IProduceWidgets authored and Doctor-Cpu committed Jan 2, 2025
1 parent a4c7553 commit ef3567c
Show file tree
Hide file tree
Showing 5 changed files with 4,102 additions and 467 deletions.
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

0 comments on commit ef3567c

Please sign in to comment.