Yes, I do. Thanks. The last issue with the given patch is the broken indentation in the ServerApp.cpp file. Otherwise the patch looks fine to me.Vegavis wrote:Here is a version with the field-filling code repeated for each variant. Do you really prefer it?
[patch] Improve sitrep messages
Moderator: Committer
- adrian_broher
- Programmer
- Posts: 1156
- Joined: Fri Mar 01, 2013 9:52 am
- Location: Germany
Re: [patch] Improve sitrep messages
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz
Re: [patch] Improve sitrep messages
Oh, more stray tabs. Fixed version attached.
Also, here's a trivial patch to prevent similar problems from other emacs users by giving them the right defaults for indent style and tabs.
Also, here's a trivial patch to prevent similar problems from other emacs users by giving them the right defaults for indent style and tabs.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Improve sitrep messages
Is there a "FreeOrion/.dir-locals.el" in SVN? I don't see it...Vegavis wrote:Also, here's a trivial patch to prevent similar problems from other emacs users by giving them the right defaults for indent style and tabs.
Re: [patch] Improve sitrep messages
It's not there yet; the patch adds it. (It's a file emacs looks for. Many projects include such tool-specific files to give their users good defaults.)Geoff the Medio wrote:Is there a "FreeOrion/.dir-locals.el" in SVN? I don't see it...
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Improve sitrep messages
Could you put the EnemyID function in an anonymous namespace, probably at the top of its file?Vegavis wrote:Fixed version attached.
Could you fix the indenting of the (mostly?) raw text sitrep.AddVariable lines, where the boost::lexical_cast... texts doesn't line up with the preceeding lines?
Re: [patch] Improve sitrep messages
Done.Geoff the Medio wrote:Could you fix the indenting of the (mostly?) raw text sitrep.AddVariable lines, where the boost::lexical_cast... texts doesn't line up with the preceeding lines?
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Improve sitrep messages
The UserStringNop comments still apply...
Code: Select all
UserStringNop(enemy_id == ALL_EMPIRES ? "SITREP_GROUND_BATTLE" : "SITREP_GROUND_BATTLE_ENEMY")
Re: [patch] Improve sitrep messages
Fixed the remaining UserStringNop.
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Improve sitrep messages
Had an extra ) that caused a compile error, but after fixed that, I committed it.
Send me a pm if you have a real name you'd like to be credited with.
Send me a pm if you have a real name you'd like to be credited with.
Re: [patch] Improve sitrep messages
Looks like this still has some bugs. You may have been unaware vegavis, but the default options cause sitreps with errors in them to be supressed; to see them you need to go to the end of the Options->UI tab and select "Situation reports with errors"
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0
Re: [patch] Improve sitrep messages
Enemy fleets had the wrong message ID. Here's a fix.
Why does this feature even exist?Dilvish wrote:the default options cause sitreps with errors in them to be supressed
- Attachments
-
[The extension patch has been deactivated and can no longer be displayed.]
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: [patch] Improve sitrep messages
Because players whine/complain about such very visible errors, and scripts will often cause them.Vegavis wrote:Why does this feature even exist?
Edit: committed