Content update for NetEntities (#18935)
This commit is contained in:
@@ -54,7 +54,7 @@ namespace Content.Client.Storage
|
||||
|
||||
if (args.Event.Function == EngineKeyFunctions.UIClick)
|
||||
{
|
||||
SendMessage(new StorageInteractWithItemEvent(entity));
|
||||
SendMessage(new StorageInteractWithItemEvent(EntMan.GetNetEntity(entity)));
|
||||
}
|
||||
else if (EntMan.EntityExists(entity))
|
||||
{
|
||||
@@ -76,11 +76,11 @@ namespace Content.Client.Storage
|
||||
else if (args.Function == ContentKeyFunctions.ActivateItemInWorld)
|
||||
{
|
||||
EntMan.EntityNetManager?.SendSystemNetworkMessage(
|
||||
new InteractInventorySlotEvent(entity, altInteract: false));
|
||||
new InteractInventorySlotEvent(EntMan.GetNetEntity(entity), altInteract: false));
|
||||
}
|
||||
else if (args.Function == ContentKeyFunctions.AltActivateItemInWorld)
|
||||
{
|
||||
EntMan.RaisePredictiveEvent(new InteractInventorySlotEvent(entity, altInteract: true));
|
||||
EntMan.RaisePredictiveEvent(new InteractInventorySlotEvent(EntMan.GetNetEntity(entity), altInteract: true));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,18 +19,20 @@ public sealed class StorageSystem : EntitySystem
|
||||
/// <param name="msg"></param>
|
||||
public void HandleAnimatingInsertingEntities(AnimateInsertingEntitiesEvent msg)
|
||||
{
|
||||
if (!TryComp(msg.Storage, out ClientStorageComponent? storage))
|
||||
var store = GetEntity(msg.Storage);
|
||||
|
||||
if (!HasComp<ClientStorageComponent>(store))
|
||||
return;
|
||||
|
||||
TryComp(msg.Storage, out TransformComponent? transformComp);
|
||||
TryComp(store, out TransformComponent? transformComp);
|
||||
|
||||
for (var i = 0; msg.StoredEntities.Count > i; i++)
|
||||
{
|
||||
var entity = msg.StoredEntities[i];
|
||||
var entity = GetEntity(msg.StoredEntities[i]);
|
||||
var initialPosition = msg.EntityPositions[i];
|
||||
if (EntityManager.EntityExists(entity) && transformComp != null)
|
||||
{
|
||||
ReusableAnimations.AnimateEntityPickup(entity, initialPosition, transformComp.LocalPosition, msg.EntityAngles[i], EntityManager);
|
||||
ReusableAnimations.AnimateEntityPickup(entity, GetCoordinates(initialPosition), transformComp.LocalPosition, msg.EntityAngles[i], EntityManager);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ namespace Content.Client.Storage.UI
|
||||
/// </summary>
|
||||
public void BuildEntityList(StorageBoundUserInterfaceState state)
|
||||
{
|
||||
var list = state.StoredEntities.ConvertAll(uid => new EntityListData(uid));
|
||||
var list = state.StoredEntities.ConvertAll(nent => new EntityListData(_entityManager.GetEntity(nent)));
|
||||
EntityList.PopulateList(list);
|
||||
|
||||
//Sets information about entire storage container current capacity
|
||||
|
||||
Reference in New Issue
Block a user