From de2ab29f349871797182d105918d3e9c013661e5 Mon Sep 17 00:00:00 2001 From: Plykiya <58439124+Plykiya@users.noreply.github.com> Date: Fri, 12 Jul 2024 21:06:54 -0700 Subject: [PATCH] Update SmokingSystem.SmokingPipe.cs to not use Component.Owner (#29967) Update SmokingSystem.SmokingPipe.cs Co-authored-by: plykiya --- .../EntitySystems/SmokingSystem.SmokingPipe.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Content.Server/Nutrition/EntitySystems/SmokingSystem.SmokingPipe.cs b/Content.Server/Nutrition/EntitySystems/SmokingSystem.SmokingPipe.cs index 3950c73eb4..26d86acd54 100644 --- a/Content.Server/Nutrition/EntitySystems/SmokingSystem.SmokingPipe.cs +++ b/Content.Server/Nutrition/EntitySystems/SmokingSystem.SmokingPipe.cs @@ -42,7 +42,7 @@ namespace Content.Server.Nutrition.EntitySystems if (!isHotEvent.IsHot) return; - if (TryTransferReagents(entity.Comp, smokable)) + if (TryTransferReagents(entity, (entity.Owner, smokable))) SetSmokableState(entity, SmokableState.Lit, smokable); args.Handled = true; } @@ -62,7 +62,7 @@ namespace Content.Server.Nutrition.EntitySystems if (!isHotEvent.IsHot) return; - if (TryTransferReagents(entity.Comp, smokable)) + if (TryTransferReagents(entity, (entity.Owner, smokable))) SetSmokableState(entity, SmokableState.Lit, smokable); args.Handled = true; } @@ -74,15 +74,15 @@ namespace Content.Server.Nutrition.EntitySystems } // Convert smokable item into reagents to be smoked - private bool TryTransferReagents(SmokingPipeComponent component, SmokableComponent smokable) + private bool TryTransferReagents(Entity entity, Entity smokable) { - if (component.BowlSlot.Item == null) + if (entity.Comp.BowlSlot.Item == null) return false; - EntityUid contents = component.BowlSlot.Item.Value; + EntityUid contents = entity.Comp.BowlSlot.Item.Value; if (!TryComp(contents, out var reagents) || - !_solutionContainerSystem.TryGetSolution(smokable.Owner, smokable.Solution, out var pipeSolution, out _)) + !_solutionContainerSystem.TryGetSolution(smokable.Owner, smokable.Comp.Solution, out var pipeSolution, out _)) return false; foreach (var (_, soln) in _solutionContainerSystem.EnumerateSolutions((contents, reagents))) @@ -93,7 +93,7 @@ namespace Content.Server.Nutrition.EntitySystems EntityManager.DeleteEntity(contents); - _itemSlotsSystem.SetLock(component.Owner, component.BowlSlot, true); //no inserting more until current runs out + _itemSlotsSystem.SetLock(entity.Owner, entity.Comp.BowlSlot, true); //no inserting more until current runs out return true; } -- 2.51.2