Construction System. (#87)
* Construction WiP * Construction kinda works! * Lots more construction work. * It mostly works!
This commit is contained in:
committed by
GitHub
parent
f051078c79
commit
d7074bf74f
@@ -1,6 +1,7 @@
|
||||
using SS14.Server.GameObjects;
|
||||
using SS14.Server.Interfaces.GameObjects;
|
||||
using SS14.Shared.GameObjects;
|
||||
using SS14.Shared.Interfaces.GameObjects.Components;
|
||||
using SS14.Shared.IoC;
|
||||
using System;
|
||||
using System.Linq;
|
||||
@@ -56,10 +57,10 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
return;
|
||||
}
|
||||
var _emanager = IoCManager.Resolve<IServerEntityManager>();
|
||||
var position = Owner.GetComponent<TransformComponent>().WorldPosition;
|
||||
var position = Owner.GetComponent<ITransformComponent>().WorldPosition;
|
||||
var wires = _emanager.GetEntitiesIntersecting(Owner)
|
||||
.Where(x => x.HasComponent<PowerTransferComponent>())
|
||||
.OrderByDescending(x => (x.GetComponent<TransformComponent>().WorldPosition - position).Length);
|
||||
.OrderByDescending(x => (x.GetComponent<ITransformComponent>().WorldPosition - position).Length);
|
||||
var choose = wires.FirstOrDefault();
|
||||
if (choose != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user