:: passegeTypeWidgets[widget]

<!--
    Usage:
    <<passageType super_type>>

    Arguments:
        0 super_type:
            -indoors (i):
            -menu (m): actionbar is disabled by default
            -outdoors (o):
            -quest (q): including dialogs

            The difference between indoors and outdoors is only cosmetic.

        1 class
        2 type
-->


<<widget 'pt'>>
    <<passageType _args[0] _args[1] _args[2] _args[3] _args[4] _args[5] _args[6] _args[7]>>
<</widget>>

<<widget 'passageType'>>
    <<set _super_type	= _args[0]>>
    <<set _class		= _args[1]>>
    <<set _type			= _args[2]>>

    <<switch _super_type>>
        <<case "indoors" "inside" "i">>
			
			<<set $loc		= $here>>
			<<set $loc_arg	= $location_var[$here][0]>>
            <<set $qloc		= $here>>
            <<set $qloc_arg	= $location_var[$here][0]>>
        <<case "menu" "m">>
            <<set _actionBarOverride = 1>>
        <<case "outdoors" "o">>
			<<set $loc		= $here>>
			<<set $loc_arg	= $location_var[$here][0]>>
			<<set $qloc		= $here>>
            <<set $qloc_arg	= $location_var[$here][0]>>
        <<case "quest" "q">>
			<<set _actionBarOverride = -1>>
			<<set $qloc		= $here>>
            <<set $qloc_arg	= $location_var[$here][0]>>
        <<default>>
            <<error `'passageType supertype not recognized:'+_super_type`>>
    <</switch>>

	<!-- Compatibility -->
	<<set $location_type= _type>>
	<<set $locclass		= _class>>
<</widget>>
