bugFreeciv - Bugs: bug #20964, player_invention_reachable()...

 
 
Show feedback again

bug #20964: player_invention_reachable() allow_prereqs mess

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Fri 12 Jul 2013 07:59:59 AM UTC  
 
Category: clientSeverity: 3 - Normal
Priority: 5 - NormalStatus: Duplicate
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
Planned Release: 

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 11 Jan 2014 12:05:23 PM UTC, comment #2:

> I think patch #4397 has dealt with this ticket?


Yes.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 11 Jan 2014 11:55:04 AM UTC, comment #1:

I think patch #4397 has dealt with this ticket?

Jacob Nevins <jtn>
Project Administrator
Fri 12 Jul 2013 07:59:59 AM UTC, original submission:

What is supposed to be the function of "allow_prereqs" parameter to player_invention_reachable()?

Function header says: "Returns TRUE iff the given tech is ever reachable by the given player by checking tech tree limitations. If allow_prereqs is TRUE check if the player can ever reach this tech." i.e, function always checks if tech is ever reachable, and does the same thing if allow_prereqs is TRUE?

Reading the code, the only difference allow_prereq does (sans different implementation that is logically equivalent) is that any root req must be already known if it's not set, but reachability is enough when it's set. For other requirements reachability is always enough.

I think most (all?) callers that have allow_prereq set to FALSE are in error. Why wouldn't reachability be enough for root_req if at the same time it's enough for other reqs?

One interesting caller is research dialog. Toggle between showing all or only reachable techs was originally meant for distinct tech trees - to show only current player's tree or entire tree. Now it never shows other trees, but toggles between showing player's entire tree or only those parts for which root_req is already known.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 11 Jan 2014 12:05:23 PM UTCcazfiCategoryNone=>client
      StatusNone=>Duplicate
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup