Skip to content

Commit

Permalink
Solve 1 issue cause 20 million more, still not working
Browse files Browse the repository at this point in the history
  • Loading branch information
Piras314 committed Jun 22, 2024
1 parent 61d1bc2 commit 1ba8b31
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed class RuneCasterSystem : SharedRuneCasterSystem
[Dependency] private readonly IPrototypeManager _prototypeManager = default!;

[Dependency] private readonly DecalSystem _decals = default!;
[Dependency] private readonly DoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly PopupSystem _popup = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly UserInterfaceSystem _uiSystem = default!;
Expand All @@ -52,7 +52,7 @@ public override void Initialize()
SubscribeLocalEvent<RuneCasterComponent, ComponentGetState>(OnRuneCasterGetState);

SubscribeLocalEvent<RuneCasterComponent, AfterInteractEvent>(OnRuneCasterAfterInteract);
SubscribeLocalEvent<RuneCasterComponent, RuneCasterDoAfterEvent>(DoAfterEvent);
SubscribeLocalEvent<RuneCasterComponent, RuneCasterDoAfterEvent>(OnDoAfter);
}

private static void OnRuneCasterGetState(EntityUid uid, RuneCasterComponent component, ref ComponentGetState args)
Expand Down Expand Up @@ -81,7 +81,8 @@ private void OnRuneCasterAfterInteract(EntityUid uid, RuneCasterComponent compon
}

// Wait, then cast the rune
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.ScanDoAfterDuration, new RuneCasterDoAfterEvent(), uid, target: target, used: uid) {});
// TODO: RuneCasterDoAfterDuration needs to be added to component
_doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.RuneCasterDoAfterDuration, new RuneCasterDoAfterEvent(), uid, target: target, used: uid) {});
}

private void OnDoAfter(EntityUid uid, RuneCasterComponent component, DoAfterEvent args)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Content.Shared.DoAfter;
using Robust.Shared.Serialization;

namespace Content.Shared.Goobstation.Cult.RuneCaster;

[Serializable, NetSerializable]
public sealed partial class RuneCasterDoAfterEvent : SimpleDoAfterEvent
{
}

0 comments on commit 1ba8b31

Please sign in to comment.