name: Sancheck
product: |-
  To mark something here as intentional, put a reference like the following
  in the relevant sheet:

  {{{
  <<OneWay>>Doesn't know that [[ExamplePC]] has a crush on her.<</OneWay>>
  }}}

  These are suppressed for everything except sanchecking, and also serve
  as a useful GM comment.

  <<let sanchecking=True>>

  == Unbalanced References ==

  <<foreach [PC, BlueSheet] type>>

  === <<type.type/>>s ===

  <<foreach type elm foreach get_mentions(elm, 'body') ref
            (elm not in get_mentions(ref, 'body'))
            (has_ancestor(ref, PC) or has_ancestor(ref, BlueSheet))
            ifNone='* None.'>>
    * [[edit:elm]] mentions but is not mentioned by [[edit:ref]]
  <</foreach>>

  <</foreach>>

  == Unbalanced Contacts ==

  <<foreach PC pc foreach get_references(pc, 'contacts') ref
            (pc not in get_references(ref, 'contacts'))
            has_ancestor(ref, PC)
            ifNone='* None.'>>
    * [[edit:pc]] has [[edit:ref]] as a contact, but not vice versa.
  <</foreach>>

  == Missing Contacts ==

  <<foreach PC pc foreach get_mentions(pc, 'body') ref
            (ref not in get_references(pc, 'contacts'))
            has_ancestor(ref, PC)
            ifNone='* None.'>>
    * [[edit:pc]] mentions [[edit:t]] but does not have them as a contact.
  <</foreach>>

  == Members Without Bluesheet ==

  <<foreach BlueSheet blue foreach get_references(blue, 'members') ref
            (blue not in ref.stuff)
            has_ancestor(ref, PC)
            ifNone='* None.'>>
    * [[edit:ref]] is in [[edit:blue]], but doesn't have the sheet.
  <</foreach>>

  == Has Bluesheet but Unlisted ==

  <<foreach PC pc foreach pc.stuff ref
            (pc not in ref.stuff)
            has_ancestor(ref, PC)
            ifNone='* None.'>>
    * [[edit:ref]] is in [[edit:blue]], but doesn't have the sheet.
  <</foreach>>

  == Missing Stuff ==

  <<foreach PC pc foreach get_mentions(pc, 'body') ref
            (ref not in pc.stuff)
            (not has_ancestor(ref, Character))
            ifNone='* None.'>>
    * [[edit:pc]] mentions but does not have [[edit:ref]].
  <</foreach>>

  <</let>>
comment:
