azalea
azalea copied to clipboard
`SwarmEvent` should have either a periodic or “tick” option.
Right now, the events that a bot swarm has consists of Login, Init, Disconnect, and Chat. However, there should also be an Interval or Tick event, for when you want to do something with the swarm (like add a new account) and not have to wait for an event like Chat or Disconnect to be triggered, but rather have a period event that will go off.
If you make a plugin you can add .in_schedule(CoreSchedule::FixedUpdate)
to a system to make it run every tick (see https://github.com/mat-1/azalea/blob/main/azalea/src/pathfinder/mod.rs#L40)
You're right though, right now there is no way to do this without a plugin and there should be.
I think there should just be a period_interval_time(Duration)
method in SwarmBuilder
. Possibly also with a Tick
event. I'd love to try and implement this, but I currently do not have substantial knowledge with the inner workings of this library.