[Freeciv-Dev] bug/fix: worklists and spaceship parts (PR#557)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Worklists don't work properly when building spaceship parts: when a city
finishes building a spaceship part, the city keeps building the same
part regardless of any worklist. Fixed by attached patch.
-- David
--- freeciv-cvs/server/cityturn.c Fri Sep 1 00:47:36 2000
+++ freeciv-mod/server/cityturn.c Sun Sep 10 17:32:19 2000
@@ -1326,13 +1326,17 @@
send_spaceship_info(pplayer, 0);
} else {
city_refresh(pcity);
- /* If there's something in the worklist, change the build target. */
- if (!worklist_change_build_target(pplayer, pcity)) {
- /* Fall back to the good old ways. */
- freelog(LOG_DEBUG, "Trying advisor_choose_build.");
- advisor_choose_build(pplayer, pcity);
- freelog(LOG_DEBUG, "Advisor_choose_build didn't kill us.");
- }
+ }
+ /* If there's something in the worklist, change the build target.
+ * Else if just built a spaceship part, keep building the same part.
+ * (Fixme? - doesn't check whether spaceship part is still sensible.)
+ * Else co-opt AI routines as "city advisor".
+ */
+ if (!worklist_change_build_target(pplayer, pcity) && !space_part) {
+ /* Fall back to the good old ways. */
+ freelog(LOG_DEBUG, "Trying advisor_choose_build.");
+ advisor_choose_build(pplayer, pcity);
+ freelog(LOG_DEBUG, "Advisor_choose_build didn't kill us.");
}
}
} else {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] bug/fix: worklists and spaceship parts (PR#557),
David Pfitzner <=
|
|