#include "component_redirect.h"

/* Sets redirect component info. */
void
component_redirect_init(ComponentRedirect* self, u32 max)
{
	self->max = max;
	self->value = self->max;
}

/* Ticks redirect component. If redirects are depleted, marks as out. */
void
component_redirect_tick(ComponentRedirect* self, ECS* ecs)
{
	if (self->value <= 0)
		self->isOut = true;
	else
		self->isOut = false;
}
