diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-23 17:45:05 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-23 17:45:05 -0300 |
commit | 09dd3c9ec3d60e1cc7410bd25901941bcdab88de (patch) | |
tree | 3cd8e03fe9422c03c732a65ee397f57a640608cf | |
parent | 59d9017b51d82201e8d9687fcea5f2a1f3375fbf (diff) | |
download | client-09dd3c9ec3d60e1cc7410bd25901941bcdab88de.tar.gz client-09dd3c9ec3d60e1cc7410bd25901941bcdab88de.tar.bz2 client-09dd3c9ec3d60e1cc7410bd25901941bcdab88de.tar.xz client-09dd3c9ec3d60e1cc7410bd25901941bcdab88de.zip |
Fix a bug in persistent.allfiles
Register squared units
-rw-r--r-- | game/03_init.rpy | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/game/03_init.rpy b/game/03_init.rpy index e6b8ff1..43e67e5 100644 --- a/game/03_init.rpy +++ b/game/03_init.rpy @@ -125,7 +125,7 @@ init python: renpy.image(name, card_composite(fn, file)) dl=dl_search(persistent.allfiles, 0, name) - if dl is not ERR_INVALID: + if dl is ERR_INVALID: persistent.allfiles.append((name, file)) allfiles.append(name) continue @@ -153,7 +153,7 @@ init python: name = "dialog_"+fn renpy.image(name, Image(file, yanchor=1.0)) dl=dl_search(persistent.allfiles, 0, name) - if dl is not ERR_INVALID: + if dl is ERR_INVALID: persistent.allfiles.append((name, file)) allfiles.append(name) continue @@ -168,7 +168,7 @@ init python: name = "bg "+fn renpy.image(name, Frame(file, 0, 0)) dl=dl_search(persistent.allfiles, 0, name) - if dl is not ERR_INVALID: + if dl is ERR_INVALID: persistent.allfiles.append((name, file)) allfiles.append(name) continue @@ -183,12 +183,29 @@ init python: name = "summon_"+fn renpy.image(name, Image(file, yanchor=1.0)) dl=dl_search(persistent.allfiles, 0, name) - if dl is not ERR_INVALID: + if dl is ERR_INVALID: persistent.allfiles.append((name, file)) allfiles.append(name) continue continue + + # Load summon images: "square" + for file in renpy.list_files(): + fn=file.replace('gfx/square/','').replace('/', ' ').replace('.png','').replace('.webp','') + if file.startswith('gfx/square/'): + if file.endswith('.png') or file.endswith('.webp'): + name = "square_"+fn + renpy.image(name, Image(file, yanchor=1.0)) + dl=dl_search(persistent.allfiles, 0, name) + if dl is ERR_INVALID: + persistent.allfiles.append((name, file)) + allfiles.append(name) + continue + continue + + + def star_write(am): i, st = 0, "" while i < am: |