[Freeciv-Dev] [bug #18816] When you lose a technology, cities check doesn't count on upgradable productions

2012-06-24 Thread Jacob Nevins
Follow-up Comment #5, bug #18816 (project freeciv):

OK, here's what I guess is going on here. (Sorry if you'd worked this out; I
finally got there.)
* You had a bunch of cities building Caravans.
* You got The Corporation. You won't be able to direct new cities to build
Caravans, but the existing ones are left as they are; there's no check on
productions at this point.
* You tried to get Genetic Engineering, but fumbled it. You never had it.
** However, as I noted in comment #1, forget_tech_transfered() is called. This
calls player_tech_lost().
*** That loops around all governments, unit activities, and city productions,
and aborts any that you wouldn't be able to start in your current situation.
This is done without reference to the specific tech you lost. In the case of
city productions, it chooses a replacement project with
choose_build_target().
*** So that includes the Caravan productions, even though (a) they're nothing
to do with Genetic Engineering, (b) the server would have upgraded them to
Freight the next turn.

Two things to fix:
* Trying to remove a tech the player never had. That just looks dangerous.
* However, that's not sufficient; had you been the donor of Genetic
Engineering you could genuinely have lost it and triggered this. Therefore,
the checks in player_tech_lost() need to be reviewed and unified somehow with
other server behaviour, particularly the end-turn production upgrade
behaviour.
** We don't want to just upgrade here and now; if we were doing that, we
should do it when we gained the tech. We just want to leave the existing
production alone.
** (I don't think anything other than production is actually affected, as I
suspect nothing other than actually losing techs can cause activities or
governments to become unavailable.)

___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2012-03-10 Thread Jacob Nevins
Follow-up Comment #4, bug #18816 (project freeciv):

Hmm. Originally I thought this looked similar to bug #18736. But I've now
worked out that that bites when a unit is obsoleted by one that costs more
shields; but Caravan and Freight in the experimental ruleset cost the same.

Actually, now I come to look at your logs, I see lots of (the Spanish version
of) [city] can't build Caravan. The required technology was lost. Which
looks rather different. (Notice that it's Caravan you can't build any more,
not Freight/Convoy.)

___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2011-10-25 Thread Jacob Nevins

Follow-up Comment #1, bug #18816 (project freeciv):

Can you explain the scenario in your screenshots more?

I can see that you stole Genetic Engineering from the Spanish, but you lost
it during the transfer (Too bad! You made a mistake transferring the tech %s
and lost it. -- presumably you had a non-zero techlost_recv) -- which,
looking at the code, I think means that you never got it at all (despite what
the messages imply).[*]

But that tech doesn't enable or obsolete any units, and doesn't obsolete any
buildings (I see you're playing what looks like the experimental ruleset, so
it enables Genetic Lab).

So I'm not quite sure I follow what behaviour you're seeing that you don't
expect.

Also, what version was this? 2.3.0?

[*] I notice that forget_tech_transfered() is called in the techlost_recv
case, and enacts all the consequences of removing a tech from a player that
doesn't have it. I haven't worked out if that's safe.

___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2011-10-25 Thread Jacob Nevins

Follow-up Comment #2, bug #18816 (project freeciv):

(This sounds a bit similar to bug #18736.)

___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2011-10-25 Thread Jordi Negrevernis i Font

Follow-up Comment #3, bug #18816 (project freeciv):

This is the experimental ruleset on S2_3.

I conquered a Spanish city, so i gained the Genetic Engineering.
But in the same turn, previously I also conquered another Spanish city and
this give me The Corporation.
So i did have cities producing caravans instead of freights...
So when forget_tech_transfered() was called it encountered cities producing
caravans which now it can't build...
So, instead of upgrading those caravan units to freights, it just removed and
begin building airports

And, yes, it seams similar to bug #18736.


___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2011-10-17 Thread Jordi Negrevernis i Font

URL:
  http://gna.org/bugs/?18816

 Summary: When you lose a technology, cities check doesn't
count on upgradable productions
 Project: Freeciv
Submitted by: jorneg
Submitted on: Mon Oct 17 23:59:20 2011
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
  Status: None
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Release: 
 Discussion Lock: Any
Operating System: None
 Planned Release: 

___

Details:


This is the situation:
You conquer a city, gain a new technology, and lose that technology...

The check to see if you can build the units or buildings of the lost
technology does not take into count that you can be producing an obsolete
unit... and instead of upgrading that production it just removes it.




___

File Attachments:


---
Date: Mon Oct 17 23:59:20 2011  Name: freeciv1.PNG  Size: 260kB   By: jorneg

http://gna.org/bugs/download.php?file_id=14224
---
Date: Mon Oct 17 23:59:20 2011  Name: freeciv2.PNG  Size: 326kB   By: jorneg

http://gna.org/bugs/download.php?file_id=14225

___

Reply to this item at:

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

___
  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 #18816] When you lose a technology, cities check doesn't count on upgradable productions

2011-10-17 Thread Jordi Negrevernis i Font

Additional Item Attachment, bug #18816 (project freeciv):

File name: freeciv3.PNG   Size:522 KB


___

Reply to this item at:

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

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


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