@tool
class_name BlackboardEraseSafe extends ActionLeaf
## Erases the specified key from the blackboard.
##
## Unlike Beehave's builtin BlackboardEraseAction, this version will succeed silently if
## the given key is not defined.

## Expression representing a blackboard key.
@export var key := ""


func tick(_actor: Node, blackboard: Blackboard) -> int:
	blackboard.erase_value(key)
	return SUCCESS
