1.6.5 before python3.9

This commit is contained in:
imayushsaini 2021-10-26 23:24:50 +05:30
parent 7cb8323a5d
commit 162b04b6b5
296 changed files with 6445 additions and 491 deletions

View file

@ -40,7 +40,7 @@ def get_human_readable_user_scripts_path() -> str:
def _request_storage_permission() -> bool:
"""If needed, requests storage permission from the user (& return true)."""
from ba._language import Lstr
from ba._enums import Permission
from ba._generated.enums import Permission
if not _ba.have_permission(Permission.STORAGE):
_ba.playsound(_ba.getsound('error'))
_ba.screenmessage(Lstr(resource='storagePermissionAccessText'),
@ -73,7 +73,7 @@ def show_user_scripts() -> None:
usd: Optional[str] = app.python_directory_user
if usd is not None and os.path.isdir(usd):
file_name = usd + '/about_this_folder.txt'
with open(file_name, 'w') as outfile:
with open(file_name, 'w', encoding='utf-8') as outfile:
outfile.write('You can drop files in here to mod the game.'
' See settings/advanced'
' in the game for more info.')