Replace VerbTypes with verb classes (#6525)

This commit is contained in:
Leon Friedrich
2022-02-10 15:30:59 +13:00
committed by GitHub
parent 0cd2c2fa9d
commit 1c9ffdc78c
60 changed files with 409 additions and 405 deletions

View File

@@ -15,12 +15,12 @@ public class FollowerSystem : EntitySystem
{
base.Initialize();
SubscribeLocalEvent<GetAlternativeVerbsEvent>(OnGetAlternativeVerbs);
SubscribeLocalEvent<GetVerbsEvent<AlternativeVerb>>(OnGetAlternativeVerbs);
SubscribeLocalEvent<FollowerComponent, RelayMoveInputEvent>(OnFollowerMove);
SubscribeLocalEvent<FollowedComponent, EntityTerminatingEvent>(OnFollowedTerminating);
}
private void OnGetAlternativeVerbs(GetAlternativeVerbsEvent ev)
private void OnGetAlternativeVerbs(GetVerbsEvent<AlternativeVerb> ev)
{
if (!HasComp<SharedGhostComponent>(ev.User))
return;
@@ -28,7 +28,7 @@ public class FollowerSystem : EntitySystem
if (ev.User == ev.Target)
return;
var verb = new Verb
var verb = new AlternativeVerb
{
Priority = 10,
Act = (() =>