Exemplo n.º 1
0
def AddToStructures(line):
    global PlayList
    global scriptWatcher
    global lineCounter
    global sceneCounter
    global charWatcher
    global firstScene
    global firstPlay

    if line.scene == sceneCounter and line.script == scriptWatcher:
        return

    #if new play
    if line.script != scriptWatcher:
        if not firstPlay:
            UpdatePreviousScene()
            UpdatePreviousScript()
        scriptWatcher = line.script
        resetCounters()
        PlayList.append(DataStructures.PlayData(line.script))
        firstPlay = False
        firstScene = True
    lineCounter += 1
    #if new Scene
    if line.scene != sceneCounter:
        if not firstScene:
            UpdatePreviousScene()
        sceneCounter = line.scene
        temp = DataStructures.SceneObject()
        temp.start = lineCounter
        temp.name = str(sceneCounter)
        getPlayinList(scriptWatcher).sceneList.append(temp)
        firstScene = False
    #if new Character
    if line.character not in charWatcher:
        charWatcher.append(line.character)
    return