[Freeciv-Dev] [PATCH] duplicate specialists automatically
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
I actually want this client setting, but I'm not familiar with UI.
------------------------------------------------------------------------
.-----. .---------. .------. .---------.
New specialist is ( Elvis ) ( Scientist ) ( Taxman ) ( Duplicate )
`-----' `---------' `------' `---------'
If you select one of Elvis, Scientis or Taxman and when city
grows or you adjust workers new specialists are the ones you
selected. If you chose Duplicate you get more of the left ones.
Ie, if you have only taxmen you get taxmen, if you have
scientists and taxmen you get scientists and if you have one
elvis or more you get elvis'.
------------------------------------------------------------------------
This patch changes the default action to duplicate.
--
//Markus
1999-01-31 Markus Linnala <maage@xxxxxxxxx>
* server/cityhand.c (handle_city_make_specialist),
server/cityturn.c (add_adjust_workers): New specialist is taxman
if there is only taxmen or scientist if there is scientists but no
elvis'.
Index: cityturn.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityturn.c,v
retrieving revision 1.48
diff -u -r1.48 cityturn.c
--- cityturn.c 1999/01/28 11:14:35 1.48
+++ cityturn.c 1999/01/31 02:51:36
@@ -643,7 +643,15 @@
worker_loop(pcity, &foodneed, &prodneed, &toplace);
- pcity->ppl_elvis+=toplace;
+ /* if we have only taxmen new specialists are also taxmen */
+ if (pcity->ppl_elvis == 0 && pcity->ppl_scientist == 0 && pcity->ppl_taxman
> 0)
+ pcity->ppl_taxman+=toplace;
+ /* or if we don't have elvis then choose scientists */
+ else if (pcity->ppl_elvis == 0 && pcity->ppl_scientist > 0)
+ pcity->ppl_scientist+=toplace;
+ else
+ pcity->ppl_elvis+=toplace;
+
return 1;
}
Index: cityhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/cityhand.c,v
retrieving revision 1.35
diff -u -r1.35 cityhand.c
--- cityhand.c 1999/01/30 03:34:27 1.35
+++ cityhand.c 1999/01/31 02:51:36
@@ -285,7 +285,16 @@
}
if (is_worker_here(pcity, preq->worker_x, preq->worker_y) == C_TILE_WORKER) {
set_worker_city(pcity, preq->worker_x, preq->worker_y, C_TILE_EMPTY);
- pcity->ppl_elvis++;
+
+ /* if we have only taxmen new specialists are also taxmen */
+ if (pcity->ppl_elvis == 0 && pcity->ppl_scientist == 0 &&
pcity->ppl_taxman > 0)
+ pcity->ppl_taxman++;
+ /* or if we don't have elvis then choose scientists */
+ else if (pcity->ppl_elvis == 0 && pcity->ppl_scientist > 0)
+ pcity->ppl_scientist++;
+ else
+ pcity->ppl_elvis++;
+
city_refresh(pcity);
send_adjacent_cities(pcity);
send_city_info(pplayer, pcity, 0);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] [PATCH] duplicate specialists automatically,
Markus Linnala <=
|
|