Delete FoodComponent, migrate prototypes to EdibleComponent (#41070)

* yml

* yml fixes

* cs

* document regression

* comment

* organs fix

* diona consistency

* push

---------

Co-authored-by: iaada <iaada@users.noreply.github.com>
Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
āda
2025-10-24 13:32:14 -05:00
committed by GitHub
parent 9008f776ec
commit 48e2b2d263
30 changed files with 76 additions and 382 deletions

View File

@@ -33,8 +33,6 @@ namespace Content.Server.Nutrition.EntitySystems
{
base.Initialize();
// activate BEFORE entity is deleted and trash is spawned
SubscribeLocalEvent<CreamPieComponent, ConsumeDoAfterEvent>(OnConsume, before: [typeof(FoodSystem)]);
SubscribeLocalEvent<CreamPieComponent, SliceFoodEvent>(OnSlice);
SubscribeLocalEvent<CreamPiedComponent, RejuvenateEvent>(OnRejuvenate);
@@ -59,10 +57,10 @@ namespace Content.Server.Nutrition.EntitySystems
QueueDel(entity);
}
private void OnConsume(Entity<CreamPieComponent> entity, ref ConsumeDoAfterEvent args)
{
ActivatePayload(entity);
}
// TODO
// A regression occured here. Previously creampies would activate their hidden payload if you tried to eat them.
// However, the refactor to IngestionSystem caused the event to not be reached,
// because eating is blocked if an item is inside the food.
private void OnSlice(Entity<CreamPieComponent> entity, ref SliceFoodEvent args)
{