PatrolRoute
A named route for NPC patrols. Register it once, with { id, name, points, mode, speed, radius, waitSeconds }, and pass it to npc.patrol as the object, id or name. An NPC copies the route when ordered, so changes or removal affect only patrols started later.
patrolRoute.create()
PatrolRoute.create(source, name)Registers a route.
patrolRoute.getById()
PatrolRoute.getById(id)The route with this id, or null.
patrolRoute.getByName()
PatrolRoute.getByName(name)The route with this name, or null.
patrolRoute.all()
PatrolRoute.all()All registered routes.
patrolRoute.exists
existsFalse once the route has been removed.
patrolRoute.id
idThe route's id, or '' after destroy.
patrolRoute.name
nameThe route's name.
patrolRoute.destroy()
destroy()Removes the route. Running patrols keep their copy.
patrolRoute.update()
update(changes)Changes route fields for patrols started from now on.