[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-05 Thread Jacob Nevins
Update of bug #21425 (project freeciv):

  Status:  Ready For Test = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-03 Thread Jacob Nevins
Follow-up Comment #1, bug #21425 (project freeciv):

If nreqs are used for this instead (as is conventional in effects.ruleset),
the American clause doesn't appear at all, so old code didn't display
misleading information and behaviour after this patch is no different.

nreqs and present=FALSE are supposed to be equivalent, so I'm not sure about
having the client display them differently.
On the other hand, I can see a use for letting ruleset authors decide which
requirements are important to display in the client UI, otherwise complex
conditions could have confusing descriptions when the client tries to describe
them (imagine if the whole Factory/Plant/Recycling condition mess was
displayed in full in bonuses like this).
On the gripping hand, we've no intention of providing nreqs for things other
than effects, so ruleset authors won't have the option of using this hint
there. If we think such a hint would be useful, it probably wants to be a new
requirement field hidden or something.

So I'm now unsure whether I will proceed with this patch, or make a simpler
one that simply discards all !present requirements to make the display
equivalent to nreqs.

___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-03 Thread Jacob Nevins
Update of bug #21425 (project freeciv):

  Status: In Progress = Ready For Test 
 Planned Release: = 2.4.2,2.5.0,2.6.0  

___

Follow-up Comment #2:

New, much simpler patch per comment #1 -- this is what I propose to commit.
Bits of the old one have ended up in other tickets.

(file #19648, file #19649, file #19650)
___

Additional Item Attachment:

File name: trunk-negated-reqs-city-dialog-bis.patch Size:0 KB
File name: S2_5-negated-reqs-city-dialog-bis.patch Size:0 KB
File name: S2_4-negated-reqs-city-dialog-bis.patch Size:0 KB


___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-02 Thread Jacob Nevins
URL:
  http://gna.org/bugs/?21425

 Summary: Correct display of city output bonuses in the
presence of negated requirements
 Project: Freeciv
Submitted by: jtn
Submitted on: Fri Jan  3 04:33:48 2014
Category: client
Severity: 3 - Normal
Priority: 5 - Normal
  Status: In Progress
 Assigned to: jtn
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: Any
 Planned Release: 

___

Details:

The city dialog output popup (get_city_dialog_output_text()) gives misleading
output in the presence of negated requirements.

Tested by adding the following to classic/effects.ruleset (not a social
comment, just easy to test):


 [effect_palace_5]
 type = Output_Bonus
 value  = 75
 reqs =
 { type, name, range, present
   Gov, Despotism, Player, TRUE
   Building, Palace, City, TRUE
   OutputType, Shield, Local, TRUE
+  Nation, American, Player, FALSE
 }


With the fix, result if we pick a nation that's not American:


  +3 : Citizens
  +2 : Bonus from Despotism+Palace+Shield+!American (+75%)
 : Adds up to 
   5 : Total surplus


If we're American, the line doesn't appear at all.

(Using programmer-ish ! to indicate negation is a bit naff but I couldn't
think of anything better yet succinct. It's marked for i18n, so translators
can use ¬ or whatever if they want.)

While I'm in there, fix universal_name_translation() for VUT_MAXTILEUNITS to
be more succinct (and fix i18n plural issues).




___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-02 Thread Jacob Nevins
Additional Item Attachment, bug #21425 (project freeciv):

File name: trunk-negated-reqs-city-dialog.patch Size:12 KB


___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev


[Freeciv-Dev] [bug #21425] Correct display of city output bonuses in the presence of negated requirements

2014-01-02 Thread Jacob Nevins
Update of bug #21425 (project freeciv):

  Depends on: = bugs #21417


___

Reply to this item at:

  http://gna.org/bugs/?21425

___
  Message sent via/by Gna!
  http://gna.org/


___
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev