if (!isHotEvent.IsHot)
return;
- if (TryTransferReagents(entity.Comp, smokable))
+ if (TryTransferReagents(entity, (entity.Owner, smokable)))
SetSmokableState(entity, SmokableState.Lit, smokable);
args.Handled = true;
}
if (!isHotEvent.IsHot)
return;
- if (TryTransferReagents(entity.Comp, smokable))
+ if (TryTransferReagents(entity, (entity.Owner, smokable)))
SetSmokableState(entity, SmokableState.Lit, smokable);
args.Handled = true;
}
}
// Convert smokable item into reagents to be smoked
- private bool TryTransferReagents(SmokingPipeComponent component, SmokableComponent smokable)
+ private bool TryTransferReagents(Entity<SmokingPipeComponent> entity, Entity<SmokableComponent> 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<SolutionContainerManagerComponent>(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)))
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;
}