(include "sci.sh")
(use "Main")
(use "Class_255_0")
(use "brain")
(use "SQRoom")
(use "PolyPath")
(use "Class_950_0")
(use "Cycle")
(use "PicView")
(use "Obj")
(script 500)



(instance public rm500 of SQRoom
    (properties
        picture 500
        style 30
        east 505
        south 515
        vanishingX 380
        vanishingY 65461
    )

    (method (init)
        Load(rsVIEW 508)
        (if (== global12 515)
            (self:setScript(enterScript))
        )(else
            proc0_3()
        )
        (send gEgo:init())
        (self:setRegions(704))
        (super:init())
        (brain:makePolygon(0 189 0 0 319 0 319 108 165 104 59 189))
        (brain:makePolygon(110 189 174 125 319 125 319 189))
        (send (ScriptID(704 5)):
            x(237)
            y(90)
            nsLeft(230)
            nsTop(85)
            nsBottom(96)
            nsRight(244)
            sightAngle(90)
            init()
        )
        (light:
            init()
            setCycle(Fwd)
        )
        (roomFeature:init())
    )


    (method (doit)
        (super:doit())
        (if (proc0_5(gEgo 8))
            (brain:exitDir(225))
        )
    )

)
(instance enterScript of Script
    (properties)

    (method (changeState newState)
        (switch (= state newState)
            (case 0
                proc0_2()
                (send gEgo:
                    x(52)
                    y(229)
                    setMotion(PolyPath 98 183 self)
                )
            )
            (case 1
                proc0_3()
                (self:dispose())
            )
        )
    )

)
(instance light of Prop
    (properties
        x 110
        y 49
        description "light"
        lookStr "The strange light pulses toward the center structure."
        view 508
    )
)
(instance roomFeature of Feature
    (properties
        nsBottom 200
        nsRight 320
        description "super brain computer"
        lookStr "This maze of cables, ducts, pipes, and glowing panels give the super brain computer a sense of being alive..."
    )

    (method (doVerb param1 param2)
        (switch (param1)
            (case 4
                Print("You'd better not.  Something might answer.")
            )
            (default 
                (super:doVerb(param1 rest param2))
            )
        )
    )

)
