Follow-up Comment #7, bug #14037 (project freeciv): rework changing of homecity / rehome of units and cities
* rename transfer_unit() to rehome_unit() * merge transfer_city() and transfer_city_units() * no more teleport of units! some definitions for different functions: unit_change_homecity_handling(): - change homecity of the unit - takes care of owner - does NOT move the unit handle_unit_change_homecity(): - change homecity of a unit - only checks if unit exists - calls unit_change_homecity_handling() ai_unit_make_homecity(): - calls handle_unit_change_homecity() execute_orders(): - calls handle_unit_change_homecity() transfer_city(): - transfers a city from one player to another - units further away than distance given by kill_outside are killed - possibility to also transfer all units to the new owner - default: transfer only units at the city tile - search new homecity for all supported units not on the city tile unit_enter_city(): - call to transfer_city() remove_city() - rehome all units and kill the city rehome_unit() - change homecity of unit to another city of the player - the current homecity is NOT considered > But, to answer you, I don't think in any case an unit have to > be moved. For me the transfer_unit() would take only the unit > argument and look like: > > if find a new possible homecity { > change_homecity(); > return TRUE; > } else { > wipe_up(); > return FALSE; > } I decided to change it to a homeless unit. If no possible homecity can be found, the current homecity is the last city of this player ... This patch also solves bug #14017 (file #6360) _______________________________________________________ Additional Item Attachment: File name: 0001-rework-changing-of-homecity-rehome-of-units-and-ci.patch Size:33 KB _______________________________________________________ Reply to this item at: <http://gna.org/bugs/?14037> _______________________________________________ Nachricht geschickt von/durch Gna! http://gna.org/ _______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev