API changes, renamed SpawnEntityAt to SpawnEntity.
This commit is contained in:
@@ -4,8 +4,10 @@ using Content.Server.GameObjects.Components.Stack;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Power
|
||||
@@ -140,7 +142,7 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
if (eventArgs.AttackWith.TryGetComponent(out WirecutterComponent wirecutter))
|
||||
{
|
||||
Owner.Delete();
|
||||
var droppedEnt = Owner.EntityManager.SpawnEntityAt("CableStack", eventArgs.ClickLocation);
|
||||
var droppedEnt = Owner.EntityManager.SpawnEntity("CableStack", eventArgs.ClickLocation);
|
||||
|
||||
if (droppedEnt.TryGetComponent<StackComponent>(out var stackComp))
|
||||
stackComp.Count = 1;
|
||||
|
||||
@@ -4,8 +4,10 @@ using Robust.Server.GameObjects;
|
||||
using Robust.Server.Interfaces.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Transform;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Power
|
||||
{
|
||||
@@ -50,7 +52,8 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
if (Owner.TryGetComponent(out StackComponent stack) && !stack.Use(1))
|
||||
return;
|
||||
|
||||
var newWire = _entityManager.SpawnEntityAt("Wire", grid.GridTileToLocal(snapPos));
|
||||
GridCoordinates coordinates = grid.GridTileToLocal(snapPos);
|
||||
var newWire = _entityManager.SpawnEntity("Wire", coordinates);
|
||||
if (newWire.TryGetComponent(out SpriteComponent wireSpriteComp) && hasItemSpriteComp)
|
||||
{
|
||||
wireSpriteComp.Color = itemSpriteComp.Color;
|
||||
|
||||
Reference in New Issue
Block a user