Decouple interactions from hands, cleanup old events, add new fears (#28393)
* ok basic shit * second part * pretend it isn't real it can't hurt you. * 👁️ 👁️ * shadowcommander review
This commit is contained in:
@@ -43,7 +43,7 @@ public sealed partial class RevenantSystem
|
||||
|
||||
private void InitializeAbilities()
|
||||
{
|
||||
SubscribeLocalEvent<RevenantComponent, InteractNoHandEvent>(OnInteract);
|
||||
SubscribeLocalEvent<RevenantComponent, UserActivateInWorldEvent>(OnInteract);
|
||||
SubscribeLocalEvent<RevenantComponent, SoulEvent>(OnSoulSearch);
|
||||
SubscribeLocalEvent<RevenantComponent, HarvestEvent>(OnHarvest);
|
||||
|
||||
@@ -53,11 +53,14 @@ public sealed partial class RevenantSystem
|
||||
SubscribeLocalEvent<RevenantComponent, RevenantMalfunctionActionEvent>(OnMalfunctionAction);
|
||||
}
|
||||
|
||||
private void OnInteract(EntityUid uid, RevenantComponent component, InteractNoHandEvent args)
|
||||
private void OnInteract(EntityUid uid, RevenantComponent component, UserActivateInWorldEvent args)
|
||||
{
|
||||
if (args.Target == args.User || args.Target == null)
|
||||
if (args.Handled)
|
||||
return;
|
||||
var target = args.Target.Value;
|
||||
|
||||
if (args.Target == args.User)
|
||||
return;
|
||||
var target = args.Target;
|
||||
|
||||
if (HasComp<PoweredLightComponent>(target))
|
||||
{
|
||||
@@ -78,6 +81,8 @@ public sealed partial class RevenantSystem
|
||||
{
|
||||
BeginHarvestDoAfter(uid, target, component, essence);
|
||||
}
|
||||
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void BeginSoulSearchDoAfter(EntityUid uid, EntityUid target, RevenantComponent revenant)
|
||||
|
||||
Reference in New Issue
Block a user