Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -252,7 +252,7 @@ namespace Content.Server.Kitchen.EntitySystems
butcherable.BeingButchered = true;
component.InUse = true;
var doAfterArgs = new DoAfterArgs(userUid, component.SpikeDelay + butcherable.ButcherDelay, new SpikeDoAfterEvent(), uid, target: victimUid, used: uid)
var doAfterArgs = new DoAfterArgs(EntityManager, userUid, component.SpikeDelay + butcherable.ButcherDelay, new SpikeDoAfterEvent(), uid, target: victimUid, used: uid)
{
BreakOnTargetMove = true,
BreakOnUserMove = true,

View File

@@ -288,8 +288,8 @@ namespace Content.Server.Kitchen.EntitySystems
if (ui == null)
return;
UserInterfaceSystem.SetUiState(ui, new MicrowaveUpdateUserInterfaceState(
component.Storage.ContainedEntities.ToArray(),
_userInterface.SetUiState(ui, new MicrowaveUpdateUserInterfaceState(
GetNetEntityArray(component.Storage.ContainedEntities.ToArray()),
HasComp<ActiveMicrowaveComponent>(uid),
component.CurrentCookTimeButtonIndex,
component.CurrentCookTimerTime
@@ -482,7 +482,7 @@ namespace Content.Server.Kitchen.EntitySystems
if (!HasContents(component) || HasComp<ActiveMicrowaveComponent>(uid))
return;
component.Storage.Remove(args.EntityID);
component.Storage.Remove(EntityManager.GetEntity(args.EntityID));
UpdateUserInterfaceState(uid, component);
}

View File

@@ -206,7 +206,7 @@ namespace Content.Server.Kitchen.EntitySystems
this.IsPowered(uid, EntityManager),
canJuice,
canGrind,
inputContainer.ContainedEntities.Select(item => item).ToArray(),
GetNetEntityArray(inputContainer.ContainedEntities.ToArray()),
containerSolution?.Contents.ToArray()
);
_userInterfaceSystem.TrySetUiState(uid, ReagentGrinderUiKey.Key, state);
@@ -242,10 +242,11 @@ namespace Content.Server.Kitchen.EntitySystems
return;
var inputContainer = _containerSystem.EnsureContainer<Container>(uid, SharedReagentGrinder.InputContainerId);
var ent = GetEntity(message.EntityId);
if (inputContainer.Remove(message.EntityId))
if (inputContainer.Remove(ent))
{
message.EntityId.RandomOffset(0.4f);
ent.RandomOffset(0.4f);
ClickSound(uid, reagentGrinder);
UpdateUiState(uid);
}

View File

@@ -66,7 +66,7 @@ public sealed class SharpSystem : EntitySystem
return;
var doAfter =
new DoAfterArgs(user, sharp.ButcherDelayModifier * butcher.ButcherDelay, new SharpDoAfterEvent(), knife, target: target, used: knife)
new DoAfterArgs(EntityManager, user, sharp.ButcherDelayModifier * butcher.ButcherDelay, new SharpDoAfterEvent(), knife, target: target, used: knife)
{
BreakOnTargetMove = true,
BreakOnUserMove = true,