Commit 540ceef6 authored by Studer Brendan's avatar Studer Brendan
Browse files

added link between scenes and chapters

parent d43e27ef
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ def main(argv):
        os.mkdir(outputFolder)
        
        #Iterate over chapters
        for chapter in contents["Chapters"]:
        for idx_chapter, chapter in enumerate(contents["Chapters"]):
            chapter_name = normalize_string(chapter["Name"])
            chapter_folder = os.path.join(outputFolder,chapter_name)
            os.mkdir(chapter_folder)
@@ -81,7 +81,7 @@ def main(argv):
                f.write(f"{chapter['Intro']}\n")
                f.write(f"@goto {normalize_string(chapter['Scenes'][0]['Title'])}")            
            
            for scene in chapter["Scenes"]:
            for idx_scene, scene in enumerate(chapter["Scenes"]):
                scene_name = normalize_string(scene["Title"])
                scene_path = os.path.join(chapter_folder,scene_name)
                os.mkdir(scene_path)
@@ -105,6 +105,12 @@ def main(argv):
                        f.write(f"{interaction['Actor']['Name']}: {interaction['Text']}\n\n")
                        
                        for choice in interaction['Responses']:
                            if choice['NextInteractionID'] == 1:
                                if idx_scene == len(chapter["Scenes"]) -1:
                                    f.write(f"@choice \"{choice['Text']}\" goto:{normalize_string(contents['Chapters'][idx_chapter + 1]['Name']) + '_intro'}\n") 
                                else:
                                    f.write(f"@choice \"{choice['Text']}\" goto:{normalize_string(chapter['Scenes'][idx_scene+1]['Title'])}\n")
                            else:
                                f.write(f"@choice \"{choice['Text']}\" goto:.{choice['NextInteractionID']}\n")
                                
                        f.write("@stop\n\n")
+1 −1
Original line number Diff line number Diff line
@@ -169,6 +169,6 @@ Agathe: Aidez-moi à respirer et faîtes-moi voir ces gens.
@char Agathe
Agathe: Agathe soupire. Son visage manifeste de l’inquiétude.

@choice "Sortir" goto:.1
@choice "Sortir" goto:les_professionnels_face_a_la_mort
@stop
+1 −1
Original line number Diff line number Diff line
@@ -107,6 +107,6 @@ Pascal: Là, je trouve que tu exagères. Et en plus les dix minutes sont passée
@char Pascal
Pascal: Je t’en prie. Il sort, pressé comme à son habitude.

@choice "Sortir" goto:.1
@choice "Sortir" goto:acceptation_inconditionnelle
@stop
+1 −1
Original line number Diff line number Diff line
@@ -51,6 +51,6 @@ Agathe: Agathe sourit.
@char Agathe
Agathe: ...

@choice "Je sors" goto:.1
@choice "Je sors" goto:vivre_en_ems_intro
@stop
+5 −5
Original line number Diff line number Diff line
@@ -268,9 +268,9 @@ Agathe: ...
@char Agathe
Agathe: ...

@choice "La plaie est infectée. Je vais la nettoyer et faire un nouveau pansement. Suite à quoi je demanderai au médecin de venir vous voir." goto:.1
@choice "C’est une petite infection. Je vais m’en occuper et demanderai au médecin de passer vous voir." goto:.1
@choice "Je demanderai au médecin de venir vous voir." goto:.1
@choice "La plaie est infectée. Je vais la nettoyer et faire un nouveau pansement. Suite à quoi je demanderai au médecin de venir vous voir." goto:le_dîner
@choice "C’est une petite infection. Je vais m’en occuper et demanderai au médecin de passer vous voir." goto:le_dîner
@choice "Je demanderai au médecin de venir vous voir." goto:le_dîner
@choice "C’est bien ce que je pensais. C’est infecté !" goto:.31
@stop

@@ -285,7 +285,7 @@ Agathe: ...
@char Agathe
Agathe: ...

@choice "Je pars." goto:.1
@choice "Je pars." goto:le_dîner
@stop

# 33
@@ -302,7 +302,7 @@ Agathe: Laissez les « Madame » à la porte ! Je m’appelle Agathe !
@char Agathe
Agathe: Agathe ne répond rien. Je lui refais son pansement puis je sors. Pascal sera content : j’ai pris peu de temps.

@choice "Je pars." goto:.1
@choice "Je pars." goto:le_dîner
@stop

# 35
Loading