/******************************************************************************/
(include "sci.sh")
(include "game.sh")
/******************************************************************************/
(script 600)
/******************************************************************************/
(use "controls")
(use "cycle")
(use "door")
(use "feature")
(use "game")
(use "inv")
(use "main")
(use "obj")
(local
vari
)
/******************************************************************************/
(instance public rm600 of Rm
	(properties
		picture 14
		north 0
		east 0
		south 0
		west 0
	)
	(method (init)
		(super:init())
		(self:setScript(RoomScript))

		(switch(gPreviousRoomNumber)
			(default
				(send gEgo:
					posn(150 130)
					loop(1)
				)
			)
		)

		SetUpEgo()
		(send gEgo:init() posn(ex ey) loop(2))
  = vari 0
   (aDoor: init())
  (aSonny: init())
  (aHairpin: init())
	)
)
/******************************************************************************/
(instance RoomScript of Script
	(properties)
     (method(doit)
     (var dyingScript)
(if(send gEgo:has(INV_HAIRPIN))
      (aHairpin: hide())
      )
     
(if(== vari 0)
= vari 1
(send gEgo: view(600))
ProgramControl()
(send gEgo: setCycle(Fwd))
= gTimeSeconds 0
)
    (if(== gTimeSeconds 1)
= gTimeSeconds 2
    = dyingScript ScriptID(DYING_SCRIPT)
  (send dyingScript:
    caller(3)
    register("Didn't I tell you that the gate was powered. Oops!")
  )
  (send gGame:setScript(dyingScript))
    )
)
 )
 (instance aDoor of Act
(properties
view 230
cel 0
x 68
y 152
))
(instance aHairpin of Prop
(properties
view 688
loop 204
x 175
y 148
))
(instance aSonny of Prop
(properties
view 36
loop 1
x 227
y 132
))
/******************************************************************************/
