Skip to content

Commit

Permalink
Fix RCDSystem errors
Browse files Browse the repository at this point in the history
  • Loading branch information
GreaseMonk committed Apr 9, 2024
1 parent 1151db6 commit 354fb68
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Content.Shared/RCD/Systems/RCDSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
using Robust.Shared.Timing;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Robust.Shared.Audio;

namespace Content.Shared.RCD.Systems;

Expand Down Expand Up @@ -200,10 +201,6 @@ private void OnAfterInteract(EntityUid uid, RCDComponent component, AfterInterac

if (!_net.IsServer)
return;

if (!IsAuthorized(gridId, uid, comp, args)) {
return;
}

// Get the starting cost, delay, and effect from the prototype
var cost = component.CachedPrototype.Cost;
Expand Down Expand Up @@ -289,7 +286,7 @@ private bool IsAuthorized(EntityUid? gridId, EntityUid uid, RCDComponent comp, A
{
return true;
}
var mapGrid = _mapMan.GetGrid(gridId.Value);
var mapGrid = Comp<MapGridComponent>(gridId.Value);
var gridUid = mapGrid.Owner;

// Frontier - Remove all RCD use on outpost.
Expand Down Expand Up @@ -464,7 +461,7 @@ private bool IsConstructionLocationValid(EntityUid uid, RCDComponent component,
if (component.CachedPrototype.Mode == RcdMode.ConstructTile)
{
// Check rule: Tile placement is valid
if (!_floors.CanPlaceTile(mapGridData.GridUid, mapGridData.Component, out var reason))
if (!_floors.CanPlaceTile(mapGridData.GridUid, mapGridData.Component, null, out var reason))
{
if (popMsgs)
_popup.PopupClient(reason, uid, user);
Expand Down

0 comments on commit 354fb68

Please sign in to comment.