forked from space-syndicate/space-station-14
fix fish petting misprediction (#30175)
* make fish petting ignore use delay * m * troll --------- Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
@@ -32,23 +32,23 @@ public sealed class PettableFriendSystem : EntitySystem
|
||||
{
|
||||
var (uid, comp) = ent;
|
||||
var user = args.User;
|
||||
if (args.Handled || !_exceptionQuery.TryGetComponent(uid, out var exceptionComp))
|
||||
return;
|
||||
|
||||
if (_useDelayQuery.TryGetComponent(uid, out var useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true))
|
||||
if (args.Handled || !_exceptionQuery.TryComp(uid, out var exceptionComp))
|
||||
return;
|
||||
|
||||
var exception = (uid, exceptionComp);
|
||||
if (_factionException.IsIgnored(exception, user))
|
||||
if (!_factionException.IsIgnored(exception, user))
|
||||
{
|
||||
_popup.PopupClient(Loc.GetString(comp.FailureString, ("target", uid)), user, user);
|
||||
// you have made a new friend :)
|
||||
_popup.PopupClient(Loc.GetString(comp.SuccessString, ("target", uid)), user, user);
|
||||
_factionException.IgnoreEntity(exception, user);
|
||||
args.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// you have made a new friend :)
|
||||
_popup.PopupClient(Loc.GetString(comp.SuccessString, ("target", uid)), user, user);
|
||||
_factionException.IgnoreEntity(exception, user);
|
||||
args.Handled = true;
|
||||
if (_useDelayQuery.TryComp(uid, out var useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true))
|
||||
return;
|
||||
|
||||
_popup.PopupClient(Loc.GetString(comp.FailureString, ("target", uid)), user, user);
|
||||
}
|
||||
|
||||
private void OnRehydrated(Entity<PettableFriendComponent> ent, ref GotRehydratedEvent args)
|
||||
|
||||
Reference in New Issue
Block a user