#elemental gallery switch #1
from SDLKeys import SDLK_f, SDLK_e, SDLK_w, SDLK_a, SDLK_l
from eventAPI import *
from APIUtils import *


def fireEvent(e):
   text = ["There are a series of switches here.  They appear to correspond to the 4 elements.", "", "(F)ire", "(E)arth", "(W)ater", "(A)ir"]
   optionTexts = ["Select a switch or (L)eave the Scene"]
   optionsKeys = [SDLK_f, SDLK_e, SDLK_w, SDLK_a, SDLK_l]
   inputValue = optionInput(e, text, optionTexts, optionsKeys)
   if (inputValue == SDLK_f):
      showMessage(e, ["As you press the switch, you are jolted by an immense wave of heat."])
      setExit(e, "maps/rtplaneoffire.cfg", 15, 38, 180)
      return 0
   elif (inputValue == SDLK_e):
      showMessage(e, ["As you press the switch, you are surrounded by a suffocating darkness."])
      setExit(e, "maps/rtplaneofearth.cfg", 14, 3, 0)
      return 0
   elif (inputValue == SDLK_w):
      showMessage(e, ["As you press the switch, you are engulfed in a torrent of water."])
      setExit(e, "maps/rtplaneofwater.cfg", 22, 12, 0)
      return 0
   elif (inputValue == SDLK_a):
      showMessage(e, ["As you press the switch, you are engulfed in a white light."])
      rtPOAWind1 = getTag(e, "rtPOAWind1")
      if (rtPOAWind1 == 1):
         setExit(e, "maps/rtplaneofairb.cfg", 35, 18, 90)
         return 0
      else:
         setExit(e, "maps/rtplaneofaira.cfg", 35, 18, 90)
         return 0
   else:
      return 0
