Forensics (#8451)
* Port forensics from nyanotrasen * port updates * printing * Update Resources/Locale/en-US/forensics/forensics.ftl Co-authored-by: Veritius <veritiusgaming@gmail.com> * Update Content.Server/Forensics/Components/ForensicPadComponent.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Update Content.Server/Forensics/Systems/ForensicPadSystem.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * Update Content.Server/Forensics/Systems/ForensicScannerSystem.cs Co-authored-by: Kara <lunarautomaton6@gmail.com> * partially address reviews * comments * redo the events * handle it * rewrite loc * master fixes Co-authored-by: ike709 <ike709@github.com> Co-authored-by: Veritius <veritiusgaming@gmail.com> Co-authored-by: Kara <lunarautomaton6@gmail.com>
This commit is contained in:
@@ -75,6 +75,9 @@ namespace Content.Shared.ActionBlocker
|
||||
var targetEv = new GettingInteractedWithAttemptEvent(user, target);
|
||||
RaiseLocalEvent(target.Value, targetEv, true);
|
||||
|
||||
if (!targetEv.Cancelled)
|
||||
InteractWithItem(user, target.Value);
|
||||
|
||||
return !targetEv.Cancelled;
|
||||
}
|
||||
|
||||
@@ -128,6 +131,10 @@ namespace Content.Shared.ActionBlocker
|
||||
|
||||
var itemEv = new GettingPickedUpAttemptEvent(user, item);
|
||||
RaiseLocalEvent(item, itemEv, false);
|
||||
|
||||
if (!itemEv.Cancelled)
|
||||
InteractWithItem(user, item);
|
||||
|
||||
return !itemEv.Cancelled;
|
||||
|
||||
}
|
||||
@@ -171,5 +178,11 @@ namespace Content.Shared.ActionBlocker
|
||||
|
||||
return !ev.Cancelled;
|
||||
}
|
||||
|
||||
private void InteractWithItem(EntityUid user, EntityUid item)
|
||||
{
|
||||
var itemEvent = new UserInteractedWithItemEvent(user, item);
|
||||
RaiseLocalEvent(user, itemEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user