public bool InteractUsing(InteractUsingEventArgs eventArgs) { if (!eventArgs.Using.TryGetComponent(out PowerStorageComponent component)) { return(false); } if (capacitorComponent.Full) { Owner.PopupMessage(eventArgs.User, "Capacitor at max charge"); return(false); } capacitorComponent.FillFrom(component); return(true); }
public bool AttackBy(AttackByEventArgs eventArgs) { if (!eventArgs.AttackWith.TryGetComponent(out PowerStorageComponent component)) { return(false); } if (capacitorComponent.Full) { Owner.PopupMessage(eventArgs.User, "Capacitor at max charge"); return(false); } capacitorComponent.FillFrom(component); return(true); }
public bool Attackby(IEntity user, IEntity attackwith) { if (!attackwith.TryGetComponent(out PowerStorageComponent component)) { return(false); } if (capacitorComponent.Full) { Owner.PopupMessage(user, "Capacitor at max charge"); return(false); } capacitorComponent.FillFrom(component); return(true); }