public bool Start(InteractionEvent interactionEvent, InteractionReference reference) { if (interactionEvent.Source is IGameObjectProvider provider) { SubstanceContainer container = provider.GameObject.GetComponent <SubstanceContainer>(); if (container != null) { container.AddSubstance(Substance.Substance, Substance.Moles); container.MarkDirty(); } } return(false); }
public bool Start(InteractionEvent interactionEvent, InteractionReference reference) { if (interactionEvent.Source is IGameObjectProvider provider) { SubstanceContainer container = provider.GameObject.GetComponent <SubstanceContainer>(); if (container != null) { var targetContainer = interactionEvent.Target.GetComponent <SubstanceContainer>(); container.TransferVolume(targetContainer, 25); container.MarkDirty(); targetContainer.MarkDirty(); } } return(false); }