I have a Rover MG TF (54 plate)............ I arranged for a specialist locksmith with computer diagnostics to attend a re-programme a new fob, but after about 2 hours he gave up - it seems that the onboard computer was just not communicating with his diagnostic kit.
Being a 2004 model, yours will have the Pektron Systems Control Unit (SCU) instead of the Lucas 5as fitted to earlier TFs.
Unless he has Rover T4, or the Avon diagnostics equipment/software for the Pektron equipped Rovers (or the T300 Chinese made knock-off of this), he won't be able to do anything about programming a fob to the Pektron system.
To code a fob you will need the 22 digit bar code from the original packaging (as you refer to a "new fob", I assume that you have this).
You mention you left the roof open and it got wet - if wet has got into the SCU (most likely through the wiring connector), the first thing it comes into contact with is the radio reciever circuit for the fob radio signal - if this circuit is damaged due to water ingress, the reciever won't work, so even if the fob is transmitting its signal, the SCU won't be recieving it. In this case, the SCU will need to be removed for repair by a competent electronics engineer. Have a read of this thread by technozen: Pektron SCU/BCU
. If needed, (and for a sensible fee) he is able to repair damage within the SCU if it is repairable or can give you advice on obtaining a replacement unit. You would need to remove the unit and post it to him for this, but his turnaround time is very quick.
You also mention a flattened car battery - it is not unknown for the SCU to 'forget' some of its settings if left connected to a dying/low charge battery for some time. Forgetting the codes for the fobs is one of the possibilities. I hope you took care when charging the battery from jump leads - always connect the negative on the slave battery to a good earth on the car you are trying to start or disconnect the flat battery from the car completely. Connecting the negative on the slave directly to the negative on the flat battery whilst it is still connected to the car may cause damage to the electronic systems.
Your car certainly needn't be regarded as a write-off - at worst you will need a replacement SCU (together with fobs) from a breaker, and a few minutes with a garage or auto electrician with suitable diagnostic equipment to security match the replacement SCU with your engine ECU.