class_name AccessPolicy extends Resource ## Venue admission rules (PLAN.md: access rules per venue). ## Minimum required artifacts. For the Hollywood Blvd building this may be ## { WRISTBAND: true }. The Joke Shop may require { ID: true, TICKET: true }. @export var required_artifacts: Dictionary = {} ## OR-admission: when true, entry is granted as soon as ANY required artifact ## kind is valid (e.g. TV studio). When false, every kind must be satisfied. @export var grant_if_any_required: bool = false ## Artifact kinds accepted as OR-equivalent: e.g. { GUEST_LIST: true } when a ## reservation list can replace a ticket. If true, the verifier grants when any ## listed kind is valid. @export_range(1, 8) var minimum_age: int = 0 ## Wether identification is required or only checked when present. @export var require_id: bool = false @export var wand_screening_required: bool = false ## Displayed rules summary used by dialogue/UI. @export var policy_summary: String = "" func requires(kind: int) -> bool: return required_artifacts.get(kind, false) func description() -> String: if not policy_summary.is_empty(): return policy_summary return str(required_artifacts)