Ok, heh...
Well, in the question you only asked for how to add a sound to a command. This in particular could be implemented via different ways, so I just threw in the approaches I could think of.
Using script is probably the easiest, but it may not cover all the situations you want to implement, and as said is not 3D-aware.
Code:
from game import Game
from menu import Menu
def sc_CommandWasGiven( e ):
if e.CommandText == "Open_torpedo_tube":
Menu.PlaySound( "<sdl-identifier>" ) # Needs an SDL-identifier f.ex.: torpedo.openTube. This is a generic message.
elif e.CommandText == "Open_sel_torpedo_tube":
Menu.PlaySound( "<sdl-identifier>" + ( e.Param1 + 1 ).ToString() ) # Needs an SDL-identifier f.ex.: torpedo.openTube1, torpedo.openTube2, etc. This is a message per tube index (Param1 is 0-based tube index).
def InitializeScript():
Game.SubmarineCommands.CommandWasGiven += sc_CommandWasGiven
def UnloadScript():
Game.SubmarineCommands.CommandWasGiven -= sc_CommandWasGiven
I have not tested this script, as this was written outside of the game, but this is roughly what you need...