patchBattle for Wesnoth - Patches: patch #3297, [modification] tag and dependency...

 
 
Show feedback again

patch #3297: [modification] tag and dependency system for mp

Submitted by:  B. Lipka <lipk>
Submitted on:  Tue May 15 07:38:58 2012  
 
Priority: 5 - NormalStatus: Done
Privacy: PublicAssigned to: B. Lipka <lipk>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue Sep 25 17:42:19 2012, SVN revision 55412:

Applied patch #3297

(Browse SVN revision 55412)

B. Lipka <lipk>
Project MemberIn charge of this item.
Mon Sep 24 21:15:20 2012, comment #24:

Final version.

(file #16603)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sat Sep 22 20:43:13 2012, comment #23:

An update to compile with latest svn.

(file #16600)

B. Lipka <lipk>
Project MemberIn charge of this item.
Fri Aug 24 18:22:46 2012, comment #22:

Debug messages.

(file #16424)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun Aug 12 13:31:53 2012, comment #21:

Yet another update, featuring "Restore Defaults".

(file #16377)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun Jul 29 18:54:33 2012, comment #20:

I forgot to put the new files under version control in the previous submission.

(file #16236)

B. Lipka <lipk>
Project MemberIn charge of this item.
Mon Jul 23 20:20:37 2012, comment #19:

New version featuring options!
Todo:

  • Need a combo box option (not appropriate GUI2 widget afaik).
  • Slider is buggy if step size is bigger than one, although it's likely to be a problem with the widget itself.
  • Badly need a restore defaults button.
  • Debug messages should be added.

(file #16175)

B. Lipka <lipk>
Project MemberIn charge of this item.
Tue Jul 10 09:46:40 2012, comment #18:

Changes in this version:

  • extended and corrected Wiki docs in mp_create_choose_mods.cpp and mp_depcheck_select_new (or confirm_change, I don't remember which)
  • replaced string concatenation with a vgettext call in mp_depcheck_select_new.cpp
  • changed result_'s type to reference in gui2::tmp_create_choose_mods
  • reformatted Doxygen comments
  • removed the "Close" button from tmp_create_choose_mods, added "OK" and "Cancel" instead with proper support
  • renamed some variables in mp_depcheck.?pp
  • I apparently broke a few things in dependency checking somewhen in the past few weeks, fixed that as well
  • removed maximum_width and maximum_height attributes from all new dialogs

(file #16050)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun Jul 8 13:45:14 2012, comment #17:

(I reviewed the code based on file #15817)

Good to see there is more comment and lines no longer exceed the 80 characters,
but it would have been nice if the style was more like the currently used
style.

I mainly looked at the GUI code and had a short glance at mp_depcheck. Will
this be fully documented in the wiki? At the moment I miss the overview of what
WML variables are around and how they are supposed to interact.

Attached a patch which can be applied on top of file #15817 with more remarks
inline.

(file #16025)

Mark de Wever <mordante>
Project Member
Sat Jul 7 14:39:10 2012, comment #16:

Replaced all occurrences of the foreach macro with BOOST_FOREACH.

(file #16003)

B. Lipka <lipk>
Project MemberIn charge of this item.
Wed Jul 4 08:48:56 2012, comment #15:

The editor was a bit overzealous and removed the spaces inserted by diff at linestarts. I put them back so that the file is now well-formatted from both Mordante's and patch's viewpoint.

(file #15969)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sat Jun 30 19:14:26 2012, comment #14:

Now really removed trailing whitespaces.

(file #15940)

B. Lipka <lipk>
Project MemberIn charge of this item.
Thu Jun 14 17:29:09 2012, comment #13:

Removed some fancy formatting which would be most likely broken with different tab settings. Fixed some multiline strings (space between \ and endline). revision.hpp somehow managed to keep back, removed again.

(file #15817)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun Jun 10 08:49:15 2012, comment #12:

...and removed trailing whitespace.

(file #15812)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun Jun 10 08:40:57 2012, comment #11:

Removed most long lines, added a lot of comments.

(file #15811)

B. Lipka <lipk>
Project MemberIn charge of this item.
Fri Jun 8 13:05:55 2012, comment #10:

Right, updates keep coming...
News:

  • removed the hunk for revision.hpp
  • relabeled the ok button of Choose Modifications dialog to "Close" (btw, there used to be a "Done" button in the add-on manager iirc :P)
  • swapped ok/cancel and yes/no button order in select new and confirm change dialogs
  • moved initialize_modifications() in game_preferences.cpp, copy_keys() and contains() in mp_depcheck.cpp into an anonymous namespace so that they don't generate warnings with the -Wmissing-declarations flag
  • maximized the Choose Modification dialog's height in 480 pixels
  • took the chance to clean up mp::depcheck::manager::conflicts() a bit

(file #15805)

B. Lipka <lipk>
Project MemberIn charge of this item.
Wed Jun 6 22:49:28 2012, comment #9:

Is there any particular reason one of the newly introduced GUI2 dialogs (mp_create_game_choose_mods) uses "Done" as the OK button string instead of the existing "Close"?

The other two newly introduced dialogs appear to have the order of OK/Cancel or Yes/No buttons reversed, which is inconsistent with the rest of the Wesnoth dialogs.

I was taking a look at the latest version of this patch to check for GUI consistency issues and test on 800x480 (very important!), but stumbled upon a problem while building:

Also, please exclude revision.hpp when submitting patches.

Ignacio R. Morelle <shadowmaster>
Project Administrator
Tue May 29 13:47:21 2012, comment #8:

Here's a post-final version, which incorporates various improvements and fixes suggested by boucman and mordante (and a few on my own):

  • added missing translatable marks (hopefully to all strings)
  • modified gui2::tmp_depcheck_select_new to be more translation-friendly
  • ids of missing dependencies are now listed in the error message
  • fixed mp::depcheck::copy_keys
  • mp::depcheck::manager::conflicts now ignores missing dependencies, those could have raised missing wml child message before
  • renamed mp::depcheck::set_... functions to mp::depcheck::try_...
  • changed mp::depcheck::manager::insert_element's first argument's type from string to mp::depcheck::component_type (which is an enum)
  • moved mp::depcheck::manager::contains into a local helper function in mp_depcheck.cpp
  • added missing wiki documentation for the gui2 parts
  • added changelog entry (in fact, two changelog entries)
  • license headers
  • removed an obsolete TODO comment

(file #15786)

B. Lipka <lipk>
Project MemberIn charge of this item.
Mon May 28 18:34:35 2012, comment #7:

Ooookay, this is meant to be final. Additions since the last version:

  • added the require_modification key for [modification] tags
  • the modifications' names now are translatable in the lobby
  • added documentation for the new dialogs

This time, I also attach a textfile which describes the suggested changes to the WML Reference.

(file #15783, file #15784)

B. Lipka <lipk>
Project MemberIn charge of this item.
Mon May 28 15:44:12 2012, comment #6:

ok, I won't assign this patch to anybody while you're still working on it, please ping me on IRC once you're done so we can start reviewing it...

Jérémy Rosen <boucman>
Project Member
Sun May 27 18:44:06 2012, comment #5:

Yeah, still updating... this version brings a new set of keys which allow authors to skip dependency checking in relation of two add-ons. The keys are ignore_incompatible_era, ignore_incompatible_scenario and ignore_incompatible_modification.

(file #15780)

B. Lipka <lipk>
Project MemberIn charge of this item.
Tue May 22 10:51:17 2012, comment #4:

I've just realised that I should have added the new files to version control before diffing, so the previous patches don't really contain anything usable...

(file #15770)

B. Lipka <lipk>
Project MemberIn charge of this item.
Mon May 21 19:11:33 2012, comment #3:

Yet another update. Brings the following changes:

  • added the special value "none" to the allow_modifications attribute, which disallows every mod
  • if you have require_modification and allow_modification at the same time, you don't have to add the items from the former to the latter as well
  • the names of the activated modifications are listed for players in the lobby

(file #15760)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun May 20 11:47:34 2012, comment #2:

Another update. I fixed a bug which prevented the game from selecting the last used era on startup, and added a short error message when the user tries to activate a scenario/era with not installed dependencies (therefore I consider missing feature 1 implemented). I also changed the WML interface, renaming the require_modification key to force_modification to avoid confusion with require_era (and to preserve the name require_modification for a future, require_era-like feature).

(file #15752)

B. Lipka <lipk>
Project MemberIn charge of this item.
Fri May 18 12:05:03 2012, comment #1:

I forgot to add some files to CMakeLists.txt, so my original patch won't compile with cmake. Here's a fixed version.

(file #15747)

B. Lipka <lipk>
Project MemberIn charge of this item.
Tue May 15 07:38:58 2012, original submission:

This patch implements the toplevel modification tag and a dynamic dependency system for multiplayer add-ons (eras, mp scenarios and the brand new modifications). See the details here:
http://forums.wesnoth.org/viewtopic.php?f=10&t=36348

There're some important features still missing, but I thought I'd send the patch before it grows too big and messy.

Missing features:
* handle missing dependencies (add-ons required but not installed)
* add metadata about activated modifications to savegames
* implement a visual indication of activated modifications for non-host players

B. Lipka <lipk>
Project MemberIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #16603:  modification-final.diff added by lipk (107kB - application/octet-stream)
file #16600:  modification-2.diff added by lipk (104kB - application/octet-stream)
file #16424:  modification.diff added by lipk (104kB - application/octet-stream)
file #16377:  modification.diff added by lipk (103kB - application/octet-stream)
file #16236:  modification.diff added by lipk (99kB - text/x-patch)
file #16175:  modification.diff added by lipk (76kB - text/x-patch)
file #16050:  modification.diff added by lipk (70kB - text/x-patch)
file #16025:  patch added by mordante (5kB - application/octet-stream)
file #16003:  modification.diff added by lipk (69kB - text/x-patch)
file #15969:  modification.diff added by lipk (69kB - text/x-patch)
file #15940:  modification.diff added by lipk (69kB - text/x-patch)
file #15817:  modification.diff added by lipk (70kB - text/x-patch)
file #15812:  modification.diff added by lipk (70kB - text/x-patch)
file #15811:  modification.diff added by lipk (70kB - text/x-patch)
file #15805:  modification.diff added by lipk (64kB - text/x-patch)
file #15786:  modification.diff added by lipk (63kB - text/x-patch)
file #15784:  modifications_wiki.txt added by lipk (2kB - text/plain)
file #15783:  modification.diff added by lipk (60kB - text/x-patch)
file #15780:  modification.diff added by lipk (57kB - text/x-patch)
file #15770:  modification.diff added by lipk (58kB - application/octet-stream)
file #15760:  modification.diff added by lipk (18kB - text/x-patch)
file #15752:  modification.diff added by lipk (14kB - application/octet-stream)
file #15747:  modification.diff added by lipk (13kB - application/octet-stream)
file #15741:  modification.diff added by lipk (13kB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mordante (Updated the item)
  • -unavailable- added by shadowmaster (Posted a comment)
  • -unavailable- added by boucman (Posted a comment)
  • -unavailable- added by lipk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Error: not logged in

     

     

    Follow 25 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Mar 14 07:46:56 2013shadowmasterOpen/ClosedOpen=>Closed
    Tue Sep 25 17:52:48 2012lipkStatusNone=>Done
    Mon Sep 24 21:15:20 2012lipkAttached File-=>Added modification-final.diff, #16603
    Mon Sep 24 20:15:07 2012boucmanAssigned toNone=>lipk
    Sat Sep 22 20:43:13 2012lipkAttached File-=>Added modification-2.diff, #16600
    Fri Aug 24 18:22:46 2012lipkAttached File-=>Added modification.diff, #16424
    Sun Aug 12 13:31:53 2012lipkAttached File-=>Added modification.diff, #16377
    Sun Jul 29 18:54:33 2012lipkAttached File-=>Added modification.diff, #16236
    Mon Jul 23 20:20:37 2012lipkAttached File-=>Added modification.diff, #16175
    Tue Jul 10 09:46:40 2012lipkAttached File-=>Added modification.diff, #16050
    Sun Jul 8 13:45:14 2012mordanteAttached File-=>Added patch, #16025
    Sat Jul 7 14:39:10 2012lipkAttached File-=>Added modification.diff, #16003
    Wed Jul 4 08:48:55 2012lipkAttached File-=>Added modification.diff, #15969
    Sat Jun 30 19:14:26 2012lipkAttached File-=>Added modification.diff, #15940
    Thu Jun 14 17:29:09 2012lipkAttached File-=>Added modification.diff, #15817
    Sun Jun 10 08:49:15 2012lipkAttached File-=>Added modification.diff, #15812
    Sun Jun 10 08:40:57 2012lipkAttached File-=>Added modification.diff, #15811
    Fri Jun 8 13:05:55 2012lipkAttached File-=>Added modification.diff, #15805
    Tue May 29 13:47:21 2012lipkAttached File-=>Added modification.diff, #15786
    Mon May 28 18:34:35 2012lipkAttached File-=>Added modifications_wiki.txt, #15784
    Mon May 28 18:34:34 2012lipkAttached File-=>Added modification.diff, #15783
    Sun May 27 18:44:06 2012lipkAttached File-=>Added modification.diff, #15780
    Tue May 22 10:51:17 2012lipkAttached File-=>Added modification.diff, #15770
    Mon May 21 19:11:33 2012lipkAttached File-=>Added modification.diff, #15760
    Sun May 20 11:47:34 2012lipkAttached File-=>Added modification.diff, #15752
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup