Ren'Py Translator ToolKit  Check-in [c3d128a2fe]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix start-up error when using fresh Ren'Py and/or unconfigured projects list
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:c3d128a2fe92b36fd6e38e5426802e66066f040570e71ec8fa2f194009178796
User & Date: Beuc 2020-07-10 14:43:41
Context
2020-07-10
14:45
Use consistent case check-in: 76a32af578 user: Beuc tags: trunk
14:43
Fix start-up error when using fresh Ren'Py and/or unconfigured projects list check-in: c3d128a2fe user: Beuc tags: trunk
14:41
Doc fix check-in: 1221b529f8 user: Beuc tags: trunk
Changes

Changes to game/screens.rpy.

23
24
25
26
27
28
29
30
31
32
33
34


35
36
37
38
39
40
41
42
43
44
                subprocess.Popen([ "xdg-open", directory ])
        except Exception, e:
            print(e)

    def projects_directory():
        f = os.path.join(renpy.config.savedir,'..','launcher-4/persistent')
        p = renpy.persistent.load(f)
        return p.projects_directory

    def projects_list():
        import glob
        dirs = (


            sorted(glob.glob(os.path.join(projects_directory(),'*'))) +
            sorted(glob.glob(os.path.join(config.renpy_base,'*')))
        )
        return [d for d in dirs if os.path.isdir(os.path.join(d,'game'))]

    def languages_list():
        if store.projectpath is None:
            return []
        dirs = glob.glob(os.path.join(projectpath,'game','tl','*'))
        return [os.path.basename(d) for d in sorted(dirs) if os.path.isdir(d)]







|



|
>
>
|
|
<







23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

39
40
41
42
43
44
45
                subprocess.Popen([ "xdg-open", directory ])
        except Exception, e:
            print(e)

    def projects_directory():
        f = os.path.join(renpy.config.savedir,'..','launcher-4/persistent')
        p = renpy.persistent.load(f)
        return p and p.projects_directory

    def projects_list():
        import glob
        dirs = []
        projects_dir = projects_directory()
        if projects_dir and projects_dir != config.renpy_base:
            dirs += sorted(glob.glob(os.path.join(projects_dir,'*')))
        dirs += sorted(glob.glob(os.path.join(config.renpy_base,'*')))

        return [d for d in dirs if os.path.isdir(os.path.join(d,'game'))]

    def languages_list():
        if store.projectpath is None:
            return []
        dirs = glob.glob(os.path.join(projectpath,'game','tl','*'))
        return [os.path.basename(d) for d in sorted(dirs) if os.path.isdir(d)]