MaterialComponent cleanup (#13326)

This commit is contained in:
Leon Friedrich
2023-01-08 11:36:32 +13:00
committed by GitHub
parent 89301629f5
commit 1f5bae751f
12 changed files with 70 additions and 75 deletions

View File

@@ -217,7 +217,7 @@ namespace Content.Server.Lathe
private void OnMaterialEntityInserted(EntityUid uid, LatheComponent component, MaterialEntityInsertedEvent args)
{
var lastMat = args.Materials.Keys.Last();
var lastMat = args.MaterialComp.Materials.Keys.Last();
// We need the prototype to get the color
_proto.TryIndex(lastMat, out MaterialPrototype? matProto);
EnsureComp<LatheInsertingComponent>(uid).TimeRemaining = component.InsertionTime;