magic bread wand (#17044)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-06-03 19:08:52 +00:00
committed by GitHub
parent b4ecd61438
commit 2bef7bfa38
8 changed files with 152 additions and 28 deletions

View File

@@ -293,9 +293,16 @@ namespace Content.Server.Nutrition.EntitySystems
return;
}
if (string.IsNullOrEmpty(component.TrashPrototype))
EntityManager.QueueDeleteEntity(uid);
var ev = new BeforeFullyEatenEvent
{
User = args.User
};
RaiseLocalEvent(uid, ev);
if (ev.Cancelled)
return;
if (string.IsNullOrEmpty(component.TrashPrototype))
QueueDel(uid);
else
DeleteAndSpawnTrash(component, uid, args.User);
}