committed by
GitHub
parent
e8e1c9dd1f
commit
415b7e96fd
@@ -45,7 +45,7 @@ namespace Content.Client
|
||||
PopupMessage(_eyeManager.WorldToScreen(message.Coordinates), message.Message);
|
||||
}
|
||||
|
||||
public override void PopupMessage(GridLocalCoordinates coordinates, IEntity viewer, string message)
|
||||
public override void PopupMessage(GridCoordinates coordinates, IEntity viewer, string message)
|
||||
{
|
||||
if (viewer != _playerManager.LocalPlayer.ControlledEntity)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ namespace Content.Client
|
||||
{
|
||||
var label = new PopupLabel {Text = message};
|
||||
var minimumSize = label.CombinedMinimumSize;
|
||||
label.InitialPos = label.Position = coordinates.AsVector - minimumSize / 2;
|
||||
label.InitialPos = label.Position = coordinates.Position - minimumSize / 2;
|
||||
_userInterfaceManager.StateRoot.AddChild(label);
|
||||
_aliveLabels.Add(label);
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ namespace Content.Client.Construction
|
||||
if (prototype.Type != ConstructionType.Structure)
|
||||
{
|
||||
// In-hand attackby doesn't exist so this is the best alternative.
|
||||
var loc = Owner.Owner.GetComponent<ITransformComponent>().LocalPosition;
|
||||
var loc = Owner.Owner.GetComponent<ITransformComponent>().GridPosition;
|
||||
Owner.SpawnGhost(prototype, loc, Direction.North);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Content.Client.Construction
|
||||
Owner = owner;
|
||||
}
|
||||
|
||||
public override bool HijackPlacementRequest(GridLocalCoordinates coords)
|
||||
public override bool HijackPlacementRequest(GridCoordinates coords)
|
||||
{
|
||||
if (Prototype != null)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Content.Client.GameObjects.Components.Construction
|
||||
Button?.Dispose();
|
||||
}
|
||||
|
||||
public void SpawnGhost(ConstructionPrototype prototype, GridLocalCoordinates loc, Direction dir)
|
||||
public void SpawnGhost(ConstructionPrototype prototype, GridCoordinates loc, Direction dir)
|
||||
{
|
||||
var entMgr = IoCManager.Resolve<IClientEntityManager>();
|
||||
var ghost = entMgr.ForceSpawnEntityAt("constructionghost", loc);
|
||||
@@ -80,7 +80,7 @@ namespace Content.Client.GameObjects.Components.Construction
|
||||
{
|
||||
var ghost = Ghosts[ghostId];
|
||||
var transform = ghost.Owner.GetComponent<ITransformComponent>();
|
||||
var msg = new TryStartStructureConstructionMessage(transform.LocalPosition, ghost.Prototype.ID, transform.LocalRotation, ghostId);
|
||||
var msg = new TryStartStructureConstructionMessage(transform.GridPosition, ghost.Prototype.ID, transform.LocalRotation, ghostId);
|
||||
SendNetworkMessage(msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace Content.Client.GameObjects.Components.Weapons.Ranged
|
||||
private TimeSpan _lastFireTime;
|
||||
private int _tick;
|
||||
|
||||
public void TryFire(GridLocalCoordinates worldPos)
|
||||
public void TryFire(GridCoordinates worldPos)
|
||||
{
|
||||
var curTime = IoCManager.Resolve<IGameTiming>().CurTime;
|
||||
var span = curTime - _lastFireTime;
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
||||
RaiseNetworkEvent(new VerbSystemMessages.RequestVerbsMessage(_currentEntity));
|
||||
|
||||
var size = vBox.CombinedMinimumSize;
|
||||
var box = UIBox2.FromDimensions(screenCoordinates.AsVector, size);
|
||||
var box = UIBox2.FromDimensions(screenCoordinates.Position, size);
|
||||
_currentPopup.Open(box);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user