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 15 May 2012 07:38:58 AM UTC  
 
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 25 Sep 2012 05:42:19 PM UTC, SVN revision 55412:

Applied patch #3297

(Browse SVN revision 55412)

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

Final version.

(file #16603)

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

An update to compile with latest svn.

(file #16600)

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

Debug messages.

(file #16424)

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

Yet another update, featuring "Restore Defaults".

(file #16377)

B. Lipka <lipk>
Project MemberIn charge of this item.
Sun 29 Jul 2012 06:54:33 PM UTC, 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 23 Jul 2012 08:20:37 PM UTC, 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 10 Jul 2012 09:46:40 AM UTC, 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 08 Jul 2012 01:45:14 PM UTC, 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 07 Jul 2012 02:39:10 PM UTC, comment #16:

Replaced all occurrences of the foreach macro with BOOST_FOREACH.

(file #16003)

B. Lipka <lipk>
Project MemberIn charge of this item.
Wed 04 Jul 2012 08:48:56 AM UTC, 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 30 Jun 2012 07:14:26 PM UTC, comment #14:

Now really removed trailing whitespaces.

(file #15940)

B. Lipka <lipk>
Project MemberIn charge of this item.
Thu 14 Jun 2012 05:29:09 PM UTC, 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 10 Jun 2012 08:49:15 AM UTC, comment #12:

...and removed trailing whitespace.

(file #15812)

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

Removed most long lines, added a lot of comments.

(file #15811)

B. Lipka <lipk>
Project MemberIn charge of this item.
Fri 08 Jun 2012 01:05:55 PM UTC, 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 06 Jun 2012 10:49:28 PM UTC, 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 29 May 2012 01:47:21 PM UTC, 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 28 May 2012 06:34:35 PM UTC, 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 28 May 2012 03:44:12 PM UTC, 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 27 May 2012 06:44:06 PM UTC, 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 22 May 2012 10:51:17 AM UTC, 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 21 May 2012 07:11:33 PM UTC, 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 20 May 2012 11:47:34 AM UTC, 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 18 May 2012 12:05:03 PM UTC, 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 15 May 2012 07:38:58 AM UTC, 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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 25 latest changes.

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

    Back to the top


    Powered by Savane 3.1-cleanup