[*]Issues with Strings.Designer.cs file into svn. It's autogenerated, which means it gets completely mugged when switching between english and deutch versions of VS.
True, any ideas for a workaround?
I think there's a command line to generate the file.
So possible solution would be remove the Strings.Designer.cs, and update the .vsproj file to generate the file. (Just not quite sure how to do that.)
[*]Remove Utils.LoadString(string resourceName, string fallback). If the resource string is not there, it needs to be added, not worked around.
Hmm, I would rather have a game that falls back on the symbolic names than explode :-) Also, this way, CTD can easily add the "real names" step by step and we still have a working version. But I'm open to suggestions.
Looks like we disagree with this, I'd rather have the function fail if a string is missing, so that we know there's a problem. Instead of silently failing.
A possible comprimise, give the function a different name, but same signature as the other LoadString. e.g. SafeLoadString(string resourceName). That means we can have the function work if the string is missing, but can do a simple search/replace of the source to put in the less tolerant LoadString() for imporoved error checking.
[*]In GeoscapeScreen, when a topic has been researched, do NOT call TopicResearched() in Geoscape and then put up a dialog.
The correct pattern is to define a new GeoEvent, and put the event into the Event queue for handling.
Reason for this, is the Research dialog may involve going to diferent screens (e.g. XNet)
Hmmm, I agree that there may be different actions required when something is researched. Nevertheless, I think a delegate/.NET event is the right approach for this. GeoEvent just reinvents a .NET-event system, I think. With my approach, handlers can be registered with ResearchGraph. The current dialog that pops up is just one way of handling that event.
Again, just my two cents. Maybe we can discuss this a little on irc?
The problem is what happens if during an update time slice two (or more) events occur that both want to put up a dialog? E.g. A research project is completed, and a facility is completed, and a Craft reaches attack range of a UFO. The event queue is to deal with that when a screen change may occur. (From memory, a finished research project shows user XNet entry, and user can set a new project.)
Have a look at the files here
, especially GettingModalDialogsToWork.htm and Research.htm
[*]Please make sure all code you add has no warnings, and all functions have XML comments.
So far, I added XML-Comments to all public functions. I didn't see any warnings left. Will check now, though.
I'd prefer comments for everything, the more we can do to make the code clear, the better.
Oh, and if you can, please run Code Analysis over the source as well.
(Yes, I know there's still 6 warnings left in my code. I'll deal with the exception shortly, the others, if you can provide a good solution, let me know.)
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.