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

@@ -180,9 +180,9 @@ namespace Content.Client.Verbs
public SortedSet<Verb> GetVerbs(EntityUid target, EntityUid user, List<Type> verbTypes,
bool force = false)
{
if (!target.IsClientSide())
if (!IsClientSide(target))
{
RaiseNetworkEvent(new RequestServerVerbsEvent(target, verbTypes, adminRequest: force));
RaiseNetworkEvent(new RequestServerVerbsEvent(GetNetEntity(target), verbTypes, adminRequest: force));
}
// Some admin menu interactions will try get verbs for entities that have not yet been sent to the player.
@@ -214,11 +214,11 @@ namespace Content.Client.Verbs
return;
}
if (verb.ClientExclusive || target.IsClientSide())
if (verb.ClientExclusive || IsClientSide(target))
// is this a client exclusive (gui) verb?
ExecuteVerb(verb, user.Value, target);
else
EntityManager.RaisePredictiveEvent(new ExecuteVerbEvent(target, verb));
EntityManager.RaisePredictiveEvent(new ExecuteVerbEvent(GetNetEntity(target), verb));
}
private void HandleVerbResponse(VerbsResponseEvent msg)