From: Erik V. <eri...@xs...> - 2011-08-15 17:24:08
|
Bill, Eclipse/Egit cannot load git patches, so for the time being I slightly prefer 'normal' patches. Git patches also work , but I have to load these from the command line. Erik. > -----Original Message----- > From: Bill Rosgen [mailto:ro...@gm...] > Sent: Monday, August 15, 2011 9:15 AM > To: Development list for Rails: an 18xx game > Subject: [Rails-devel] Patch: getName() in parser.GameOption and C&O > Home in 1830-Reading > > In the current development version I encounter two problems: > > 1) When creating a new game, the options (such as 1830 Variants) are > ignored. > > 2) In 1830-Reading, the C&O has no home. > > In the first case, it seems that when calling GameOption.getName() the > returned string is "null" for any option that is not a parametrized option (i.e. > pretty much anything that isn't UnlimitedTopTrains). This seems to happen > because at least as far back as commit dd14df the getName() function > returns the string parametrizedName, which is only non-null for > parametrized options. The attached patch fixes this by adding an explicit > check to test if parametrizedName is null, returning the regular name if it is. > I'm not sure if this is the best way to fix this, but it seems to work. > > The second problem seems to be a simple omission of 'Reading' from the list > of options when the C&O's home is specified. The attached patch adds > 'Reading' to the list of options for which the C&O's home appears in the usual > place. > > I've attached what I think is an "Eclipse format" patch. If you'd rather have a > "git format" patch, let me know: I can produce those too. > > Bill |