PlaceableSurfaceSystem uses resolves.
This commit is contained in:
@@ -16,20 +16,29 @@ namespace Content.Shared.Placeable
|
||||
SubscribeLocalEvent<PlaceableSurfaceComponent, ComponentHandleState>(OnHandleState);
|
||||
}
|
||||
|
||||
public void SetPlaceable(PlaceableSurfaceComponent surface, bool isPlaceable)
|
||||
public void SetPlaceable(EntityUid uid, bool isPlaceable, PlaceableSurfaceComponent? surface = null)
|
||||
{
|
||||
if (!Resolve(uid, ref surface))
|
||||
return;
|
||||
|
||||
surface.IsPlaceable = isPlaceable;
|
||||
surface.Dirty();
|
||||
}
|
||||
|
||||
public void SetPlaceCentered(PlaceableSurfaceComponent surface, bool placeCentered)
|
||||
public void SetPlaceCentered(EntityUid uid, bool placeCentered, PlaceableSurfaceComponent? surface = null)
|
||||
{
|
||||
if (!Resolve(uid, ref surface))
|
||||
return;
|
||||
|
||||
surface.PlaceCentered = placeCentered;
|
||||
surface.Dirty();
|
||||
}
|
||||
|
||||
public void SetPositionOffset(PlaceableSurfaceComponent surface, Vector2 offset)
|
||||
public void SetPositionOffset(EntityUid uid, Vector2 offset, PlaceableSurfaceComponent? surface = null)
|
||||
{
|
||||
if (!Resolve(uid, ref surface))
|
||||
return;
|
||||
|
||||
surface.PositionOffset = offset;
|
||||
surface.Dirty();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user