This event is invoked when a rest is about to be interrupted. The ambushing spawn can be overridden by changing the creature parameter.
--- @param e restInterruptEventData local function restInterruptCallback(e) end event.register(tes3.event.restInterrupt, restInterruptCallback)
This event supports blocking by setting
true or returning
false. Blocking the event prevents vanilla behavior from happening. For example, blocking an
equip event prevents the item from being equipped.
An event can be claimed by setting
true, or by returning
false from the callback. Claiming the event prevents any lower priority callbacks from being called.
creature(tes3creature, tes3npc, tes3leveledCreature): The creature that is interrupting rest. Can be set to a creature, NPC, or leveled creature.
resting(boolean): Read-only. If true, the player is attempting to rest, as opposed to wait.
waiting(boolean): Read-only. If true, the player is attempting to wait, as opposed to rest.