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

@@ -49,7 +49,7 @@ namespace Content.Server.Nutrition.EntitySystems
SubscribeLocalEvent<FoodComponent, UseInHandEvent>(OnUseFoodInHand);
SubscribeLocalEvent<FoodComponent, AfterInteractEvent>(OnFeedFood);
SubscribeLocalEvent<FoodComponent, GetInteractionVerbsEvent>(AddEatVerb);
SubscribeLocalEvent<FoodComponent, GetVerbsEvent<InteractionVerb>>(AddEatVerb);
SubscribeLocalEvent<SharedBodyComponent, FeedEvent>(OnFeed);
SubscribeLocalEvent<ForceFeedCancelledEvent>(OnFeedCancelled);
SubscribeLocalEvent<InventoryComponent, IngestionAttemptEvent>(OnInventoryIngestAttempt);
@@ -245,7 +245,7 @@ namespace Content.Server.Nutrition.EntitySystems
EntityManager.QueueDeleteEntity(component.Owner);
}
private void AddEatVerb(EntityUid uid, FoodComponent component, GetInteractionVerbsEvent ev)
private void AddEatVerb(EntityUid uid, FoodComponent component, GetVerbsEvent<InteractionVerb> ev)
{
if (component.CancelToken != null)
return;
@@ -260,7 +260,7 @@ namespace Content.Server.Nutrition.EntitySystems
if (EntityManager.TryGetComponent<MobStateComponent>(uid, out var mobState) && mobState.IsAlive())
return;
Verb verb = new()
InteractionVerb verb = new()
{
Act = () =>
{