Entity Whitelist changes (#7426)

This commit is contained in:
Leon Friedrich
2022-04-06 17:21:45 +12:00
committed by GitHub
parent c2867cd9e5
commit f583d0b96a
5 changed files with 33 additions and 38 deletions

View File

@@ -155,19 +155,11 @@ namespace Content.Client.Actions
act.CopyFrom(serverAct);
serverActions.Remove(serverAct);
if (act is EntityTargetAction entAct)
{
entAct.Whitelist?.UpdateRegistrations();
}
}
// Anything that remains is a new action
foreach (var newAct in serverActions)
{
if (newAct is EntityTargetAction entAct)
entAct.Whitelist?.UpdateRegistrations();
// We create a new action, not just sorting a reference to the state's action.
component.Actions.Add((ActionType) newAct.Clone());
}