Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2002:
[Freeciv-Dev] Re: Civserver upgrade building (PR#1585)
Home

[Freeciv-Dev] Re: Civserver upgrade building (PR#1585)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Joona Kiiski <freeciv-dev@xxxxxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Civserver upgrade building (PR#1585)
From: Daniel L Speyer <dspeyer@xxxxxxxxxxx>
Date: Mon, 17 Jun 2002 16:23:51 -0400 (EDT)

On Mon, 17 Jun 2002, Joona Kiiski wrote:

> On Mon, Jun 17, 2002 at 12:55:11PM -0700, dspeyer@xxxxxxxxxxx wrote:
> > Full_Name: Daniel Speyer
> > Version: CVS 
> > Distribution: Built from source
> > Client: Both (or N/A)
> > OS: Gnu/Linux -- Debian woody
> > Submission from: (NULL) (12.243.200.32)
> > 
> > 
> > If you develope musketeers before pikemen, your cities will continue to 
> > build
> > phalanxes.  This can be very annoying.  This patch should fix it (apply to
> > freeciv/server/cityturn.c):
> > 
> 
> This topic has been discussed before. And there are situations when
> you might want to build phalanx instead of musketeer (because it is
> cheaper). I understand that current behaviour is a bit annoying... But you
> can use "change all"-command.
> 

If you're supposed to be able to build it, it should show up in the list
of things you can build.  And if we allow building obsolete units (which
might be a good idea), then we should *allow* it.

At present, you can build obsolete units only if they are indirectly
obsolete AND either you were building them before they became obsolete or
you captured a city building them.  This is particularly ugly and has
*never* gotten me an obsolete unit when I wanted one.

--Daniel Speyer
If you *don't* consider sharing information to be morally equivalent to 
kidnapping and murder on the high seas, you probably shouldn't use the
phrase "software piracy."

> > 
> > diff -u cityturn.c.old cityturn.c
> > --- cityturn.c.old      Mon Jun 17 15:40:04 2002
> > +++ cityturn.c  Mon Jun 17 15:41:09 2002
> > @@ -842,13 +842,13 @@
> >  **************************************************************************/
> >  static Unit_Type_id unit_upgrades_to(struct city *pcity, Unit_Type_id id)
> >  {
> > -  Unit_Type_id latest_ok = id;
> > -
> > -  if (!can_build_unit_direct(pcity, id))
> > -    return -1;
> > -  while(unit_type_exists(id = unit_types[id].obsoleted_by))
> > -    if (can_build_unit_direct(pcity, id))
> > +  Unit_Type_id latest_ok = -1;
> > +  
> > +  for(; unit_type_exists(id); id = unit_types[id].obsoleted_by){
> > +    if (can_build_unit_direct(pcity, id)){
> >        latest_ok = id;
> > +    }
> > +  }
> >  
> >    return latest_ok;
> >  }
> > 
> > 
> > 
> 
> -- 
> Joona Kiiski <joona.kiiski@xxxxxx>
> 
> 




[Prev in Thread] Current Thread [Next in Thread]