ProjectAliceDev / aliceos-classic

A virtual operating system framework for Ren'Py projects
https://aliceos.app
GNU Lesser General Public License v3.0
7 stars 1 forks source link

Applet ask permissions fails to write variable #5

Closed alicerunsonfedora closed 6 years ago

alicerunsonfedora commented 6 years ago

The following code fails to write the variables (notification_permission, filesystem_permission, adminstrator_permission) to 'yes' and assumes that the value is 'no':

if pm_notify in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_un, no_action=Return(1), yes_action=[SetVariable("notification_permission", "yes"), Return(0)])

            if pm_files in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_fs, no_action=Return(1), yes_action=[SetVariable("filesystem_permission", "yes"), Return(0)])

            if pm_sysadmin in self.permissions:
                renpy.call_screen("ask_permission", app_name=self.long_name, action=allow_sip, no_action=Return(1), yes_action=[SetVariable("administrator_permission", "yes"), Return(0)])
alicerunsonfedora commented 6 years ago

New commit to fix the 'local variable assignment' error, but still doesn't resolve issue

abduelhamit commented 6 years ago

By the way: Ren'Py saves store variables automatically in the savegame. No need for the apf files unless it was for debugging purposes only.

abduelhamit commented 6 years ago

It should also be possible to save the permission on an applet basis in the store.