When trying to compare the current sound() being played with a file("textstring_path") in an if statement, it appears to fail even if said text string is the correct path. But if one were to compare the current sound with file('path') for testing purposes, the if statement will not fail.
Code Snippet (if applicable) to Reproduce Problem:
Here I have created a quick verb which demonstrates the problem. This first snippet shows that file() appears to work properly. (It is obvious that file() is not needed in this situation, but it is for debugging purposes.)
mob
var/sound/sound
Login()
..()
sound = sound(file = 'songs/sound.ogg')
src << sound
verb/issound()
var/song = file('songs/sound.ogg')
if(sound.file == song) world << "The song is playing!"
If you replace the above issound() with this one, you will see that I am trying to compare the current sound to file("textstring_path"). Unfortunately, it appears that if the path within the file() procedure is a text string, it will not return a file object.
verb/issound()
var/song = file("songs/sound.ogg")
if(sound.file == song) world << "The song is playing!"
Expected Results:
When one does if(song.file == file("textstring_path")), and said "textstring_path" is equal to song.file, the statement should be true.
Actual Results:
The statement is false.
You'll also be forced to include any files referenced in double-quotes with the game package, as they won't be referenced from within the rsc file.
From what I can tell, things are working perfectly correct in this case.