Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12584) gtk2: add-first-after-buy misbehaviour
Home

[Freeciv-Dev] (PR#12584) gtk2: add-first-after-buy misbehaviour

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bh@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#12584) gtk2: add-first-after-buy misbehaviour
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Mar 2005 19:49:05 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12584 >

> [jdorje - Tue Mar 22 03:47:46 2005]:
> 
> > [bhudson - Tue Mar 22 03:40:16 2005]:
> > 
> > If I buy a building then add-first, the thing I bought gets duplicated
> > on the worklist.
> > 
> > There are two ways to fix this bug: 
> > - complain "can't change after buying this turn"
> > - add-next instead
> > 
> > I slightly prefer the latter.
> 
> This is unfortunately rather hard to fix since the operation (as sent to
> the server) is not atomic.  The client (in citydlg_common) changes the
> build target, and changes the worklist.  Then it sends the new build
> target and the new worklist.  The build-target change fails but the
> worklist change succeeds.
> 
> To solve this the client needs to detect the error itself.  This may
> mean moving some code from cityhand/cityturn.c into common/city.c.

Oh, or we can use the Vasco solution: queues.  The current production
becomes the first element of the worklist (queue) rather than a separate
value.  This makes some things easier, and others harder...naturally.

-jason




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