Add an option to dump the player's options file. #740
This commit adds the RC file of the player to the character dump, to add provisions for working out whether a game should count as a realtime speedrun according to the consensus among the speedrunning community. A subsequent commit will add an option regarding whether the RC file should be dumped, and make the default for this option to be turned off.
This commit adds an option, dump_options, which, when set to true, will dump the contents of the options file in the character dump. The option will default to false, in order not to spam the character dump when not required. This will allow the realtime speedrunning community to properly assess whether the contents of the RC file are permitted to count as a valid human speedrun.
This commit allows the recording of command line extra options as well as those from the init/RC file.
This commit reads in the options file as a whole, creating a char* from it which is then added to Options.file_contents and passed to read_options to be converted to a StringLineInput for game_options::read_options. This commit also removes reference to the content variable in game_options::read_options and changes the function back to a void. Further cleanup may be necessary if it is decided there is a better way than new char to read in the file and to add provisions for if the options file cannot be found (ie, if (!f)).
… (aidanh)" This reverts commit e1e9d6c. It was decided that this could cause issues, and that the StringLineInput method was intended for use with the command line. Some testing using the new message also produced strings of random characters at the end of the options file, which is undesirable.
There has been some discussion about what this PR's overall goal is, and what is necessary to address the realtime speedrunning issues. The speedrunning community has come up with some specific requirements, which can be found here: https://pastebin.com/raw/kVSscaLC.
I am closing this PR now, because the realtime speedrunning community will now use video evidence to vet the very fastest of runs as had previously been suggested by many of the development team, so such option file dumping is less of a priority (even though the basic functionality may be useful for other purposes). It seemed like the best way forward for dumping the options file for other purposes was to use hashes to check when (and how) the options file was changed, and I don't feel I am the right person to fiddle around with that.
The basic functionality will remain in this PR, and I will not delete the NormalPerson7/crawl:speedrun-rc branch in case anyone else wants to pick up the pieces for this in the future. It is largely no longer required for the realtime community though.