ID:103679
 
Applies to:Dream Daemon
Status: Open

Issue hasn't been assigned a status value.
Could we get a way to get the current world mode? In the case where we have to read/write external files, we could prevent a runtime error and possibly instead do other things if the world mode isn't the desired one (say, we need trusted to read from a file, but we can't access it, so instead we either alert them or use a default value). Of course, it would be read only.
This would really come in handy. I use a server configuration file in Decadence to store things like the server name, player limit, match settings, etc. It can cause problems when I can't read/write the file, fixing incorrect settings or creating a new default config file.

It would be so much easier to check the security settings and if it isn't Trusted then just use hardcoded server defaults.
+
I'd give a yes vote here as well. ;)

Allowing developers the ability to see the security mode in read-only fashion wouldn't violate safe/ultrasafe modes.

For games such like that might be writing to a web root on the same server as http server (especially one that would absolutely need the trusted mode) this kind of feature is ideal.
This is very useful for library implementors as well, for making libraries that gracefully handle any hosting environment.
In cases where developers are going to be making several external files, it might be better to change the current warning dialog entirely. Rather than asking permission for each individual read/write there could just be a single prompt asking to bump the game up to Trusted mode.

Also, add a "Don't ask me again" checkbox which saves for that particular game.
Yes, so much yeeeeeees!
+1
bump
+2 this should be a fairly simple thing to implement
Bump +1
Lol looking back at the older comments, SA's displeasure/minute frustration was palpable haha. Also yeah this seems like it'd be useful to more than a few people.

I also think this suggestion
SuperAntx wrote:
In cases where developers are going to be making several external files, it might be better to change the current warning dialog entirely. Rather than asking permission for each individual read/write there could just be a single prompt asking to bump the game up to Trusted mode.

Also, add a "Don't ask me again" checkbox which saves for that particular game.

is pretty sound... or not.. i dunno, but something to make that whole process seem less suspicious than it might otherwise do.
If the .dmb & folder name don't match as well it can cause issues reading savefiles in the same directory as well, so simply knowing the mode DD is in wouldn't help. Trusted never has any issues though.

I think it'd be better to tell what mode is needed to do the action, and allow them a choice to switch to said mode if they want, such as their getting a popup to read each individual players savefile, and for obvious reasons such as wanting people to be able to join and play using their own saved data without having to manually approve the reading/saving for every player would be preferable.