Skip to content

Commit

Permalink
Bug fix for deconstructing tiles and lattice with RCDs (space-wizards…
Browse files Browse the repository at this point in the history
…#26863)

* Fixed mixed deconstruction times for tiles and lattice

* Lattice and power cables can be deconstructed instantly
  • Loading branch information
chromiumboy authored Apr 11, 2024
1 parent 00dc997 commit fc5a90b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Content.Shared/RCD/Systems/RCDSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ private void OnAfterInteract(EntityUid uid, RCDComponent component, AfterInterac
else
{
var deconstructedTile = _mapSystem.GetTileRef(mapGridData.Value.GridUid, mapGridData.Value.Component, mapGridData.Value.Location);
var protoName = deconstructedTile.IsSpace() ? _deconstructTileProto : _deconstructLatticeProto;
var protoName = !deconstructedTile.IsSpace() ? _deconstructTileProto : _deconstructLatticeProto;

if (_protoManager.TryIndex(protoName, out var deconProto))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
damageModifierSet: Metallic
- type: RCDDeconstructable
cost: 2
delay: 2
fx: EffectRCDDeconstruct2
delay: 0
fx: EffectRCDConstruct0
- type: Destructible
thresholds:
- trigger:
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/Entities/Structures/Power/cables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
node: power
- type: RCDDeconstructable
cost: 2
delay: 2
fx: EffectRCDDeconstruct2
delay: 0
fx: EffectRCDConstruct0

- type: entity
parent: CableBase
Expand Down
4 changes: 2 additions & 2 deletions Resources/Prototypes/RCD/rcd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
name: rcd-component-deconstruct
mode: Deconstruct
cost: 2
delay: 1
delay: 0
rotation: Camera
fx: EffectRCDDeconstruct2
fx: EffectRCDConstruct0

- type: rcd
id: DeconstructTile # Hidden prototype - do not add to RCDs
Expand Down

0 comments on commit fc5a90b

Please sign in to comment.